Author: manolo
Date: 2011-01-20 05:22:30 -0800 (Thu, 20 Jan 2011)
New Revision: 8295
Log:
Redefined fl_xid() as an inline function when used inside the FLTK library.
Modified:
branches/branch-1.3/FL/win32.H
branches/branch-1.3/FL/x.H
branches/branch-1.3/src/Fl_win32.cxx
branches/branch-1.3/src/Fl_x.cxx
Modified: branches/branch-1.3/FL/win32.H
===================================================================
--- branches/branch-1.3/FL/win32.H 2011-01-20 12:55:50 UTC (rev 8294)
+++ branches/branch-1.3/FL/win32.H 2011-01-20 13:22:30 UTC (rev 8295)
@@ -101,9 +101,13 @@
extern FL_EXPORT void fl_release_dc(HWND w, HDC dc);
extern FL_EXPORT void fl_save_dc( HWND w, HDC dc);
+inline Window fl_xid(const Fl_Window* w) { Fl_X *temp = Fl_X::i(w); return
temp ? temp->xid : 0; }
+
+#else
+FL_EXPORT Window fl_xid_(const Fl_Window* w);
+#define fl_xid(w) fl_xid_(w)
#endif // FL_LIBRARY || FL_INTERNALS
-extern FL_EXPORT Window fl_xid(const Fl_Window*w);
FL_EXPORT Fl_Window* fl_find(Window xid);
FL_EXPORT void fl_clip_region(Fl_Region);
Modified: branches/branch-1.3/FL/x.H
===================================================================
--- branches/branch-1.3/FL/x.H 2011-01-20 12:55:50 UTC (rev 8294)
+++ branches/branch-1.3/FL/x.H 2011-01-20 13:22:30 UTC (rev 8295)
@@ -163,10 +163,15 @@
extern FL_EXPORT char fl_override_redirect; // hack into Fl_X::make_xid()
extern FL_EXPORT int fl_background_pixel; // hack into Fl_X::make_xid()
+inline Window fl_xid(const Fl_Window* w) { return Fl_X::i(w)->xid; }
+
+#else
+
+extern Window fl_xid_(const Fl_Window* w);
+#define fl_xid(w) fl_xid_(w)
+
#endif // FL_LIBRARY || FL_INTERNALS
-// convert xid <-> Fl_Window:
-Window fl_xid(const Fl_Window*w);
FL_EXPORT Fl_Window* fl_find(Window xid);
Modified: branches/branch-1.3/src/Fl_win32.cxx
===================================================================
--- branches/branch-1.3/src/Fl_win32.cxx 2011-01-20 12:55:50 UTC (rev
8294)
+++ branches/branch-1.3/src/Fl_win32.cxx 2011-01-20 13:22:30 UTC (rev
8295)
@@ -1933,7 +1933,7 @@
return CreatePolygonRgn(pt, 4, ALTERNATE);
}
-Window fl_xid(const Fl_Window *w) {
+Window fl_xid_(const Fl_Window *w) {
Fl_X *temp = Fl_X::i(w);
return temp ? temp->xid : 0;
}
Modified: branches/branch-1.3/src/Fl_x.cxx
===================================================================
--- branches/branch-1.3/src/Fl_x.cxx 2011-01-20 12:55:50 UTC (rev 8294)
+++ branches/branch-1.3/src/Fl_x.cxx 2011-01-20 13:22:30 UTC (rev 8295)
@@ -1880,7 +1880,7 @@
#endif
}
-Window fl_xid(const Fl_Window* w)
+Window fl_xid_(const Fl_Window* w)
{
return Fl_X::i(w)->xid;
}
_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit