source: trunk/src/gui/dialogs/qfiledialog_win_p.h@ 1123

Last change on this file since 1123 was 846, checked in by Dmitry A. Kuminov, 15 years ago

trunk: Merged in qt 4.7.2 sources from branches/vendor/nokia/qt.

File size: 9.5 KB
Line 
1/****************************************************************************
2**
3** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
4** All rights reserved.
5** Contact: Nokia Corporation ([email protected])
6**
7** This file is part of the QtGui module of the Qt Toolkit.
8**
9** $QT_BEGIN_LICENSE:LGPL$
10** Commercial Usage
11** Licensees holding valid Qt Commercial licenses may use this file in
12** accordance with the Qt Commercial License Agreement provided with the
13** Software or, alternatively, in accordance with the terms contained in
14** a written agreement between you and Nokia.
15**
16** GNU Lesser General Public License Usage
17** Alternatively, this file may be used under the terms of the GNU Lesser
18** General Public License version 2.1 as published by the Free Software
19** Foundation and appearing in the file LICENSE.LGPL included in the
20** packaging of this file. Please review the following information to
21** ensure the GNU Lesser General Public License version 2.1 requirements
22** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
23**
24** In addition, as a special exception, Nokia gives you certain additional
25** rights. These rights are described in the Nokia Qt LGPL Exception
26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
27**
28** GNU General Public License Usage
29** Alternatively, this file may be used under the terms of the GNU
30** General Public License version 3.0 as published by the Free Software
31** Foundation and appearing in the file LICENSE.GPL included in the
32** packaging of this file. Please review the following information to
33** ensure the GNU General Public License version 3.0 requirements will be
34** met: http://www.gnu.org/copyleft/gpl.html.
35**
36** If you have questions regarding the use of this file, please contact
37** Nokia at [email protected].
38** $QT_END_LICENSE$
39**
40****************************************************************************/
41
42#include <objbase.h>
43#ifndef QFILEDIAG_WIN_P_H
44#define QFILEDIAG_WIN_P_H
45
46//these are the interface declarations needed for the file dialog on Vista and up
47
48//At some point we can hope that all compilers/sdk will support that interface
49//and we won't have to declare it ourselves
50
51//declarations
52#define FOS_OVERWRITEPROMPT 0x2
53#define FOS_STRICTFILETYPES 0x4
54#define FOS_NOCHANGEDIR 0x8
55#define FOS_PICKFOLDERS 0x20
56#define FOS_FORCEFILESYSTEM 0x40
57#define FOS_ALLNONSTORAGEITEMS 0x80
58#define FOS_NOVALIDATE 0x100
59#define FOS_ALLOWMULTISELECT 0x200
60#define FOS_PATHMUSTEXIST 0x800
61#define FOS_FILEMUSTEXIST 0x1000
62#define FOS_CREATEPROMPT 0x2000
63#define FOS_SHAREAWARE 0x4000
64#define FOS_NOREADONLYRETURN 0x8000
65#define FOS_NOTESTFILECREATE 0x10000
66#define FOS_HIDEMRUPLACES 0x20000
67#define FOS_HIDEPINNEDPLACES 0x40000
68#define FOS_NODEREFERENCELINKS 0x100000
69#define FOS_DONTADDTORECENT 0x2000000
70#define FOS_FORCESHOWHIDDEN 0x10000000
71#define FOS_DEFAULTNOMINIMODE 0x20000000
72#define FOS_FORCEPREVIEWPANEON 0x40000000
73
74typedef int GETPROPERTYSTOREFLAGS;
75#define GPS_DEFAULT 0x00000000
76#define GPS_HANDLERPROPERTIESONLY 0x00000001
77#define GPS_READWRITE 0x00000002
78#define GPS_TEMPORARY 0x00000004
79#define GPS_FASTPROPERTIESONLY 0x00000008
80#define GPS_OPENSLOWITEM 0x00000010
81#define GPS_DELAYCREATION 0x00000020
82#define GPS_BESTEFFORT 0x00000040
83#define GPS_MASK_VALID 0x0000007F
84
85typedef int (QT_WIN_CALLBACK* BFFCALLBACK)(HWND hwnd, UINT uMsg, LPARAM lParam, LPARAM lpData);
86// message from browser
87#define BFFM_INITIALIZED 1
88#define BFFM_SELCHANGED 2
89#define BFFM_ENABLEOK (WM_USER + 101)
90#define BFFM_SETSELECTION (WM_USER + 103)
91#define BFFM_SETSTATUSTEXT (WM_USER + 104)
92
93// Browsing for directory.
94#define BIF_RETURNONLYFSDIRS 0x0001
95#define BIF_DONTGOBELOWDOMAIN 0x0002
96#define BIF_STATUSTEXT 0x0004
97#define BIF_RETURNFSANCESTORS 0x0008
98#define BIF_EDITBOX 0x0010
99#define BIF_VALIDATE 0x0020
100#define BIF_NEWDIALOGSTYLE 0x0040
101#define BIF_BROWSEINCLUDEURLS 0x0080
102#define BIF_UAHINT 0x0100
103#define BIF_NONEWFOLDERBUTTON 0x0200
104#define BIF_NOTRANSLATETARGETS 0x0400
105#define BIF_BROWSEFORCOMPUTER 0x1000
106#define BIF_BROWSEFORPRINTER 0x2000
107#define BIF_BROWSEINCLUDEFILES 0x4000
108#define BIF_SHAREABLE 0x8000
109
110//the enums
111typedef enum {
112 SIATTRIBFLAGS_AND = 0x1,
113 SIATTRIBFLAGS_OR = 0x2,
114 SIATTRIBFLAGS_APPCOMPAT = 0x3,
115 SIATTRIBFLAGS_MASK = 0x3
116} SIATTRIBFLAGS;
117typedef enum {
118 SIGDN_NORMALDISPLAY = 0x00000000,
119 SIGDN_PARENTRELATIVEPARSING = 0x80018001,
120 SIGDN_PARENTRELATIVEFORADDRESSBAR = 0x8001c001,
121 SIGDN_DESKTOPABSOLUTEPARSING = 0x80028000,
122 SIGDN_PARENTRELATIVEEDITING = 0x80031001,
123 SIGDN_DESKTOPABSOLUTEEDITING = 0x8004c000,
124 SIGDN_FILESYSPATH = 0x80058000,
125 SIGDN_URL = 0x80068000
126} SIGDN;
127typedef enum {
128 FDAP_BOTTOM = 0x00000000,
129 FDAP_TOP = 0x00000001
130} FDAP;
131typedef enum {
132 FDESVR_DEFAULT = 0x00000000,
133 FDESVR_ACCEPT = 0x00000001,
134 FDESVR_REFUSE = 0x00000002
135} FDE_SHAREVIOLATION_RESPONSE;
136typedef FDE_SHAREVIOLATION_RESPONSE FDE_OVERWRITE_RESPONSE;
137
138//the structs
139typedef struct {
140 LPCWSTR pszName;
141 LPCWSTR pszSpec;
142} qt_COMDLG_FILTERSPEC;
143typedef struct {
144 GUID fmtid;
145 DWORD pid;
146} qt_PROPERTYKEY;
147
148typedef struct {
149 USHORT cb;
150 BYTE abID[1];
151} qt_SHITEMID, *qt_LPSHITEMID;
152typedef struct {
153 qt_SHITEMID mkid;
154} qt_ITEMIDLIST, *qt_LPITEMIDLIST;
155typedef const qt_ITEMIDLIST *qt_LPCITEMIDLIST;
156typedef struct {
157 HWND hwndOwner;
158 qt_LPCITEMIDLIST pidlRoot;
159 LPWSTR pszDisplayName;
160 LPCWSTR lpszTitle;