Subversion Repositories filter_foundry

Rev

Rev 536 | 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
536 daniel-mar 3
    Copyright (C) 2002-2006 Toby Thain, toby@telegraphics.net
259 daniel-mar 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
 
546 daniel-mar 37
// Scripting system, see https://developer.apple.com/library/archive/documentation/mac/pdf/Text.pdf , PDF page 676
38
// Not required for Windows
263 daniel-mar 39
typedef int16 ScriptCode;
546 daniel-mar 40
#define smSystemScript -1 // System script
41
#define smCurrentScript -2 // Font script
42
#define smRoman 0 // Roman
43
#define smJapanese 1 // Japanese
44
#define smTradChinese 2 // Traditional Chinese
45
#define smKorean 3 // Korean
46
#define smArabic 4 // Arabic
47
#define smHebrew 5 // Hebrew
48
#define smGreek 6 // Greek
49
#define smCyrillic 7 // Cyrillic
50
#define smRSymbol 8 // Right-to-left symbols
51
#define smDevanagari 9 // Devanagari
52
#define smGurmukhi 10 // Gurmukhi
53
#define smGujarati 11 // Gujarati
54
#define smOriya 12 // Oriya
55
#define smBengali 13 // Bengali
56
#define smTamil 14 // Tamil
57
#define smTelugu 15 // Telugu
58
#define smKannada 16 // Kannada / Kanarese
59
#define smMalayalam 17 // Malayalam
60
#define smSinhalese 18 // Sinhalese
61
#define smBurmese 19 // Burmese
62
#define smKhmer 20 // Khmer
63
#define smThai 21 // Thai
64
#define smLaotian 22 // Laotian
65
#define smGeorgian 23 // Georgian
66
#define smArmenian 24 // Armenian
67
#define smSimpChinese 25 // Simplified Chinese
68
#define smTibetan 26 // Tibetan
69
#define smMongolian 27 // Mongolian
70
#define smGeez 28 // Geez / Ethiopic
71
#define smEthiopic 28 // = smGeez
72
#define smEastEurRoman 29 // Extended Roman for Slavicand Baltic languages
73
#define smVietnamese 30 // Extended Roman for Vietnamese
74
#define smExtArabic 31 // Extended Arabic for Sindhi
75
#define smUninterp 32 // Uninterpreted symbols
259 daniel-mar 76
 
77
typedef struct StandardFileReply {
263 daniel-mar 78
        Boolean     sfGood;
79
        Boolean     sfReplacing;
80
        OSType      sfType;
81
        FSSpec      sfFile;
546 daniel-mar 82
        ScriptCode  sfScript;
259 daniel-mar 83
 
263 daniel-mar 84
#ifdef WIN_ENV
259 daniel-mar 85
        WORD nFileExtension ;
86
        /* http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/WinUI/WindowsUserInterface/UserInput/CommonDialogBoxLibrary/CommonDialogBoxReference/CommonDialogBoxStructures/OPENFILENAME.asp
268 daniel-mar 87
           Specifies the zero-based offset, in TCHAR s, from the beginning of the path to the file name extension
88
           in the string pointed to by lpstrFile . For the ANSI version, this is the number of bytes;
89
           for the Unicode version, this is the number of characters. For example, if lpstrFile points to
90
           the following string, "c:\dir1\dir2\file.ext", this member contains the value 18.
91
           If the user did not type an extension and lpstrDefExt is NULL, this member specifies an offset
92
           to the terminating NULL character. If the user typed "." as the last character in the file name,
93
           this member specifies zero.  */
263 daniel-mar 94
#endif
259 daniel-mar 95
} StandardFileReply;
96
 
97
typedef unsigned char *StringPtr,**StringHandle;
98
//typedef const unsigned char *ConstStr255Param;
99
 
100
typedef Ptr RgnHandle,GWorldPtr,ControlHandle,CGrafPtr,GDHandle,PixMapHandle;
101
void NumToString(long n,StringPtr s);
102
Ptr GetPixBaseAddr(PixMapHandle);
103
PixMapHandle GetGWorldPixMap(GWorldPtr);
104
 
480 daniel-mar 105
Ptr NewPtrClear(size_t size);
536 daniel-mar 106
 
479 daniel-mar 107
//#define NewPtr malloc
480 daniel-mar 108
Ptr NewPtr(size_t size);
479 daniel-mar 109
 
110
#define DisposPtr DisposePtr
111
//#define DisposePtr free
480 daniel-mar 112
void DisposePtr(Ptr ptr);
479 daniel-mar 113
 
259 daniel-mar 114
#define MemError() memFullErr /* FIXME */
115
#define BlockMoveData(src,dst,len) memcpy(dst,src,len)
116
 
117
enum{ ok = 1,cancel = 2 };
118
 
532 daniel-mar 119
Boolean Implements3264ResourceAPI(void);
259 daniel-mar 120
 
532 daniel-mar 121
ULONGLONG _GetTickCount64(void);
122
 
444 daniel-mar 123
HANDLE _BeginUpdateResource(
124
        LPCTSTR pFileName,
263 daniel-mar 125
        BOOL   bDeleteExistingResources
259 daniel-mar 126
);
127
 
444 daniel-mar 128
BOOL _EndUpdateResource(
263 daniel-mar 129
        HANDLE hUpdate,
130
        BOOL   fDiscard
259 daniel-mar 131
);
132
 
444 daniel-mar 133
BOOL _UpdateResource(
263 daniel-mar 134
        HANDLE hUpdate,
444 daniel-mar 135
        LPCTSTR lpType,
136
        LPCTSTR lpName,
263 daniel-mar 137
        WORD   wLanguage,
138
        LPVOID lpData,
139
        DWORD  cb
259 daniel-mar 140
);
141
 
274 daniel-mar 142
void _GetNativeSystemInfo(
143
        LPSYSTEM_INFO lpSystemInfo
144
);
145
 
357 daniel-mar 146
BOOL _ImageRemoveCertificate(HANDLE FileHandle, DWORD Index);
147
 
259 daniel-mar 148
#endif