28 #if !defined(FL_PLATFORM_H) && !defined(FL_DOXYGEN) 29 # define FL_PLATFORM_H 31 # include <FL/Fl_Export.H> 38 # elif defined(__APPLE__) 40 # elif defined(__ANDROID__) 45 # if !defined(USE_X11) 48 # if defined(_ABIN32) || defined(_ABI64) // fix for broken SGI Irix X .h files 49 # pragma set woff 3322 51 # include <X11/Xlib.h> 52 # include <X11/Xutil.h> 53 # if defined(_ABIN32) || defined(_ABI64) 54 # pragma reset woff 3322 56 # include <X11/Xatom.h> 59 extern FL_EXPORT Display *fl_display;
60 extern FL_EXPORT
int fl_screen;
61 extern FL_EXPORT XVisualInfo *fl_visual;
62 extern FL_EXPORT Colormap fl_colormap;
65 extern FL_EXPORT GC fl_gc;
70 FL_EXPORT
int fl_handle(
const XEvent&);
73 extern FL_EXPORT
const XEvent* fl_xevent;
74 extern FL_EXPORT
ulong fl_event_time;
76 #if defined(FL_LIBRARY) || defined(FL_INTERNALS) 77 extern FL_EXPORT Window fl_message_window;
78 extern FL_EXPORT
void *fl_xftfont;
87 class FL_EXPORT Fl_XFont_On_Demand
90 Fl_XFont_On_Demand(XFontStruct* p = NULL) : ptr(p) { }
91 Fl_XFont_On_Demand& operator=(
const Fl_XFont_On_Demand& x)
92 { ptr = x.ptr;
return *
this; }
93 Fl_XFont_On_Demand& operator=(XFontStruct* p)
94 { ptr = p;
return *
this; }
96 operator XFontStruct*() {
return value(); }
97 XFontStruct& operator*() {
return *value(); }
98 XFontStruct* operator->() {
return value(); }
99 bool operator==(
const Fl_XFont_On_Demand& x) {
return ptr == x.ptr; }
100 bool operator!=(
const Fl_XFont_On_Demand& x) {
return ptr != x.ptr; }
104 extern FL_EXPORT Fl_XFont_On_Demand fl_xfont;
106 extern FL_EXPORT
char fl_override_redirect;
107 extern FL_EXPORT
int fl_background_pixel;
109 #endif // FL_LIBRARY || FL_INTERNALS 116 #if defined(FL_LIBRARY) || defined(FL_INTERNALS) 119 class FL_EXPORT Fl_X {
127 static Fl_X* i(
const Fl_Window* w) {
return (Fl_X*)w->i;}
128 # if defined(USE_X11) // for backward compatibility 129 static void make_xid(
Fl_Window*, XVisualInfo* =fl_visual, Colormap=fl_colormap);
130 static Fl_X* set_xid(
Fl_Window*, Window);
134 inline Window fl_xid(
const Fl_Window* w) { Fl_X *xTemp = Fl_X::i(w);
return xTemp ? xTemp->xid : 0; }
136 extern FL_EXPORT Window fl_xid_(
const Fl_Window* w);
137 # define fl_xid(w) fl_xid_(w) 138 #endif // FL_LIBRARY || FL_INTERNALS 140 extern FL_EXPORT
Fl_Window* fl_find(Window xid);
142 extern FL_EXPORT
void fl_close_display();
143 extern FL_EXPORT Window fl_window;
144 extern FL_EXPORT
Fl_Bitmask fl_create_bitmask(
int w,
int h,
const uchar *data);
145 extern FL_EXPORT
Fl_Bitmask fl_create_alphamask(
int w,
int h,
int d,
int ld,
const uchar *data);
146 extern FL_EXPORT
void fl_delete_bitmask(
Fl_Bitmask bm);
147 extern FL_EXPORT
int fl_parse_color(
const char* p,
uchar& r,
uchar& g,
uchar& b);
150 #endif // !FL_PLATFORM_H This widget produces an actual window.
Definition: Fl_Window.H:53
void fl_open_callback(void(*cb)(const char *))
Register a function called for each file dropped onto an application icon.
Definition: Fl.cxx:2112
unsigned long ulong
unsigned long
Definition: fl_types.h:30
This file contains type definitions and general enumerations.
void fl_open_display()
Opens the display.
Definition: Fl.cxx:2083
unsigned int Fl_Color
An FLTK color value; see also Colors.
Definition: Enumerations.H:1042
This file contains simple "C"-style type definitions.
Mac OS X-specific symbols.
unsigned char uchar
unsigned char
Definition: fl_types.h:28