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.

85 lines
2.5 KiB

  1. ////////////////////////////////////////////////////////////////////////
  2. //
  3. // GDIHELP.H - GDI TOOLHELP FUNCTIONS
  4. //
  5. // a bunch of GDI utility functions that are usefull for walking
  6. // all GDI objects and dinking with them.
  7. //
  8. // ToddLa
  9. //
  10. ////////////////////////////////////////////////////////////////////////
  11. #ifdef __cplusplus
  12. extern "C" { /* Assume C declarations for C++ */
  13. #endif /* __cplusplus */
  14. ////////////////////////////////////////////////////////////////////////
  15. //
  16. // object enumeration functions
  17. //
  18. ////////////////////////////////////////////////////////////////////////
  19. #define OBJ_PEN 1
  20. #define OBJ_BRUSH 2
  21. #define OBJ_FONT 3
  22. #define OBJ_PALETTE 4
  23. #define OBJ_BITMAP 5
  24. #define OBJ_RGN 6
  25. #define OBJ_DC 7
  26. #define OBJ_DISABLED_DC 8
  27. #define OBJ_METADC 9
  28. #define OBJ_METAFILE 10
  29. #define OBJ_SAVEDC 42
  30. #define OBJ_MAX OBJ_SAVEDC
  31. BOOL BeginGdiSnapshot(void);
  32. void EndGdiSnapshot(void);
  33. typedef void (*EnumGdiObjectsCallback)(HGDIOBJ, LPARAM lParam);
  34. void EnumGdiObjects(UINT type, EnumGdiObjectsCallback callback, LPARAM lParam);
  35. ////////////////////////////////////////////////////////////////////////
  36. //
  37. // query information functions
  38. //
  39. ////////////////////////////////////////////////////////////////////////
  40. HBITMAP StockBitmap(void);
  41. BOOL IsMemoryDC(HDC hdc);
  42. BOOL IsScreenDC(HDC hdc);
  43. BOOL IsObjectPrivate(HGDIOBJ h);
  44. BOOL IsObjectStock(HGDIOBJ h);
  45. HANDLE GetObjectOwner(HGDIOBJ h);
  46. LPCSTR GetObjectOwnerName(HGDIOBJ h);
  47. HBITMAP CurrentBitmap(HDC hdc);
  48. HBRUSH CurrentBrush(HDC hdc);
  49. HPEN CurrentPen(HDC hdc);
  50. HPALETTE CurrentPalette(HDC hdc);
  51. HDC GetBitmapDC(HBITMAP hbm);
  52. HPALETTE GetBitmapPalette(HBITMAP hbm);
  53. ////////////////////////////////////////////////////////////////////////
  54. //
  55. // conversion functions.
  56. //
  57. ////////////////////////////////////////////////////////////////////////
  58. HBITMAP ConvertDDBtoDS(HBITMAP hbm);
  59. HBITMAP ConvertDStoDDB(HBITMAP hbm, BOOL fForceConvert);
  60. HBRUSH ConvertPatternBrush(HBRUSH hbr);
  61. void ConvertIcon(HICON hIcon);
  62. void ConvertObjects(void);
  63. void ConvertObjectsBack(void);
  64. void ConvertBitmapsBack(BOOL fForceConvert);
  65. void ReRealizeObjects(void);
  66. LPVOID GetPDevice(HDC hdc);
  67. #ifdef __cplusplus
  68. } /* End of extern "C" { */
  69. #endif /* __cplusplus */