add native_interface::set_parent

This commit is contained in:
Jinhao 2015-12-18 00:57:46 +08:00
parent 54ca38d575
commit 25743b14a9
2 changed files with 12 additions and 0 deletions

View File

@ -70,6 +70,7 @@ namespace detail
static void capture_window(native_window_type, bool);
static nana::point cursor_position();
static native_window_type get_owner_window(native_window_type);
static native_window_type set_parent(native_window_type child, native_window_type new_parent);
//For Caret
static void caret_create(native_window_type, const ::nana::size&);
static void caret_destroy(native_window_type);

View File

@ -1199,6 +1199,17 @@ namespace nana{
return reinterpret_cast<native_window_type>(::GetWindow(reinterpret_cast<HWND>(wd), GW_OWNER));
#elif defined(NANA_X11)
return restrict::spec.get_owner(wd);
#endif
}
native_window_type native_interface::set_parent(native_window_type child, native_window_type new_parent)
{
#ifdef NANA_WINDOWS
return reinterpret_cast<native_window_type>(
::SetParent(reinterpret_cast<HWND>(child), reinterpret_cast<HWND>(new_parent))
);
#elif defined(NANA_X11)
#endif
}