value
This commit is contained in:
parent
e9afde5216
commit
b96faacf89
4 changed files with 39 additions and 0 deletions
|
|
@ -138,4 +138,11 @@ export namespace Crafter::CppDOMBindings {
|
|||
}
|
||||
|
||||
__attribute__((import_module("env"), import_name("deleteElement"))) void DeleteElement(void* ptr);
|
||||
|
||||
// Value property functions
|
||||
__attribute__((import_module("env"), import_name("getValue"))) const char* GetValue(void* ptr);
|
||||
__attribute__((import_module("env"), import_name("setValue"))) void SetValue(void* ptr, const char* value, std::int32_t valueLength);
|
||||
void SetValue(void* ptr, const std::string_view value) {
|
||||
SetValue(ptr, value.data(), value.size());
|
||||
}
|
||||
}
|
||||
|
|
@ -63,6 +63,10 @@ namespace Crafter {
|
|||
void ToggleClass(const std::string_view className);
|
||||
bool HasClass(const std::string_view className);
|
||||
|
||||
// Value property accessors
|
||||
std::string GetValue();
|
||||
void SetValue(const std::string_view value);
|
||||
|
||||
std::int32_t AddClickListener(std::function<void(Crafter::MouseEvent)> callback);
|
||||
void RemoveClickListener(std::int32_t id);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue