mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-30 06:32:42 +00:00
Added jmessage_new_copy_without_dests() to copy messages without copying the list of recipients.
This commit is contained in:
parent
ea56481314
commit
8b4c4f6a5a
@ -107,6 +107,24 @@ JMessage jmessage_new_copy(const JMessage msg)
|
||||
return copy;
|
||||
}
|
||||
|
||||
JMessage jmessage_new_copy_without_dests(const JMessage msg)
|
||||
{
|
||||
JMessage copy;
|
||||
|
||||
assert(msg != NULL);
|
||||
|
||||
copy = jnew(union jmessage, 1);
|
||||
if (!copy)
|
||||
return NULL;
|
||||
|
||||
memcpy(copy, msg, sizeof(union jmessage));
|
||||
|
||||
copy->any.widgets = jlist_new();
|
||||
copy->any.used = false;
|
||||
|
||||
return copy;
|
||||
}
|
||||
|
||||
void jmessage_free(JMessage msg)
|
||||
{
|
||||
assert(msg != NULL);
|
||||
|
@ -146,6 +146,7 @@ int ji_register_message_type();
|
||||
JMessage jmessage_new(int type);
|
||||
JMessage jmessage_new_key_related(int type, int readkey_value);
|
||||
JMessage jmessage_new_copy(const JMessage msg);
|
||||
JMessage jmessage_new_copy_without_dests(const JMessage msg);
|
||||
void jmessage_free(JMessage msg);
|
||||
|
||||
void jmessage_add_dest(JMessage msg, JWidget widget);
|
||||
|
Loading…
x
Reference in New Issue
Block a user