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.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. /* -*- Mode: c; tab-width: 8; c-basic-offset: 4; indent-tabs-mode: t; -*- */
  2. /* cairo - a vector graphics library with display and print output
  3. *
  4. * Copyright © 2005 Red Hat, Inc
  5. *
  6. * This library is free software; you can redistribute it and/or
  7. * modify it either under the terms of the GNU Lesser General Public
  8. * License version 2.1 as published by the Free Software Foundation
  9. * (the "LGPL") or, at your option, under the terms of the Mozilla
  10. * Public License Version 1.1 (the "MPL"). If you do not alter this
  11. * notice, a recipient may use your version of this file under either
  12. * the MPL or the LGPL.
  13. *
  14. * You should have received a copy of the LGPL along with this library
  15. * in the file COPYING-LGPL-2.1; if not, write to the Free Software
  16. * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA
  17. * You should have received a copy of the MPL along with this library
  18. * in the file COPYING-MPL-1.1
  19. *
  20. * The contents of this file are subject to the Mozilla Public License
  21. * Version 1.1 (the "License"); you may not use this file except in
  22. * compliance with the License. You may obtain a copy of the License at
  23. * http://www.mozilla.org/MPL/
  24. *
  25. * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY
  26. * OF ANY KIND, either express or implied. See the LGPL or the MPL for
  27. * the specific language governing rights and limitations.
  28. *
  29. * The Original Code is the cairo graphics library.
  30. *
  31. * The Initial Developer of the Original Code is Red Hat, Inc.
  32. *
  33. * Contributor(s):
  34. * Owen Taylor <otaylor@redhat.com>
  35. */
  36. #ifndef _CAIRO_WIN32_H_
  37. #define _CAIRO_WIN32_H_
  38. #include "cairo.h"
  39. #if CAIRO_HAS_WIN32_SURFACE
  40. #include <windows.h>
  41. CAIRO_BEGIN_DECLS
  42. cairo_public cairo_surface_t *
  43. cairo_win32_surface_create (HDC hdc);
  44. cairo_public cairo_surface_t *
  45. cairo_win32_printing_surface_create (HDC hdc);
  46. cairo_public cairo_surface_t *
  47. cairo_win32_surface_create_with_ddb (HDC hdc,
  48. cairo_format_t format,
  49. int width,
  50. int height);
  51. cairo_public cairo_surface_t *
  52. cairo_win32_surface_create_with_dib (cairo_format_t format,
  53. int width,
  54. int height);
  55. cairo_public HDC
  56. cairo_win32_surface_get_dc (cairo_surface_t *surface);
  57. cairo_public cairo_surface_t *
  58. cairo_win32_surface_get_image (cairo_surface_t *surface);
  59. #if CAIRO_HAS_WIN32_FONT
  60. /*
  61. * Win32 font support
  62. */
  63. cairo_public cairo_font_face_t *
  64. cairo_win32_font_face_create_for_logfontw (LOGFONTW *logfont);
  65. cairo_public cairo_font_face_t *
  66. cairo_win32_font_face_create_for_hfont (HFONT font);
  67. cairo_public cairo_font_face_t *
  68. cairo_win32_font_face_create_for_logfontw_hfont (LOGFONTW *logfont, HFONT font);
  69. cairo_public cairo_status_t
  70. cairo_win32_scaled_font_select_font (cairo_scaled_font_t *scaled_font,
  71. HDC hdc);
  72. cairo_public void
  73. cairo_win32_scaled_font_done_font (cairo_scaled_font_t *scaled_font);
  74. cairo_public double
  75. cairo_win32_scaled_font_get_metrics_factor (cairo_scaled_font_t *scaled_font);
  76. cairo_public void
  77. cairo_win32_scaled_font_get_logical_to_device (cairo_scaled_font_t *scaled_font,
  78. cairo_matrix_t *logical_to_device);
  79. cairo_public void
  80. cairo_win32_scaled_font_get_device_to_logical (cairo_scaled_font_t *scaled_font,
  81. cairo_matrix_t *device_to_logical);
  82. #endif /* CAIRO_HAS_WIN32_FONT */
  83. CAIRO_END_DECLS
  84. #else /* CAIRO_HAS_WIN32_SURFACE */
  85. # error Cairo was not compiled with support for the win32 backend
  86. #endif /* CAIRO_HAS_WIN32_SURFACE */
  87. #endif /* _CAIRO_WIN32_H_ */