2022-10-04 13:21:05 +08:00
|
|
|
//----------------------------------------
|
|
|
|
//
|
|
|
|
// Copyright © yanghy. All Rights Reserved.
|
|
|
|
//
|
2022-10-04 16:38:43 +08:00
|
|
|
// Licensed under GNU General Public License v3.0
|
2022-10-04 13:21:05 +08:00
|
|
|
//
|
|
|
|
//----------------------------------------
|
|
|
|
|
|
|
|
package cef
|
|
|
|
|
|
|
|
import (
|
2022-11-02 12:47:47 +08:00
|
|
|
. "github.com/energye/energy/common"
|
2022-10-04 13:21:05 +08:00
|
|
|
"github.com/energye/golcl/lcl/api"
|
|
|
|
"unsafe"
|
|
|
|
)
|
|
|
|
|
|
|
|
type ICefStringMultiMap struct {
|
|
|
|
instance uintptr
|
|
|
|
ptr unsafe.Pointer
|
|
|
|
}
|
|
|
|
|
|
|
|
//header map
|
|
|
|
func (m *ICefStringMultiMap) GetSize() int {
|
|
|
|
return cefHeaderMap_GetSize(m.instance)
|
|
|
|
}
|
|
|
|
func (m *ICefStringMultiMap) FindCount(key string) int {
|
|
|
|
return cefHeaderMap_FindCount(m.instance, key)
|
|
|
|
}
|
|
|
|
func (m *ICefStringMultiMap) GetEnumerate(key string, valueIndex int) string {
|
2022-12-03 21:56:51 +08:00
|
|
|
return api.GoStr(cefHeaderMap_GetEnumerate(m.instance, key, valueIndex))
|
2022-10-04 13:21:05 +08:00
|
|
|
}
|
|
|
|
func (m *ICefStringMultiMap) GetKey(index int) string {
|
2022-12-03 21:56:51 +08:00
|
|
|
return api.GoStr(cefHeaderMap_GetKey(m.instance, index))
|
2022-10-04 13:21:05 +08:00
|
|
|
}
|
|
|
|
func (m *ICefStringMultiMap) GetValue(index int) string {
|
2022-12-03 21:56:51 +08:00
|
|
|
return api.GoStr(cefHeaderMap_GetValue(m.instance, index))
|
2022-10-04 13:21:05 +08:00
|
|
|
}
|
|
|
|
func (m *ICefStringMultiMap) Append(key, value string) bool {
|
2022-12-03 21:56:51 +08:00
|
|
|
return api.GoBool(cefHeaderMap_Append(m.instance, key, value))
|
2022-10-04 13:21:05 +08:00
|
|
|
}
|
|
|
|
func (m *ICefStringMultiMap) Clear() {
|
|
|
|
cefHeaderMap_Clear(m.instance)
|
|
|
|
}
|
|
|
|
|
|
|
|
func cefHeaderMap_GetSize(instance uintptr) int {
|
2022-12-06 12:04:00 +08:00
|
|
|
r1, _, _ := Proc(internale_cefHeaderMap_GetSize).Call(instance)
|
2022-10-04 13:21:05 +08:00
|
|
|
return int(r1)
|
|
|
|
}
|
|
|
|
func cefHeaderMap_FindCount(instance uintptr, key string) int {
|
2022-12-06 12:04:00 +08:00
|
|
|
r1, _, _ := Proc(internale_cefHeaderMap_FindCount).Call(instance, api.PascalStr(key))
|
2022-10-04 13:21:05 +08:00
|
|
|
return int(r1)
|
|
|
|
}
|
|
|
|
func cefHeaderMap_GetEnumerate(instance uintptr, key string, valueIndex int) uintptr {
|
2022-12-06 12:04:00 +08:00
|
|
|
r1, _, _ := Proc(internale_cefHeaderMap_GetEnumerate).Call(instance, api.PascalStr(key), uintptr(valueIndex))
|
2022-10-04 13:21:05 +08:00
|
|
|
return r1
|
|
|
|
}
|
|
|
|
func cefHeaderMap_GetKey(instance uintptr, index int) uintptr {
|
2022-12-06 12:04:00 +08:00
|
|
|
r1, _, _ := Proc(internale_cefHeaderMap_GetKey).Call(instance, uintptr(index))
|
2022-10-04 13:21:05 +08:00
|
|
|
return r1
|
|
|
|
}
|
|
|
|
func cefHeaderMap_GetValue(instance uintptr, index int) uintptr {
|
2022-12-06 12:04:00 +08:00
|
|
|
r1, _, _ := Proc(internale_cefHeaderMap_GetValue).Call(instance, uintptr(index))
|
2022-10-04 13:21:05 +08:00
|
|
|
return r1
|
|
|
|
}
|
|
|
|
func cefHeaderMap_Append(instance uintptr, key, value string) uintptr {
|
2022-12-06 12:04:00 +08:00
|
|
|
r1, _, _ := Proc(internale_cefHeaderMap_Append).Call(instance, api.PascalStr(key), api.PascalStr(value))
|
2022-10-04 13:21:05 +08:00
|
|
|
return r1
|
|
|
|
}
|
|
|
|
func cefHeaderMap_Clear(instance uintptr) {
|
2022-12-06 12:04:00 +08:00
|
|
|
Proc(internale_cefHeaderMap_Clear).Call(instance)
|
2022-10-04 13:21:05 +08:00
|
|
|
}
|