Merge branch 'develop'
This commit is contained in:
commit
bd2fc63b20
@ -142,7 +142,11 @@ endif()
|
||||
#
|
||||
if(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
|
||||
if("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
|
||||
if("${CMAKE_SYSTEM_NAME}" MATCHES "FreeBSD")
|
||||
set(CMAKE_CXX_FLAGS "-std=gnu++14 -Wall -I/usr/local/include")
|
||||
else()
|
||||
set(CMAKE_CXX_FLAGS "-std=gnu++14 -Wall")
|
||||
endif()
|
||||
else()
|
||||
set(CMAKE_CXX_FLAGS "-std=c++14 -Wall")
|
||||
endif()
|
||||
|
||||
@ -1541,7 +1541,7 @@ the nana::detail::basic_window member pointer scheme
|
||||
nana::any* _m_anyobj(size_type cat, size_type index, bool allocate_if_empty) const override;
|
||||
drawerbase::listbox::category_t* _m_assoc(std::shared_ptr<nana::detail::key_interface>, bool create_if_not_exists);
|
||||
void _m_erase_key(nana::detail::key_interface*) noexcept;
|
||||
std::shared_ptr<scroll_operation_interface> _m_scroll_operation();
|
||||
std::shared_ptr<scroll_operation_interface> _m_scroll_operation() override;
|
||||
};
|
||||
}//end namespace nana
|
||||
|
||||
|
||||
@ -279,7 +279,7 @@ namespace nana
|
||||
native_string_type _m_caption() const throw() override;
|
||||
void _m_caption(native_string_type&&) override;
|
||||
void _m_typeface(const paint::font&) override;
|
||||
std::shared_ptr<scroll_operation_interface> _m_scroll_operation() const;
|
||||
std::shared_ptr<scroll_operation_interface> _m_scroll_operation() override;
|
||||
};
|
||||
}//end namespace nana
|
||||
#include <nana/pop_ignore_diagnostic>
|
||||
|
||||
@ -446,7 +446,7 @@ namespace nana
|
||||
item_proxy selected() const; ///< returns the selected node
|
||||
|
||||
private:
|
||||
std::shared_ptr<scroll_operation_interface> _m_scroll_operation() const;
|
||||
std::shared_ptr<scroll_operation_interface> _m_scroll_operation() override;
|
||||
|
||||
};//end class treebox
|
||||
}//end namespace nana
|
||||
|
||||
@ -12,8 +12,10 @@
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
# ifndef NANA_LINUX
|
||||
static bool get_default_audio(std::string &, bool);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
namespace nana{namespace audio
|
||||
{
|
||||
@ -47,14 +49,13 @@ namespace nana{namespace audio
|
||||
}wave_native_if;
|
||||
#endif
|
||||
//class audio_device
|
||||
audio_device::audio_device()
|
||||
#if defined(NANA_WINDOWS)
|
||||
: handle_(nullptr), buf_prep_(nullptr)
|
||||
audio_device::audio_device():
|
||||
#if defined(NANA_WINDOWS) || defined(NANA_LINUX)
|
||||
handle_(nullptr),
|
||||
#elif defined(NANA_POSIX)
|
||||
: handle_(-1), buf_prep_(nullptr)
|
||||
#elif defined(NANA_LINUX)
|
||||
: handle_(nullptr), buf_prep_(nullptr)
|
||||
handle_(-1),
|
||||
#endif
|
||||
buf_prep_(nullptr)
|
||||
{}
|
||||
|
||||
audio_device::~audio_device()
|
||||
@ -64,7 +65,7 @@ namespace nana{namespace audio
|
||||
|
||||
bool audio_device::empty() const
|
||||
{
|
||||
#ifdef NANA_POSIX
|
||||
#if defined(NANA_POSIX) && not defined(NANA_LINUX)
|
||||
return (-1 == handle_);
|
||||
#else
|
||||
return (nullptr == handle_);
|
||||
@ -249,11 +250,6 @@ namespace nana{namespace audio
|
||||
|
||||
wave_native_if.out_prepare(handle_, m, sizeof(WAVEHDR));
|
||||
wave_native_if.out_write(handle_, m, sizeof(WAVEHDR));
|
||||
#elif defined(NANA_POSIX)
|
||||
// consider moving this to a background thread.
|
||||
// currently this blocks calling thread.
|
||||
::write(handle_, m->buf, m->bufsize);
|
||||
buf_prep_->revert(m);
|
||||
#elif defined(NANA_LINUX)
|
||||
std::size_t frames = m->bufsize / bytes_per_frame_;
|
||||
std::size_t buffered = 0; //in bytes
|
||||
@ -269,6 +265,11 @@ namespace nana{namespace audio
|
||||
::snd_pcm_prepare(handle_);
|
||||
}
|
||||
buf_prep_->revert(m);
|
||||
#elif defined(NANA_POSIX)
|
||||
// consider moving this to a background thread.
|
||||
// currently this blocks calling thread.
|
||||
::write(handle_, m->buf, m->bufsize);
|
||||
buf_prep_->revert(m);
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -304,7 +305,7 @@ namespace nana{namespace audio
|
||||
}//end namespace audio
|
||||
}//end namespace nana
|
||||
|
||||
#ifdef NANA_POSIX
|
||||
#if defined(NANA_POSIX) && not defined(NANA_LINUX)
|
||||
// parse input securely, no-overruns or overflows.
|
||||
static bool match(char *&cursor, const char *pattern, const char *tail)
|
||||
{
|
||||
|
||||
@ -2583,8 +2583,9 @@ namespace nana
|
||||
: public division
|
||||
{
|
||||
public:
|
||||
div_switchable(std::string && name, implement* impl) noexcept
|
||||
: division(kind::switchable, std::move(name)), impl_(impl)
|
||||
div_switchable(std::string && name, implement* /*impl*/) noexcept:
|
||||
division(kind::switchable, std::move(name))//,
|
||||
//impl_(impl) //deprecated
|
||||
{}
|
||||
private:
|
||||
void collocate(window wd) override
|
||||
@ -2613,7 +2614,7 @@ namespace nana
|
||||
}
|
||||
}
|
||||
private:
|
||||
implement * const impl_;
|
||||
//implement * const impl_; //deprecated
|
||||
};
|
||||
|
||||
place::implement::~implement()
|
||||
|
||||
@ -817,7 +817,7 @@ namespace drawerbase {
|
||||
editor->reset_caret_pixels();
|
||||
}
|
||||
|
||||
std::shared_ptr<scroll_operation_interface> textbox::_m_scroll_operation() const
|
||||
std::shared_ptr<scroll_operation_interface> textbox::_m_scroll_operation()
|
||||
{
|
||||
internal_scope_guard lock;
|
||||
auto editor = get_drawer_trigger().editor();
|
||||
|
||||
@ -2234,7 +2234,7 @@ namespace nana
|
||||
return item_proxy(const_cast<drawer_trigger_t*>(&get_drawer_trigger()), get_drawer_trigger().selected());
|
||||
}
|
||||
|
||||
std::shared_ptr<scroll_operation_interface> treebox::_m_scroll_operation() const
|
||||
std::shared_ptr<scroll_operation_interface> treebox::_m_scroll_operation()
|
||||
{
|
||||
internal_scope_guard lock;
|
||||
return std::make_shared<drawerbase::treebox::exclusive_scroll_operation>(get_drawer_trigger().impl()->shape.scroll);
|
||||
|
||||
@ -34,7 +34,7 @@ static void posix_open_url(const char *url_utf8)
|
||||
const char *home = getenv("HOME");
|
||||
std::string cheat(home);
|
||||
cheat += "/.mozilla";
|
||||
struct stat exists{};
|
||||
struct stat exists;
|
||||
|
||||
// TODO: generalize this for chromium, opera, waterfox, etc.
|
||||
// Most desktop environments (KDE, Gnome, Lumina etc.) provide a way to set
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user