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