Subversion Repositories filter_foundry

Compare Revisions

Regard whitespace Rev 429 → Rev 430

/trunk/ff.h
66,8 → 66,8
PARM_T parm;
#ifdef _WIN32
HWND hWndMainDlg;
HMODULE pluginDllModule;
DWORD pluginDllSliderMessageId;
HMODULE pluginDllModule;
#endif /* _WIN32 */
} globals_t;
 
89,7 → 89,7
#define DBG(x) {}
//#define DEBUG
 
struct InternalState {
typedef struct InternalState_ {
Boolean bak_obfusc;
Boolean bak_standalone;
Boolean bak_parmloaded;
96,7 → 96,7
char* bak_expr[4];
uint8_t bak_slider[8];
PARM_T bak_parm;
};
} InternalState;
 
// from main.c
unsigned long get_parm_hash(PARM_T *parm);
106,8 → 106,8
OSErr DoContinue (FilterRecordPtr epb);
void DoFinish (FilterRecordPtr epb);
void RequestNext (FilterRecordPtr epb,long);
struct InternalState saveInternalState();
void restoreInternalState(struct InternalState state);
InternalState saveInternalState();
void restoreInternalState(InternalState state);
 
// from read.c
Boolean readparams_afs_pff(Handle h,char **reason);
/trunk/main.c
731,8 → 731,8
}
}
 
struct InternalState saveInternalState() {
struct InternalState ret;
InternalState saveInternalState() {
InternalState ret;
int i;
 
ret.bak_obfusc = gdata->obfusc;
745,7 → 745,7
return ret;
}
 
void restoreInternalState(struct InternalState state) {
void restoreInternalState(InternalState state) {
int i;
gdata->obfusc = state.bak_obfusc;
gdata->standalone = state.bak_standalone;
/trunk/telegraphics_common/tt/ui_compat.h
175,6 → 175,7
#define HideDialogItem(d,i) ShowWindow(GetDlgItem(d,i),SW_HIDE)
#define ShowDialogItem(d,i) ShowWindow(GetDlgItem(d,i),SW_SHOW)
 
// from PLUGIN.DLL
extern int SetSliderPos(HWND hWnd, int nPos, BOOL bRepaint);
extern int GetSliderPos(HWND hWnd, BOOL bPixelPosition);
 
/trunk/ui.c
339,7 → 339,7
static OSType types[] = {TEXT_FILETYPE,PS_FILTER_FILETYPE};
char *reason;
HINSTANCE hShellRes;
struct InternalState bakState;
InternalState bakState;
 
switch(item){
#ifdef MAC_ENV
/trunk/ui_win.c
40,7 → 40,38
HCURSOR hCurHandQuestion;
HICON hIconCautionSign;
 
// This method will register the "slider" class used in dialogs.
typedef void(__stdcall* f_InitCommonControls)();
typedef BOOL(__stdcall* f_InitCommonControlsEx)(const INITCOMMONCONTROLSEX* picce);
void RegisterMsTrackbar() {
f_InitCommonControls fInitCommonControls;
f_InitCommonControlsEx fInitCommonControlsEx;
HMODULE libComctl32;
 
libComctl32 = LoadLibraryA("Comctl32.dll");
if (!libComctl32) return;
fInitCommonControlsEx = (f_InitCommonControlsEx)(void*)GetProcAddress(libComctl32, "InitCommonControlsEx");
if (fInitCommonControlsEx != 0) {
INITCOMMONCONTROLSEX icce;
icce.dwSize = sizeof(INITCOMMONCONTROLSEX);
icce.dwICC = ICC_BAR_CLASSES;
fInitCommonControlsEx(&icce);
FreeLibrary(libComctl32);
return;
}
else {
fInitCommonControls = (f_InitCommonControls)(void*)GetProcAddress(libComctl32, "InitCommonControls");
if (fInitCommonControls != 0) {
fInitCommonControls();
FreeLibrary(libComctl32);
return;
}
else {
return;
}
}
}
 
// PLUGIN.DLL Sliders: This method will register the "slider" class used in dialogs.
typedef int(__cdecl* f_RegisterSlider)(HINSTANCE hInstanceDll, DWORD* MessageID);
int RegisterSlider(HINSTANCE hInstanceDll, DWORD* MessageID) {
f_RegisterSlider fRegisterSlider;
55,7 → 86,7
}
}
 
// This method will unregister the "slider" class used in dialogs.
// PLUGIN.DLL Sliders: This method will unregister the "slider" class used in dialogs.
typedef int(__cdecl* f_UnregisterSlider)(HINSTANCE hInstanceDll);
int UnregisterSlider(HINSTANCE hInstanceDll) {
f_UnregisterSlider fUnregisterSlider;
70,6 → 101,7
}
}
 
// PLUGIN.DLL Sliders: Set slider range (min/max)
typedef int(__cdecl* f_SetSliderRange)(HWND hWnd, int nMin, int nMax);
int SetSliderRange(HWND hWnd, int nMin, int nMax) {
f_SetSliderRange fSetSliderRange;
84,6 → 116,7
}
}
 
// PLUGIN.DLL Sliders : Sets slider position
typedef int(__cdecl* f_SetSliderPos)(HWND hWnd, int nPos, BOOL bRepaint);
int SetSliderPos(HWND hWnd, int nPos, BOOL bRepaint) {
f_SetSliderPos fSetSliderPos;
98,6 → 131,7
}
}
 
// PLUGIN.DLL Sliders : Get slider position
typedef int(__cdecl* f_GetSliderPos)(HWND hWnd, BOOL bPixelPosition);
int GetSliderPos(HWND hWnd, BOOL bPixelPosition) {
f_GetSliderPos fGetSliderPos;
427,7 → 461,10
dbg(s);
}
}
else if (GetClassInfo(hDllInstance, "msctls_trackbar32", &clx) != 0) {
else {
RegisterMsTrackbar();
 
if (GetClassInfo(hDllInstance, "msctls_trackbar32", &clx) != 0) {
// We couldn't get the sliders from PLUGIN.DLL (probably not running in Photoshop)
// Try the Microsoft Trackbar Control instead
clx.lpszClassName = "FoundrySlider";
459,6 → 496,7
dbg(s);
}
}
}
 
// For the preview image and caution symbols, we register a class, so that we can assign a mouse cursor to this class.
GetClassInfo(hDllInstance, "STATIC", &clx);