Added multi platform support for ICOns files.

This commit is contained in:
dankan1890
2016-10-18 00:32:58 +02:00
parent 47b2234932
commit afa9cffd51
3 changed files with 272 additions and 6 deletions

View File

@@ -201,7 +201,7 @@ namespace nana
#if defined(NANA_WINDOWS)
void notifications_window_proc(HWND wd, WPARAM wparam, LPARAM lparam)
{
arg_notifier arg;
arg_notifier arg = {};
switch (lparam)
{
case WM_LBUTTONDBLCLK:
@@ -321,6 +321,7 @@ namespace nana
void notifier::icon(const std::string& icon_file)
{
#if defined(NANA_WINDOWS)
paint::image image_ico{ icon_file };
auto icon_handle = paint::image_accessor::icon(image_ico);
if (icon_handle)
@@ -330,14 +331,17 @@ namespace nana
impl_->set_icon(image_ico);
impl_->icon = image_ico;
}
#endif
}
void notifier::insert_icon(const std::string& icon_file)
{
#if defined(NANA_WINDOWS)
paint::image image_ico{ icon_file };
auto icon_handle = paint::image_accessor::icon(image_ico);
if (icon_handle)
impl_->icons.emplace_back(static_cast<paint::image&&>(image_ico));
#endif
}
void notifier::period(unsigned ms)