source: tspsg/src/shobjidl.h @ f8e5161968

appveyorimgbotreadme
Last change on this file since f8e5161968 was c90b437dd8, checked in by Oleksii Serdiuk, 12 years ago

More copyright headers updates.

Some strings wheren't found by generic search and replace :-)
Also, there were some really outdated since 2010.

  • Property mode set to 100644
File size: 5.4 KB
Line 
1/*!
2 * \file shobjidl.h
3 * \author Copyright © Microsoft Corporation
4 * \author Extracted and documented by Oleksii Serdiuk <contacts[at]oleksii[dot]name>
5 * \version Microsoft Windows SDK v7.0A
6 *
7 *  $Id: $Format:%h %ai %an$ $
8 *  $URL: http://tspsg.info/ $
9 *
10 * \brief This file is a minimal required part of \c %shobjidl.h from <b>Microsoft Windows SDK v7.0A</b>.
11 *
12 *  This file is an extract of \c %shobjidl.h from <b>Microsoft Windows SDK v7.0A</b>.
13 *  It is needed to support <b>Windows 7 Taskbar Extensions</b> (namely, <em>Progress Bars</em>)
14 *  and contains minimal required definition of \c ITaskbarList3 interface.
15 *
16 *  Tested with \b MSVC and \b mingw32. Doesn't need <b>Windows 7 SDK</b> itself.
17 *
18 * \note Don't forget to link to \b ole32 library when using this file (usually \c -lole32 linker flag is enough).
19 */
20
21#ifndef _SHOBJIDL_H
22#define _SHOBJIDL_H
23
24#define INITGUID
25#include <windows.h>
26
27#ifndef DOXYGEN_EXCLUDE
28DEFINE_GUID(CLSID_TaskbarList, 0x56fdf344,0xfd6d,0x11d0,0x95,0x8a,0x00,0x60,0x97,0xc9,0xa0,0x90);
29DEFINE_GUID(IID_ITaskbarList3, 0xea1afb91,0x9e28,0x4b86,0x90,0xe9,0x9e,0x9f,0x8a,0x5e,0xef,0xaf);
30#endif
31
32enum TBPFLAG {
33        /*! Stops displaying progress and returns the button to its normal state. Call this method with this flag to dismiss the progress bar when the operation is complete or cancelled. */
34        TBPF_NOPROGRESS         = 0,
35
36        /*! The progress indicator does not grow in size, but cycles repeatedly along the length of the taskbar button. This indicates activity without specifying what proportion of the progress is complete. Progress is taking place, but there is no prediction as to how long the operation will take. */
37        TBPF_INDETERMINATE      = 0x1,
38
39        /*! The progress indicator grows in size from left to right in proportion to the estimated amount of the operation completed. This is a determinate progress indicator; a prediction is being made as to the duration of the operation. */
40        TBPF_NORMAL                     = 0x2,
41
42        /*! The progress indicator turns red to show that an error has occurred in one of the windows that is broadcasting progress. This is a determinate state. If the progress indicator is in the indeterminate state, it switches to a red determinate display of a generic percentage not indicative of actual progress. */
43        TBPF_ERROR                      = 0x4,
44
45        /*! The progress indicator turns yellow to show that progress is currently stopped in one of the windows but can be resumed by the user. No error condition exists and nothing is preventing the progress from continuing. This is a determinate state. If the progress indicator is in the indeterminate state, it switches to a yellow determinate display of a generic percentage not indicative of actual progress. */
46        TBPF_PAUSED                     = 0x8
47};
48
49#ifndef DOXYGEN_EXCLUDE
50DECLARE_INTERFACE_(ITaskbarList3, IUnknown)
51{
52        /*** IUnknown methods ***/
53        STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
54        STDMETHOD_(ULONG, AddRef) (THIS) PURE;
55        STDMETHOD_(ULONG, Release) (THIS) PURE;
56        /*** ITaskbarList specific methods ***/
57        STDMETHOD(HrInit) (THIS) PURE;
58        STDMETHOD(AddTab) (THIS_ HWND hwnd) PURE;
59        STDMETHOD(DeleteTab) (THIS_ HWND hwnd) PURE;
60        STDMETHOD(ActivateTab) (THIS_ HWND hwnd) PURE;
61        STDMETHOD(SetActiveAlt) (THIS_ HWND hwnd) PURE;
62        /*** ITaskbarList2 specific methods ***/
63        STDMETHOD(MarkFullscreenWindow) (THIS_ HWND hwnd, BOOL fFullscreen) PURE;
64        /*** ITaskbarList3 specific methods (only used ones) ***/
65        STDMETHOD(SetProgressValue) (THIS_ HWND hwnd, ULONGLONG ullCompleted, ULONGLONG ullTotal) PURE;
66        STDMETHOD(SetProgressState) (THIS_ HWND hwnd, TBPFLAG tbpFlags) PURE;
67};
68#else
69// This block is strictly for doxygen.
70/*!
71 * \brief Exposes methods that control the taskbar.
72 *
73 *  Extends ITaskbarList2 by exposing methods that support the unified launching and switching taskbar button functionality added in Windows 7. This functionality includes thumbnail representations and switch targets based on individual tabs in a tabbed application, thumbnail toolbars, notification and status overlays, and progress indicators. This interface also provides the methods of the ITaskbarList and ITaskbarList2 interfaces, from which it inherits.
74 */
75public interface class ITaskbarList3: public ITaskbarList2 {
76        /*!
77         * \brief Sets the type and state of the progress indicator displayed on a taskbar button.
78         * \param hwnd The handle of the window in which the progress of an operation is being shown. This window's associated taskbar button will display the progress bar.
79         * \param tbpFlags Flags that control the current state of the progress button.
80         * \return Returns S_OK if successful, or an error value otherwise.
81         *
82         * \note A call to SetProgressValue() will switch a progress indicator currently in an indeterminate mode (#TBPF_INDETERMINATE) to a normal (determinate) display and clear the #TBPF_INDETERMINATE flag.
83         */
84        HRESULT SetProgressState(HWND hwnd, TBPFLAG tbpFlags);
85        /*!
86         * \brief Displays or updates a progress bar hosted in a taskbar button to show the specific percentage completed of the full operation.
87         * \param hwnd The handle of the window whose associated taskbar button is being used as a progress indicator.
88         * \param ullCompleted An application-defined value that indicates the proportion of the operation that has been completed at the time the method is called.
89         * \param ullTotal An application-defined value that specifies the value \a ullCompleted will have when the operation is complete.
90         */
91        HRESULT SetProgressValue(HWND hwnd, ULONGLONG ullCompleted, ULONGLONG ullTotal);
92};
93#endif
94
95#endif /* _SHOBJIDL_H */
Note: See TracBrowser for help on using the repository browser.