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
This commit is contained in:
Matthias Melcher 2006-07-18 11:23:20 +00:00
parent b6f3595669
commit e6818b19a6
5 changed files with 16 additions and 1 deletions

View File

@ -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

1
FL/x.H
View File

@ -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);

View File

@ -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>

View File

@ -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) {

View File

@ -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) {