Subversion Repositories filter_foundry

Rev

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

Rev Author Line No. Line
259 daniel-mar 1
/*
268 daniel-mar 2
    This file is part of a common library for Adobe(R) Photoshop(R) plugins
259 daniel-mar 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
 
439 daniel-mar 20
#ifndef COMPAT_WIN_H_
21
#define COMPAT_WIN_H_
259 daniel-mar 22
 
23
#ifndef _MSC_VER
24
        // probably MinGW gcc
25
        #include <stdint.h> // for intptr_t req'd by CS4 SDK
26
#endif
27
 
444 daniel-mar 28
// Avoid loading FSSpec in PITypes.h !
29
#define _FSSPEC_        1
30
typedef struct
31
{
32
        TCHAR szName[MAX_PATH+1];
33
} FSSpec;
34
 
259 daniel-mar 35
#include "PITypes.h"
36
 
263 daniel-mar 37
typedef int16 ScriptCode;
259 daniel-mar 38
 
39
typedef struct StandardFileReply {
263 daniel-mar 40
        Boolean     sfGood;
41
        Boolean     sfReplacing;
42
        OSType      sfType;
43
        FSSpec      sfFile;
44
        ScriptCode  sfScript;
259 daniel-mar 45
 
263 daniel-mar 46
#ifdef WIN_ENV
259 daniel-mar 47
        WORD nFileExtension ;
48
        /* http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/WinUI/WindowsUserInterface/UserInput/CommonDialogBoxLibrary/CommonDialogBoxReference/CommonDialogBoxStructures/OPENFILENAME.asp
268 daniel-mar 49
           Specifies the zero-based offset, in TCHAR s, from the beginning of the path to the file name extension
50
           in the string pointed to by lpstrFile . For the ANSI version, this is the number of bytes;
51
           for the Unicode version, this is the number of characters. For example, if lpstrFile points to
52
           the following string, "c:\dir1\dir2\file.ext", this member contains the value 18.
53
           If the user did not type an extension and lpstrDefExt is NULL, this member specifies an offset
54
           to the terminating NULL character. If the user typed "." as the last character in the file name,
55
           this member specifies zero.  */
263 daniel-mar 56
#endif
259 daniel-mar 57
} StandardFileReply;
58
 
59
typedef unsigned char *StringPtr,**StringHandle;
60
//typedef const unsigned char *ConstStr255Param;
61
 
62
typedef Ptr RgnHandle,GWorldPtr,ControlHandle,CGrafPtr,GDHandle,PixMapHandle;
63
void NumToString(long n,StringPtr s);
64
Ptr GetPixBaseAddr(PixMapHandle);
65
PixMapHandle GetGWorldPixMap(GWorldPtr);
66
 
67
#define NewPtr malloc
68
#define DisposePtr free
69
#define MemError() memFullErr /* FIXME */
70
#define BlockMoveData(src,dst,len) memcpy(dst,src,len)
71
 
72
enum{ ok = 1,cancel = 2 };
73
 
74
ULONGLONG _GetTickCount64();
75
 
444 daniel-mar 76
HANDLE _BeginUpdateResource(
77
        LPCTSTR pFileName,
263 daniel-mar 78
        BOOL   bDeleteExistingResources
259 daniel-mar 79
);
80
 
444 daniel-mar 81
BOOL _EndUpdateResource(
263 daniel-mar 82
        HANDLE hUpdate,
83
        BOOL   fDiscard
259 daniel-mar 84
);
85
 
444 daniel-mar 86
BOOL _UpdateResource(
263 daniel-mar 87
        HANDLE hUpdate,
444 daniel-mar 88
        LPCTSTR lpType,
89
        LPCTSTR lpName,
263 daniel-mar 90
        WORD   wLanguage,
91
        LPVOID lpData,
92
        DWORD  cb
259 daniel-mar 93
);
94
 
274 daniel-mar 95
void _GetNativeSystemInfo(
96
        LPSYSTEM_INFO lpSystemInfo
97
);
98
 
357 daniel-mar 99
BOOL _ImageRemoveCertificate(HANDLE FileHandle, DWORD Index);
100
 
259 daniel-mar 101
#endif