From d7b88a3bcc7e76f38ee5799be7722fd5a10781ef Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Wed, 13 Jan 1999 19:28:54 +0000 Subject: Updated all links so they work between files. Revision 1. git-svn-id: file:///fltk/svn/fltk/trunk@219 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- documentation/osissues.html | 720 +++++++++++++++++++------------------------- 1 file changed, 316 insertions(+), 404 deletions(-) (limited to 'documentation/osissues.html') diff --git a/documentation/osissues.html b/documentation/osissues.html index 572d8952c..83f6d6897 100644 --- a/documentation/osissues.html +++ b/documentation/osissues.html @@ -1,271 +1,216 @@ - - - -

F - Operating System Issues

- -This appendix describes the X and WIN32 specific interfaces in FLTK. - -

X-Specific Interface

- - - -On X you can include this file to access FLTK's X-specific functions. -Be warned that some of the structures and calls in it are subject to -change in future version of FLTK. Try to avoid doing this so your code -is portable. - -

Handling Other X Events

- -

void Fl::add_handler(int (*f)(int))

- -Installs a function to parse unrecognized events. If FLTK cannot figure -out what to do with an event, it calls each of these functions (most -recent first) until one of them returns non-zero. If none of them -returns non-zero then the event is ignored. - -

FLTK calls this for any X events it does not recognize, or X events -with a window id that FLTK does not recognize. You can look at the X -event with the fl_xevent variable. - -

The argument is zero for unrecognized X events. These handlers are -also called for global shortcuts and some other events that the widget -they were passed to did not handle. In this case the argument is -non-zero (for example FL_SHORTCUT). - -

extern XEvent *fl_xvent

- -The most recent X event. - -

extern ulong fl_event_time

- -This is the time stamp from the most recent X event that reported it -(not all do). Many X calls (like cut and paste) need this value. - -

Window fl_xid(const Fl_Window *)

- -Returns the XID for a window, or zero if not shown(). - -

Fl_Window *fl_find(ulong xid)

- -Returns the Fl_Window that corresponds to the given XID, or -NULL if not found. This uses a cache so it is slightly faster -than iterating through the windows yourself. - -

int fl_handle(const XEvent &)

- -This call allows you to supply the X events to FLTK, which may allow -FLTK to cooperate with another toolkit or library. The return value -is true if FLTK understood the event (if the window does not belong to -FLTK and the add_handler() functions all ignore it this returns -false). - -

Besides feeding events your code should call Fl::flush() periodically so that FLTK -redraws its windows. - -

This function will call the callback functions. It will not return -until they complete. In particular if a callback pops up a modal -window (by calling fl_ask(), for -instance) it will not return until the modal function returns. - -

Drawing using Xlib

- -The following global variables are set before -Fl_Widget::draw() is called, or by Fl_Window::make_current(): - - + It may also be useful to refer to +Fl_Window::current() to get the window's size or position. +

Setting the Icon of a Window

+ FLTK currently supports setting a window's icon *before* it is shown +using the Fl_Window::icon() method. +

void Fl_Window::icon(char *)

+ Sets the icon for the window to the passed pointer. You will need to +cast the HICON handle to a char * when calling this +method. To set the icon using an icon resource compiled with your +application use: + +

How to Not Get a MSDOS Console Window

+ WIN32 has a really stupid mode switch stored in the executables that +controls whether or not to make a console window. +

To always get a console window you simply create a console +application (the "/SUBSYSTEM:CONSOLE" option for the linker). For a +GUI-only application create a WIN32 application (the +"/SUBSYSTEM:WINDOWS" option for the linker).

+

FLTK includes a WinMain() function that calls the ANSI +standard main() entry point for you. This function creates +a console window when you use the debug version of the library.

+

WIN32 applications without a console cannot write to stdout + or stderr, even if they are run from a console window. Any +output is silently thrown away.

+

Known Bugs

+ If a program is deactivated, Fl::wait() does not return until +it is activated again, even though many events are delivered to the +program. This can cause idle background processes to stop unexpectedly. + This also happens while the user is dragging or resizing windows or +otherwise holding the mouse down. I was forced to remove most of the +efficiency FLTK uses for redrawing in order to get windows to update +while being moved. This is a design error in WIN32 and probably +impossible to get around. +

Fl_Gl_Window::can_do_overlay() returns true until the first +time it attempts to draw an overlay, and then correctly returns whether +or not there is overlay hardware.

+

Cut text contains ^J rather than ^M^J to break lines. This is a +feature, not a bug.

+

SetCapture (used by Fl::grab()) doesn't work, and +the main window title bar turns gray while menus are popped up.

+

FLUID does not support BMP files yet.

+ \ No newline at end of file -- cgit v1.2.3