Sweden-Number/objects/dcvalues.c

431 lines
9.2 KiB
C
Raw Normal View History

Release 0.3.0 Fri Sep 3 11:52:18 1993 Bob Amstadt * [windows/timer.c] Changed to use CallWindowProc() rather directly calling callback. * [windows/event.c] Implemented SetCapture() and ReleaseCapture() * [windows/keyboard.c] Created stub for GetKeyState() * [objects/linedda.c] Created stub for LineDDA() * [if1632/callback.c] Created callback handler for LineDDA callback procedure. * [if1632/callback.c] Created FreeProcInstance() Fri Sep 3 08:36:52 1993 David Metcalfe * [loader/signal.c] Patch to and code for INT 1A Thu Sep 2 00:31:54 1993 Alexandre Julliard * [objects/font.c] [objects/text.c] More text support: implemented justification and underlining. * [windows/clipping.c] [objects/clipping.c] Moved low-level clipping functions to objects/clipping.c. * [windows/clipping.c] [windows/event.c] [windows/message.c] Implemented window update regions. * [windows/dc.c] [objects/dcvalues.c] Moved some device-independent DC functions to objects/dcvalues.c. * [windows/graphics.c] Implemented InvertRect() and GetPixel(). Sat Aug 28 08:40:23 1993 Eric Youngdale * [include/neexe.h] [loader/wine.c] Added code to handle relocation type 4. * [loader/signal.h] [loader/wine.c] [loader/selector.c] Added support for dos interrupts. Thu 26 Aug 19:15:00 1993 Eric Youngdale * [loader/selector.c] Fixed bug dealing with loading DLLs. Thu Aug 26 19:22:40 1993 Alexandre Julliard * [include/gdi.h] [objects/font.c] [windows/dc.c] Beginning of real font support. * [windows/graphics.c] Implemented PatBlt(). * [memory/global.c] Corrected a bug with linked list handling in GlobalAlloc(). * [objects/bitmap.c] Corrected a bug in BITMAP_SelectObject(). Tue Aug 24 19:22:40 1993 David Metcalfe * [controls/Command*] [controls/Label*] [controls[MenuButto*] [controls/SmeMenuButt*] Change code to support & as a special character in menu item text. Tue Aug 24 19:22:40 1993 Alexandre Julliard * [include/gdi.h] [windows/dc.c] Heavily modified the DC structure for better device-independence. * [objects/bitmap.c] Implemented bitmap dimensions. * [windows/dc.c] [windows/dce.c] Implemented DC state saving and restoring. * [windows/dc.c] Implemented ROP mode. * [windows/graphics.c] Implemented FillRect(). Mon Aug 23 22:08:34 1993 Bob Amstadt (bob at pooh) * [misc/xt.c] Fixed bug in InvalidateRect(). Solitaire attempted to clear window before it was realized. * [loader/resource.c] Began rewrite of LoadBitmap(). * [loader/wine.c] Fixed code which set Argv and Argc global variables. * [loader/selector.c] Added code to set up command line arguments. * [include/neexe.h] Fixed error in PSP structure. Tue Aug 17 20:41:12 1993 Alexandre Julliard * [include/gdi.h] [windows/dc.c] Implemented device capabilities. * [objects/region.c] Implemented EqualRgn() and CombineRgn(). * [windows/clipping.c] Implemented Save/RestoreVisRgn(). * [windows/graphics.c] Implemented PaintRgn() and FillRgn(). * [windows/mapping.c] Implemented mapping modes. Tue Aug 10 14:07:38 1993 Alexandre Julliard * [if1632/user.spec] [misc/rect.c] Implemented rectangle API functions. * [if1632/gdi.spec] [include/gdi.h] [objects/region.c] Implemented regions. * [windows/class.c] Corrected a typo in UnregisterClass(). * [windows/clipping.c] [windows/dc.c] Implemented DC clipping and visible region. Tue Aug 10 20:57:56 1993 Bob Amstadt (bob at pooh) * [controls/menu.c] [windows/win.c] SetMenu(), GetMenu(), CheckMenuItem() implemented Thu Aug 5 22:33:22 1993 Bob Amstadt (bob at pooh) * [controls/menu.c] [windows/win.c] Many improvements menus. LoadMenu() should work. Wed Aug 4 14:55:36 1993 Alexandre Julliard * [objects/dib.c] Started the implementation of device-independent bitmaps. * [objects/bitmap.c] Added support for multiple bitmap depths. * [objects/brush.c] Implemented pattern brushes. * [windows/dc.c] [windows/graphics.c] Implemented some GDI graphics primitives. Tue Aug 3 21:16:47 1993 Bob Amstadt (bob at pooh) * [controls/menu.c] [windows/win.c] [include/menu.h] Code to load class menus from executable file. * [if1632/user.spec] Fixed specification of SendMessage() and PostMessage. Mon Jul 26 21:53:24 1993 Alexandre Julliard * [if1632/call.S] Corrected a bug in KERNEL_InitTask(). * [include/windows.h] Added a lot of constants. * [loader/selector.c] Corrected a bug in segment allocation in CreateSelectors(). * [objects/bitmap.c] Implemented SelectObject() for bitmaps. * [objects/brush.c] Implemented hatched brushes and SelectObject(). * [objects/gdiobj.c] Removed linked list (not needed). * [objects/palette.c] Implemented system palette creation and misc. palette API functions. * [windows/timer.c] Implemented timers. * [windows/dc.c] Implemented memory device contexts. Tue Jul 20 10:38:59 1993 Bob Amstadt (bob at pooh) * [dos.c] Split DOS3Call() out of kernel.c. Added support for get date and time functions. * [call.S] Added function ReturnFromRegisterFunc() to allow DOS calls to return values in registers. * [regfunc.h] Macros to access registers saved on stack. Tue Jul 20 10:38:59 1993 Alexandre Julliard * [win.c] Corrected allocation of the WM_CREATE data structure. * [dce.c] [dce.h] Implemented DCE handling. * [bitmap.c] [brush.c] [dc.c] [font.c] [gdi.h] [gdi.spec] [gdiobj.c] [palette.c] [pen.c] Implemented the GDI objects data structures and allocation. * [windows.h] Added several structures and constants for GDI objects. Mon Jul 19 12:51:10 1993 Bob Amstadt (bob at pooh) * [ldtlib.c] Modified system calls to match Linus' new interface for the LDT modification. * [win.c] Fixed bug with WM_CREATE message. * [heap.c] [kernel.spec] Completed local heap allocation functions. * [global.c] Created function GlobalQuickAlloc() for easy allocation from DLLs
1993-09-04 12:09:32 +02:00
/*
* DC device-independent Get/SetXXX functions
*
* Copyright 1993 Alexandre Julliard
Release 941210 Wed Dec 7 14:52:25 1994 Alexandre Julliard (julliard@lamisun.epfl.ch) * [controls/listbox.c] Fixed problems due to new scroll-bar code. * [loader/signal.c] [miscemu/ioports.c] Handle I/O opcodes that use an absolute address. * [objects/text.c] Implemented TabbedTextOut(). Sat Dec 3 18:53:08 1994 Kenneth MacDonald <K.MacDonald@ed.ac.uk> * [objects/metafile.c] Implemented GetMetafile(). Fixed bug in PlayMetaFile() when reading disc based metafile records. Added META_POLYPOLYGON, META_DELETEOBJECT and META_EOF to PlayMetaFileRecord(). Wed Nov 30 06:32:25 1994 Martin von Loewis (martin@cs.csufresno.edu) * [Imakefile] wine.sym: Remove gcc2_compiled and friends * [controls/listbox.c][if1632/relay.c][if1632/relay.c] [loader/resource.c][memory/heap.c][objects/dib.c][windows/dialog.c] Replace #ifdef DEBUG_XXX with if(debugging_xxx){ * [if1632/call.S] CallToLibMain: New function * [if1632/relay.c][include/options.h][misc/main.c] [miscemu/int1a.c][miscemu/int21.c][miscemu/kernel.c] removed Options.relay_debug * [include/heap.h] HEAP_OWNER: Use ds instead of cs:ip * [loader/ne_image.c] LoadNEImage: Remember current exe, handle nodata dlls InitNEDLL: handle nodata dlls, call CallToLibMain * [loader/selector.c] CreateSelectors: Initialize auto_data_sel with 0 * [memory/heap.c] HEAP_CheckHeap: Check prev HEAP_CheckLocalHeaps: new function * [misc/profile] Remember and dump only changed profiles * [tools/makedebug] Introduce debugging_xxx flags Sun Nov 27 23:13:22 MET 1994 <erik@xs4all.nl> * [clipboard.h color.h dc.h dos_fs.h event.h font.h graphics.h if1632.h kernel.h library.h miscemu.h ne_image.h nonclient.h pe_image.h selectors.h wintypes.h] Added. * [*/*] - Commented all 'static char copyright statements', see misc/main.c - moved prototypes to headers files, fixed wrong prototypes. - *please* add a header file for each .c if you need to export things. * [misc/main.c] Added one static string which list the names of the contributors. Fri Nov 25 16:24:27 MET 1994 Dag Asheim (dash@ifi.uio.no) * [Configure] Made the support for multiple languages more automatic. Added a [fonts] section to the wine.conf file. Made the defaults better. Generally cleaned it up. * [rc/sysres_No.rc] [rc/sysres_De.rc] [rc/sysres.c] Norwegian resources and small fixes to the german resources. Wed Nov 23 20:28:59 1994 Martin von Loewis (martin@cs.csufresno.edu) * [debugger/break.c] bark(), toggle_next(), should_continue(): New functions insert_break(): Fixed, adds write access to page before writing wine_bp.next_addr: new structure field * [debugger/dbg.y] Changed symbol's value to be it's value instead of the value pointed to by the symbol. Changed SIGTRAP handling to allow continuation after break point * [misc/shell.c] ShellAbout(): Load resource from memory
1994-12-10 14:02:28 +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
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Release 960712 Fri Jul 12 17:43:05 1996 Alexandre Julliard <julliard@lrc.epfl.ch> * [controls/scroll.c] Use Win32 heap functions to allocate scroll-bar info structure. * [debugger/dbg.y] [debugger/registers.c] Added support for FS and GS segment registers. Check that segment registers value are OK before returning from the signal handler. * [tools/build.c] [if1632/relay.c] [loader/builtin.c] Changed relay debugging for Win32 function: the relay code now passes the entry point address instead of the function name. * [tools/build.c] [miscemu/*.c] Added support for data entry points in Win32 DLLs. Added 'cdecl' function type for Win32. For 'register' function, the relay code now passes a pointer to the SIGCONTEXT structure. * [include/registers.h] [include/wine.h] Moved SIGCONTEXT structure definition in registers.h. * [loader/pe_image.c] Don't die at once if some Win32 entry points cannot be found, but set them to NULL, just like we do for Win16. This allows some programs to go further before crashing. * [loader/task.c] [loader/main.c] Moved global initializations from InitTask() to MAIN_Init(), as they no longer need a task context with the new SEGPTR heap functions. * [memory/string.c] Added lstrcpynAtoW and lstrcpynWtoA; not real API functions, but very convenient. * [windows/graphics.c] Partially implemented DrawEdge(). * [windows/timer.c] [windows/caret.c] Implemented Win32 timer handling. Updated caret management to use Win32 timers (avoids having to use a Win16 callback). * [windows/win.c] Prevent programs from setting some style bits with SetWindowLong(). This should fix some BadMatch crashes. Link new windows at the end of the linked list. * [windows/winpos.c] Don't try to activate a child window in ShowWindow(). * [windows/winproc.c] Added a 32->32 thunk to support Ansi-Unicode translation. Wed Jul 10 22:11:12 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [files/directory.c] Additional (undocumented) return value for GetTempDrive() added. * [files/dos_fs.c] [files/file.c] [include/windows.h] GetTempFileName32* added. GetShortPathName* added. * [memory/string.c] Win16 lstrcpy() can get NULL ptrs as argument and survive. * [misc/lzexpand.c] LZOpenFile(): also try opening with compressed filename if normal open fails. * [misc/ole2nls.c] [misc/lstr.c] [include/windows.h] Char* added. CompareString* added. Sun Jul 7 01:22:14 1996 Jukka Iivonen <iivonen@cc.helsinki.fi> * [objects/font.c] [if1632/gdi32.spec] CreateFontIndirect32A and CreateFontIndirect32W added. * [misc/ole2nls.c] GetUserDefaultLCID return values updated for new languages. Finnish support added for GetLocaleInfoA. * [object/palette] [gdi32.spec] RealizePalette32 and SelectPalette32 added. Sat Jul 6 17:27:30 1996 Ronan Waide <root@waider.ie> * [misc/shell.c] Fixup for SHELL_FindExecutable so that File->Run from progman works once more. Still needs some more fixups - grep for FIXME in this file.
1996-07-12 21:02:39 +02:00
*/
2001-07-24 02:58:52 +02:00
#include "config.h"
#include "winbase.h"
#include "winerror.h"
2002-11-21 22:50:04 +01:00
#include "wownt32.h"
2001-07-24 02:58:52 +02:00
Release 0.3.0 Fri Sep 3 11:52:18 1993 Bob Amstadt * [windows/timer.c] Changed to use CallWindowProc() rather directly calling callback. * [windows/event.c] Implemented SetCapture() and ReleaseCapture() * [windows/keyboard.c] Created stub for GetKeyState() * [objects/linedda.c] Created stub for LineDDA() * [if1632/callback.c] Created callback handler for LineDDA callback procedure. * [if1632/callback.c] Created FreeProcInstance() Fri Sep 3 08:36:52 1993 David Metcalfe * [loader/signal.c] Patch to and code for INT 1A Thu Sep 2 00:31:54 1993 Alexandre Julliard * [objects/font.c] [objects/text.c] More text support: implemented justification and underlining. * [windows/clipping.c] [objects/clipping.c] Moved low-level clipping functions to objects/clipping.c. * [windows/clipping.c] [windows/event.c] [windows/message.c] Implemented window update regions. * [windows/dc.c] [objects/dcvalues.c] Moved some device-independent DC functions to objects/dcvalues.c. * [windows/graphics.c] Implemented InvertRect() and GetPixel(). Sat Aug 28 08:40:23 1993 Eric Youngdale * [include/neexe.h] [loader/wine.c] Added code to handle relocation type 4. * [loader/signal.h] [loader/wine.c] [loader/selector.c] Added support for dos interrupts. Thu 26 Aug 19:15:00 1993 Eric Youngdale * [loader/selector.c] Fixed bug dealing with loading DLLs. Thu Aug 26 19:22:40 1993 Alexandre Julliard * [include/gdi.h] [objects/font.c] [windows/dc.c] Beginning of real font support. * [windows/graphics.c] Implemented PatBlt(). * [memory/global.c] Corrected a bug with linked list handling in GlobalAlloc(). * [objects/bitmap.c] Corrected a bug in BITMAP_SelectObject(). Tue Aug 24 19:22:40 1993 David Metcalfe * [controls/Command*] [controls/Label*] [controls[MenuButto*] [controls/SmeMenuButt*] Change code to support & as a special character in menu item text. Tue Aug 24 19:22:40 1993 Alexandre Julliard * [include/gdi.h] [windows/dc.c] Heavily modified the DC structure for better device-independence. * [objects/bitmap.c] Implemented bitmap dimensions. * [windows/dc.c] [windows/dce.c] Implemented DC state saving and restoring. * [windows/dc.c] Implemented ROP mode. * [windows/graphics.c] Implemented FillRect(). Mon Aug 23 22:08:34 1993 Bob Amstadt (bob at pooh) * [misc/xt.c] Fixed bug in InvalidateRect(). Solitaire attempted to clear window before it was realized. * [loader/resource.c] Began rewrite of LoadBitmap(). * [loader/wine.c] Fixed code which set Argv and Argc global variables. * [loader/selector.c] Added code to set up command line arguments. * [include/neexe.h] Fixed error in PSP structure. Tue Aug 17 20:41:12 1993 Alexandre Julliard * [include/gdi.h] [windows/dc.c] Implemented device capabilities. * [objects/region.c] Implemented EqualRgn() and CombineRgn(). * [windows/clipping.c] Implemented Save/RestoreVisRgn(). * [windows/graphics.c] Implemented PaintRgn() and FillRgn(). * [windows/mapping.c] Implemented mapping modes. Tue Aug 10 14:07:38 1993 Alexandre Julliard * [if1632/user.spec] [misc/rect.c] Implemented rectangle API functions. * [if1632/gdi.spec] [include/gdi.h] [objects/region.c] Implemented regions. * [windows/class.c] Corrected a typo in UnregisterClass(). * [windows/clipping.c] [windows/dc.c] Implemented DC clipping and visible region. Tue Aug 10 20:57:56 1993 Bob Amstadt (bob at pooh) * [controls/menu.c] [windows/win.c] SetMenu(), GetMenu(), CheckMenuItem() implemented Thu Aug 5 22:33:22 1993 Bob Amstadt (bob at pooh) * [controls/menu.c] [windows/win.c] Many improvements menus. LoadMenu() should work. Wed Aug 4 14:55:36 1993 Alexandre Julliard * [objects/dib.c] Started the implementation of device-independent bitmaps. * [objects/bitmap.c] Added support for multiple bitmap depths. * [objects/brush.c] Implemented pattern brushes. * [windows/dc.c] [windows/graphics.c] Implemented some GDI graphics primitives. Tue Aug 3 21:16:47 1993 Bob Amstadt (bob at pooh) * [controls/menu.c] [windows/win.c] [include/menu.h] Code to load class menus from executable file. * [if1632/user.spec] Fixed specification of SendMessage() and PostMessage. Mon Jul 26 21:53:24 1993 Alexandre Julliard * [if1632/call.S] Corrected a bug in KERNEL_InitTask(). * [include/windows.h] Added a lot of constants. * [loader/selector.c] Corrected a bug in segment allocation in CreateSelectors(). * [objects/bitmap.c] Implemented SelectObject() for bitmaps. * [objects/brush.c] Implemented hatched brushes and SelectObject(). * [objects/gdiobj.c] Removed linked list (not needed). * [objects/palette.c] Implemented system palette creation and misc. palette API functions. * [windows/timer.c] Implemented timers. * [windows/dc.c] Implemented memory device contexts. Tue Jul 20 10:38:59 1993 Bob Amstadt (bob at pooh) * [dos.c] Split DOS3Call() out of kernel.c. Added support for get date and time functions. * [call.S] Added function ReturnFromRegisterFunc() to allow DOS calls to return values in registers. * [regfunc.h] Macros to access registers saved on stack. Tue Jul 20 10:38:59 1993 Alexandre Julliard * [win.c] Corrected allocation of the WM_CREATE data structure. * [dce.c] [dce.h] Implemented DCE handling. * [bitmap.c] [brush.c] [dc.c] [font.c] [gdi.h] [gdi.spec] [gdiobj.c] [palette.c] [pen.c] Implemented the GDI objects data structures and allocation. * [windows.h] Added several structures and constants for GDI objects. Mon Jul 19 12:51:10 1993 Bob Amstadt (bob at pooh) * [ldtlib.c] Modified system calls to match Linus' new interface for the LDT modification. * [win.c] Fixed bug with WM_CREATE message. * [heap.c] [kernel.spec] Completed local heap allocation functions. * [global.c] Created function GlobalQuickAlloc() for easy allocation from DLLs
1993-09-04 12:09:32 +02:00
#include "gdi.h"
2001-07-24 02:58:52 +02:00
/***********************************************************************
* SetBkMode (GDI32.@)
1999-10-31 03:07:05 +01:00
*/
2001-07-24 22:54:30 +02:00
INT WINAPI SetBkMode( HDC hdc, INT mode )
{
INT ret;
DC *dc;
if ((mode <= 0) || (mode > BKMODE_LAST))
{
SetLastError(ERROR_INVALID_PARAMETER);
return 0;
}
if (!(dc = DC_GetDCPtr( hdc ))) return 0;
if (dc->funcs->pSetBkMode)
ret = dc->funcs->pSetBkMode( dc->physDev, mode );
2001-07-24 22:54:30 +02:00
else
{
ret = dc->backgroundMode;
dc->backgroundMode = mode;
}
GDI_ReleaseObj( hdc );
return ret;
}
1999-10-31 03:07:05 +01:00
/***********************************************************************
2001-07-24 02:58:52 +02:00
* SetROP2 (GDI32.@)
1999-10-31 03:07:05 +01:00
*/
2001-07-24 22:54:30 +02:00
INT WINAPI SetROP2( HDC hdc, INT mode )
{
INT ret;
DC *dc;
if ((mode < R2_BLACK) || (mode > R2_WHITE))
{
SetLastError(ERROR_INVALID_PARAMETER);
return 0;
}
if (!(dc = DC_GetDCPtr( hdc ))) return 0;
if (dc->funcs->pSetROP2)
ret = dc->funcs->pSetROP2( dc->physDev, mode );
2001-07-24 22:54:30 +02:00
else
{
ret = dc->ROPmode;
dc->ROPmode = mode;
}
GDI_ReleaseObj( hdc );
return ret;
}
1999-10-31 03:07:05 +01:00
/***********************************************************************
2001-07-24 22:54:30 +02:00
* SetRelAbs (GDI32.@)
1999-10-31 03:07:05 +01:00
*/
2001-07-24 22:54:30 +02:00
INT WINAPI SetRelAbs( HDC hdc, INT mode )
{
INT ret;
DC *dc;
if ((mode != ABSOLUTE) && (mode != RELATIVE))
{
SetLastError(ERROR_INVALID_PARAMETER);
return 0;
}
if (!(dc = DC_GetDCPtr( hdc ))) return 0;
if (dc->funcs->pSetRelAbs)
ret = dc->funcs->pSetRelAbs( dc->physDev, mode );
2001-07-24 22:54:30 +02:00
else
{
ret = dc->relAbsMode;
dc->relAbsMode = mode;
}
GDI_ReleaseObj( hdc );
return ret;
}
1999-10-31 03:07:05 +01:00
/***********************************************************************
2001-07-24 22:54:30 +02:00
* SetPolyFillMode (GDI32.@)
1999-10-31 03:07:05 +01:00
*/
2001-07-24 22:54:30 +02:00
INT WINAPI SetPolyFillMode( HDC hdc, INT mode )
{
INT ret;
DC *dc;
if ((mode <= 0) || (mode > POLYFILL_LAST))
{
SetLastError(ERROR_INVALID_PARAMETER);
return 0;
}
if (!(dc = DC_GetDCPtr( hdc ))) return 0;
if (dc->funcs->pSetPolyFillMode)
ret = dc->funcs->pSetPolyFillMode( dc->physDev, mode );
2001-07-24 22:54:30 +02:00
else
{
ret = dc->polyFillMode;
dc->polyFillMode = mode;
}
GDI_ReleaseObj( hdc );
return ret;
}
1999-10-31 03:07:05 +01:00
/***********************************************************************
2001-07-24 22:54:30 +02:00
* SetStretchBltMode (GDI32.@)
1999-10-31 03:07:05 +01:00
*/
2001-07-24 22:54:30 +02:00
INT WINAPI SetStretchBltMode( HDC hdc, INT mode )
{
INT ret;
DC *dc;
if ((mode <= 0) || (mode > MAXSTRETCHBLTMODE))
{
SetLastError(ERROR_INVALID_PARAMETER);
return 0;
}
if (!(dc = DC_GetDCPtr( hdc ))) return 0;
if (dc->funcs->pSetStretchBltMode)
ret = dc->funcs->pSetStretchBltMode( dc->physDev, mode );
2001-07-24 22:54:30 +02:00
else
{
ret = dc->stretchBltMode;
dc->stretchBltMode = mode;
}
GDI_ReleaseObj( hdc );
return ret;
}
1999-10-31 03:07:05 +01:00
/***********************************************************************
2001-07-24 22:54:30 +02:00
* GetBkColor (GDI32.@)
1999-10-31 03:07:05 +01:00
*/
2001-07-24 22:54:30 +02:00
COLORREF WINAPI GetBkColor( HDC hdc )
{
COLORREF ret = 0;
DC * dc = DC_GetDCPtr( hdc );
if (dc)
{
ret = dc->backgroundColor;
GDI_ReleaseObj( hdc );
}
return ret;
}
1999-10-31 03:07:05 +01:00
/***********************************************************************
2001-07-24 22:54:30 +02:00
* GetBkMode (GDI32.@)
1999-10-31 03:07:05 +01:00
*/
2001-07-24 22:54:30 +02:00
INT WINAPI GetBkMode( HDC hdc )
{
INT ret = 0;
DC * dc = DC_GetDCPtr( hdc );
if (dc)
{
ret = dc->backgroundMode;
GDI_ReleaseObj( hdc );
}
return ret;
}
1999-10-31 03:07:05 +01:00
/***********************************************************************
2001-07-24 22:54:30 +02:00
* GetMapMode (GDI32.@)
1999-10-31 03:07:05 +01:00
*/
2001-07-24 22:54:30 +02:00
INT WINAPI GetMapMode( HDC hdc )
{
INT ret = 0;
DC * dc = DC_GetDCPtr( hdc );
if (dc)
{
ret = dc->MapMode;
GDI_ReleaseObj( hdc );
}
return ret;
}
1999-10-31 03:07:05 +01:00
/***********************************************************************
2001-07-24 22:54:30 +02:00
* GetPolyFillMode (GDI32.@)
1999-10-31 03:07:05 +01:00
*/
2001-07-24 22:54:30 +02:00
INT WINAPI GetPolyFillMode( HDC hdc )
{
INT ret = 0;
DC * dc = DC_GetDCPtr( hdc );
if (dc)
{
ret = dc->polyFillMode;
GDI_ReleaseObj( hdc );
}
return ret;
}
1999-10-31 03:07:05 +01:00
/***********************************************************************
2001-07-24 22:54:30 +02:00
* GetROP2 (GDI32.@)
1999-10-31 03:07:05 +01:00
*/
2001-07-24 22:54:30 +02:00
INT WINAPI GetROP2( HDC hdc )
{
INT ret = 0;
DC * dc = DC_GetDCPtr( hdc );
if (dc)
{
ret = dc->ROPmode;
GDI_ReleaseObj( hdc );
}
return ret;
}
1999-10-31 03:07:05 +01:00
/***********************************************************************
2001-07-24 22:54:30 +02:00
* GetStretchBltMode (GDI32.@)
1999-10-31 03:07:05 +01:00
*/
2001-07-24 22:54:30 +02:00
INT WINAPI GetStretchBltMode( HDC hdc )
{
INT ret = 0;
DC * dc = DC_GetDCPtr( hdc );
if (dc)
{
ret = dc->stretchBltMode;
GDI_ReleaseObj( hdc );
}
return ret;
}
1999-10-31 03:07:05 +01:00
/***********************************************************************
2001-07-24 22:54:30 +02:00
* GetTextColor (GDI32.@)
1999-10-31 03:07:05 +01:00
*/
2001-07-24 22:54:30 +02:00
COLORREF WINAPI GetTextColor( HDC hdc )
{
COLORREF ret = 0;
DC * dc = DC_GetDCPtr( hdc );
if (dc)
{
ret = dc->textColor;
GDI_ReleaseObj( hdc );
}
return ret;
}
1999-10-31 03:07:05 +01:00
/***********************************************************************
2001-07-24 22:54:30 +02:00
* GetTextAlign (GDI32.@)
1999-10-31 03:07:05 +01:00
*/
2001-07-24 22:54:30 +02:00
UINT WINAPI GetTextAlign( HDC hdc )
{
UINT ret = 0;
DC * dc = DC_GetDCPtr( hdc );
if (dc)
{
ret = dc->textAlign;
GDI_ReleaseObj( hdc );
}
return ret;
}
1999-10-31 03:07:05 +01:00
/***********************************************************************
2001-07-24 22:54:30 +02:00
* GetArcDirection (GDI32.@)
1999-10-31 03:07:05 +01:00
*/
2001-07-24 22:54:30 +02:00
INT WINAPI GetArcDirection( HDC hdc )
{
INT ret = 0;
DC * dc = DC_GetDCPtr( hdc );
if (dc)
{
ret = dc->ArcDirection;
GDI_ReleaseObj( hdc );
}
return ret;
}
1999-10-31 03:07:05 +01:00
/***********************************************************************
2001-07-24 22:54:30 +02:00
* GetGraphicsMode (GDI32.@)
1999-10-31 03:07:05 +01:00
*/
2001-07-24 22:54:30 +02:00
INT WINAPI GetGraphicsMode( HDC hdc )
{
INT ret = 0;
DC * dc = DC_GetDCPtr( hdc );
if (dc)
{
ret = dc->GraphicsMode;
GDI_ReleaseObj( hdc );
}
return ret;
}
1999-10-31 03:07:05 +01:00
/***********************************************************************
2001-07-24 22:54:30 +02:00
* GetBrushOrgEx (GDI32.@)
1999-10-31 03:07:05 +01:00
*/
2001-07-24 22:54:30 +02:00
BOOL WINAPI GetBrushOrgEx( HDC hdc, LPPOINT pt )
{
DC * dc = DC_GetDCPtr( hdc );
if (!dc) return FALSE;
pt->x = dc->brushOrgX;
pt->y = dc->brushOrgY;
GDI_ReleaseObj( hdc );
return TRUE;
}
1999-10-31 03:07:05 +01:00
/***********************************************************************
2001-07-24 22:54:30 +02:00
* GetCurrentPositionEx (GDI32.@)
1999-10-31 03:07:05 +01:00
*/
2001-07-24 22:54:30 +02:00
BOOL WINAPI GetCurrentPositionEx( HDC hdc, LPPOINT pt )
{
DC * dc = DC_GetDCPtr( hdc );
if (!dc) return FALSE;
pt->x = dc->CursPosX;
pt->y = dc->CursPosY;
GDI_ReleaseObj( hdc );
return TRUE;
}
1999-10-31 03:07:05 +01:00
/***********************************************************************
2001-07-24 22:54:30 +02:00
* GetViewportExtEx (GDI32.@)
1999-10-31 03:07:05 +01:00
*/
2001-07-24 22:54:30 +02:00
BOOL WINAPI GetViewportExtEx( HDC hdc, LPSIZE size )
{
DC * dc = DC_GetDCPtr( hdc );
if (!dc) return FALSE;
size->cx = dc->vportExtX;
size->cy = dc->vportExtY;
GDI_ReleaseObj( hdc );
return TRUE;
}
1999-10-31 03:07:05 +01:00
/***********************************************************************
2001-07-24 22:54:30 +02:00
* GetViewportOrgEx (GDI32.@)
1999-10-31 03:07:05 +01:00
*/
2001-07-24 22:54:30 +02:00
BOOL WINAPI GetViewportOrgEx( HDC hdc, LPPOINT pt )
{
DC * dc = DC_GetDCPtr( hdc );
if (!dc) return FALSE;
pt->x = dc->vportOrgX;
pt->y = dc->vportOrgY;
GDI_ReleaseObj( hdc );
return TRUE;
}
1999-10-31 03:07:05 +01:00
/***********************************************************************
2001-07-24 22:54:30 +02:00
* GetWindowExtEx (GDI32.@)
1999-10-31 03:07:05 +01:00
*/
2001-07-24 22:54:30 +02:00
BOOL WINAPI GetWindowExtEx( HDC hdc, LPSIZE size )
{
DC * dc = DC_GetDCPtr( hdc );
if (!dc) return FALSE;
size->cx = dc->wndExtX;
size->cy = dc->wndExtY;
GDI_ReleaseObj( hdc );
return TRUE;
}
1999-10-31 03:07:05 +01:00
/***********************************************************************
2001-07-24 22:54:30 +02:00
* GetWindowOrgEx (GDI32.@)
1999-10-31 03:07:05 +01:00
*/
2001-07-24 22:54:30 +02:00
BOOL WINAPI GetWindowOrgEx( HDC hdc, LPPOINT pt )
{
DC * dc = DC_GetDCPtr( hdc );
if (!dc) return FALSE;
pt->x = dc->wndOrgX;
pt->y = dc->wndOrgY;
GDI_ReleaseObj( hdc );
return TRUE;
}
/**** 16-bit functions ***/
2001-07-24 02:58:52 +02:00
/***********************************************************************
* InquireVisRgn (GDI.131)
2001-07-24 02:58:52 +02:00
*/
2001-07-24 22:54:30 +02:00
HRGN16 WINAPI InquireVisRgn16( HDC16 hdc )
{
HRGN16 ret = 0;
2002-11-21 22:50:04 +01:00
DC * dc = DC_GetDCPtr( HDC_32(hdc) );
2001-07-24 22:54:30 +02:00
if (dc)
{
2002-11-21 22:50:04 +01:00
ret = HRGN_16(dc->hVisRgn);
GDI_ReleaseObj( HDC_32(hdc) );
2001-07-24 22:54:30 +02:00
}
return ret;
}
2001-07-24 02:58:52 +02:00
/***********************************************************************
2001-07-24 22:54:30 +02:00
* GetClipRgn (GDI.173)
2001-07-24 02:58:52 +02:00
*/
2001-07-24 22:54:30 +02:00
HRGN16 WINAPI GetClipRgn16( HDC16 hdc )
{
HRGN16 ret = 0;
2002-11-21 22:50:04 +01:00
DC * dc = DC_GetDCPtr( HDC_32(hdc) );
2001-07-24 22:54:30 +02:00
if (dc)
{
2002-11-21 22:50:04 +01:00
ret = HRGN_16(dc->hClipRgn);
GDI_ReleaseObj( HDC_32(hdc) );
2001-07-24 22:54:30 +02:00
}
return ret;
}