Skip to content

Commit

Permalink
Added Carbon event handling for Mac OS X gaining support for the
Browse files Browse the repository at this point in the history
Mose Wheel, Key Modifiers, etc. .
Added some documentation (please check: English is not my native
language)
Changed line pattern to look a little nicer.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1835 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
  • Loading branch information
Matthias Melcher committed Dec 12, 2001
1 parent 96d4997 commit 0ee1fb7
Show file tree
Hide file tree
Showing 8 changed files with 317 additions and 45 deletions.
2 changes: 2 additions & 0 deletions CHANGES
@@ -1,5 +1,7 @@
CHANGES IN FLTK 1.1.0b7

- Mac OS X uses mostly Carbon event handling to support
Mousewheel, three buttons, all modifier keys, etc.
- More documentation updates...
- Mac OS X support works 95%
- Updated paragraph 4 of the FLTK license exceptions;
Expand Down
4 changes: 2 additions & 2 deletions documentation/drawing.html
Expand Up @@ -141,7 +141,7 @@ <H3><A name="colors">Colors</A></H3>
screen, either from one of the 256 colors in the FLTK 1.0.x
colormap or a direct RGB value on TrueColor screens. You can
generate 24-bit RGB color values using the <A
HREF="functions.html#fl_rgb_color"><TT>fl_rgb_color()</TT>
HREF="functions.html#fl_rgb_color"><TT>fl_rgb_color()</TT></A>
function.

<H4>void fl_color(Fl_Color)</H4>
Expand Down Expand Up @@ -770,7 +770,7 @@ <H3><A name="Fl_Image">Image Classes</A></H3>
<H4>virtual void copy();<BR>
virtual void copy(int w, int h);</H4>

<P>The <TT>copy() method creates a copy of the image. The second form
<P>The <TT>copy()</TT> method creates a copy of the image. The second form
specifies the new size of the image - the image is resized using the
nearest-neighbor algorithm.

Expand Down
8 changes: 4 additions & 4 deletions documentation/intro.html
Expand Up @@ -98,12 +98,12 @@ <H2>Features</H2>
<LI>The FLUID program (which includes every widget) is
538k.</LI>

<LI>Written directly atop Xlib (or WIN32) for maximum
<LI>Written directly atop core libraries (Xlib, WIN32 or Carbon) for maximum
speed, and carefully optimized for code size and
performance.</LI>

<LI>Precise low-level compatability between the X11 and
WIN32 version - only about 10% of the code is
<LI>Precise low-level compatability between the X11,
WIN32 and MacOS version - only about 10% of the code is
different.</LI>

<LI>Interactive user interface builder program. Output is
Expand All @@ -113,7 +113,7 @@ <H2>Features</H2>
is available.</LI>

<LI>Very small &amp; fast portable 2-D drawing library
to hide Xlib and WIN32.</LI>
to hide Xlib, WIN32 or QuickDraw.</LI>

<LI>OpenGL/Mesa drawing area widget.</LI>

Expand Down
32 changes: 32 additions & 0 deletions documentation/osissues.html
Expand Up @@ -373,4 +373,36 @@ <H3>Known Bugs</H3>
<P><TT>SetCapture</TT> (used by <TT>Fl::grab()</TT>) doesn't work, and
the main window title bar turns gray while menus are popped up. </P>
<P>FLUID does not support BMP files yet. </P>

