Subversion Repositories filter_foundry

Rev

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

Rev Author Line No. Line
259 daniel-mar 1
/*
2
        This file is part of a common library for Adobe(R) Photoshop(R) plugins
3
    Copyright (C) 2002-6 Toby Thain, toby@telegraphics.com.au
4
 
5
    This program is free software; you can redistribute it and/or modify
6
    it under the terms of the GNU General Public License as published by
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
 
15
    You should have received a copy of the GNU General Public License
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
 
20
#ifndef COMPAT_H
21
#define COMPAT_H
22
 
23
#ifndef _MSC_VER
24
        // probably MinGW gcc
25
        #include <stdint.h> // for intptr_t req'd by CS4 SDK
26
#endif
27
 
28
#include "PITypes.h"
29
 
263 daniel-mar 30
typedef int16 ScriptCode;
259 daniel-mar 31
 
32
typedef struct StandardFileReply {
263 daniel-mar 33
        Boolean     sfGood;
34
        Boolean     sfReplacing;
35
        OSType      sfType;
36
        FSSpec      sfFile;
37
        ScriptCode  sfScript;
259 daniel-mar 38
 
263 daniel-mar 39
#ifdef WIN_ENV
259 daniel-mar 40
        WORD nFileExtension ;
41
        /* http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/WinUI/WindowsUserInterface/UserInput/CommonDialogBoxLibrary/CommonDialogBoxReference/CommonDialogBoxStructures/OPENFILENAME.asp
42
                Specifies the zero-based offset, in TCHAR s, from the beginning of the path to the file name extension
43
                in the string pointed to by lpstrFile . For the ANSI version, this is the number of bytes;
44
                for the Unicode version, this is the number of characters. For example, if lpstrFile points to
45
                the following string, "c:\dir1\dir2\file.ext", this member contains the value 18.
46
                If the user did not type an extension and lpstrDefExt is NULL, this member specifies an offset
47
                to the terminating NULL character. If the user typed "." as the last character in the file name,
48
                this member specifies zero.  */
263 daniel-mar 49
#endif
259 daniel-mar 50
} StandardFileReply;
51
 
52
typedef unsigned char *StringPtr,**StringHandle;
53
//typedef const unsigned char *ConstStr255Param;
54
 
55
typedef Ptr RgnHandle,GWorldPtr,ControlHandle,CGrafPtr,GDHandle,PixMapHandle;
56
void NumToString(long n,StringPtr s);
57
Ptr GetPixBaseAddr(PixMapHandle);
58
PixMapHandle GetGWorldPixMap(GWorldPtr);
59
 
60
#define NewPtr malloc
61
#define DisposePtr free
62
#define MemError() memFullErr /* FIXME */
63
#define BlockMoveData(src,dst,len) memcpy(dst,src,len)
64
 
65
enum{ ok = 1,cancel = 2 };
66
 
67
Boolean isWin32NT(void);
68
 
69
ULONGLONG _GetTickCount64();
70
 
71
HANDLE _BeginUpdateResource/*A*/(
263 daniel-mar 72
        LPCSTR pFileName,
73
        BOOL   bDeleteExistingResources
259 daniel-mar 74
);
75
 
76
BOOL _EndUpdateResource/*A*/(
263 daniel-mar 77
        HANDLE hUpdate,
78
        BOOL   fDiscard
259 daniel-mar 79
);
80
 
81
BOOL _UpdateResource/*A*/(
263 daniel-mar 82
        HANDLE hUpdate,
83
        LPCSTR lpType,
84
        LPCSTR lpName,
85
        WORD   wLanguage,
86
        LPVOID lpData,
87
        DWORD  cb
259 daniel-mar 88
);
89
 
90
#endif