1 // Copyright (c) 2011 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.
5 #ifndef PPAPI_THUNK_PPB_BROWSER_FONT_TRUSTED_API_H_
6 #define PPAPI_THUNK_PPB_BROWSER_FONT_TRUSTED_API_H_
8 #include "ppapi/c/trusted/ppb_browser_font_trusted.h"
9 #include "ppapi/thunk/ppapi_thunk_export.h"
14 // API for font resources.
15 class PPAPI_THUNK_EXPORT PPB_BrowserFont_Trusted_API
{
17 virtual ~PPB_BrowserFont_Trusted_API() {}
19 virtual PP_Bool
Describe(PP_BrowserFont_Trusted_Description
* description
,
20 PP_BrowserFont_Trusted_Metrics
* metrics
) = 0;
21 virtual PP_Bool
DrawTextAt(PP_Resource image_data
,
22 const PP_BrowserFont_Trusted_TextRun
* text
,
23 const PP_Point
* position
,
26 PP_Bool image_data_is_opaque
) = 0;
27 virtual int32_t MeasureText(const PP_BrowserFont_Trusted_TextRun
* text
) = 0;
28 virtual uint32_t CharacterOffsetForPixel(
29 const PP_BrowserFont_Trusted_TextRun
* text
,
30 int32_t pixel_position
) = 0;
31 virtual int32_t PixelOffsetForCharacter(
32 const PP_BrowserFont_Trusted_TextRun
* text
,
33 uint32_t char_offset
) = 0;
39 #endif // PPAPI_THUNK_PPB_BROWSER_FONT_TRUSTED_API_H_