1: /*
     2:  ============================================================================
     3:  xoblite™ -> an advanced "extended shell" for Microsoft® Windows® 11
     4:  Copyright © 2002-2026 Karl Henrik Henriksson [qwilk/@xoblite]
     5:  Copyright © 2001-2004 The Blackbox for Windows Development Team
     6:  http://xoblite.net/ + https://github.com/xoblite/
     7:  ============================================================================
     8: 
     9:   Blackbox for Windows is free software, released under the
    10:   GNU General Public License (GPL version 2 or later), with an extension
    11:   that allows linking of proprietary modules under a controlled interface.
    12:   What this means is that plugins etc. are allowed to be released
    13:   under any license the author wishes. Please note, however, that the
    14:   original Blackbox gradient math code used in Blackbox for Windows
    15:   is available under the BSD license.
    16: 
    17:   http://www.fsf.org/licenses/gpl.html
    18:   http://www.fsf.org/licenses/gpl-faq.html#LinkingOverControlledInterface
    19:   http://www.xfree86.org/3.3.6/COPYRIGHT2.html#5
    20: 
    21:   This program is distributed in the hope that it will be useful,
    22:   but WITHOUT ANY WARRANTY; without even the implied warranty of
    23:   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    24:   GNU General Public License for more details.
    25: 
    26:   For additional license information, please read the included license.html.
    27: 
    28:  ============================================================================
    29: */
    30: 
    31: #ifndef __PREVIEWITEM_H 
    32: #define __PREVIEWITEM_H 
    33: 
    34: #include "..\API\BBApi.h" 
    35: #include "..\Settings\Settings.h" 
    36: #include "..\Console\Console.h" 
    37: #include <gdiplus.h> 
    38: 
    39: using namespace Gdiplus;
    40: 
    41: #define PREVIEW_ITEM_TIMER 1 
    42: 
    43: //===========================================================================
    44: 
    45: class PreviewItem
    46: {
    47: public:
    48:     PreviewItem(HINSTANCE hInstance);
    49:     ~PreviewItem();
    50: 
    51:     friend LRESULT CALLBACK PreviewItemWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
    52:     void UpdatePreviewItemWindow(int x, int y, int width, int height, char* path);
    53:     void Show(int x, int y, int width, int height, char* path, int delay);
    54:     void Hide();
    55:     int GetWidth();
    56:     int GetHeight();
    57: 
    58:     //====================
    59: 
    60:     HINSTANCE hPreviewItemInstance;
    61:     HWND hBlackboxWnd;
    62:     HWND hPreviewItemWnd;
    63:     HDC cachedBackground;
    64: 
    65:     int newItemX, newItemY;
    66:     int newItemWidth, newItemHeight;
    67:     char newItemPath[MAX_PATH];
    68:     int PreviewItemX, PreviewItemY, PreviewItemWidth, PreviewItemHeight;
    69:     bool PreviewItemHidden;
    70: };
    71: 
    72: //===========================================================================
    73: 
    74: #endif /* __PREVIEWITEM_H */ 
    75: