beta-0.89.2
[luatex.git] / source / libs / cairo / cairo-src / src / cairo-win32.h
blob3d2e1c60169559aef079f82780c47bb4e92eda19
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
4 * Copyright © 2005 Red Hat, Inc
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.
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
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/
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.
29 * The Original Code is the cairo graphics library.
31 * The Initial Developer of the Original Code is Red Hat, Inc.
33 * Contributor(s):
34 * Owen Taylor <otaylor@redhat.com>
37 #ifndef _CAIRO_WIN32_H_
38 #define _CAIRO_WIN32_H_
40 #include "cairo.h"
42 #if CAIRO_HAS_WIN32_SURFACE
44 #include <windows.h>
46 CAIRO_BEGIN_DECLS
48 cairo_public cairo_surface_t *
49 cairo_win32_surface_create (HDC hdc);
51 cairo_public cairo_surface_t *
52 cairo_win32_printing_surface_create (HDC hdc);
54 cairo_public cairo_surface_t *
55 cairo_win32_surface_create_with_ddb (HDC hdc,
56 cairo_format_t format,
57 int width,
58 int height);
60 cairo_public cairo_surface_t *
61 cairo_win32_surface_create_with_dib (cairo_format_t format,
62 int width,
63 int height);
65 cairo_public HDC
66 cairo_win32_surface_get_dc (cairo_surface_t *surface);
68 cairo_public cairo_surface_t *
69 cairo_win32_surface_get_image (cairo_surface_t *surface);
71 #if CAIRO_HAS_WIN32_FONT
74 * Win32 font support
77 cairo_public cairo_font_face_t *
78 cairo_win32_font_face_create_for_logfontw (LOGFONTW *logfont);
80 cairo_public cairo_font_face_t *
81 cairo_win32_font_face_create_for_hfont (HFONT font);
83 cairo_public cairo_font_face_t *
84 cairo_win32_font_face_create_for_logfontw_hfont (LOGFONTW *logfont, HFONT font);
86 cairo_public cairo_status_t
87 cairo_win32_scaled_font_select_font (cairo_scaled_font_t *scaled_font,
88 HDC hdc);
90 cairo_public void
91 cairo_win32_scaled_font_done_font (cairo_scaled_font_t *scaled_font);
93 cairo_public double
94 cairo_win32_scaled_font_get_metrics_factor (cairo_scaled_font_t *scaled_font);
96 cairo_public void
97 cairo_win32_scaled_font_get_logical_to_device (cairo_scaled_font_t *scaled_font,
98 cairo_matrix_t *logical_to_device);
100 cairo_public void
101 cairo_win32_scaled_font_get_device_to_logical (cairo_scaled_font_t *scaled_font,
102 cairo_matrix_t *device_to_logical);
104 #endif /* CAIRO_HAS_WIN32_FONT */
106 CAIRO_END_DECLS
108 #else /* CAIRO_HAS_WIN32_SURFACE */
109 # error Cairo was not compiled with support for the win32 backend
110 #endif /* CAIRO_HAS_WIN32_SURFACE */
112 #endif /* _CAIRO_WIN32_H_ */