Index: ui/gfx/gtk_util.h |
=================================================================== |
--- ui/gfx/gtk_util.h (revision 96870) |
+++ ui/gfx/gtk_util.h (working copy) |
@@ -7,11 +7,13 @@ |
#pragma once |
#include <glib-object.h> |
+#include <pango/pango-layout.h> |
#include <stdint.h> |
#include <string> |
#include <vector> |
+#include "base/i18n/rtl.h" |
#include "base/memory/scoped_ptr.h" |
#include "ui/base/ui_export.h" |
@@ -26,6 +28,7 @@ |
namespace gfx { |
+class Font; |
class Rect; |
// Call gtk_init() using the argc and argv from command_line. |
@@ -42,6 +45,17 @@ |
UI_EXPORT void SubtractRectanglesFromRegion(GdkRegion* region, |
const std::vector<Rect>& cutouts); |
+// Setup pango layout |layout|, including set layout text as |text|, font |
+// description based on |font|, width as |width| in PANGO_SCALE for RTL lcoale, |
+// and set up whether auto-detect directionality, alignment, ellipsis, word |
+// wrapping, resolution etc. |
+void SetupPangoLayout(PangoLayout* layout, |
msw
2011/08/23 08:01:01
Hmm, I didn't suspect that moving the declaration
xji
2011/08/23 23:52:52
Ah, I think I mis-interpreted your previous commen
|
+ const string16& text, |
+ const gfx::Font& font, |
+ int width, |
+ base::i18n::TextDirection text_direction, |
+ int flags); |
+ |
// Creates and returns a PangoContext. The caller owns the context. |
PangoContext* GetPangoContext(); |
@@ -65,7 +79,6 @@ |
// The caller is responsible for free()ing the data. If |stride| is 0, it's |
// assumed to be 4 * |width|. |
uint8_t* BGRAToRGBA(const uint8_t* pixels, int width, int height, int stride); |
- |
msw
2011/08/23 08:01:01
replace this line. (I think the common/proper styl
|
} // namespace gfx |
// It's not legal C++ to have a templatized typedefs, so we wrap it in a |