Rev 149 | Rev 182 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2 | toby | 1 | /* |
18 | toby | 2 | This file is part of "Filter Foundry", a filter plugin for Adobe Photoshop |
171 | dmarschall | 3 | Copyright (C) 2003-2019 Toby Thain, toby@telegraphics.com.au |
2 | toby | 4 | |
5 | This program is free software; you can redistribute it and/or modify |
||
106 | dmarschall | 6 | it under the terms of the GNU General Public License as published by |
2 | toby | 7 | the Free Software Foundation; either version 2 of the License, or |
8 | (at your option) any later version. |
||
9 | |||
10 | This program is distributed in the hope that it will be useful, |
||
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||
13 | GNU General Public License for more details. |
||
14 | |||
106 | dmarschall | 15 | You should have received a copy of the GNU General Public License |
2 | toby | 16 | along with this program; if not, write to the Free Software |
17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
||
18 | */ |
||
19 | |||
8 | toby | 20 | #include "world.h" |
2 | toby | 21 | |
22 | #include "PIFilter.h" |
||
23 | |||
24 | #include "entry.h" |
||
8 | toby | 25 | |
2 | toby | 26 | #include "choosefile.h" |
27 | #include "ui.h" |
||
28 | #include "file_compat.h" |
||
29 | #include "symtab.h" |
||
30 | #include "PARM.h" |
||
94 | toby | 31 | #include "preview.h" |
32 | #include "misc.h" |
||
2 | toby | 33 | |
106 | dmarschall | 34 | #ifndef INCLUDED_FF_H |
35 | #define INCLUDED_FF_H |
||
36 | |||
2 | toby | 37 | enum{ |
38 | TAB = 011, |
||
8 | toby | 39 | LF = 012, |
40 | CR = 015, |
||
2 | toby | 41 | |
42 | CHUNK_ROWS = 64, |
||
43 | |||
44 | PARM_TYPE = 'PARM', |
||
45 | PARM_ID = 16000, |
||
85 | toby | 46 | OBFUSCDATA_ID = 16001, |
2 | toby | 47 | TEXT_FILETYPE = 'TEXT', |
48 | SIG_SIMPLETEXT = 'ttxt', |
||
49 | PS_FILTER_FILETYPE = '8BFM' |
||
50 | }; |
||
51 | |||
52 | typedef struct{ |
||
85 | toby | 53 | Boolean standalone,parmloaded,obfusc; |
2 | toby | 54 | PARM_T parm; |
106 | dmarschall | 55 | #ifdef _WIN32 |
56 | HWND hWndMainDlg; |
||
57 | #endif /* _WIN32 */ |
||
2 | toby | 58 | } globals_t; |
59 | |||
60 | extern globals_t *gdata; |
||
61 | |||
142 | dmarschall | 62 | #define NUM_CELLS 0x100 |
63 | |||
2 | toby | 64 | extern struct node *tree[4]; |
65 | extern char *err[4]; |
||
94 | toby | 66 | extern int errpos[4],errstart[4];//,nplanes; |
142 | dmarschall | 67 | extern value_type slider[8],cell[NUM_CELLS],map[4][0x100]; |
2 | toby | 68 | extern char *expr[4]; |
106 | dmarschall | 69 | // extern long maxSpace; |
2 | toby | 70 | |
71 | extern int tokpos,tokstart,varused[]; |
||
72 | extern char *errstr; |
||
73 | |||
74 | #define DBG(x) |
||
75 | //#define DEBUG |
||
76 | |||
102 | toby | 77 | #define PS_BUFFER_ALLOC (pb->bufferProcs->allocateProc) |
78 | #define PS_BUFFER_LOCK (pb->bufferProcs->lockProc) |
||
79 | #define PS_BUFFER_UNLOCK (pb->bufferProcs->unlockProc) |
||
80 | #define PS_BUFFER_FREE (pb->bufferProcs->freeProc) |
||
2 | toby | 81 | |
82 | void DoPrepare (FilterRecordPtr epb); |
||
83 | void DoStart (FilterRecordPtr epb); |
||
84 | OSErr DoContinue (FilterRecordPtr epb); |
||
85 | void DoFinish (FilterRecordPtr epb); |
||
86 | void RequestNext (FilterRecordPtr epb,long); |
||
87 | |||
88 | Boolean readparams(Handle h,Boolean alerts,char **reason); |
||
149 | dmarschall | 89 | void convert_premiere_to_photoshop(PARM_T* photoshop, PARM_T_PREMIERE* premiere); |
90 | Boolean read8bfplugin(StandardFileReply *sfr,char **reason); |
||
2 | toby | 91 | Handle readfileintohandle(FILEREF r); |
92 | Boolean readfile(StandardFileReply *sfr,char **reason); |
||
45 | toby | 93 | Boolean readPARM(Ptr h,PARM_T *parm,char **reasonstr,int fromwin); |
2 | toby | 94 | |
95 | OSErr saveparams(Handle h); |
||
96 | OSErr savehandleintofile(Handle h,FILEREF r); |
||
97 | Boolean savefile(StandardFileReply *sfr); |
||
98 | |||
99 | OSErr make_standalone(StandardFileReply *sfr); |
||
100 | |||
101 | Boolean setup(FilterRecordPtr pb); |
||
102 | void evalpixel(unsigned char *outp,unsigned char *inp); |
||
103 | |||
104 | unsigned long printablehash(unsigned long hash); |
||
105 | long fixpipl(PIPropertyList *pipl,long origsize,StringPtr title); |
||
106 | long fixaete(unsigned char *p,long origsize,StringPtr title); |
||
85 | toby | 107 | void obfusc(unsigned char *pparm,size_t size); |
2 | toby | 108 | |
109 | Boolean loadfile(StandardFileReply *sfr,char **reason); |
||
87 | toby | 110 | Boolean readPARMresource(HMODULE hm,char **reason,int readobfusc); |
2 | toby | 111 | |
112 | void dbglasterror(char*); |
||
13 | toby | 113 | |
114 | // from parser.y |
||
115 | struct node *parseexpr(char *s); |
||
102 | toby | 116 | |
117 | #ifdef _MSC_VER |
||
118 | // Microsoft dumbassery |
||
119 | #define strcasecmp _stricmp |
||
120 | #define snprintf _snprintf |
||
106 | dmarschall | 121 | #endif /* _MSC_VER */ |
122 | |||
123 | #endif /* INCLUDED_FF_H */ |