Skip to content

Commit

Permalink
feat(icon): add data
Browse files Browse the repository at this point in the history
  • Loading branch information
Curve committed Sep 2, 2024
1 parent 921dd91 commit 0ea4f79
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/saucer/icon.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ extern "C"
struct saucer_icon;

SAUCER_EXPORT void saucer_icon_free(saucer_icon *);

SAUCER_EXPORT bool saucer_icon_empty(saucer_icon *);
SAUCER_EXPORT saucer_stash *saucer_icon_data(saucer_icon *);

SAUCER_EXPORT void saucer_icon_save(saucer_icon *, const char *path);

Expand Down
5 changes: 5 additions & 0 deletions src/icon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ extern "C"
return handle->value().empty();
}

saucer_stash *saucer_icon_data(saucer_icon *handle)
{
return saucer_stash::from(handle->value().data());
}

void saucer_icon_save(saucer_icon *handle, const char *path)
{
handle->value().save(path);
Expand Down

0 comments on commit 0ea4f79

Please sign in to comment.