Bug 1444940 [wpt PR 9917] - Writable streams: test changes to abort() under error...
[gecko.git] / gfx / thebes / gfxTypes.h
blob6702d2dfc7ca5765e185a99a4ab5279c802562c9
1 /* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2 * This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef GFX_TYPES_H
7 #define GFX_TYPES_H
9 #include <stdint.h>
11 typedef struct _cairo_surface cairo_surface_t;
12 typedef struct _cairo_user_data_key cairo_user_data_key_t;
14 typedef void (*thebes_destroy_func_t) (void *data);
16 /**
17 * Currently needs to be 'double' for Cairo compatibility. Could
18 * become 'float', perhaps, in some configurations.
20 typedef double gfxFloat;
22 /**
23 * Priority of a line break opportunity.
25 * eNoBreak The line has no break opportunities
26 * eWordWrapBreak The line has a break opportunity only within a word. With
27 * overflow-wrap|word-wrap: break-word we will break at this point only if
28 * there are no other break opportunities in the line.
29 * eNormalBreak The line has a break opportunity determined by the standard
30 * line-breaking algorithm.
32 * Future expansion: split eNormalBreak into multiple priorities, e.g.
33 * punctuation break and whitespace break (bug 389710).
34 * As and when we implement it, text-wrap: unrestricted will
35 * mean that priorities are ignored and all line-break
36 * opportunities are equal.
38 * @see gfxTextRun::BreakAndMeasureText
39 * @see nsLineLayout::NotifyOptionalBreakPosition
41 enum class gfxBreakPriority {
42 eNoBreak = 0,
43 eWordWrapBreak,
44 eNormalBreak
47 enum class gfxSurfaceType {
48 Image,
49 PDF,
50 PS,
51 Xlib,
52 Xcb,
53 Glitz, // unused, but needed for cairo parity
54 Quartz,
55 Win32,
56 BeOS,
57 DirectFB, // unused, but needed for cairo parity
58 SVG,
59 OS2,
60 Win32Printing,
61 QuartzImage,
62 Script,
63 QPainter,
64 Recording,
65 VG,
66 GL,
67 DRM,
68 Tee,
69 XML,
70 Skia,
71 Subsurface,
72 Max
75 enum class gfxContentType {
76 COLOR = 0x1000,
77 ALPHA = 0x2000,
78 COLOR_ALPHA = 0x3000,
79 SENTINEL = 0xffff
82 enum class gfxAlphaType {
83 Opaque,
84 Premult,
85 NonPremult,
88 #endif /* GFX_TYPES_H */