SetUpA5.h

Go to the documentation of this file.
00001 
00002 /*  $Id: SetUpA5.h 1175 2006-04-01 13:30:11Z andreradke $    */
00003 
00004 /******************************************************************************
00005 
00006     UserLand Frontier(tm) -- High performance Web content management,
00007     object database, system-level and Internet scripting environment,
00008     including source code editing and debugging.
00009 
00010     Copyright (C) 1992-2004 UserLand Software, Inc.
00011 
00012     This program is free software; you can redistribute it and/or modify
00013     it under the terms of the GNU General Public License as published by
00014     the Free Software Foundation; either version 2 of the License, or
00015     (at your option) any later version.
00016 
00017     This program is distributed in the hope that it will be useful,
00018     but WITHOUT ANY WARRANTY; without even the implied warranty of
00019     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00020     GNU General Public License for more details.
00021 
00022     You should have received a copy of the GNU General Public License
00023     along with this program; if not, write to the Free Software
00024     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00025 
00026 ******************************************************************************/
00027 
00028 /*
00029     here's the scoop: when Frontier is servicing a component call, 
00030     running a script, it's A5 is set up.  when running a dialog, the 
00031     system gets confused if A5 isn't the same as that of the current 
00032     application.  (one way to make it flake out is to click in the 
00033     menu bar to pull down the dimmed menus.)  fortunately, we always 
00034     have the "correct" value at hand -- the low-mem global CurrentA5.
00035     
00036     these macros expand on those in Think C's SetUpA4.h by adding two 
00037     flavors of setting up A5, one to set it to CurrentA4, the other to 
00038     set it to the A5 that has been stashed away by calling RememberA5. 
00039     the latter value is Frontier's A5, which must be remembered before 
00040     setting A5 to CurrentA5.
00041     
00042     get it?  it works!
00043     
00044     2006-04-01 aradke: removed assembler code for Mac/68k and prepare for Mac/x86
00045 */
00046 
00047     
00048 //Code change by Timothy Paustian Wednesday, July 12, 2000 1:59:26 PM
00049 //A5 worlds have no relvance in Carbon so just define them away.
00050 #if TARGET_API_MAC_CARBON == 1
00051 
00052     #define RememberA5()
00053     
00054     #define SetUpThisA5(A5) nil
00055     
00056     #define SetUpAppA5() nil
00057         
00058     #define SetUpCurA5() nil
00059         
00060     #define RestoreA5(savedA5)
00061     
00062     #define pushA5()
00063     
00064     #define popA5()
00065 
00066 #else
00067     
00068     // 2006-04-01 aradke: only used for Classic Mac OS on PPC (which we actually don't even support anymore)
00069     
00070     static long __appA5;    /* 2004-10-28 aradke: not used on Carbon */
00071 
00072     #define RememberA5()    do {__appA5 = (long) LMGetCurrentA5 ();} while (0)
00073 
00074     #define SetUpThisA5(A5) SetA5 (A5)
00075 
00076     #define SetUpAppA5()    SetA5 (__appA5);
00077 
00078     //  #define SetUpCurA5()    do { savedA5 = SetA5 ((long) LMGetCurrentA5 ()); } while (0)
00079 
00080     #define SetUpCurA5()    SetCurrentA5 ();
00081 
00082     #define RestoreA5(savedA5)  SetA5 (savedA5)
00083 
00084     #define pushA5()        SetUpCurA5 ()
00085 
00086     #define popA5()         RestoreA5 ()
00087 
00088 #endif
00089 

Generated on Wed May 31 18:20:00 2006 for frontierkernel 10.1.10a by  doxygen 1.4.6