ReactOS 0.4.15-dev-8116-gf69e256
dxeng.c
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS Win32 Subsystem
3 * LICENSE: GPL - See COPYING in the top level directory
4 * FILE: win32ss/reactx/ntddraw/dxeng.c
5 * PURPOSE: Implementation of DxEng functions
6 * PROGRAMMERS: Magnus Olsen (magnus@greatlord.com)
7 * Oleg Dubinskiy (oleg.dubinskij30@gmail.com)
8 */
9
10#include <win32k.h>
11
12// #define NDEBUG
13#include <debug.h>
14
16
19{
20 {0, (PFN) NULL},
63};
64
65/*++
66* @name DxEngDispUniq
67* @implemented
68*
69* The function DxEngDispUniq returns the DisplayUniqVisrgn counter value from GDI shared memory
70*
71* @return
72* Returns the DisplayUniqVisrgn counter value from GDI shared memory
73*
74* @remarks.
75* none
76*
77*--*/
81{
82 DPRINT("ReactX Calling : DxEngDispUniq\n");
83 return GdiHandleTable->flDeviceUniq;
84}
85
86/*++
87* @name DxEngGetDeviceGammaRamp
88* @implemented
89*
90* The function DxEngGetDeviceGammaRamp gets the gamma ramp to dxg.sys.
91
92* @param HDEV hPDev
93* The hdev.
94*
95* @param PGAMMARAMP Ramp
96* Pointer to store the gamma ramp value in.
97*
98* @return
99*Returns TRUE for success, FALSE for failure
100*
101* @remarks.
102* None
103*
104*--*/
105BOOL
108{
109 DPRINT("ReactX Calling : DxEngGetDeviceGammaRamp\n");
110 return IntGetDeviceGammaRamp(hPDev, Ramp);
111}
112
113/*++
114* @name DxEngLockDC
115* @implemented
116*
117* The function DxEngLockDC locks a hdc from dxg.sys
118*
119* @param HDC hDC
120* The handle we want to lock
121*
122* @return
123* Returns PDC if lock succeeded or NULL if it failed.
124*
125* @remarks.
126* none
127*
128*--*/
129PDC
132{
133 DPRINT("ReactX Calling : DxEngLockDC\n");
134 return DC_LockDc(hDC);
135}
136
137/*++
138* @name DxEngUnlockDC
139* @implemented
140*
141* The function DxEngUnlockDC unlocks a pDC (hdc) from dxg.sys.
142
143* @param PDC pDC
144* The handle we want to unlock.
145*
146* @return
147* This function returns TRUE no matter what.
148*
149* @remarks.
150* none
151*
152*--*/
156{
157 DPRINT("ReactX Calling : DxEngUnlockDC\n");
158 DC_UnlockDc(pDC);
159 return TRUE;
160}
161
162/*++
163* @name DxEngLockShareSem
164* @implemented
165*
166* The function DxEngLockShareSem locks a struct of type ghsemShareDevLock that can be shared.
167*
168* @return
169* This function returns TRUE for success and FALSE for failure.
170* FALSE must mean the struct has already been locked.
171*
172* @remarks.
173* It is being used in various ntuser* functions and ntgdi*
174* ReactOS specific: It is not in use yet?
175*SystemResourcesList
176*--*/
180{
181 DPRINT("ReactX Calling : DxEngLockShareSem\n");
182 if(!ghsemShareDevLock) ghsemShareDevLock = EngCreateSemaphore(); // Hax, should be in dllmain.c
184 return TRUE;
185}
186
187/*++
188* @name DxEngUnlockShareSem
189* @implemented
190*
191* The function DxEngUnlockShareSem unlocks the struct of type ghsemShareDevLock.
192*
193* @return
194* This function returns TRUE no matter what.
195*
196* @remarks.
197* ReactOS specific: It is not in use yet?
198*
199*--*/
203{
204 DPRINT("ReactX Calling : DxEngUnlockShareSem\n");
206 return TRUE;
207}
208
209/*++
210* @name DxEngSetDeviceGammaRamp
211* @implemented
212*
213* The function DxEngSetDeviceGammaRamp sets gamma ramp from dxg.sys
214
215* @param HDEV hPDev
216* The hdev
217*
218* @param PGAMMARAMP Ramp
219* Value to change gamma ramp to.
220*
221* @param BOOL Test
222* Whether gamma should be tested. TRUE to test, FALSE to not test.
223*
224* @return
225*Returns TRUE for success, FALSE for failure.
226*
227* @remarks.
228* None
229*
230*--*/
234{
235 DPRINT("ReactX Calling : DxEngSetDeviceGammaRamp\n");
236 return IntSetDeviceGammaRamp(hPDev, Ramp, Test);
237}
238
239/*++
240* @name DxEngGetHdevData
241* @implemented
242*
243* The function DxEngGetHdevData retrieves a value from the HDEV
244
245* @param HDEV hPDev
246* The HDEV
247*
248* @param DXEGSHDEVDATA Type
249* The following typs are supported
250* Type Purpose
251* DxEGShDevData_Surface Retrieve pointer to Surface handle.
252* DxEGShDevData_hSpooler Device object of graphics driver.
253* DxEGShDevData_DitherFmt Retrieve the device iDitherFormat
254* DxEGShDevData_FxCaps Retrieve the device flGraphicsCaps
255* DxEGShDevData_FxCaps2 Retrieve the device flGraphicsCaps2
256* DxEGShDevData_DrvFuncs Retrieve the device DriverFunctions function table
257* DxEGShDevData_dhpdev Retrieve the device hPDev, the real DHPDEV
258* DxEGShDevData_eddg Retrieve the device pEDDgpl
259* DxEGShDevData_dd_nCount Retrieve the device DxDd_nCount
260* DxEGShDevData_dd_flags Retrieve the device DxDd_Flags
261* DxEGShDevData_disable See if the device pdev is disabled
262* DxEGShDevData_metadev See if the device pdev is a meta device
263* DxEGShDevData_display See if the device is the primary display driver
264* DxEGShDevData_Parent Retrieve the ppdevParent
265* DxEGShDevData_OpenRefs Retrieve the pdevOpenRefs counter
266* DxEGShDevData_palette See if the device RC_PALETTE is set
267* DxEGShDevData_ldev ATM we do not support the Loader Device driver structure
268* DxEGShDevData_GDev Retrieve the device pGraphicsDevice
269* DxEGShDevData_clonedev Retrieve the device PDEV_CLONE_DEVICE flag is set or not
270*
271* @return
272* Returns the data we requested
273*
274* @remarks.
275* ReactOS specific: Implementation is incomplete, I do not save the value into the hdev yet.
276*
277*--*/
282{
283 DWORD_PTR retVal = 0;
284 PPDEVOBJ PDev = (PPDEVOBJ)hDev;
285
286 DPRINT("ReactX Calling : DxEngGetHdevData, Type: %d\n", Type);
287
288#if 1
289 DPRINT("hDev: %p\n", hDev);
290#endif
291
292 switch ( Type )
293 {
295 DPRINT("requested DxEGShDevData_Surface\n");
296 retVal = (DWORD_PTR) PDev->pSurface; // ptr to Surface handle.
297 break;
299 DPRINT("requested DxEGShDevData_hSpooler\n");
300 retVal = (DWORD_PTR) PDev->hSpooler;
301 break;
303 DPRINT("requested DxEGShDevData_DitherFmt\n");
304 retVal = (DWORD_PTR) PDev->devinfo.iDitherFormat;
305 break;
307 DPRINT("requested DxEGShDevData_FxCaps\n");
308 retVal = (DWORD_PTR) PDev->devinfo.flGraphicsCaps;
309 break;
311 DPRINT("requested DxEGShDevData_FxCaps2\n");
312 retVal = (DWORD_PTR) PDev->devinfo.flGraphicsCaps2;
313 break;
315 DPRINT("requested DxEGShDevData_DrvFuncs\n");
316 retVal = (DWORD_PTR) &PDev->DriverFunctions;
317 break;
319 DPRINT("requested DxEGShDevData_dhpdev\n");
320 retVal = (DWORD_PTR) PDev->dhpdev; // DHPDEV
321 break;
323 DPRINT("requested DxEGShDevData_eddg\n");
324 retVal = (DWORD_PTR) PDev->pEDDgpl;
325 break;
327 DPRINT("requested DxEGShDevData_dd_locks\n");
328 retVal = (DWORD_PTR) PDev->cDirectDrawDisableLocks;
329 break;
331 DPRINT("requested DxEGShDevData_dd_flags\n");
332 retVal = (DWORD_PTR) PDev->DxDd_Flags;
333 break;
335 DPRINT("requested DxEGShDevData_disable\n");
336 retVal = (DWORD_PTR) PDev->flFlags & PDEV_DISABLED;
337 break;
339 DPRINT("requested DxEGShDevData_metadev\n");
340 retVal = (DWORD_PTR) PDev->flFlags & PDEV_META_DEVICE;
341 break;
343 DPRINT("requested DxEGShDevData_display\n");
344 retVal = (DWORD_PTR) PDev->flFlags & PDEV_DISPLAY;
345 break;
347 DPRINT("requested DxEGShDevData_Parent\n");
348 retVal = (DWORD_PTR) PDev->ppdevParent;
349 break;
351 DPRINT("requested DxEGShDevData_OpenRefs\n");
352 retVal = (DWORD_PTR) PDev->cPdevOpenRefs != 0;
353 break;
355 DPRINT("requested DxEGShDevData_palette\n");
356 retVal = (DWORD_PTR) PDev->gdiinfo.flRaster & RC_PALETTE;
357 break;
359 DPRINT("requested DxEGShDevData_ldev\n");
360 retVal = (DWORD_PTR) PDev->pldev;
361 break;
363 DPRINT("requested DxEGShDevData_GDev\n");
364 retVal = (DWORD_PTR) PDev->pGraphicsDevice; // P"GRAPHICS_DEVICE"
365 break;
367 DPRINT("requested DxEGShDevData_clonedev\n");
368 retVal = (DWORD_PTR) PDev->flFlags & PDEV_CLONE_DEVICE;
369 break;
370 default:
371 // TODO: Make this default a bit more useful.
372 break;
373 }
374
375#if 1
376 DPRINT("retVal: %08Ix\n", retVal);
377#endif
378
379 return retVal;
380}
381
382/*++
383* @name DxEngSetHdevData
384* @implemented
385*
386* The function DxEngSetHdevData sets a value in hdev
387
388* @param HDEV hPDev
389* The hdev
390*
391* @param DXEGSHDEVDATA Type
392* Supports only DxEGShDevData_dd_nCount. It is an internal counter on how many times hdev has been locked and unlocked
393*
394* @param DWORD Data
395* The value to be saved to hdev's internal counter.
396*
397* @return
398* Returns TRUE for success, FALSE for failure
399*
400* @remarks.
401* none
402*
403*--*/
409{
410 BOOLEAN retVal = FALSE; // Default, no set.
411
412 DPRINT("ReactX Calling : DxEngSetHdevData, Type: %d\n", Type);
413
415 {
416 DPRINT("Assigning value: %Iu\n", Data);
417 ((PPDEVOBJ)hDev)->cDirectDrawDisableLocks = Data;
418 retVal = TRUE; // Set
419 }
420 return retVal;
421}
422
423/*++
424* @name DxEngGetDCState
425* @implemented
426*
427* The function DxEngGetDCState is capable of returning three
428* DC states depending on what value is passed in its second parameter:
429* 1. If the DC is full screen
430* 2. Get Complexity of visible region
431* 3. Get Driver hdev, which is ppdev
432*
433* @param HDC hdc
434* The DC handle
435*
436* @param DWORD type
437* value 1 = Is DC fullscreen
438* value 2 = Get Complexity of visible region.
439* value 3 = Get Driver hdev, which is a ppdev.
440*
441* @return
442* Return one of the type values
443*
444* @remarks.
445* none
446*
447*--*/
451 DWORD type)
452{
453 PDC pDC = DC_LockDc(hDC);
454 DWORD_PTR retVal = 0;
455
456 DPRINT("ReactX Calling : DxEngGetDCState, type: %lu\n", type);
457
458 if (pDC)
459 {
460 switch (type)
461 {
462 case 1:
463 retVal = (DWORD_PTR) pDC->fs & DC_FULLSCREEN;
464 break;
465 case 2:
466 /* Return the complexity of the visible region. */
467 retVal = (DWORD_PTR) REGION_Complexity(pDC->prgnVis);
468 break;
469 case 3:
470 {
471 /* Return the HDEV of this DC. */
472 retVal = (DWORD_PTR) pDC->ppdev;
473 break;
474 }
475 default:
476 /* If a valid type is not found, zero is returned */
477 DPRINT1("Warning: did not find type %lu\n", type);
478 break;
479 }
480 DC_UnlockDc(pDC);
481 }
482
483 DPRINT("retVal: %08Ix\n", retVal);
484
485 return retVal;
486}
487
488/*++
489* @name DxEngIncDispUniq
490* @implemented
491*
492* The function DxEngIncDispUniq increments the DisplayUniqVisrgn counter from GDI shared memory.
493*
494* @return
495* This function returns TRUE no matter what.
496*
497* @remarks.
498* none
499*
500*--*/
504{
505 DPRINT("ReactX Calling : DxEngIncDispUniq\n");
506
507 InterlockedIncrement((LONG*)&GdiHandleTable->flDeviceUniq);
508 return TRUE;
509}
510
511/*++
512* @name DxEngLockHdev
513* @implemented
514*
515* The function DxEngLockHdev lock the internal PDEV
516*
517* @param HDEV type
518* it is a pointer to win32k internal pdev struct known as PPDEVOBJ
519
520* @return
521* This function returns TRUE no matter what.
522*
523* @remarks.
524* none
525*
526*--*/
530{
531 PPDEVOBJ ppdev = (PPDEVOBJ)hDev;
533
534 DPRINT("ReactX Calling : DxEngLockHdev\n");
535
536 DPRINT("hDev: %p\n", hDev);
537
539
540 if (Resource)
541 {
543 ExAcquireResourceExclusiveLite( Resource , TRUE); // Lock monitor.
544 }
545 return TRUE;
546}
547
548/*++
549* @name DxEngUnlockHdev
550* @implemented
551*
552* The function DxEngUnlockHdev unlock the internal PDEV
553*
554* @param HDEV type
555* it is a pointer to win32k internal pdev struct known as PPDEVOBJ
556
557* @return
558* This function returns TRUE no matter what.
559*
560* @remarks.
561* none
562*
563*--*/
567{
568 PPDEVOBJ ppdev = (PPDEVOBJ)hDev;
570
571 DPRINT("ReactX Calling : DxEngUnlockHdev\n");
572
573 if (Resource)
574 {
577 }
578 return TRUE;
579}
580
581/************************************************************************/
582/* DxEngReferenceHdev */
583/************************************************************************/
587{
589 /* ALWAYS return true */
590 return TRUE;
591}
592
593/************************************************************************/
594/* DxEngNUIsTermSrv */
595/************************************************************************/
596
597/* Notes: Check if terminal server got connections or not */
601{
602 /* FIXME: ReactOS does not suport terminal server yet, we can not check if we got connections or not */
604 return FALSE;
605}
606
607/************************************************************************/
608/* DxEngRedrawDesktop */
609/************************************************************************/
610
611/* Notes: it always returns TRUE, and it updates whole screen
612 (redraws current desktop) */
616{
618 return TRUE;
619}
620
621ULONG gulVisRgnUniqueness; // Increase count everytime client region is updated.
622
623/************************************************************************/
624/* DxEngVisRgnUniq */
625/************************************************************************/
626/* Notes: returns the VisRgnUniq counter for win32k */
627ULONG
630{
631 DPRINT("ReactX Calling : DxEngVisRgnUniq\n");
632
633 return gulVisRgnUniqueness;
634}
635
636/************************************************************************/
637/* DxEngEnumerateHdev */
638/************************************************************************/
639/* Enumerate all drivers in win32k */
640HDEV *
643{
644 /* FIXME: Enumerate all drivers in win32k */
646 return FALSE;
647}
648
649/************************************************************************/
650/* DxEngCreateMemoryDC */
651/************************************************************************/
652HDC
655{
657}
658
659/************************************************************************/
660/* DxEngScreenAccessCheck */
661/************************************************************************/
663{
665
666 /* We're cheating here and telling dxg.sys it has always had permissions to access the screen */
667 return TRUE;
668}
669
670/************************************************************************/
671/* DxEngIsHdevLockedByCurrentThread */
672/************************************************************************/
676{ // Based on EngIsSemaphoreOwnedByCurrentThread w/o the Ex call.
677 PERESOURCE pSem = (PERESOURCE)(((PPDEVOBJ)hDev)->hsemDevLock);
678 return pSem->OwnerEntry.OwnerThread == (ERESOURCE_THREAD)PsGetCurrentThread();
679}
680
681/************************************************************************/
682/* DxEngUnreferenceHdev */
683/************************************************************************/
687{
689 return TRUE; // Always true.
690}
691
692/************************************************************************/
693/* DxEngGetDesktopDC */
694/************************************************************************/
695HDC
697DxEngGetDesktopDC(ULONG DcType, BOOL EmptyDC, BOOL ValidatehWnd)
698{
699 return UserGetDesktopDC(DcType, EmptyDC, ValidatehWnd);
700}
701
702/************************************************************************/
703/* DxEngDeleteDC */
704/************************************************************************/
708{
709 return IntGdiDeleteDC(hdc, Force);
710}
711
712/************************************************************************/
713/* DxEngCleanDC */
714/************************************************************************/
718{
719 return IntGdiCleanDC(hdc);
720}
721
722/************************************************************************/
723/* DxEngSetDCOwner */
724/************************************************************************/
726{
727 DPRINT("ReactX Calling : DxEngSetDCOwner\n");
728
729 return GreSetDCOwner(hObject, OwnerMask);
730}
731
732/************************************************************************/
733/* DxEngSetDCState */
734/************************************************************************/
738{
739 BOOLEAN Ret = FALSE;
740 PDC pDC = DC_LockDc(hDC);
741
742 if (pDC)
743 {
744 if (SetType == 1)
745 {
746 if ( Set )
747 pDC->fs |= DC_FULLSCREEN;
748 else
749 pDC->fs &= ~DC_FULLSCREEN;
750 Ret = TRUE;
751 }
752 DC_UnlockDc(pDC);
753 return Ret; // Everything else returns FALSE.
754 }
755 return Ret;
756}
757
758/************************************************************************/
759/* DxEngSelectBitmap */
760/************************************************************************/
762{
763 DPRINT("ReactX Calling : DxEngSelectBitmap\n");
764
765 return NtGdiSelectBitmap(hdc, hbmp);
766}
767
768/************************************************************************/
769/* DxEngSetBitmapOwner */
770/************************************************************************/
772{
773 DPRINT("ReactX Calling : DxEngSetBitmapOwner\n");
774
775 return GreSetBitmapOwner(hbmp, ulOwner);
776}
777
778/************************************************************************/
779/* DxEngDeleteSurface */
780/************************************************************************/
782{
783 DPRINT("ReactX Calling : DxEngDeleteSurface\n");
784
785 return EngDeleteSurface(hsurf);
786}
787
788/************************************************************************/
789/* DxEngGetSurfaceData */
790/************************************************************************/
792{
794 return FALSE;
795}
796
797/************************************************************************/
798/* DxEngAltLockSurface */
799/************************************************************************/
801{
802 DPRINT("ReactX Calling : DxEngAltLockSurface\n");
803
804 return EngLockSurface(hsurf);
805}
806
807/************************************************************************/
808/* DxEngUploadPaletteEntryToSurface */
809/************************************************************************/
811{
813 return FALSE;
814}
815
816/************************************************************************/
817/* DxEngMarkSurfaceAsDirectDraw */
818/************************************************************************/
820{
822 return FALSE;
823}
824
825/************************************************************************/
826/* DxEngSelectPaletteToSurface */
827/************************************************************************/
829{
831 return FALSE;
832}
833
834/************************************************************************/
835/* DxEngSyncPaletteTableWithDevice */
836/************************************************************************/
838{
840 return FALSE;
841}
842
843/************************************************************************/
844/* DxEngSetPaletteState */
845/************************************************************************/
847{
849 return FALSE;
850}
851
852/************************************************************************/
853/* DxEngGetRedirectionBitmap */
854/************************************************************************/
855DWORD
858{
859 return FALSE; // Normal return.
860}
861
862/************************************************************************/
863/* DxEngLoadImage */
864/************************************************************************/
866{
868 return FALSE;
869}
870
871/************************************************************************/
872/* DxEngSpTearDownSprites */
873/************************************************************************/
875{
877 return FALSE;
878}
879
880/************************************************************************/
881/* DxEngSpUnTearDownSprites */
882/************************************************************************/
884{
886 return FALSE;
887}
888
889/************************************************************************/
890/* DxEngSpSpritesVisible */
891/************************************************************************/
893{
895 return FALSE;
896}
static HDC hDC
Definition: 3dtext.c:33
unsigned char BOOLEAN
Type
Definition: Type.h:7
#define InterlockedIncrement
Definition: armddk.h:53
DWORD_PTR HSEMAPHORE
Definition: axcore.idl:60
#define DPRINT1
Definition: precomp.h:8
BOOL NTAPI GreSetBitmapOwner(_In_ HBITMAP hbmp, _In_ ULONG ulOwner)
Definition: bitmaps.c:17
#define UNIMPLEMENTED
Definition: debug.h:118
HBITMAP hbmp
_Inout_ PVCB _In_ BOOLEAN Force
Definition: cdprocs.h:1417
_Acquires_exclusive_lock_ Resource _Acquires_shared_lock_ Resource _Inout_ PERESOURCE Resource
Definition: cdprocs.h:843
FORCEINLINE VOID DC_UnlockDc(PDC pdc)
Definition: dc.h:238
BOOL FASTCALL IntGdiDeleteDC(HDC, BOOL)
Definition: dclife.c:892
BOOL NTAPI GreSetDCOwner(HDC hdc, ULONG ulOwner)
Definition: dclife.c:455
@ DCTYPE_MEMORY
Definition: dc.h:42
HDC FASTCALL IntGdiCreateDisplayDC(HDEV hDev, ULONG DcType, BOOL EmptyDC)
Definition: dclife.c:1063
BOOL FASTCALL IntGdiCleanDC(HDC hDC)
Definition: dcstate.c:73
@ DC_FULLSCREEN
Definition: dc.h:30
FORCEINLINE PDC DC_LockDc(HDC hdc)
Definition: dc.h:220
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define APIENTRY
Definition: api.h:79
DWORD APIENTRY DxEngSelectPaletteToSurface(DWORD x1, DWORD x2)
Definition: dxeng.c:828
PDC APIENTRY DxEngLockDC(HDC hDC)
Definition: dxeng.c:131
BOOLEAN APIENTRY DxEngUnlockHdev(HDEV hDev)
Definition: dxeng.c:566
HDEV *APIENTRY DxEngEnumerateHdev(HDEV *hdev)
Definition: dxeng.c:642
DWORD_PTR APIENTRY DxEngGetDCState(HDC hDC, DWORD type)
Definition: dxeng.c:450
BOOLEAN APIENTRY DxEngIncDispUniq(VOID)
Definition: dxeng.c:503
ULONG gcEngFuncs
Definition: dxeng.c:17
DWORD APIENTRY DxEngLoadImage(DWORD x1, DWORD x2)
Definition: dxeng.c:865
BOOLEAN APIENTRY DxEngDeleteSurface(HSURF hsurf)
Definition: dxeng.c:781
DWORD APIENTRY DxEngMarkSurfaceAsDirectDraw(DWORD x1, DWORD x2)
Definition: dxeng.c:819
BOOLEAN APIENTRY DxEngRedrawDesktop(VOID)
Definition: dxeng.c:615
DWORD_PTR APIENTRY DxEngGetHdevData(HDEV hDev, DXEGSHDEVDATA Type)
Definition: dxeng.c:280
BOOLEAN APIENTRY DxEngLockHdev(HDEV hDev)
Definition: dxeng.c:529
DWORD APIENTRY DxEngSpSpritesVisible(DWORD x1)
Definition: dxeng.c:892
BOOLEAN APIENTRY DxEngSetHdevData(HDEV hDev, DXEGSHDEVDATA Type, DWORD_PTR Data)
Definition: dxeng.c:406
HDC APIENTRY DxEngGetDesktopDC(ULONG DcType, BOOL EmptyDC, BOOL ValidatehWnd)
Definition: dxeng.c:697
BOOLEAN APIENTRY DxEngNUIsTermSrv(VOID)
Definition: dxeng.c:600
DWORD APIENTRY DxEngGetSurfaceData(DWORD x1, DWORD x2)
Definition: dxeng.c:791
BOOLEAN APIENTRY DxEngUnlockShareSem(VOID)
Definition: dxeng.c:202
DRVFN gaEngFuncs[]
Definition: dxeng.c:18
HDC APIENTRY DxEngCreateMemoryDC(HDEV hDev)
Definition: dxeng.c:654
BOOLEAN APIENTRY DxEngSetDCState(HDC hDC, DWORD SetType, DWORD Set)
Definition: dxeng.c:737
BOOLEAN APIENTRY DxEngLockShareSem(VOID)
Definition: dxeng.c:179
DWORD APIENTRY DxEngUploadPaletteEntryToSurface(DWORD x1, DWORD x2, DWORD x3, DWORD x4)
Definition: dxeng.c:810
ULONG gulVisRgnUniqueness
Definition: dxeng.c:621
BOOLEAN APIENTRY DxEngSetBitmapOwner(HBITMAP hbmp, ULONG ulOwner)
Definition: dxeng.c:771
SURFOBJ *APIENTRY DxEngAltLockSurface(HSURF hsurf)
Definition: dxeng.c:800
BOOLEAN APIENTRY DxEngDeleteDC(HDC hdc, BOOL Force)
Definition: dxeng.c:707
DWORD APIENTRY DxEngSyncPaletteTableWithDevice(DWORD x1, DWORD x2)
Definition: dxeng.c:837
HSEMAPHORE ghsemShareDevLock
Definition: dxeng.c:15
BOOLEAN APIENTRY DxEngIsHdevLockedByCurrentThread(HDEV hDev)
Definition: dxeng.c:675
BOOLEAN APIENTRY DxEngReferenceHdev(HDEV hDev)
Definition: dxeng.c:586
ULONG APIENTRY DxEngDispUniq(VOID)
Definition: dxeng.c:80
DWORD APIENTRY DxEngSetPaletteState(DWORD x1, DWORD x2, DWORD x3)
Definition: dxeng.c:846
BOOL APIENTRY DxEngSetDCOwner(HGDIOBJ hObject, DWORD OwnerMask)
Definition: dxeng.c:725
ULONG APIENTRY DxEngVisRgnUniq(VOID)
Definition: dxeng.c:629
HBITMAP APIENTRY DxEngSelectBitmap(HDC hdc, HBITMAP hbmp)
Definition: dxeng.c:761
DWORD APIENTRY DxEngSpUnTearDownSprites(DWORD x1, DWORD x2, DWORD x3)
Definition: dxeng.c:883
BOOLEAN APIENTRY DxEngCleanDC(HDC hdc)
Definition: dxeng.c:717
DWORD APIENTRY DxEngScreenAccessCheck(VOID)
Definition: dxeng.c:662
DWORD APIENTRY DxEngGetRedirectionBitmap(DWORD x1)
Definition: dxeng.c:857
BOOLEAN APIENTRY DxEngSetDeviceGammaRamp(HDEV hPDev, PGAMMARAMP Ramp, BOOL Test)
Definition: dxeng.c:233
DWORD APIENTRY DxEngSpTearDownSprites(DWORD x1, DWORD x2, DWORD x3)
Definition: dxeng.c:874
BOOLEAN APIENTRY DxEngUnreferenceHdev(HDEV hDev)
Definition: dxeng.c:686
BOOLEAN APIENTRY DxEngUnlockDC(PDC pDC)
Definition: dxeng.c:155
BOOL APIENTRY DxEngGetDeviceGammaRamp(HDEV hPDev, PGAMMARAMP Ramp)
Definition: dxeng.c:107
#define DXENG_INDEX_DxEngCreateMemoryDC
Definition: dxeng.h:28
#define DXENG_INDEX_DxEngSpSpritesVisible
Definition: dxeng.h:25
#define DXENG_INDEX_DxEngSetPaletteState
Definition: dxeng.h:46
enum _DXEGSHDEVDATA DXEGSHDEVDATA
#define DXENG_INDEX_DxEngScreenAccessCheck
Definition: dxeng.h:8
#define DXENG_INDEX_DxEngAltLockSurface
Definition: dxeng.h:41
#define DXENG_INDEX_DxEngSyncPaletteTableWithDevice
Definition: dxeng.h:45
@ DxEGShDevData_OpenRefs
Definition: dxeng.h:66
@ DxEGShDevData_DrvFuncs
Definition: dxeng.h:57
@ DxEGShDevData_DitherFmt
Definition: dxeng.h:54
@ DxEGShDevData_FxCaps
Definition: dxeng.h:55
@ DxEGShDevData_dd_flags
Definition: dxeng.h:61
@ DxEGShDevData_Surface
Definition: dxeng.h:52
@ DxEGShDevData_eddg
Definition: dxeng.h:59
@ DxEGShDevData_display
Definition: dxeng.h:64
@ DxEGShDevData_ldev
Definition: dxeng.h:68
@ DxEGShDevData_palette
Definition: dxeng.h:67
@ DxEGShDevData_clonedev
Definition: dxeng.h:70
@ DxEGShDevData_disable
Definition: dxeng.h:62
@ DxEGShDevData_Parent
Definition: dxeng.h:65
@ DxEGShDevData_metadev
Definition: dxeng.h:63
@ DxEGShDevData_hSpooler
Definition: dxeng.h:53
@ DxEGShDevData_FxCaps2
Definition: dxeng.h:56
@ DxEGShDevData_dd_locks
Definition: dxeng.h:60
@ DxEGShDevData_dhpdev
Definition: dxeng.h:58
@ DxEGShDevData_GDev
Definition: dxeng.h:69
#define DXENG_INDEX_DxEngUnlockHdev
Definition: dxeng.h:17
#define DXENG_INDEX_DxEngGetDCState
Definition: dxeng.h:36
#define DXENG_INDEX_DxEngUnreferenceHdev
Definition: dxeng.h:20
#define DXENG_INDEX_DxEngUnlockShareSem
Definition: dxeng.h:14
#define DXENG_INDEX_DxEngIncDispUniq
Definition: dxeng.h:11
#define DXENG_INDEX_DxEngGetDesktopDC
Definition: dxeng.h:29
#define DXENG_INDEX_DxEngSetBitmapOwner
Definition: dxeng.h:38
#define DXENG_INDEX_DxEngDispUniq
Definition: dxeng.h:10
#define DXENG_INDEX_DxEngSetHdevData
Definition: dxeng.h:27
#define DXENG_INDEX_DxEngGetSurfaceData
Definition: dxeng.h:40
#define DXENG_INDEX_DxEngCleanDC
Definition: dxeng.h:31
#define DXENG_INDEX_DxEngSetDCOwner
Definition: dxeng.h:32
#define DXENG_INDEX_DxEngMarkSurfaceAsDirectDraw
Definition: dxeng.h:43
#define DXENG_INDEX_DxEngIsHdevLockedByCurrentThread
Definition: dxeng.h:18
#define DXENG_INDEX_DxEngReferenceHdev
Definition: dxeng.h:19
#define DXENG_INDEX_DxEngSpUnTearDownSprites
Definition: dxeng.h:24
#define DXENG_INDEX_DxEngUploadPaletteEntryToSurface
Definition: dxeng.h:42
#define DXENG_INDEX_DxEngDeleteSurface
Definition: dxeng.h:39
#define DXENG_INDEX_DxEngSpTearDownSprites
Definition: dxeng.h:23
#define DXENG_INDEX_DxEngSetDeviceGammaRamp
Definition: dxeng.h:22
#define DXENG_INDEX_DxEngSetDCState
Definition: dxeng.h:35
#define DXENG_INDEX_DxEngLockDC
Definition: dxeng.h:33
#define DXENG_INDEX_DxEngGetHdevData
Definition: dxeng.h:26
#define DXENG_INDEX_DxEngLockShareSem
Definition: dxeng.h:13
#define DXENG_INDEX_DxEngSelectBitmap
Definition: dxeng.h:37
#define DXENG_INDEX_DxEngEnumerateHdev
Definition: dxeng.h:15
#define DXENG_INDEX_DxEngDeleteDC
Definition: dxeng.h:30
#define DXENG_INDEX_DxEngGetDeviceGammaRamp
Definition: dxeng.h:21
#define DXENG_INDEX_DxEngLoadImage
Definition: dxeng.h:48
#define DXENG_INDEX_DxEngGetRedirectionBitmap
Definition: dxeng.h:47
#define DXENG_INDEX_DxEngUnlockDC
Definition: dxeng.h:34
#define DXENG_INDEX_DxEngVisRgnUniq
Definition: dxeng.h:12
#define DXENG_INDEX_DxEngRedrawDesktop
Definition: dxeng.h:9
#define DXENG_INDEX_DxEngSelectPaletteToSurface
Definition: dxeng.h:44
#define DXENG_INDEX_DxEngLockHdev
Definition: dxeng.h:16
#define DXENG_INDEX_DxEngNUIsTermSrv
Definition: dxeng.h:7
#define PsGetCurrentThread()
Definition: env_spec_w32.h:81
#define ExAcquireResourceExclusiveLite(res, wait)
Definition: env_spec_w32.h:615
ERESOURCE * PERESOURCE
Definition: env_spec_w32.h:595
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
VOID WINAPI EngReleaseSemaphore(IN HSEMAPHORE hsem)
Definition: eng.c:235
HSEMAPHORE WINAPI EngCreateSemaphore(VOID)
Definition: eng.c:75
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
#define KeLeaveCriticalRegion()
Definition: ke_x.h:119
#define KeEnterCriticalRegion()
Definition: ke_x.h:88
if(dx< 0)
Definition: linetemp.h:194
struct _PDEVOBJ * PPDEVOBJ
Definition: mdevobj.h:6
HDC hdc
Definition: main.c:9
static HBITMAP
Definition: button.c:44
static HDC
Definition: imagelist.c:92
__kernel_entry W32KAPI HBITMAP APIENTRY NtGdiSelectBitmap(_In_ HDC hdc, _In_ HBITMAP hbm)
VOID FASTCALL ExReleaseResourceLite(IN PERESOURCE Resource)
Definition: resource.c:1822
static BOOL Set
Definition: pageheap.c:10
VOID NTAPI PDEVOBJ_vRelease(_Inout_ PPDEVOBJ ppdev)
Definition: pdevobj.c:105
@ PDEV_DISABLED
Definition: pdevobj.h:14
@ PDEV_DISPLAY
Definition: pdevobj.h:7
@ PDEV_META_DEVICE
Definition: pdevobj.h:20
@ PDEV_CLONE_DEVICE
Definition: pdevobj.h:22
FORCEINLINE VOID PDEVOBJ_vReference(_In_ PPDEVOBJ ppdev)
Definition: pdevobj.h:160
long LONG
Definition: pedump.c:60
#define DPRINT
Definition: sndvol32.h:73
Definition: polytest.cpp:41
FLONG flGraphicsCaps
Definition: winddi.h:390
ULONG iDitherFormat
Definition: winddi.h:395
FLONG flGraphicsCaps2
Definition: winddi.h:399
Definition: winddi.h:529
ULONG flRaster
Definition: winddi.h:887
LONG cPdevOpenRefs
Definition: pdevobj.h:85
struct _PDEVOBJ * ppdevParent
Definition: pdevobj.h:86
PSURFACE pSurface
Definition: pdevobj.h:124
FLONG DxDd_Flags
Definition: pdevobj.h:131
struct _LDEVOBJ * pldev
Definition: pdevobj.h:119
struct _EDD_DIRECTDRAW_GLOBAL * pEDDgpl
Definition: pdevobj.h:148
FLONG flFlags
Definition: pdevobj.h:87
GDIINFO gdiinfo
Definition: pdevobj.h:123
HANDLE hSpooler
Definition: pdevobj.h:125
DHPDEV dhpdev
Definition: pdevobj.h:120
PGRAPHICS_DEVICE pGraphicsDevice
Definition: pdevobj.h:127
DRIVER_FUNCTIONS DriverFunctions
Definition: pdevobj.h:137
ULONG cDirectDrawDisableLocks
Definition: pdevobj.h:104
DEVINFO devinfo
Definition: pdevobj.h:122
HSEMAPHORE hsemDevLock
Definition: pdevobj.h:89
#define DWORD_PTR
Definition: treelist.c:76
uint32_t DWORD_PTR
Definition: typedefs.h:65
uint32_t ULONG
Definition: typedefs.h:59
#define GdiHandleTable
Definition: win32nt.h:37
BOOL FASTCALL IntGetDeviceGammaRamp(HDEV hPDev, PGAMMARAMP Ramp)
Definition: icm.c:92
BOOL FASTCALL IntSetDeviceGammaRamp(HDEV hPDev, PGAMMARAMP Ramp, BOOL Test)
Definition: icm.c:284
INT FASTCALL REGION_Complexity(PREGION prgn)
Definition: region.c:554
VOID APIENTRY UserRedrawDesktop(VOID)
Definition: desktop.c:1599
HDC FASTCALL UserGetDesktopDC(ULONG DcType, BOOL bAltDc, BOOL ValidatehWnd)
Definition: desktop.c:1574
LONG_PTR(APIENTRY * PFN)()
Definition: winddi.h:133
ENGAPI BOOL APIENTRY EngDeleteSurface(_In_ _Post_ptr_invalid_ HSURF hsurf)
Definition: surface.c:567
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG _In_ LONG x2
Definition: winddi.h:3710
ENGAPI SURFOBJ *APIENTRY EngLockSurface(_In_ HSURF hsurf)
Definition: surface.c:607
ENGAPI VOID APIENTRY EngAcquireSemaphore(_Inout_ HSEMAPHORE hsem)
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG x1
Definition: winddi.h:3708
_In_ HDEV hdev
Definition: winddi.h:3449
typedef HSURF(APIENTRY FN_DrvEnableSurface)(_In_ DHPDEV dhpdev)
#define RC_PALETTE
Definition: wingdi.h:790
ULONG_PTR ERESOURCE_THREAD
Definition: extypes.h:208