Subversion Repositories filter_foundry

Rev

Rev 485 | Rev 487 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
439 daniel-mar 1
/*
2
    This file is part of "Filter Foundry", a filter plugin for Adobe Photoshop
3
    Copyright (C) 2003-2009 Toby Thain, toby@telegraphics.com.au
4
    Copyright (C) 2018-2021 Daniel Marschall, ViaThinkSoft
5
 
6
    This program is free software; you can redistribute it and/or modify
7
    it under the terms of the GNU General Public License as published by
8
    the Free Software Foundation; either version 2 of the License, or
9
    (at your option) any later version.
10
 
11
    This program is distributed in the hope that it will be useful,
12
    but WITHOUT ANY WARRANTY; without even the implied warranty of
13
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
    GNU General Public License for more details.
15
 
16
    You should have received a copy of the GNU General Public License
17
    along with this program; if not, write to the Free Software
18
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19
*/
20
 
21
#ifndef FF_MISC_H_
22
#define FF_MISC_H_
23
 
330 daniel-mar 24
extern FilterRecordPtr gpb;
25
 
486 daniel-mar 26
#define BUFVERSION_NULL    'b000'
27
#define BUFVERSION_STD32   'bST1'
28
#define BUFVERSION_STD64   'bST2'
29
#define BUFVERSION_SUITE32 'bSU1'
30
#define BUFVERSION_SUITE64 'bSU2'
485 daniel-mar 31
 
32
typedef struct FFBuffer_ {
33
    OSType signature;
34
    BufferID standard;
486 daniel-mar 35
    Ptr suite;
485 daniel-mar 36
} FFBuffer;
37
 
486 daniel-mar 38
#define HDLVERSION_NULL     'h000'
39
#define HDLVERSION_STANDARD 'hSTD'
40
#define HDLVERSION_SUITE1   'hSU1'
41
#define HDLVERSION_SUITE2   'hSU2'
330 daniel-mar 42
 
486 daniel-mar 43
typedef struct FFHandle_ {
44
    OSType signature;
45
    Handle handle;
46
} FFHandle;
47
 
48
// These functions are for code backwards compatibility:
49
Handle PINEWHANDLE(int32 size);
50
void PIDISPOSEHANDLE(Handle h);
51
int32 PIGETHANDLESIZE(Handle h);
52
OSErr PISETHANDLESIZE(Handle h, int32 newSize);
53
Ptr PILOCKHANDLE(Handle h, Boolean moveHigh);
54
void PIUNLOCKHANDLE(Handle h);
55
 
56
//#define PINEWHANDLE      gpb->handleProcs->newProc
57
//#define PIDISPOSEHANDLE  gpb->handleProcs->disposeProc
58
//#define PIGETHANDLESIZE  gpb->handleProcs->getSizeProc
59
//#define PISETHANDLESIZE  gpb->handleProcs->setSizeProc
60
//#define PILOCKHANDLE     gpb->handleProcs->lockProc
61
//#define PIUNLOCKHANDLE   gpb->handleProcs->unlockProc
62
 
330 daniel-mar 63
#define MIN(a,b) ((a) < (b) ? (a) : (b))
64
#define MAX(a,b) ((a) > (b) ? (a) : (b))
439 daniel-mar 65
 
66
#endif