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/. */
10 #include "mozilla/TypedEnum.h"
12 typedef struct _cairo_surface cairo_surface_t
;
13 typedef struct _cairo_user_data_key cairo_user_data_key_t
;
15 typedef void (*thebes_destroy_func_t
) (void *data
);
18 * Currently needs to be 'double' for Cairo compatibility. Could
19 * become 'float', perhaps, in some configurations.
21 typedef double gfxFloat
;
24 * Priority of a line break opportunity.
26 * eNoBreak The line has no break opportunities
27 * eWordWrapBreak The line has a break opportunity only within a word. With
28 * word-wrap: break-word we will break at this point only if
29 * there are no other break opportunities in the line.
30 * eNormalBreak The line has a break opportunity determined by the standard
31 * line-breaking algorithm.
33 * Future expansion: split eNormalBreak into multiple priorities, e.g.
34 * punctuation break and whitespace break (bug 389710).
35 * As and when we implement it, text-wrap: unrestricted will
36 * mean that priorities are ignored and all line-break
37 * opportunities are equal.
39 * @see gfxTextRun::BreakAndMeasureText
40 * @see nsLineLayout::NotifyOptionalBreakPosition
42 MOZ_BEGIN_ENUM_CLASS(gfxBreakPriority
)
46 MOZ_END_ENUM_CLASS(gfxBreakPriority
)
49 * The format for an image surface. For all formats with alpha data, 0
50 * means transparent, 1 or 255 means fully opaque.
52 MOZ_BEGIN_ENUM_CLASS(gfxImageFormat
)
53 ARGB32
, ///< ARGB data in native endianness, using premultiplied alpha
54 RGB24
, ///< xRGB data in native endianness
55 A8
, ///< Only an alpha channel
56 A1
, ///< Packed transparency information (one byte refers to 8 pixels)
57 RGB16_565
, ///< RGB_565 data in native endianness
59 MOZ_END_ENUM_CLASS(gfxImageFormat
)
61 MOZ_BEGIN_ENUM_CLASS(gfxSurfaceType
)
67 Glitz
, // unused, but needed for cairo parity
71 DirectFB
, // unused, but needed for cairo parity
88 MOZ_END_ENUM_CLASS(gfxSurfaceType
)
90 MOZ_BEGIN_ENUM_CLASS(gfxContentType
)
95 MOZ_END_ENUM_CLASS(gfxContentType
)
98 * The memory used by a gfxASurface (as reported by KnownMemoryUsed()) can
99 * either live in this process's heap, in this process but outside the
100 * heap, or in another process altogether.
102 MOZ_BEGIN_ENUM_CLASS(gfxMemoryLocation
)
106 MOZ_END_ENUM_CLASS(gfxMemoryLocation
)
108 #endif /* GFX_TYPES_H */