langexternal.h

Go to the documentation of this file.
00001 
00002 /*  $Id: langexternal.h 355 2005-01-11 22:48:55Z 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 langexternalinclude
00029 #define langexternalinclude
00030 
00031 
00032 #ifndef langinclude
00033 
00034     #include "lang.h"
00035 
00036 #endif
00037 
00038 #ifndef dbinclude
00039 
00040     #include "db.h"
00041 
00042 #endif
00043 
00044 #ifndef shellinclude
00045 
00046     #include "shell.h"
00047 
00048 #endif
00049 
00050 
00051 #define idophashresource 134
00052 #define idwordhashresource 135
00053 #define idtablehashresource 136
00054 #define idmenuhashresource 137
00055 #define idpicthashresource 138
00056 
00057 
00058 typedef enum tyexternalid { /*11/17/90 DW: order determines sort order when viewing by kind*/
00059     
00060     idoutlineprocessor,
00061     
00062     idwordprocessor,
00063     
00064     idheadrecord,
00065     
00066     idtableprocessor,
00067     
00068     idscriptprocessor,
00069     
00070     idmenuprocessor,
00071     
00072     idpictprocessor,
00073     
00074     #ifdef flnewfeatures
00075     
00076     idappleprocessor,
00077     
00078     #endif
00079     
00080     /*new types must be added at end of list, these get saved on disk*/
00081     
00082     idcardprocessor,
00083     
00084     ctexternalprocessors
00085     } tyexternalid;
00086 
00087 
00088 typedef struct typrocessorcallbacks { /*this structure isn't currently used*/
00089     
00090     callback loadroutine;
00091     
00092     callback unloadroutine;
00093     
00094     callback packroutine;
00095     
00096     callback unpackroutine;
00097     
00098     callback editroutine;
00099     
00100     callback newroutine;
00101     
00102     callback disposeroutine;
00103     
00104     callback converttotextroutine;
00105     
00106     callback getdisplaystringroutine;
00107     
00108     callback gettypestringroutine;
00109     
00110     callback functionvalueroutine;
00111     
00112     hdlhashtable functiontable;
00113     
00114     short tableresourceid;
00115     
00116     long processorrefcon;
00117     } typrocessorcallbacks, *ptrprocessorcallbacks;
00118 
00119 /*
00120     11/15/01 dmb: added flags for various external types so they can use this record,
00121     without having to add a bunch of macros to preserve existing code.
00122 */
00123 typedef struct tyexternalvariable {
00124     
00125     unsigned short id;  /*tyexternalid*/
00126     
00127     unsigned short flinmemory: 1; /*if true, variabledata is in a handle, else a dbaddress*/
00128     
00129     unsigned short flmayaffectdisplay: 1; /*not in memory, but being displayed in a table window*/
00130     
00131     unsigned short flpacked: 1; /* for wp doc; it isn't being edited, so we store it packed*/
00132 
00133     unsigned short flscript: 1; /* for outlines and scripts; they're identical, except for this bit*/
00134 
00135     unsigned short flsystemtable: 1; /*for tables: was it created by the system, or by a user script?*/
00136 
00137     #ifdef xmlfeatures
00138         unsigned short flxml: 1; /*preserve for tables; is it an xml table?*/
00139     #endif
00140 
00141 //  unsigned short variableflags: 3; /*these can be defined independently for each variable*/
00142     
00143     long variabledata; /*either a handle to data record or a dbaddress*/
00144     
00145     hdldatabaserecord hdatabase; // 5.0a18 dmb
00146 
00147     dbaddress oldaddress; /*last place this variable was stored in db*/
00148 
00149 #if langexternalfind_optimization
00150 
00151     hdlhashtable hexternaltable;
00152 
00153     hdlhashnode hexternalnode;
00154 
00155 #endif
00156     } tyexternalvariable, *ptrexternalvariable, **hdlexternalvariable;
00157 
00158 
00159 typedef hdlexternalvariable hdlexternalhandle;
00160 
00161 /*
00162 typedef struct tyexternalhandle {
00163     
00164     tyexternalid id; 
00165     
00166     Handle hdata; 
00167     } tyexternalhandle, *ptrexternalhandle, **hdlexternalhandle;
00168 */
00169 
00170 
00171 typedef struct tydiskexternalhandle {
00172     
00173     short versionnumber; /*this structure is stored on disk*/
00174     
00175     #ifdef MACVERSION
00176         tyexternalid id;
00177         //byte unused;
00178     #endif
00179     
00180     #ifdef WIN95VERSION
00181         byte id;
00182         byte unused;
00183     #endif
00184 
00185     } tydiskexternalhandle;
00186 
00187 #define externaldiskversionnumber 1
00188 
00189 
00190 /*prototypes*/
00191 
00192 extern tyexternalid langexternalgettype (tyvaluerecord);
00193 
00194 extern boolean langexternalgettable (bigstring, hdlhashtable *);
00195 
00196 extern boolean langexternalvaltotable (tyvaluerecord, hdlhashtable *, hdlhashnode);
00197 
00198 extern boolean langexternalfindvariable (hdlexternalvariable, hdlhashtable *, bigstring);
00199 
00200 extern boolean langexternalgettablevalue (hdltreenode, short, hdlhashtable *);
00201 
00202 extern hdldatabaserecord langexternalgetdatabase (hdlexternalvariable);
00203 
00204 extern void langexternalsetdatabase (hdlexternalvariable, hdldatabaserecord);
00205 
00206 extern boolean langsetexternalsymbol (hdlhashtable, bigstring, tyexternalid, Handle);
00207 
00208 extern boolean langexternaldontsave (hdlhashtable, bigstring);
00209 
00210 extern boolean langexternalpleasesave (hdlhashtable, bigstring);
00211 
00212 extern boolean langexternaltypestring (hdlexternalhandle, bigstring);
00213 
00214 extern boolean langexternalgetdisplaystring (hdlexternalhandle, bigstring);
00215 
00216 extern boolean langexternalisdirty (hdlexternalhandle);
00217 
00218 extern boolean langexternalsetdirty (hdlexternalhandle, boolean);
00219 
00220 extern boolean langexternalpack (hdlexternalhandle, Handle *, boolean *);
00221 
00222 extern boolean langexternalunpack (Handle, hdlexternalhandle *);
00223 
00224 extern boolean langexternalmemorypack (hdlexternalhandle, Handle *, hdlhashnode);
00225 
00226 extern boolean langexternalmemoryunpack (Handle, hdlexternalhandle *);
00227 
00228 extern boolean langexternalcopyvalue (const tyvaluerecord *, tyvaluerecord *);
00229 
00230 extern boolean langexternalcoercetostring (tyvaluerecord *);
00231 
00232 extern boolean langexternalgetowningwindow (hdlwindowinfo *);
00233 
00234 extern void langexternalquotename (bigstring);
00235 
00236 extern void langexternalbracketname (bigstring);
00237 
00238 extern boolean langexternalgetfullpath (hdlhashtable, bigstring, bigstring, hdlwindowinfo *);
00239 
00240 extern boolean langexternalgetquotedpath (hdlhashtable, bigstring, bigstring);
00241 
00242 extern boolean langexternalgetexternalparam (hdltreenode, short, short *, hdlexternalvariable *);
00243 
00244 extern boolean langexternalzoomfrom (tyvaluerecord, hdlhashtable, bigstring, rectparam);
00245 
00246 extern boolean langexternalzoom (tyvaluerecord, hdlhashtable, bigstring);
00247 
00248 extern boolean langexternalzoomfilewindow (const tyvaluerecord *, tyfilespec *, boolean);
00249 
00250 extern boolean langexternalwindowopen (tyvaluerecord, hdlwindowinfo *);
00251 
00252 extern boolean langexternalwindowclosed (hdlexternalvariable);
00253 
00254 extern boolean langexternaldisposevariable (hdlexternalvariable, boolean, boolean (*) (hdlexternalvariable, boolean));
00255 
00256 extern boolean langexternaldisposevalue (tyvaluerecord, boolean);
00257 
00258 extern boolean langexternalgetconfig (tyvaluetype, short, tyconfigrecord *);
00259 
00260 extern boolean langexternalnewvalue (tyexternalid, Handle, tyvaluerecord *);
00261 
00262 extern boolean langexternalvaltocode (tyvaluerecord, hdltreenode *);
00263 
00264 extern boolean langexternalgetvalsize (tyvaluerecord, long *);
00265 
00266 extern boolean langnewexternalvariable (boolean, long, hdlexternalvariable *);
00267 
00268 extern short langexternalcomparetypes (tyexternalid, tyexternalid);
00269 
00270 extern boolean langexternalsurfacekey (hdlexternalvariable);
00271 
00272 extern boolean langexternalpacktotext (hdlexternalhandle, Handle);
00273 
00274 extern boolean langexternalsearch (tyvaluerecord, boolean *);
00275 
00276 extern boolean langexternalcontinuesearch (hdlexternalvariable);
00277 
00278 extern boolean langexternalgettimes (hdlexternalhandle, long *, long *, hdlhashnode);
00279 
00280 extern boolean langexternalsettimes (hdlexternalhandle, long, long, hdlhashnode);
00281 
00282 extern boolean langexternalfindusedblocks (hdlexternalhandle, bigstring);
00283 
00284 extern boolean langexternaltitleclick (Point, hdlexternalvariable);
00285 
00286 extern OSType langexternalgettypeid (tyvaluerecord);
00287 
00288 extern tyvaluetype langexternalgetvaluetype (OSType);
00289 
00290 extern boolean langexternalregisterwindow (hdlexternalvariable);
00291 
00292 extern boolean langexternalunregisterwindow (hdlwindowinfo);
00293 
00294 extern boolean langexternalcloseregisteredwindows (boolean);
00295 
00296 extern boolean langexternalrefdata (hdlexternalvariable, Handle *);
00297 
00298 boolean langexternalsetreadonly (hdlexternalvariable hv, boolean flreadonly); /*7.0b6 PBS*/
00299 
00300 boolean langexternalgetreadonly (hdlexternalvariable hv); /*7.0b6 PBS*/
00301 
00302 extern boolean fullpathstats (hdlhashtable intable, boolean flfirst);
00303 
00304 extern boolean hashstatsverb (tyvaluerecord *v);
00305 
00306 extern boolean langexternalsymbolchanged (hdlhashtable htable, const bigstring bsname, hdlhashnode hnode, boolean flvalue);
00307 
00308 extern boolean langexternalsymbolinserted (hdlhashtable htable, const bigstring bsname, hdlhashnode hnode);
00309 
00310 #endif
00311 
00312 
00313 

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