add native_interface::set_parent
This commit is contained in:
parent
54ca38d575
commit
25743b14a9
@ -70,6 +70,7 @@ namespace detail
|
|||||||
static void capture_window(native_window_type, bool);
|
static void capture_window(native_window_type, bool);
|
||||||
static nana::point cursor_position();
|
static nana::point cursor_position();
|
||||||
static native_window_type get_owner_window(native_window_type);
|
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
|
//For Caret
|
||||||
static void caret_create(native_window_type, const ::nana::size&);
|
static void caret_create(native_window_type, const ::nana::size&);
|
||||||
static void caret_destroy(native_window_type);
|
static void caret_destroy(native_window_type);
|
||||||
|
|||||||
@ -1199,6 +1199,17 @@ namespace nana{
|
|||||||
return reinterpret_cast<native_window_type>(::GetWindow(reinterpret_cast<HWND>(wd), GW_OWNER));
|
return reinterpret_cast<native_window_type>(::GetWindow(reinterpret_cast<HWND>(wd), GW_OWNER));
|
||||||
#elif defined(NANA_X11)
|
#elif defined(NANA_X11)
|
||||||
return restrict::spec.get_owner(wd);
|
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
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user