Remove bFirstPain funky optimization, it is causing too much grief.
[wine.git] / include / wine / obj_shelllink.h
blob61b65c56b2b291734016c6cf479635dc9e30e1de
1 /*
2 * Defines the COM interfaces and APIs related to IShellLink.
4 * Depends on 'obj_base.h'.
6 * Copyright (C) 1999 Juergen Schmied
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 #ifndef __WINE_WINE_OBJ_SHELLLINK_H
24 #define __WINE_WINE_OBJ_SHELLLINK_H
26 #ifdef __cplusplus
27 extern "C" {
28 #endif /* defined(__cplusplus) */
30 #define IShellLink WINELIB_NAME_AW(IShellLink)
32 /*****************************************************************************
33 * Predeclare the interfaces
35 typedef struct IShellLinkA IShellLinkA,*LPSHELLLINK;
36 typedef struct IShellLinkW IShellLinkW,*LPSHELLLINKW;
38 /*****************************************************************************
41 typedef enum
42 { SLR_NO_UI = 0x0001,
43 SLR_ANY_MATCH = 0x0002,
44 SLR_UPDATE = 0x0004
45 } SLR_FLAGS;
47 /*****************************************************************************
48 * GetPath fFlags
50 typedef enum
51 { SLGP_SHORTPATH = 0x0001,
52 SLGP_UNCPRIORITY = 0x0002,
53 SLGP_RAWPATH = 0x0004
54 } SLGP_FLAGS;
55 /*****************************************************************************
56 * IShellLink interface
58 #define INTERFACE IShellLinkA
59 #define IShellLinkA_METHODS \
60 IUnknown_METHODS \
61 STDMETHOD(GetPath)(THIS_ LPSTR pszFile, INT cchMaxPath, WIN32_FIND_DATAA * pfd, DWORD fFlags) PURE; \
62 STDMETHOD(GetIDList)(THIS_ LPITEMIDLIST * ppidl) PURE; \
63 STDMETHOD(SetIDList)(THIS_ LPCITEMIDLIST pidl) PURE; \
64 STDMETHOD(GetDescription)(THIS_ LPSTR pszName, INT cchMaxName) PURE; \
65 STDMETHOD(SetDescription)(THIS_ LPCSTR pszName) PURE; \
66 STDMETHOD(GetWorkingDirectory)(THIS_ LPSTR pszDir,INT cchMaxPath) PURE; \
67 STDMETHOD(SetWorkingDirectory)(THIS_ LPCSTR pszDir) PURE; \
68 STDMETHOD(GetArguments)(THIS_ LPSTR pszArgs, INT cchMaxPath) PURE; \
69 STDMETHOD(SetArguments)(THIS_ LPCSTR pszArgs) PURE; \
70 STDMETHOD(GetHotkey)(THIS_ WORD * pwHotkey) PURE; \
71 STDMETHOD(SetHotkey)(THIS_ WORD wHotkey) PURE; \
72 STDMETHOD(GetShowCmd)(THIS_ INT * piShowCmd) PURE; \
73 STDMETHOD(SetShowCmd)(THIS_ INT iShowCmd) PURE; \
74 STDMETHOD(GetIconLocation)(THIS_ LPSTR pszIconPath, INT cchIconPath,INT * piIcon) PURE; \
75 STDMETHOD(SetIconLocation)(THIS_ LPCSTR pszIconPath,INT iIcon) PURE; \
76 STDMETHOD(SetRelativePath)(THIS_ LPCSTR pszPathRel, DWORD dwReserved) PURE; \
77 STDMETHOD(Resolve)(THIS_ HWND hwnd, DWORD fFlags) PURE; \
78 STDMETHOD(SetPath)(THIS_ LPCSTR pszFile) PURE;
79 ICOM_DEFINE(IShellLinkA,IUnknown)
80 #undef INTERFACE
82 #ifdef COBJMACROS
83 /*** IUnknown methods ***/
84 #define IShellLinkA_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
85 #define IShellLinkA_AddRef(p) (p)->lpVtbl->AddRef(p)
86 #define IShellLinkA_Release(p) (p)->lpVtbl->Release(p)
87 /*** IShellLink methods ***/
88 #define IShellLinkA_GetPath(p,a,b,c,d) (p)->lpVtbl->GetPath(p,a,b,c,d)
89 #define IShellLinkA_GetIDList(p,a) (p)->lpVtbl->GetIDList(p,a)
90 #define IShellLinkA_SetIDList(p,a) (p)->lpVtbl->SetIDList(p,a)
91 #define IShellLinkA_GetDescription(p,a,b) (p)->lpVtbl->GetDescription(p,a,b)
92 #define IShellLinkA_SetDescription(p,a) (p)->lpVtbl->SetDescription(p,a)
93 #define IShellLinkA_GetWorkingDirectory(p,a,b) (p)->lpVtbl->GetWorkingDirectory(p,a,b)
94 #define IShellLinkA_SetWorkingDirectory(p,a) (p)->lpVtbl->SetWorkingDirectory(p,a)
95 #define IShellLinkA_GetArguments(p,a,b) (p)->lpVtbl->GetArguments(p,a,b)
96 #define IShellLinkA_SetArguments(p,a) (p)->lpVtbl->SetArguments(p,a)
97 #define IShellLinkA_GetHotkey(p,a) (p)->lpVtbl->GetHotkey(p,a)
98 #define IShellLinkA_SetHotkey(p,a) (p)->lpVtbl->SetHotkey(p,a)
99 #define IShellLinkA_GetShowCmd(p,a) (p)->lpVtbl->GetShowCmd(p,a)
100 #define IShellLinkA_SetShowCmd(p,a) (p)->lpVtbl->SetShowCmd(p,a)
101 #define IShellLinkA_GetIconLocation(p,a,b,c) (p)->lpVtbl->GetIconLocation(p,a,b,c)
102 #define IShellLinkA_SetIconLocation(p,a,b) (p)->lpVtbl->SetIconLocation(p,a,b)
103 #define IShellLinkA_SetRelativePath(p,a,b) (p)->lpVtbl->SetRelativePath(p,a,b)
104 #define IShellLinkA_Resolve(p,a,b) (p)->lpVtbl->Resolve(p,a,b)
105 #define IShellLinkA_SetPath(p,a) (p)->lpVtbl->SetPath(p,a)
106 #endif
108 /*****************************************************************************
109 * IShellLinkW interface
111 #define INTERFACE IShellLinkW
112 #define IShellLinkW_METHODS \
113 IUnknown_METHODS \
114 STDMETHOD(GetPath)(THIS_ LPWSTR pszFile, INT cchMaxPath, WIN32_FIND_DATAA * pfd, DWORD fFlags) PURE; \
115 STDMETHOD(GetIDList)(THIS_ LPITEMIDLIST * ppidl) PURE; \
116 STDMETHOD(SetIDList)(THIS_ LPCITEMIDLIST pidl) PURE; \
117 STDMETHOD(GetDescription)(THIS_ LPWSTR pszName, INT cchMaxName) PURE; \
118 STDMETHOD(SetDescription)(THIS_ LPCWSTR pszName) PURE; \
119 STDMETHOD(GetWorkingDirectory)(THIS_ LPWSTR pszDir,INT cchMaxPath) PURE; \
120 STDMETHOD(SetWorkingDirectory)(THIS_ LPCWSTR pszDir) PURE; \
121 STDMETHOD(GetArguments)(THIS_ LPWSTR pszArgs, INT cchMaxPath) PURE; \
122 STDMETHOD(SetArguments)(THIS_ LPCWSTR pszArgs) PURE; \
123 STDMETHOD(GetHotkey)(THIS_ WORD * pwHotkey) PURE; \
124 STDMETHOD(SetHotkey)(THIS_ WORD wHotkey) PURE; \
125 STDMETHOD(GetShowCmd)(THIS_ INT * piShowCmd) PURE; \
126 STDMETHOD(SetShowCmd)(THIS_ INT iShowCmd) PURE; \
127 STDMETHOD(GetIconLocation)(THIS_ LPWSTR pszIconPath, INT cchIconPath,INT * piIcon) PURE; \
128 STDMETHOD(SetIconLocation)(THIS_ LPCWSTR pszIconPath,INT iIcon) PURE; \
129 STDMETHOD(SetRelativePath)(THIS_ LPCWSTR pszPathRel, DWORD dwReserved) PURE; \
130 STDMETHOD(Resolve)(THIS_ HWND hwnd, DWORD fFlags) PURE; \
131 STDMETHOD(SetPath)(THIS_ LPCWSTR pszFile) PURE;
132 ICOM_DEFINE(IShellLinkW,IUnknown)
133 #undef INTERFACE
135 #ifdef COBJMACROS
136 /*** IUnknown methods ***/
137 #define IShellLinkW_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
138 #define IShellLinkW_AddRef(p) (p)->lpVtbl->AddRef(p)
139 #define IShellLinkW_Release(p) (p)->lpVtbl->Release(p)
140 /*** IShellLinkW methods ***/
141 #define IShellLinkW_GetPath(p,a,b,c,d) (p)->lpVtbl->GetPath(p,a,b,c,d)
142 #define IShellLinkW_GetIDList(p,a) (p)->lpVtbl->GetIDList(p,a)
143 #define IShellLinkW_SetIDList(p,a) (p)->lpVtbl->SetIDList(p,a)
144 #define IShellLinkW_GetDescription(p,a,b) (p)->lpVtbl->GetDescription(p,a,b)
145 #define IShellLinkW_SetDescription(p,a) (p)->lpVtbl->SetDescription(p,a)
146 #define IShellLinkW_GetWorkingDirectory(p,a,b) (p)->lpVtbl->GetWorkingDirectory(p,a,b)
147 #define IShellLinkW_SetWorkingDirectory(p,a) (p)->lpVtbl->SetWorkingDirectory(p,a)
148 #define IShellLinkW_GetArguments(p,a,b) (p)->lpVtbl->GetArguments(p,a,b)
149 #define IShellLinkW_SetArguments(p,a) (p)->lpVtbl->SetArguments(p,a)
150 #define IShellLinkW_GetHotkey(p,a) (p)->lpVtbl->GetHotkey(p,a)
151 #define IShellLinkW_SetHotkey(p,a) (p)->lpVtbl->SetHotkey(p,a)
152 #define IShellLinkW_GetShowCmd(p,a) (p)->lpVtbl->GetShowCmd(p,a)
153 #define IShellLinkW_SetShowCmd(p,a) (p)->lpVtbl->SetShowCmd(p,a)
154 #define IShellLinkW_GetIconLocation(p,a,b,c) (p)->lpVtbl->GetIconLocation(p,a,b,c)
155 #define IShellLinkW_SetIconLocation(p,a,b) (p)->lpVtbl->SetIconLocation(p,a,b)
156 #define IShellLinkW_SetRelativePath(p,a,b) (p)->lpVtbl->SetRelativePath(p,a,b)
157 #define IShellLinkW_Resolve(p,a,b) (p)->lpVtbl->Resolve(p,a,b)
158 #define IShellLinkW_SetPath(p,a) (p)->lpVtbl->SetPath(p,a)
159 #endif
161 #ifdef __cplusplus
162 } /* extern "C" */
163 #endif /* defined(__cplusplus) */
165 #endif /* __WINE_WINE_OBJ_SHELLLINK_H */