native_drawing_context.h 687 B

12345678910111213141516171819202122232425262728
  1. // Copyright (c) 2015 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef PRINTING_NATIVE_DRAWING_CONTEXT_H_
  5. #define PRINTING_NATIVE_DRAWING_CONTEXT_H_
  6. #include "build/build_config.h"
  7. #if BUILDFLAG(IS_WIN)
  8. #include "base/win/windows_types.h"
  9. #elif BUILDFLAG(IS_MAC)
  10. typedef struct CGContext* CGContextRef;
  11. #endif
  12. namespace printing {
  13. #if BUILDFLAG(IS_WIN)
  14. typedef HDC NativeDrawingContext;
  15. #elif BUILDFLAG(IS_MAC)
  16. typedef CGContextRef NativeDrawingContext;
  17. #else
  18. typedef void* NativeDrawingContext;
  19. #endif
  20. } // namespace printing
  21. #endif // PRINTING_NATIVE_DRAWING_CONTEXT_H_