diff options
author | George Hazan <ghazan@miranda.im> | 2017-02-14 15:34:13 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-02-14 15:34:20 +0300 |
commit | 43ab22c6b58eccb328b1c738e6d7aa8e171e9d3f (patch) | |
tree | 560e3e192b55a2abed9b4d3cb5a15fc2e175bed4 /plugins/SendScreenshotPlus/src/Utils.h | |
parent | f1316ce218d01d5db243beb027039939cbb8710e (diff) |
- fixes #712 (chaos in file name processing)
- massive code cleaning
Diffstat (limited to 'plugins/SendScreenshotPlus/src/Utils.h')
-rw-r--r-- | plugins/SendScreenshotPlus/src/Utils.h | 58 |
1 files changed, 22 insertions, 36 deletions
diff --git a/plugins/SendScreenshotPlus/src/Utils.h b/plugins/SendScreenshotPlus/src/Utils.h index f4d58f0d00..9b69a41dd9 100644 --- a/plugins/SendScreenshotPlus/src/Utils.h +++ b/plugins/SendScreenshotPlus/src/Utils.h @@ -31,50 +31,36 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define SPP_USERPANE 1 -extern FI_INTERFACE *FIP; +extern FI_INTERFACE* FIP; #define ABS(x) ((x)<0?-(x):(x)) -typedef struct TEnumDataTemp { -size_t count; -MONITORINFOEX* info; -}MONITORS; +struct MONITORS +{ + size_t count; + MONITORINFOEX* info; +}; extern HWND g_hCapture; extern HBITMAP g_hBitmap, g_hbmMask; -//--------------------------------------------------------------------------- -int ComboBox_SelectItemData(HWND hwndCtl, LPARAM data); - -size_t MonitorInfoEnum(MONITORINFOEX* & myMonitors, RECT & virtualScreen); -BOOL CALLBACK MonitorInfoEnumProc(HMONITOR hMonitor, HDC hdcMonitor, LPRECT lprcMonitor, LPARAM dwData); - -FIBITMAP* CaptureWindow(HWND hCapture, BOOL bClientArea, BOOL bIndirectCapture); -FIBITMAP* CaptureMonitor(const wchar_t* szDevice,const RECT* cropRect=NULL); -wchar_t* SaveImage(FREE_IMAGE_FORMAT fif, FIBITMAP* dib, const wchar_t* pszFilename, const wchar_t* pszExt, int flag=0); - -wchar_t* GetFileNameW(const wchar_t* pszPath); -wchar_t* GetFileExtW (const wchar_t* pszPath); -char* GetFileNameA(const wchar_t* pszPath); -char* GetFileExtA (const wchar_t* pszPath); -#ifdef _UNICODE -# define GetFileName GetFileNameW -# define GetFileExt GetFileExtW -#else -# define GetFileName GetFileNameA -# define GetFileExt GetFileExtA -#endif // _UNICODE - -BOOL GetEncoderClsid(wchar_t *wchMimeType, CLSID& clsidEncoder); -//void SavePNG(HBITMAP hBmp, wchar_t* szFilename); -void SaveGIF(HBITMAP hBmp, wchar_t* szFilename); -void SaveTIF(HBITMAP hBmp, wchar_t* szFilename); - -//--------------------------------------------------------------------------- -/* Old stuff from Borland C++ -//void ShowPopup(char *title, char *text); +///////////////////////////////////////////////////////////////////////////////////////// -*/ +int ComboBox_SelectItemData(HWND hwndCtl, LPARAM data); + +size_t MonitorInfoEnum(MONITORINFOEX* &myMonitors, RECT &virtualScreen); + +FIBITMAP* CaptureWindow(HWND hCapture, BOOL bClientArea, BOOL bIndirectCapture); +FIBITMAP* CaptureMonitor(const wchar_t *pwszDevice, const RECT *cropRect = NULL); + +char* GetFileNameA(const wchar_t *pwszPath); + +BOOL GetEncoderClsid(wchar_t *wchMimeType, CLSID &clsidEncoder); + +void SaveGIF(HBITMAP hBmp, const wchar_t *pwszFilename); +void SaveTIF(HBITMAP hBmp, const wchar_t *pwszFilename); + +///////////////////////////////////////////////////////////////////////////////////////// class EventHandle { |