Public Member Functions | |
this (uint bytes, GMEM flags) | |
Constructs and allocates a new global memory object. | |
this (cstring data, GMEM flags) | |
Creates a global memory copy of a given text string. | |
this (CArray!(void) data, GMEM flags) | |
Creates a global memory copy of a given data block. | |
this (HANDLE h) | |
Creates a GlobalMemoryObject to interface a pre-existing global memory object. | |
~this () | |
HANDLE | clipboardDataHandle (CLIPBOARD_FORMAT format, bool clearAutoDelete=true) |
Data handle to this object for placing on the clipboard. | |
Operators | |
final override intBool | opEquals (Object o) |
final bool | opEquals (GlobalMemoryObject a) |
Properties | |
HANDLE | handle () |
The Windows handle of this global memory object. | |
uint | length () |
The length in bytes of this global memory object. | |
GlobalMemoryObject | dup () |
Creates a copy of the global memory object. | |
Public Attributes | |
bool | autoDelete = true |
Whether this memory object will automatically be deallocated when the GlobalMemoryObject is garbage-collected. |
Such a block is used e.g. for clipboard and DDE communications. (SDWF doesn't currently provide DDE facilities.)
smjg.libs.sdwf.globalmem.GlobalMemoryObject.this | ( | uint | bytes, | |
GMEM | flags | |||
) |
Constructs and allocates a new global memory object.
bytes | number of bytes to allocate. | |
flags | flags pertaining to the global memory object. |
smjg.libs.sdwf.globalmem.GlobalMemoryObject.this | ( | cstring | data, | |
GMEM | flags | |||
) |
Creates a global memory copy of a given text string.
This constructor differs from GlobalMemoryObject.this(void[], GMEM) in that the string is automatically null-terminated as required by Windows.
data | data with which to initialise the allocated memory. | |
flags | flags pertaining to the global memory object. |
smjg.libs.sdwf.globalmem.GlobalMemoryObject.this | ( | CArray!(void) | data, | |
GMEM | flags | |||
) |
Creates a global memory copy of a given data block.
data | data with which to initialise the allocated memory. | |
flags | flags pertaining to the global memory object. |
smjg.libs.sdwf.globalmem.GlobalMemoryObject.this | ( | HANDLE | h | ) |
Creates a GlobalMemoryObject to interface a pre-existing global memory object.
The autoDelete property is set to false
.
h | Windows handle of the memory object. |
smjg.libs.sdwf.globalmem.GlobalMemoryObject.~this | ( | ) |
HANDLE smjg.libs.sdwf.globalmem.GlobalMemoryObject.clipboardDataHandle | ( | CLIPBOARD_FORMAT | format, | |
bool | clearAutoDelete = true | |||
) |
Data handle to this object for placing on the clipboard.
final override intBool smjg.libs.sdwf.globalmem.GlobalMemoryObject.opEquals | ( | Object | o | ) |
final bool smjg.libs.sdwf.globalmem.GlobalMemoryObject.opEquals | ( | GlobalMemoryObject | a | ) |
Determines whether this GlobalMemoryObject is equal to another WindowBase. Two GlobalMemoryObject objects are equal iff they have the same handle, i.e. they interface the same memory object.
HANDLE smjg.libs.sdwf.globalmem.GlobalMemoryObject.handle | ( | ) |
The Windows handle of this global memory object.
You would use this property if you need to call a Windows API function directly on the memory object.
uint smjg.libs.sdwf.globalmem.GlobalMemoryObject.length | ( | ) |
The length in bytes of this global memory object.
GlobalMemoryObject smjg.libs.sdwf.globalmem.GlobalMemoryObject.dup | ( | ) |
Creates a copy of the global memory object.
This can be used to create an ad-hoc copy to put onto the clipboard, or for an application to make its own copy of data taken from the clipboard.
Whether this memory object will automatically be deallocated when the GlobalMemoryObject is garbage-collected.
This must be false in order to use the GlobalMemoryObject for purposes such as clipboard communication. The Clipboard.add method automatically sets this property of its argument to false
.