gdiplusbase.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /*
  2. * gdiplusbase.h
  3. *
  4. * GDI+ base class
  5. *
  6. * This file is part of the w32api package.
  7. *
  8. * Contributors:
  9. * Created by Markus Koenig <markus@stber-koenig.de>
  10. *
  11. * THIS SOFTWARE IS NOT COPYRIGHTED
  12. *
  13. * This source code is offered for use in the public domain. You may
  14. * use, modify or distribute it freely.
  15. *
  16. * This code is distributed in the hope that it will be useful but
  17. * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
  18. * DISCLAIMED. This includes but is not limited to warranties of
  19. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  20. *
  21. */
  22. #ifndef __GDIPLUS_BASE_H
  23. #define __GDIPLUS_BASE_H
  24. #if __GNUC__ >=3
  25. #pragma GCC system_header
  26. #endif
  27. #ifndef __cplusplus
  28. #error "A C++ compiler is required to include gdiplusbase.h."
  29. #endif
  30. class GdiplusBase
  31. {
  32. public:
  33. static void* operator new(size_t in_size)
  34. {
  35. return DllExports::GdipAlloc(in_size);
  36. }
  37. static void* operator new[](size_t in_size)
  38. {
  39. return DllExports::GdipAlloc(in_size);
  40. }
  41. static void operator delete(void *in_pVoid)
  42. {
  43. DllExports::GdipFree(in_pVoid);
  44. }
  45. static void operator delete[](void *in_pVoid)
  46. {
  47. DllExports::GdipFree(in_pVoid);
  48. }
  49. };
  50. #endif /* __GDIPLUS_BASE_H */