Skip to content

Commit 097985c

Browse files
committed
add resource api
1 parent 0b6690c commit 097985c

File tree

7 files changed

+249
-41
lines changed

7 files changed

+249
-41
lines changed

kernel32.go

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,22 @@ const (
3131

3232
// Predefined locale ids
3333
const (
34-
LOCALE_INVARIANT LCID = 0x007f
35-
LOCALE_USER_DEFAULT LCID = 0x0400
36-
LOCALE_SYSTEM_DEFAULT LCID = 0x0800
34+
LOCALE_CUSTOM_DEFAULT LCID = 0x0c00
35+
LOCALE_CUSTOM_UI_DEFAULT LCID = 0x1400
36+
LOCALE_CUSTOM_UNSPECIFIED LCID = 0x1000
37+
LOCALE_INVARIANT LCID = 0x007f
38+
LOCALE_USER_DEFAULT LCID = 0x0400
39+
LOCALE_SYSTEM_DEFAULT LCID = 0x0800
3740
)
3841

3942
// LCTYPE constants
4043
const (
41-
LOCALE_SDECIMAL LCTYPE = 14
42-
LOCALE_STHOUSAND LCTYPE = 15
44+
LOCALE_SDECIMAL LCTYPE = 14
45+
LOCALE_STHOUSAND LCTYPE = 15
46+
LOCALE_SISO3166CTRYNAME LCTYPE = 0x5a
47+
LOCALE_SISO3166CTRYNAME2 LCTYPE = 0x68
48+
LOCALE_SISO639LANGNAME LCTYPE = 0x59
49+
LOCALE_SISO639LANGNAME2 LCTYPE = 0x67
4350
)
4451

4552
var (

listbox.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
// Copyright 2012 The go-winapi Authors. All rights reserved.
2-
// Use of this source code is governed by a BSD-style
3-
// license that can be found in the LICENSE file.
1+
// Copyright 2012 The go-winapi Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style
3+
// license that can be found in the LICENSE file.
44

55
package winapi
66

7-
// ListBox style
7+
// ListBox style
88
const (
99
LBS_NOTIFY = 0x0001
1010
LBS_SORT = 0x0002
@@ -25,7 +25,7 @@ const (
2525
LBS_STANDARD = LBS_NOTIFY | LBS_SORT | WS_BORDER | WS_VSCROLL
2626
)
2727

28-
// ListBox messages
28+
// ListBox messages
2929
const (
3030
LB_ADDSTRING = 0x0180
3131
LB_INSERTSTRING = 0x0181
@@ -70,7 +70,7 @@ const (
7070
LB_MULTIPLEADDSTRING = 0x01B1
7171
)
7272

73-
//Listbox Notification Codes
73+
//Listbox Notification Codes
7474
const (
7575
LBN_ERRSPACE = -2
7676
LBN_SELCHANGE = 1

shobj.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
// Copyright 2012 The Walk Authors. All rights reserved.
2-
// Use of this source code is governed by a BSD-style
3-
// license that can be found in the LICENSE file.
1+
// Copyright 2012 The Walk Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style
3+
// license that can be found in the LICENSE file.
44

55
package winapi
66

@@ -14,7 +14,7 @@ var (
1414
IID_ITaskbarList3 = IID{0xea1afb91, 0x9e28, 0x4b86, [8]byte{0x90, 0xe9, 0x9e, 0x9f, 0x8a, 0x5e, 0xef, 0xaf}}
1515
)
1616

17-
//TBPFLAG
17+
//TBPFLAG
1818
const (
1919
TBPF_NOPROGRESS = 0
2020
TBPF_INDETERMINATE = 0x1

shobj_386.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
// Copyright 2012 The Walk Authors. All rights reserved.
2-
// Use of this source code is governed by a BSD-style
3-
// license that can be found in the LICENSE file.
1+
// Copyright 2012 The Walk Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style
3+
// license that can be found in the LICENSE file.
44

55
package winapi
66

shobj_amd64.go

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,22 @@
1-
// Copyright 2012 The Walk Authors. All rights reserved.
2-
// Use of this source code is governed by a BSD-style
3-
// license that can be found in the LICENSE file.
4-
5-
package winapi
6-
7-
import (
8-
"unsafe"
9-
"syscall"
10-
)
11-
12-
13-
func (obj *ITaskbarList3) SetProgressValue(hwnd HWND, current uint32, length uint32) HRESULT{
14-
ret, _, _ := syscall.Syscall6(obj.LpVtbl.SetProgressValue, 4,
15-
uintptr(unsafe.Pointer(obj)),
16-
uintptr(hwnd),
17-
uintptr(current),
18-
uintptr(length),
19-
0,
20-
0)
21-
22-
return HRESULT(ret)
23-
}
1+
// Copyright 2012 The Walk Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style
3+
// license that can be found in the LICENSE file.
4+
5+
package winapi
6+
7+
import (
8+
"syscall"
9+
"unsafe"
10+
)
11+
12+
func (obj *ITaskbarList3) SetProgressValue(hwnd HWND, current uint32, length uint32) HRESULT {
13+
ret, _, _ := syscall.Syscall6(obj.LpVtbl.SetProgressValue, 4,
14+
uintptr(unsafe.Pointer(obj)),
15+
uintptr(hwnd),
16+
uintptr(current),
17+
uintptr(length),
18+
0,
19+
0)
20+
21+
return HRESULT(ret)
22+
}

0 commit comments

Comments
 (0)