iowacore.h

Go to the documentation of this file.
00001 
00002 /*  $Id: iowacore.h 1298 2006-04-18 19:40:22Z 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 #ifndef iowacoreinclude
00029 #define iowacoreinclude
00030 
00031 #include "byteorder.h"  /* 2006-04-17 aradke: for SWAP_BYTE_ORDER */
00032 
00033 #ifdef coderesource /*we're building into a UCMD*/
00034     
00035     #define ucmd /*do things to save space*/
00036 
00037 #endif
00038 
00039 
00040 #ifndef texteditinclude
00041     
00042     #include <applettextedit.h>
00043 
00044 #endif
00045 
00046 
00047 #ifndef memoryinclude
00048 
00049     #include <appletmemory.h>
00050 
00051 #endif
00052 
00053 
00054 #ifndef stringsinclude
00055 
00056     #include <appletstrings.h>
00057 
00058 #endif
00059 
00060 
00061 #ifndef appletpopupinclude
00062 
00063     #include <appletpopup.h>
00064 
00065 #endif
00066 
00067 
00068 #ifndef ioainclude
00069     
00070     #include <ioa.h>
00071     
00072 #endif
00073 
00074 #ifndef iowavalidateinclude
00075 
00076     #include "iowavalidate.h"
00077 
00078 #endif
00079 
00080 
00081 extern hdlcard iowadata; /*points to a card record, the one we're currently working with*/
00082 
00083 extern boolean displaydebug;
00084 
00085 #define checkboxinset 5 /*the number of pixels to skip between checkbox and text*/
00086 
00087 #define uistringlist 130
00088 #define initialpopupscript 1
00089 #define pastepicturehere 2
00090 #define defaulticonresnum 3
00091 #define shadowdepthprompt 4
00092 #define setgridprompt 5
00093 #define untitledobjectname 6
00094 
00095 
00096 typedef struct tydiskheader {
00097     
00098     short versionnumber;
00099     
00100     short v2backcolor;
00101     
00102     long lenembeddedtable; /*only in version 2 records*/
00103     
00104     short defaultfillcolor;
00105     
00106     short defaulttextcolor;
00107     
00108     short defaultframecolor;
00109 
00110 #ifdef SWAP_BYTE_ORDER
00111     
00112     unsigned short wastebits: 10; /*room for more booleans*/
00113     
00114     unsigned short floater: 1;
00115     
00116     unsigned short flinvisiblegrid: 1; 
00117     
00118     unsigned short flselection: 1;
00119     
00120     unsigned short flgrid: 1;
00121     
00122     unsigned short defaulttransparent: 1;
00123 
00124     unsigned short defaulthasframe: 1;
00125 
00126 #else
00127 
00128     unsigned short defaulthasframe: 1;
00129     
00130     unsigned short defaulttransparent: 1;
00131     
00132     unsigned short flgrid: 1;
00133     
00134     unsigned short flselection: 1;
00135     
00136     unsigned short flinvisiblegrid: 1; 
00137     
00138     unsigned short floater: 1;
00139     
00140     unsigned short wastebits: 10; /*room for more booleans*/
00141 
00142 #endif
00143 
00144     short gridunits;
00145     
00146     short rightborder, bottomborder;
00147     
00148     RGBColor backcolor;
00149     
00150     long idwindow;
00151     
00152     long lenwindowtitle;
00153 
00154     char waste [64]; /*room for growth*/
00155     } tydiskheader;
00156     
00157     
00158 typedef struct tydiskobject {
00159     
00160     short versionnumber; /*currently set at 3*/
00161     
00162     unsigned char v1objecttype; /*this is where v1 records stored the object type*/
00163     
00164     Rect objectrect;
00165     
00166     long lenname, lenvalue, lenscript, lendata;
00167     
00168     char objectfont [32]; /*name of the the object's font*/
00169     
00170     short objectfontsize;
00171     
00172     short objectstyle;
00173     
00174     short objectjustification;
00175     
00176     short objectrecalcstatus;
00177     
00178     short objectrecalcperiod;
00179     
00180     short unused1;
00181     
00182     short objectdropshadowdepth;
00183     
00184     short objectlinespacing;
00185     
00186     short objectindentation;
00187 
00188 #ifdef SWAP_BYTE_ORDER
00189     
00190     unsigned short wastebits1: 1;   /* room for more booleans */
00191     
00192     unsigned short objectdisabled: 1;
00193     
00194     unsigned short objectfastscript: 1;
00195     
00196     unsigned short objecttransparent: 1;
00197     
00198     unsigned short lastinlist: 1;
00199     
00200     unsigned short objectinvisible: 1;
00201     
00202     unsigned short objectflag: 1;
00203 
00204     unsigned short objecthasframe: 1;
00205     
00206     unsigned short wastebits2: 8;   /* room for more booleans */
00207 
00208 #else
00209 
00210     unsigned short objecthasframe: 1;
00211     
00212     unsigned short objectflag: 1;
00213     
00214     unsigned short objectinvisible: 1;
00215     
00216     unsigned short lastinlist: 1;
00217     
00218     unsigned short objecttransparent: 1;
00219     
00220     unsigned short objectfastscript: 1;
00221     
00222     unsigned short objectdisabled: 1;
00223     
00224     unsigned short wastebits: 9;    /* room for more booleans */
00225 
00226 #endif
00227 
00228     long objecttype; /*room for lots of object types*/
00229     
00230     RGBColor objectfillcolor, objecttextcolor, objectframecolor;
00231     
00232     long objectlanguage; /*component subtype for linked script's interpreter*/ 
00233     
00234     long lenrecalcscript;
00235     
00236     char waste [2]; /*room for growth*/
00237     } tydiskobject;
00238     
00239     
00240 typedef struct tyunpackglobals {
00241 
00242     ptrchar p, lastp;
00243     
00244     short hoffset, voffset;
00245     } tyunpackglobals;
00246     
00247 
00248 extern tyunpackglobals unpack;
00249 
00250 
00251 #ifndef iowaRuntime /*it's card editor building, not card runner*/
00252     
00253     #ifndef iowainclude
00254     
00255         #include "iowa.h"
00256     
00257     #endif
00258 
00259 #endif
00260 
00261 short makemultiple (short, short);
00262 
00263 short closestmultiple (short, short);
00264 
00265 boolean iowaopenbitmap (Rect);
00266 
00267 boolean iowaclosebitmap (void);
00268 
00269 boolean iowagetstring (short, bigstring);
00270 
00271 boolean geteditrect (hdlobject, Rect *);
00272 
00273 void getobjectnamestring (hdlobject, bigstring);
00274 
00275 void getobjectname (hdlobject, Handle *);
00276 
00277 void getobjectvalue (hdlobject, Handle *);
00278 
00279 void getobjectscript (hdlobject, Handle *);
00280 
00281 void getobjectrecalcscript (hdlobject, Handle *);
00282 
00283 void getobjectsize (hdlobject, short *, short *);
00284 
00285 void setobjectvalue (hdlobject, Handle);
00286 
00287 void setobjectscript (hdlobject, Handle);
00288 
00289 void setobjectrecalcscript (hdlobject, Handle);
00290 
00291 void setobjectname (hdlobject, Handle);
00292 
00293 void setobjecterrormessage (hdlobject, Handle);
00294 
00295 void getgrouprect (hdlobject, Rect *);
00296 
00297 boolean getobjectrect (hdlobject, Rect *);
00298 
00299 void getobjectframe (hdlobject, Rect *);
00300 
00301 void drawobjectlist (hdlobject x); 
00302 
00303 void drawobject (hdlobject);
00304 
00305 void drawobjectnow (hdlobject);
00306 
00307 void pushobjectstyle (hdlobject);
00308 
00309 void popobjectstyle (void);
00310 
00311 boolean inselection (hdlobject);
00312 
00313 boolean iowaupdate (void);
00314 
00315 void debugrect (Rect);
00316 
00317 void waitfornexttick (void);
00318 
00319 boolean findterminalobject (Point, hdlobject, hdlobject *, hdlobject *);
00320 
00321 boolean setactivetextobject (hdlobject);
00322 
00323 void clearactivetextobject (void);
00324 
00325 hdleditrecord getactiveeditrecord (void);
00326 
00327 boolean visitobjects (hdlobject, tyobjectvisitroutine);
00328 
00329 boolean visittoplevelobjects (hdlobject, tyobjectvisitroutine);
00330 
00331 void getobjectinvalrect (hdlobject, Rect *);
00332 
00333 void invalobject (hdlobject);
00334 
00335 void validobject (hdlobject);
00336 
00337 void toggleobjectflag (hdlobject);
00338 
00339 boolean iowasetpictrect (void);
00340 
00341 void sortobjectlist (void);
00342 
00343 void laythread (void);
00344 
00345 boolean findobject (Point, hdlobject, hdlobject *);
00346 
00347 boolean getnthobject (hdlobject, short, hdlobject *);
00348 
00349 short countobjects (hdlobject);
00350 
00351 void getchildobjectlist (hdlobject, hdlobject *);
00352 
00353 void iowainvalrect (Rect *);
00354 
00355 void iowaupdatenow (void);
00356 
00357 boolean iowaunpack (Handle);
00358 
00359 void clearalltmpbits (void);
00360 
00361 void getlastinlist (hdlobject, hdlobject *);
00362 
00363 void disposeobjectlist (hdlobject);
00364 
00365 void disposeobject (hdlobject);
00366 
00367 boolean iowadisposerecord (void);
00368 
00369 boolean lookupname (bigstring, hdlobject *);
00370 
00371 boolean iowapreupdate (void);
00372 
00373 void pushtemphandle (Handle);
00374 
00375 void releasetemphandles (void);
00376 
00377 void disposetemphandle (Handle);
00378 
00379 boolean iowagetbooleanvalue (hdlobject, Handle *);
00380 
00381 boolean iowasetbooleanvalue (hdlobject, Handle);
00382 
00383 boolean iowagetstringvalue (hdlobject, Handle *);
00384 
00385 void checkrecalc (void);
00386 
00387 void schedulerecalc (hdlobject, short);
00388 
00389 boolean recalcobjectvalue (hdlobject);
00390 
00391 boolean runbuttonscript (hdlobject);
00392 
00393 void recalcobject (hdlobject);
00394 
00395 boolean recalcclone (hdlobject);
00396 
00397 boolean derefclone (hdlobject *);
00398 
00399 boolean minorrecalcvisit (hdlobject);
00400 
00401 boolean majorrecalcvisit (hdlobject);
00402 
00403 boolean initexclusiveobjectsvisit (hdlobject);
00404 
00405 void turnonfirstexclusiveobject (hdlobject);
00406 
00407 void turnoffallexclusiveobjects (hdlobject);
00408 
00409 short groupvertfudge (hdlobject);
00410 
00411 boolean setCardValue (bigstring, Handle);
00412 
00413 boolean setCardValueCopy (bigstring, Handle);
00414 
00415 boolean setCardString (bigstring, bigstring);
00416 
00417 boolean getCardValue (bigstring, Handle *);
00418 
00419 boolean getCardValueCopy (bigstring, Handle *);
00420 
00421 boolean setCardFlag (bigstring, boolean);
00422 
00423 boolean getCardFlag (bigstring, boolean *);
00424 
00425 boolean unlinkobject (hdlobject);
00426 
00427 void getgrouprect (hdlobject, Rect *); 
00428 
00429 void movegroupto (hdlobject, short, short); 
00430 
00431 boolean putobjectrect (hdlobject, Rect);
00432 
00433 boolean initIOAcomponents (Handle *);
00434 
00435 void restorecomponentarray (Handle);
00436 
00437 boolean closeIOAcomponents (void);
00438 
00439 boolean callinitobject (tyobject *);
00440 
00441 boolean calldrawobject (hdlobject);
00442 
00443 boolean calleditobject (hdlobject, boolean);
00444 
00445 boolean callidleobject (hdlobject);
00446 
00447 boolean callkeyobject (hdlobject, char);
00448 
00449 boolean callclick (hdlobject, hdlobject, Point, boolean, boolean);
00450 
00451 boolean callcleanobject (hdlobject, short, short, Rect *);
00452 
00453 boolean callrecalcobject (hdlobject, boolean);
00454 
00455 boolean callcanreplicate (hdlobject);
00456 
00457 boolean callgetinvalrect (hdlobject, Rect *);
00458 
00459 boolean callgeteditrect (hdlobject, Rect *);
00460 
00461 boolean callgetvalue (hdlobject, Handle *);
00462 
00463 boolean callsetvalue (hdlobject, Handle);
00464 
00465 boolean callsetcursor (hdlobject, Point);
00466 
00467 boolean callcatchreturn (hdlobject);
00468 
00469 boolean callunpackdata (hdlobject);
00470 
00471 boolean calldisposedata (hdlobject);
00472 
00473 boolean callgetattributes (hdlobject, AppleEvent *);
00474 
00475 boolean callsetattributes (hdlobject, AppleEvent *);
00476 
00477 boolean callgetcard (hdlobject, Handle *);
00478 
00479 boolean callpackdata (hdlobject, Handle *);
00480 
00481 boolean calldebug (hdlobject, Str255);
00482 
00483 boolean callgetobjectname (hdlobject, Str255);
00484 
00485 boolean callgetobjectflagname (hdlobject, Str255);
00486 
00487 boolean callframewhenediting (hdlobject);
00488 
00489 boolean callcaneditvalue (hdlobject);
00490 
00491 boolean calltoggleflagwhenhit (hdlobject);
00492 
00493 boolean callmutallyexclusive (hdlobject);
00494 
00495 boolean callspeaksforgroup (hdlobject);
00496 
00497 boolean callhandlesmousetrack (hdlobject);
00498 
00499 boolean calleditableinrunmode (hdlobject);
00500 
00501 boolean callfontaware (hdlobject);
00502 
00503 boolean callalwaysidle (hdlobject);
00504 
00505 boolean callhasspecialcard (hdlobject);
00506 
00507 boolean callcantdrawinbitmap (hdlobject);
00508 
00509 void initIOAcallbacks (void);
00510 
00511 void geteventwindow (EventRecord *, WindowPtr *);
00512 
00513 boolean alertdialog (bigstring);
00514 
00515 boolean recalcbottleneck (hdlobject, boolean);
00516 
00517 boolean runcardscript (Handle, long, boolean, bigstring, Handle *);
00518 
00519 boolean cardFastScript (bigstring, Handle, bigstring);
00520 
00521 boolean showinvisiblesloop (void);
00522 
00523 void editclickbottleneck (Point, boolean, hdleditrecord);
00524 
00525 boolean autonameobject (hdlobject);
00526 
00527 void setnubonborder (void);
00528 
00529 
00530 #endif  // iowacoreinclude

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