MINOR: Change output filename
[openwide.git] / owUtil.h
blobddb6dccb8ce751747f8744748e750f8dd4e8fff3
1 /*
2 * Openwide -- control Windows common dialog
3 *
4 * Copyright (c) 2000 Luke Hudson
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
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.
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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23 #ifndef OW_UTIL_H
24 /**
25 * @author Luke Hudson
26 * @licence GPL2
29 #define OW_UTIL_H
31 #include <windows.h>
33 enum PromptFileNameMode {OPEN, SAVE};
36 #define RCWIDTH(r) ((r).right - (r).left + 1)
37 #define RCHEIGHT(r) ((r).bottom - (r).top + 1)
39 #define WM_TRAYICON (WM_APP+1)
41 extern HWND ghwMain, ghwPropSheet;
42 extern HINSTANCE ghInstance;
43 extern POWSharedData gPowData;
44 extern HANDLE ghSharedMem;
45 extern HANDLE ghMutex;
46 extern HICON ghIconLG, ghIconSm;
50 int Add_TrayIcon(HICON hIcon, char *szTip, HWND hwnd, UINT uMsg, DWORD dwState);
51 static int AddRem_TrayIcon(HICON hIcon, char *szTip, HWND hwnd, UINT uMsg, DWORD dwState, DWORD dwMode);
52 int cbAddString(HWND hwCB, const char *szStr, LPARAM lpData);
53 HRESULT CreateLink(LPCSTR lpszPathObj, LPCSTR lpszPathLink, LPCSTR lpszDesc);
54 BOOL delFile(HWND hwnd, const char *szFile);
55 int dlgUnits2Pix(HWND hwnd, int units, BOOL bHorz);
56 void EndTrayOperation(void);
57 void Error(char *szError, ...);
58 BOOL fileExists (const char *path);
59 int getDlgItemRect(HWND hwnd, UINT uID, LPRECT pr);
60 TCHAR *lbGetItemText(HWND hwLB, int iItem);
61 int pix2DlgUnits(HWND hwnd, int pix, BOOL bHorz);
62 char *Prompt_File_Name(int iFlags, HWND hwOwner, const char *pszFilter, const char *pszTitle);
63 void releaseMutex(void);
64 int Rem_TrayIcon(HWND hwnd, UINT uMsg, DWORD dwState);
65 BOOL waitForMutex(void);
67 #endif