Commit graph

39 commits

Author SHA1 Message Date
Katayama Hirofumi MZ 084fae1eb4
[SHIMGVW] Add 'rotate and save image' buttons (#6186)
- Add IDC_ROT_CWSAVE and IDC_ROT_CCWSAVE buttons.
- Add Preview_pSaveImage helper function.
- Use it in IDC_ROT_CWSAVE and IDC_ROT_CCWSAVE
  command handling.
CORE-19358, CORE-19387
2023-12-19 13:22:53 +09:00
Katayama Hirofumi MZ b6274fdde1
[SHIMGVW] Unlock file (#6181)
- Add m_pMemStream to PREVIEW_DATA structure.
- Add Preview_pFreeImage helper function.
- Add MemStreamFromFile helper function to make
  a memory stream.
- Avoid file locking by using a memory stream and
  GdipLoadImageFromStream.
CORE-19183
2023-12-18 12:37:50 +09:00
Katayama Hirofumi MZ fed7ee70a6
[SHIMGVW] Enable middle button dragging (#6173) 2023-12-16 20:46:40 +09:00
Katayama Hirofumi MZ e62d12b140
[SHIMGVW] Enable scrolling (#6172)
- Add m_xScrollOffset and m_yScrollOffset to
  PREVIEW_DATA structure.
- Add ZoomWnd_UpdateScroll helper function.
- Handle WM_HSCROLL and WM_VSCROLL messages.
- Enable mouse wheel scrolling.
CORE-19358
2023-12-16 19:45:37 +09:00
Katayama Hirofumi MZ f0179741d1
[SHIMGVW] Fix and improve zooming (#6167)
- Add WC_ZOOM window class and
  use it for zooming.
- Add ZoomWnd_OnDraw function
  and use it in ZoomWnd_OnPaint.
- Use memory bitmap to reduce flickering.
- Make rendering pixel-perfect.
CORE-19220
2023-12-15 15:16:50 +09:00
Katayama Hirofumi MZ 946b906ec8
[SHIMGVW] Initial implementation of Slide Show (#6163)
Add Slide Show feature.
- Add Preview_StartSlideShow and Preview_EndSlideShow functions.
- Add g_hMainWnd and g_hwndFullscreen global variables.
- Modify ZoomWnd_OnPaint to display Slide Show correctly.
- Add a timer to proceed Slide Show.
CORE-19358
2023-12-14 17:38:08 +09:00
Katayama Hirofumi MZ a837138dfc [SHIMGVW] Destroy window to exit app in Preview_Edit
CORE-19358
2023-12-11 15:51:55 +09:00
Katayama Hirofumi MZ 2de6e7559e
[SHIMGVW] Refactor Part 3 (#6148)
Improve code flexibility.
- Remove g_fnPrevProc, g_hDispWnd, g_hToolBar, and g_Anime global variables.
- Declare PREVIEW_DATA structure and use it.
- Encapsulate preview window by using user data.
CORE-19358
2023-12-11 07:52:18 +09:00
Katayama Hirofumi MZ dc2d2232f4 [SHIMGVW] Use HeapAlloc/HeapFree instead of malloc/calloc/free
malloc/free are slow. CORE-19358
2023-12-10 18:09:59 +09:00
Katayama Hirofumi MZ 468a5492a9 [SHIMGVW] Support Drag & Drop
- Use DragAcceptFiles and WM_DROPFILES.
CORE-19358
2023-12-10 16:55:34 +09:00
Katayama Hirofumi MZ 0b1d6d6b20
[SHIMGVW] Refactoring Part 2 (#6147)
- Move Anime_GetFrameDelay and Anime_Step.
- Remove one parameter from ImageView_SaveSettings.
- Rename some preview-window functions as "Preview_...".
- Rename ImageView_CreateWindow as ImageView_Main.
- Use lParam of WM_CREATE.
CORE-19358
2023-12-10 16:42:22 +09:00
Katayama Hirofumi MZ 0fe0b40ee1
[SHIMGVW] Split animation code to anime.c (#6144)
Improve code flexibility.
Add anime.c and move animation code to anime.c.
CORE-19358
2023-12-10 14:07:46 +09:00
Katayama Hirofumi MZ 5a2c451696
[SHIMGVW] Some minor refactoring (#6139)
Improve human readability. Reduce code amount.
CORE-19358
2023-12-10 08:20:17 +09:00
Katayama Hirofumi MZ 57e7f0b321
[SHIMGVW] Add g_ or s_ prefix to global variables (#6134)
Renaming global variables:
- s/hInstance/g_hInstance/
- s/shiSettings/g_Settings/
- s/currentFile/g_pCurrentFile/
- s/image/g_pImage/
- s/PrevProc/g_fnPrevProc/
- s/hDispWnd/g_hDispWnd/
- s/hToolBar/g_hToolBar/
- s/ZoomPercents/s_nZoomPercents/
- s/ZoomSteps/s_ZoomSteps/
- s/Buttons/s_Buttons/
- s/BtnConfig/s_ButtonConfig/
CORE-19358
2023-12-08 21:35:43 +09:00
Katayama Hirofumi MZ e7f6b473e6
[SHIMGVW] Implement ImageView_Delete (#6132)
- Call SHFileOperation to delete.
- Rebuild the file list and load the
  next file.
CORE-19358
2023-12-08 15:30:55 +09:00
Katayama Hirofumi MZ 0faa1561a6 [SHIMGVW] Check VK_CONTROL on ImageView_OnMouseWheel
CORE-19358
2023-12-08 15:03:18 +09:00
Katayama Hirofumi MZ 77ab709b61 [SHIMGVW] Improve window size handling
CORE-19358
2023-12-08 14:56:12 +09:00
Katayama Hirofumi MZ a500b513b0 [SHIMGVW] Use WM_GETMINMAXINFO instead of WM_SIZING
to limit window size. CORE-19358
2023-12-08 14:30:35 +09:00
Katayama Hirofumi MZ 0f519a783c [SHIMGVW] Implement IDC_BEST_FIT
- Add two parameters to UpdateZoom.
- Enable/disable IDC_BEST_FIT and IDC_REAL_SIZE
  buttons in UpdateZoom.
- Call ResetZoom on IDC_BEST_FIT.
CORE-19358
2023-12-08 11:44:03 +09:00
Katayama Hirofumi MZ 02312c7bf1 [SHIMGVW] Main window class must be "ShImgVw:CPreviewWnd"
and window style is (WS_VISIBLE | WS_CLIPSIBLINGS | WS_OVERLAPPEDWINDOW).
CORE-19358
2023-12-08 11:01:00 +09:00
Katayama Hirofumi MZ 91adec683d
[SHIMGVW] Add file extension on file save (#5975)
In order to add a filename extension if necessary,
set "png" to OPENFILENAME.lpstrDefExt.
CORE-19222
2023-11-14 19:48:18 +09:00
Yukinari Mitsu 3801acb914
[SHIMGVW] Display filename in taskbar even if the file isn't loaded (#5379)
If the file could not be loaded, its name wasn't displayed in the taskbar.
Now, always display the file name in all cases.

CORE-18954
2023-07-01 19:22:03 +03:00
Hermès Bélusca-Maïto 8b35e46903
[SHIMGVW] Update the display window when selecting the Previous/Next picture. (#5223)
Patch by KRosUser.
CORE-18905
2023-04-04 22:14:14 +02:00
Hermès Bélusca-Maïto 9393fc320e
[FORMATTING] Remove trailing whitespace. Addendum to 34593d93.
Excluded: 3rd-party code (incl. wine) and most of the win32ss.
2021-09-13 03:52:22 +02:00
Carlo Bramini a141c91135
[SHIMGVW] Improve zooming feature and realize image edit (#3473)
* [SHIMGVW] Add OLE32 for CoInitializeEx()
* Implemented support for effective image size (100%).
* Fix bug that could leave one of the zoom buttons if 100% size button is now pressed.
* Replace a CreateWindowEx() with CreateWindowExW().
* Added stub for image delete function.
* Implemented support for 'Modify' button.
* [SHIMGVW] Added CoUninitialize()
* [SHIMGVW] Pair CoUninitialize with CoInitializeEx
2021-03-01 23:40:06 +09:00
Katayama Hirofumi MZ 0c15f7d183
[SHIMGVW] Use _countof instead of ARRAYSIZE and use UINT (#3471)
- Use _countof macro instead of non-standard ARRAYSIZE macro.
- Use UINT type for array index instead of INT type, to erase signed/unsigned comparison warning.
JIRA issue: N/A
2021-02-21 10:28:08 +09:00
Katayama Hirofumi MZ 99a9e7e493
[SHIMGVW] Refactoring (#3461)
- Make the calls of CallWindowProc and DefWindowProc Wide (Unicode).
- Delete needless type casts.
- Add const to function arguments.
- Improve ImageView_LoadSettings function.
- Insert OFN_EXPLORER flag.
2021-02-15 19:21:55 +09:00
Carlo Bramini 0d4e921c93
[SHIMGVW] Add new features (CORE-11044) (#3113)
Add these new features:

- Use accelerator table for keyboard hotkeys.
- Updated italian translation.
- Simplified creation of toolbar and tooltips.
- Added missing toolbar buttons.
- Initialize common controls for theming.

French translation by Kyle Katarn.
Polish translation by Adam Stachowicz.
2021-02-13 23:22:21 +09:00
Katayama Hirofumi MZ 03c09c9e2c
[SHIMGVW] Correctly draw display border (#2687)
Use WS_EX_CLIENTEDGE extended style for display window.
Fix message WM_SIZE handling. CORE-16983
2020-04-28 20:56:18 +09:00
Katayama Hirofumi MZ 3926e9b3c8
[SHIMGVW] Consider failure case of loading file (#2606)
If loading an image file failed, then properly handle it. The command line is rundll32 shimgvw.dll,ImageView_Fullscreen .
CORE-16911
2020-04-20 21:05:14 +09:00
Katayama Hirofumi MZ 358f947975
[SHELL32] Rewrite SHAddToRecentDocs (#2333)
Rewrite shell32!SHAddToRecentDocs and use it in some applications.
Wine's SHAddToRecentDocs was not Unicode supported and unusable. I will dare to rewrite.
CORE-3588
2020-02-14 11:05:21 +09:00
Katayama Hirofumi MZ ad319ef944
[SHIMGVW] Image Viewer transparent image fix (#2165)
If the pixel is transparent or translucent, fill the background with a checkered pattern. CORE-15287
2019-12-23 19:43:20 +09:00
Katayama Hirofumi MZ f55ded91a4
[SHIMGVW] Fix cursor (#1471)
Fix the cursor of shimgvw.dll. CORE-15219
2019-04-05 16:52:11 +09:00
Stanislav Motylkov c83ac7600d [SHIMGVW] Fix image flickering when rendering animations 2018-10-24 23:05:00 +02:00
Katayama Hirofumi MZ 375a78e706
[SHIMGVW] Play gif animation (#934)
Make "Picture and Fax Viewer" able to play GIF animation.
CORE-12680
2018-10-24 19:51:30 +09:00
Timo Kreuzer 0f8439aa71 [DLLS] Fix 64 bit issues 2018-08-04 19:19:34 +02:00
Timo Kreuzer d281d14fd1 [REACTOS] Fix a number of Get/SetWindowsLong*Ptr* issues and use GWLP_* instead of GWL_* where appropriate. 2018-02-19 22:36:36 +01:00
Katayama Hirofumi MZ 0864d2de85 [SHIMGVW] Enable zooming
* merge ZoomIn and ZoomOut functions
* NULL to hbrBackground
* use GET_X_LPARAM and GET_Y_LPARAM for WM_MOUSEWHEEL
2018-01-30 19:36:59 +00:00
Colin Finck c2c66aff7d Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys. 2017-10-03 07:45:34 +00:00
Renamed from reactos/dll/win32/shimgvw/shimgvw.c (Browse further)