diff options
| author | Matthias Melcher <fltk@matthiasm.com> | 2006-07-18 11:23:20 +0000 |
|---|---|---|
| committer | Matthias Melcher <fltk@matthiasm.com> | 2006-07-18 11:23:20 +0000 |
| commit | e6818b19a61dc4324505544aa5af15fd16e84eb9 (patch) | |
| tree | e30df5404d36e24dad579b4bf28977650ac2102c | |
| parent | b6f3595669994fe03169b4b85791c644b184845c (diff) | |
Fixed byte order in OS X cursor shape data. Added Xft font pointer fl_xftfont.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5262 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
| -rw-r--r-- | CHANGES | 1 | ||||
| -rw-r--r-- | FL/x.H | 1 | ||||
| -rw-r--r-- | documentation/osissues.html | 12 | ||||
| -rw-r--r-- | src/fl_font_x.cxx | 1 | ||||
| -rw-r--r-- | src/fl_font_xft.cxx | 2 |
5 files changed, 16 insertions, 1 deletions
@@ -1,5 +1,6 @@ CHANGES IN FLTK 1.1.8 + - Added access to Xft font pointer (STR #1328) - Fixed endianness in OS X mouse cursor graphics (STR #1348) - Fixed crash on mixed use of keyboard and mouse for @@ -69,6 +69,7 @@ extern FL_EXPORT Colormap fl_colormap; extern FL_EXPORT GC fl_gc; extern FL_EXPORT Window fl_window; extern FL_EXPORT XFontStruct* fl_xfont; +extern FL_EXPORT void *fl_xftfont; FL_EXPORT ulong fl_xpixel(Fl_Color i); FL_EXPORT ulong fl_xpixel(uchar r, uchar g, uchar b); FL_EXPORT void fl_clip_region(Fl_Region); diff --git a/documentation/osissues.html b/documentation/osissues.html index 3d5b9d767..95050cf0b 100644 --- a/documentation/osissues.html +++ b/documentation/osissues.html @@ -139,7 +139,17 @@ href="drawing.html#fl_color"><TT>fl_color()</TT></A> would use. href="drawing.html#fl_font"><TT>fl_font()</TT></A>. This is not necessarily the current font of <TT>fl_gc</TT>, which is not set until <A href="drawing.html#text"><TT>fl_draw()</TT></A> is -called. +called. If FLTK was compiled with Xft support, <TT>fl_xfont</TT> +will usually be 0 and <TT>fl_xftfont</TT> will contain a pointer +to the XftFont structure instead. + +<H4><A name="fl_xftfont">extern void *fl_xftfont</A></H4> + +<P>If FLTK was compiled with Xft support enabled, <tt>fl_xftfont</tt> +Points to the xft font selected by the most recent <A +href="drawing.html#fl_font"><TT>fl_font()</TT></A>. Otherwise +it will be 0. <tt>fl_xftfont</tt> should be casted to +<tt>XftFont*</tt>. <H3>Changing the Display, Screen, or X Visual</H3> diff --git a/src/fl_font_x.cxx b/src/fl_font_x.cxx index 6540cc275..2723a2197 100644 --- a/src/fl_font_x.cxx +++ b/src/fl_font_x.cxx @@ -196,6 +196,7 @@ static Fl_FontSize* find(int fnum, int size) { int fl_font_ = 0; int fl_size_ = 0; XFontStruct* fl_xfont = 0; +void *fl_xftfont = 0; static GC font_gc; void fl_font(int fnum, int size) { diff --git a/src/fl_font_xft.cxx b/src/fl_font_xft.cxx index 1c6a451da..71fb3736d 100644 --- a/src/fl_font_xft.cxx +++ b/src/fl_font_xft.cxx @@ -91,6 +91,7 @@ Fl_Fontdesc* fl_fonts = built_in_table; int fl_font_ = 0; int fl_size_ = 0; XFontStruct* fl_xfont = 0; +void *fl_xftfont = 0; const char* fl_encoding_ = "iso8859-1"; Fl_FontSize* fl_fontsize = 0; @@ -116,6 +117,7 @@ void fl_font(int fnum, int size) { #if XFT_MAJOR < 2 fl_xfont = f->font->u.core.font; #endif // XFT_MAJOR < 2 + fl_xftfont = (void*)f->font; } static XftFont* fontopen(const char* name, bool core) { |