<H2>MacOS-specific interface</h2>
FLTK supports MacOS 8.6, MacOS 9 and Mac OS X using the Apple Carbon library.
When compiled with MPW or MetroWerks' CodeWarrior, application binaries in CFM format will
run on all the above systems without changes.
OS X's 'gcc' however creates Mach-O binaries which are not supported by
MacOS 9 and earlier.
<br>
<PRE>#include &lt;FL/x.H&gt;</PRE>
The <tt>&lt;FL/x.H&gt;</tt> header file defines the interface to FLTK's MacOS-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.
<H4>WindowRef fl_xid(const Fl_Window *)</h4>
Returns the window reference for an <tt>Fl_Window</tt>, or NULL if not shown.
<h4>Fl_Window *fl_find(WindowRef xid)</h4>
Return the <tt>Fl_Window</tt> that corresponds to the give window hande, or NULL if not found. FLTK Windows that are children of top-level windows share the WindowRef
with the top-level window.
<h3>Drawing Things Using QuickDraw</h3>
When the virtual function <tt>Fl_Widget::draw()</tt> is called, FLTK has prepared
the Window and CGrafPort for drawing. Clipping and offsets are prepared to allow
correct subwindow drawing.
<br><br>
OS X doublebuffers all windows automatically. On OS X <tt>Fl_Window</tt> and
<tt>Fl_Double_Window</tt> are handled internally in the same way.
<h3>Mac File System Specifics</h3>
<h4>Resource Forks</h4>
FLTK does not access the resource fork of an application. However, a minimal
resource fork must be created for OS 8 and OS X applications.
<h4>Mac File Paths</h4>
FLTK uses Unix-style filenames and paths.

</BODY></HTML>
8 changes: 6 additions & 2 deletions documentation/preface.html
Expand Up @@ -11,7 +11,7 @@ <H1 ALIGN=RIGHT><A NAME=preface>Preface</A></H1>

<P>This manual describes the Fast Light Tool Kit (&quot;FLTK&quot;)
version 1.1.0, a C++ Graphical User Interface
(&quot;GUI&quot;) toolkit for UNIX and Microsoft Windows. Each
(&quot;GUI&quot;) toolkit for UNIX, Microsoft Windows and MacOS. Each
of the chapters in this manual is designed as a tutorial for
using FLTK, while the appendices provide a convenient reference
for all FLTK widgets, functions, and operating system
Expand Down Expand Up @@ -88,6 +88,9 @@ <H2>Abbreviations</H2>
<DT>WIN32</DT>
<DD>The Microsoft Windows 32-bit Application Programmer's Interface.</DD>

<DT>MacOS</DT>
<DD>The Apple Macintosh OS 8.6 and later, including OS X.<DD>

</DL>

<H2>Copyrights and Trademarks</H2>
Expand All @@ -98,7 +101,8 @@ <H2>Copyrights and Trademarks</H2>

<P>UNIX is a registered trademark of the X Open Group, Inc. Microsoft
and Windows are registered trademarks of Microsoft Corporation. OpenGL
is a registered trademark of Silicon Graphics, Inc. </P>
is a registered trademark of Silicon Graphics, Inc. . Apple, Macintosh,
MacOS and Mac OS X are registered trademarks of Apple Computer, Inc. .</P>

</BODY>
</HTML>
8 changes: 4 additions & 4 deletions src/Fl_grab.cxx
@@ -1,5 +1,5 @@
//
// "$Id: Fl_grab.cxx,v 1.1.2.4.2.2 2001/11/27 17:44:06 easysw Exp $"
// "$Id: Fl_grab.cxx,v 1.1.2.4.2.3 2001/12/12 07:50:37 matthiaswm Exp $"
//
// Grab/release code for the Fast Light Tool Kit (FLTK).
//
Expand Down Expand Up @@ -51,7 +51,7 @@ void Fl::grab(Fl_Window* w) {
SetActiveWindow(fl_capture = fl_xid(first_window()));
SetCapture(fl_capture);
#elif defined(__APPLE__)
//++
BeginAppModalStateForWindow( fl_xid(first_window()) );
#else
XGrabPointer(fl_display,
fl_xid(first_window()),
Expand All @@ -78,7 +78,7 @@ void Fl::grab(Fl_Window* w) {
fl_capture = 0;
ReleaseCapture();
#elif defined(__APPLE__)
//++
EndAppModalStateForWindow( fl_xid(first_window()) );
#else
XUngrabKeyboard(fl_display, fl_event_time);
XUngrabPointer(fl_display, fl_event_time);
Expand All @@ -93,5 +93,5 @@ void Fl::grab(Fl_Window* w) {
}

//
// End of "$Id: Fl_grab.cxx,v 1.1.2.4.2.2 2001/11/27 17:44:06 easysw Exp $".
// End of "$Id: Fl_grab.cxx,v 1.1.2.4.2.3 2001/12/12 07:50:37 matthiaswm Exp $".
//

0 comments on commit 0ee1fb7

Please sign in to comment.