iowaruntime.h

Go to the documentation of this file.
00001 
00002 /*  $Id: iowaruntime.h 1193 2006-04-05 21:27:33Z karstenw $    */
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 #ifndef iowaruntimeinclude
00029 #define iowaruntimeinclude
00030 
00031 #ifndef iowacoreinclude
00032 
00033     #include "iowacore.h"
00034 
00035 #endif
00036 
00037 
00038 #define iowaInitEvent 1000 /*constants for (*ev).what in callbacks*/
00039 #define iowaButtonHitEvent 1001
00040 #define iowaCloseEvent 1002
00041 #define iowaRunScriptEvent 1003
00042 #define iowaCancelEvent 1004 
00043 #define iowaSetHandleEvent 1005
00044 #define iowaOkeyDokeyEvent 1006 /*dmb 1.0b21*/
00045 
00046 
00047 typedef boolean (*tycardwindowvisitroutine) (WindowPtr);
00048 
00049 typedef void (*tycardeventcallback) (EventRecord *); 
00050 
00051 
00052 typedef struct tyruntimerecord {
00053     
00054     hdlcard hc; /*the unpacked version of the card*/
00055     
00056     WindowPtr macwindow; /*the window used to display the card*/
00057     
00058     boolean initfields; /*set true when the card starts up, consumed when the first event comes in*/
00059     
00060     boolean modeless; /*true if it's a modeless card, false if modal*/
00061     
00062     boolean closethiswindow; /*if true it's time to close this card's window*/
00063     
00064     boolean ownwindow; /*if true we created this window*/
00065     
00066     tycardeventcallback callback; /*a C routine that events filter thru*/
00067     } tyruntimerecord, **hdlruntimerecord;
00068 
00069 
00070 extern hdlruntimerecord runtimedata;
00071 
00072 extern boolean flquickrecalc; /*set false in cardrunner.c, under special circumstances*/
00073 
00074 extern boolean flexitcardloop; /*for modal cards, the loop should exit if true*/
00075 
00076 extern boolean flalertdialogrunning; /*prevent nested alerts*/
00077 
00078 
00079 boolean initIowaRuntime (void);
00080 
00081 WindowPtr newCardWindow (Point, boolean, Handle);
00082 
00083 boolean handleCardEvent (WindowPtr w, EventRecord *, boolean *);
00084 
00085 boolean cardEditCommand (short);
00086 
00087 boolean isCardWindow (WindowPtr);
00088 
00089 boolean cardToFront (bigstring);
00090 
00091 boolean recalcCardWindow (WindowPtr, boolean);
00092 
00093 boolean visitCardWindows (tycardwindowvisitroutine);
00094 
00095 short countCardWindows (void);
00096 
00097 boolean closeCardWindow (WindowPtr);
00098 
00099 void closeAllCardWindows (void);
00100 
00101 void getCardData (WindowPtr, hdlruntimerecord *); 
00102 
00103 boolean isModelessCardEvent (EventRecord *, boolean *);
00104 
00105 boolean cardIsModal (Handle);
00106 
00107 void installRuntimeEventHandlers (void); /*1.0b20 dmb*/
00108 
00109 boolean runModalCard (Handle, boolean, short, short, tycardeventcallback);
00110 
00111 boolean runModelessCard (Handle, boolean, short, short, tycardeventcallback);
00112 
00113 boolean runCard (Handle, boolean, short, short, tycardeventcallback);
00114 
00115 // 2006-04-03 - kw --- renamed parameter
00116 boolean runHostedCard (WindowPtr hostwindow, Handle hpackedcard, boolean flscriptedcard, tycardeventcallback pcallback);
00117 
00118 boolean setObjectValue (hdlcard, bigstring, Handle);
00119 
00120 boolean getObjectValue (hdlcard, bigstring, Handle *);
00121 
00122 boolean getObjectHandle (hdlcard, bigstring, hdlobject *);
00123 
00124 boolean recalcObject (hdlobject);
00125 
00126 boolean updateCard (hdlcard);
00127 
00128 WindowPtr getcardrecordwindow (hdlcard card);
00129 
00130 #endif

Generated on Wed May 31 18:19:50 2006 for frontierkernel 10.1.10a by  doxygen 1.4.6