Mac OS X support

This commit is contained in:
Benjamin Navarro
2015-10-11 18:31:30 +02:00
parent faa74047db
commit a09d5c3c95
28 changed files with 2223 additions and 154 deletions

View File

@@ -17,7 +17,7 @@
#if defined(NANA_WINDOWS)
#include "win32/bedrock.cpp"
#elif defined(NANA_LINUX)
#elif defined(NANA_LINUX) || defined(NANA_MACOS)
#include "linux_X11/bedrock.cpp"
#endif

View File

@@ -675,7 +675,7 @@ namespace detail
if (impl_->wd_register.available(wd) && !wd->is_draw_through())
{
//Copy the root buffer that wd specified into DeviceContext
#if defined(NANA_LINUX)
#if defined(NANA_LINUX) || defined(NANA_MACOS)
wd->drawer.map(reinterpret_cast<window>(wd), forced, update_area);
#elif defined(NANA_WINDOWS)
if(nana::system::this_thread_id() == wd->thread_id)

View File

@@ -16,7 +16,7 @@
#if defined(NANA_WINDOWS)
#include <windows.h>
#elif defined(NANA_LINUX)
#elif defined(NANA_LINUX) || defined(NANA_MACOS)
#include <nana/gui/widgets/label.hpp>
#include <nana/gui/widgets/button.hpp>
#include <nana/gui/widgets/listbox.hpp>
@@ -32,7 +32,7 @@
namespace nana
{
#if defined(NANA_LINUX)
#if defined(NANA_LINUX) || defined(NANA_MACOS)
class filebox_implement
: public form
{
@@ -1027,7 +1027,7 @@ namespace nana
return false;
impl_->file.resize(nana::strlen(impl_->file.data()));
#elif defined(NANA_LINUX)
#elif defined(NANA_LINUX) || defined(NANA_MACOS)
filebox_implement fb(impl_->owner, impl_->open_or_save, impl_->title);
if(impl_->filters.size())

View File

@@ -26,7 +26,7 @@
#if defined(NANA_WINDOWS)
#include <nana/detail/win32/platform_spec.hpp>
#elif defined(NANA_LINUX)
#elif defined(NANA_LINUX) || defined(NANA_MACOS)
#include PLATFORM_SPEC_HPP
#include <nana/system/platform.hpp>
#include <iostream>

View File

@@ -26,7 +26,7 @@
#if defined(NANA_WINDOWS)
#include <windows.h>
#elif defined(NANA_LINUX)
#elif defined(NANA_LINUX) || defined(NANA_MACOS)
#include PLATFORM_SPEC_HPP
#include <nana/system/platform.hpp>
#endif

View File

@@ -901,7 +901,7 @@ namespace nana
/// add a new cat created at "pos" and return a ref to it
category_t* create_cat(std::size_t pos, nana::string&& text)
{
#if defined(NANA_LINUX) || defined(NANA_MINGW)
#if defined(NANA_LINUX) || defined(NANA_MACOS) || defined(NANA_MINGW)
//Call begin instead of cbegin, because the first parameter
//of emplace is not const_iterator in GCC's C++ standard
//library implementation.