rtl

package
v2.0.2+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 15, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PathSeparator = "/"
)

Variables

View Source
var (
	// CN: 本地化相关
	// EN: localization.
	SysLocale types.TSysLocale
)

Functions

func Combine added in v1.2.8

func Combine(path, name string) string

合并

func CreateGUID added in v1.1.23

func CreateGUID() types.TGUID

CN: 创建一个新的GUID EN: Create a new GUID.

func CurrentThreadId

func CurrentThreadId() uintptr

CN: 返回当前线程iD EN: Return the current thread id.

func Exclude

func Exclude(r uint32, val ...uint8) uint32

Delphi集合减法,val...中存储为位的索引,下标为0 Deprecated: use value.Exclude.

func ExtractFileExt added in v1.2.8

func ExtractFileExt(path string) string

获取文件扩展名

func ExtractFileName added in v1.2.8

func ExtractFileName(path string) string

获取一个文件名

func ExtractFilePath

func ExtractFilePath(filename string) string

提取文件名的路径,带“\”的

func FileExists

func FileExists(filename string) bool

判断文件是否存在

func GUIDToString added in v1.1.23

func GUIDToString(guid types.TGUID) string

CN: 将TGUID转为字符形式 EN: Convert TGUID to character form.

func GetDC added in v1.2.10

func GetDC(hWnd HWND) HDC

func GetFileNameWithoutExt added in v1.2.8

func GetFileNameWithoutExt(path string) string

获取一个无扩展的文件名

func GetLibResouceCount added in v1.1.23

func GetLibResouceCount() int32

LibResouces

func GetLibResouceItem added in v1.1.23

func GetLibResouceItem(aIndex int32) types.TLibResouce

func GetLibResouceItems added in v1.1.23

func GetLibResouceItems() []types.TLibResouce

func GetStringArrOf

func GetStringArrOf(p uintptr, index int) string

从一个Delphi/Lazarus字符串数组获取成员

func HiByte

func HiByte(W uint8) uint8

func HiWord

func HiWord(L uint32) uint16

func InSets

func InSets(r uint32, s uint32) bool

Delphi集合类型的判断,类型,然后后面是第几位,下标为0 Deprecated: use value.In.

func Include

func Include(r uint32, val ...uint8) uint32

Delphi集合加法,val...中存储为位的索引,下标为0 Deprecated: use value.Include.

func IsIconic added in v1.2.10

func IsIconic(hWnd HWND) bool

func IsNil added in v1.2.1

func IsNil(val interface{}) bool

func IsWindow added in v1.2.10

func IsWindow(hWnd HWND) bool

func IsWindowVisible added in v1.2.10

func IsWindowVisible(hWnd HWND) bool

func IsZoomed added in v1.2.10

func IsZoomed(hWnd HWND) bool

func LcLLoaded

func LcLLoaded() bool

是否加载的为lcl库,true表是是,false表示不是 Deprecated

func LibAbout

func LibAbout() string

liblcl About

func LibStringEncoding added in v1.2.2

func LibStringEncoding() types.TStringEncoding

库的信息 获取当前库使用的字符串编码

func LibVersion added in v1.2.2

func LibVersion() uint32

共8位,2位2位的,如:$01020100 表示 1.2.1.0

func LocaleIDFromName added in v1.2.1

func LocaleIDFromName(name string) int32

LocaleIDFromName 从名称获取一个语言的id

func MainInstance

func MainInstance() uintptr

func MainThreadId

func MainThreadId() uintptr

CN: 返回主线程ID EN: Return the main thread id.

func MakeLParam

func MakeLParam(l, h uint16) LPARAM

func MakeLResult

func MakeLResult(l, h uint16) LRESULT

func MakeLong

func MakeLong(A, B uint16) int32

func MakeWParam

func MakeWParam(l, h uint16) WPARAM

func MakeWord

func MakeWord(A, B uint8) uint16

func ModifyLibResouce added in v1.1.23

func ModifyLibResouce(aPtr uintptr, aValue string)

func Move

func Move(src, dest uintptr, llen int)

CN: Delphi/Lazarus中的内存操作,不过这里传入的是指针 EN: Memory operations in Delphi/Lazarus, but pointers are passed here.

func PointToLParam

func PointToLParam(P TPoint) LPARAM

func PostMessage added in v1.2.10

func PostMessage(hWd HWND, msg uint32, wParam, lParam uintptr) bool

func ReleaseDC added in v1.2.10

func ReleaseDC(hWnd HWND, dc HDC) int

func SendMessage added in v1.2.10

func SendMessage(hWd HWND, msg uint32, wParam, lParam uintptr) uintptr

func SetForegroundWindow added in v1.2.10

func SetForegroundWindow(hWnd HWND) bool

func SetPropertySecValue added in v1.1.21

func SetPropertySecValue(instance uintptr, propName, secPropName, value string)

CN: 设置对象二级属性值 EN: Set the secondary attribute value of the object

func SetPropertyValue added in v1.1.21

func SetPropertyValue(instance uintptr, propName, value string)

CN: 设置对象属性值 EN: Set object property value

func ShiftStateToWord added in v1.2.8

func ShiftStateToWord(shift types.TShiftState) uint32

func ShortCutToText

func ShortCutToText(val types.TShortCut) string

将ShortCut类型转为字符串

func StrLen

func StrLen(str uintptr) int

CN: Delphi/Lazarus的字符串长度。 EN: Delphi/Lazarus string length.

func StringToGUID added in v1.1.23

func StringToGUID(str string) types.TGUID

CN: 将字符形式的GUID转为TGUID结构 EN: Convert GUID in character form to TGUID structure.

func SysOpen

func SysOpen(filename string)

SysOpen 打开,windows下调用ShellExecute

// windows
rtl.SysOpen("http://www.xxx.com")
rtl.SysOpen("c:\")
rtl.SysOpen("c:\xxx.exe")

// linux or macOS
rtl.SysOpen("https://wwww.xxx.com")
rtl.SysOpen("file:///xxx.png");

func TextToShortCut

func TextToShortCut(val string) types.TShortCut

将字符串转为ShortCut类型

func WindowFromPoint added in v1.2.10

func WindowFromPoint(point TPoint) HWND

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL