2011-03-02 16:57:41 +01:00
|
|
|
/* EcWin7 - Support library for integrating Windows 7 taskbar features
|
|
|
|
* into any Qt application
|
|
|
|
* Copyright (C) 2010 Emanuele Colombo
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef ECWIN7_H
|
|
|
|
#define ECWIN7_H
|
|
|
|
|
|
|
|
#include <QtGlobal>
|
|
|
|
#include <QWidget>
|
|
|
|
|
|
|
|
// Windows only data definitions
|
2011-04-03 21:50:44 +02:00
|
|
|
#ifdef W7API
|
2011-03-02 16:57:41 +01:00
|
|
|
|
|
|
|
#include <windows.h>
|
|
|
|
#include <initguid.h>
|
|
|
|
#define CMIC_MASK_ASYNCOK SEE_MASK_ASYNCOK
|
|
|
|
|
2011-05-01 22:07:57 +02:00
|
|
|
#include <ShlObj.h>
|
|
|
|
#include <shlwapi.h>
|
2011-10-17 09:57:07 +02:00
|
|
|
#include "msvc2008.h"
|
2011-03-02 16:57:41 +01:00
|
|
|
|
|
|
|
// ********************************************************************
|
|
|
|
// EcWin7 class - Windows 7 taskbar handling for Qt and MinGW
|
|
|
|
|
|
|
|
class EcWin7
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
2011-11-06 17:01:23 +01:00
|
|
|
// Initialization methods
|
2011-03-02 16:57:41 +01:00
|
|
|
EcWin7();
|
|
|
|
void init(WId wid);
|
2011-11-06 17:01:23 +01:00
|
|
|
bool winEvent(MSG* message, long* result);
|
2011-03-02 16:57:41 +01:00
|
|
|
|
2011-11-06 17:01:23 +01:00
|
|
|
// Overlay icon handling
|
|
|
|
void setOverlayIcon(QString iconName, QString description);
|
2011-03-02 16:57:41 +01:00
|
|
|
|
2011-11-06 17:01:23 +01:00
|
|
|
// Progress indicator handling
|
|
|
|
enum ToolBarProgressState {
|
2011-03-02 16:57:41 +01:00
|
|
|
NoProgress = 0,
|
|
|
|
Indeterminate = 1,
|
|
|
|
Normal = 2,
|
|
|
|
Error = 4,
|
|
|
|
Paused = 8
|
|
|
|
};
|
|
|
|
void setProgressValue(int value, int max);
|
|
|
|
void setProgressState(ToolBarProgressState state);
|
|
|
|
|
|
|
|
private:
|
|
|
|
WId mWindowId;
|
|
|
|
UINT mTaskbarMessageId;
|
2011-11-06 17:01:23 +01:00
|
|
|
ITaskbarList3* mTaskbar;
|
2011-03-02 16:57:41 +01:00
|
|
|
HICON mOverlayIcon;
|
|
|
|
};
|
|
|
|
// Windows only data definitions - END
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif // ECWIN7_H
|