add skeleton for variant type support
[pywinlite.git] / icon.py
blob99d98ca101a44c5430e554a34448c02e59774dba
1 #Copyright (c) 2008 Vincent Povirk
3 #Permission is hereby granted, free of charge, to any person
4 #obtaining a copy of this software and associated documentation
5 #files (the "Software"), to deal in the Software without
6 #restriction, including without limitation the rights to use,
7 #copy, modify, merge, publish, distribute, sublicense, and/or sell
8 #copies of the Software, and to permit persons to whom the
9 #Software is furnished to do so, subject to the following
10 #conditions:
12 #The above copyright notice and this permission notice shall be
13 #included in all copies or substantial portions of the Software.
15 #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 #EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
17 #OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 #NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
19 #HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
20 #WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 #FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22 #OTHER DEALINGS IN THE SOFTWARE.
24 # Icon definitions
25 # see http://msdn.microsoft.com/en-us/library/ms646973(VS.85).aspx
27 from windef import HICON, HINSTANCE, INT, BYTE, LPBYTE, PBYTE, BOOL, UINT
28 from winliteutils import NONZERO
29 from resource import MAKEINTRESOURCE
31 IDI_APPLICATION = MAKEINTRESOURCE(32512)
32 IDI_HAND = MAKEINTRESOURCE(32513)
33 IDI_QUESTION = MAKEINTRESOURCE(32514)
34 IDI_EXCLAMATION = MAKEINTRESOURCE(32515)
35 IDI_ASTERISK = MAKEINTRESOURCE(32516)
36 IDI_WINLOGO = MAKEINTRESOURCE(32517)
38 IDI_WARNING = IDI_EXCLAMATION
39 IDI_ERROR = IDI_HAND
40 IDI_INFORMATION = IDI_ASTERISK
42 _user32.CopyIcon.argtypes = [HICON]
43 _user32.CopyIcon.restype = NONZERO
44 CopyIcon = _user32.CopyIcon
46 _user32.CreateIcon.argtypes = [HINSTANCE, INT, INT, BYTE, BYTE, LPBYTE, LPBYTE]
47 _user32.CreateIcon.restype = NONZERO
48 CreateIcon = _user32.CreateIcon
50 _user32.CreateIconFromResource.argtypes = [PBYTE, DWORD, BOOL, DWORD]
51 _user32.CreateIconFromResource.restype = NONZERO
52 CreateIconFromResource = _user32.CreateIconFromResource
54 _user32.CreateIconFromResourceEx.argtypes = [PBYTE, DWORD, BOOL, DWORD, INT, INT, UINT]
55 _user32.CreateIconFromResourceEx.restype =