Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

72 lines
2.2 KiB

  1. /****************************************************************************/
  2. // noeinl.h
  3. //
  4. // Function prototypes for NT OE inline API functions.
  5. //
  6. // Copyright (C) 1996-2000 Microsoft Corporation
  7. /****************************************************************************/
  8. #ifndef _H_NOEINL
  9. #define _H_NOEINL
  10. #define DC_INCLUDE_DATA
  11. #include <noedata.c>
  12. #undef DC_INCLUDE_DATA
  13. /****************************************************************************/
  14. // OE_SendAsOrder
  15. //
  16. // Check the negotiated data to determine if this call can be sent as a
  17. // drawing order.
  18. /****************************************************************************/
  19. __inline BOOL RDPCALL OE_SendAsOrder(unsigned order)
  20. {
  21. return (BOOL)oeOrderSupported[oeEncToNeg[order]];
  22. }
  23. /****************************************************************************/
  24. // OEGetSurfObjBitmap
  25. //
  26. // This function checks a SURFOBJ pointer, and if it points to a (the) device
  27. // SURFOBJ, returns a pointer to the actual bitmap's SURFOBJ.
  28. // Assumes that pso is non-NULL.
  29. /****************************************************************************/
  30. _inline SURFOBJ * RDPCALL OEGetSurfObjBitmap(SURFOBJ *pso, PDD_DSURF *ppdsurf)
  31. {
  32. DC_BEGIN_FN("OEGetSurfObjBitmap");
  33. TRC_ASSERT(((pso) != NULL), (TB, "NULL surfobj"));
  34. // Primary Device Surface, this is our backup frame buffer for
  35. // the client desktop screen, the bitmap is saved in dhsurf
  36. if (pso->iType == STYPE_DEVICE) {
  37. TRC_ASSERT((pso->dhsurf != NULL),
  38. (TB, "NULL dhsurf for pso(%p)", pso));
  39. *ppdsurf = NULL;
  40. return(SURFOBJ *)(pso->dhsurf);
  41. }
  42. // Offscreen Bitmap Surface, the backup offscreen bitmap
  43. // is saved in the pso field of dhsurf.
  44. else if (pso->iType == STYPE_DEVBITMAP) {
  45. TRC_ASSERT((pso->dhsurf != NULL),
  46. (TB, "NULL dhsurf for pso(%p)", pso));
  47. *ppdsurf = (PDD_DSURF)(pso->dhsurf);
  48. return ((PDD_DSURF)(pso->dhsurf))->pso;
  49. }
  50. // GDI handled DIB surface.
  51. else {
  52. *ppdsurf = NULL;
  53. return pso;
  54. }
  55. DC_END_FN();
  56. return pso;
  57. }
  58. #endif // !defined(_H_NOEINL)