Home » U++ Library support » U++ Widgets - General questions or Mixed problems » DHCtrl changes for SDLCtrl
DHCtrl changes for SDLCtrl [message #28919] |
Mon, 27 September 2010 06:26 |
|
koldo
Messages: 3358 Registered: August 2008
|
Senior Veteran |
|
|
Hello Mirek and Massimo
I wanted you include these changes or similar in DHCtrl. They are necessary for SDLCtrl (and MediaPlayer).
The main reason is that SDL does not accept a window handler, so the changes enclosed let DHCtrl to accept an external handler.
Summary of changes:
In CtrlCore.h
- class DHCtrl (Windows version)
void CloseHWND() and HWND hwnd moved from private to protected.
- class DHCtrl (X11 version)
virtual void State(int reason) and bool isInitialized moved from private to protected.
Window hwnd added in protected.
In X11DHCtrl.cpp
- Included this
if (!hwnd) {
hwnd = XCreateWindow(...unchanged...);
} else {
XReparentWindow(Xdisplay, hwnd, GetParentWindow(), r.left, r.top);
XMoveResizeWindow(Xdisplay, hwnd, r.left, r.top, r.Width(), r.Height());
}
- Window handle name changed from WindowHandle to hwnd.
The DHCtrl window reparent is only a must in uppsrc in X11. In windows as it is done in virtual State() and Layout() functions it can be done in user code.
-
Attachment: CtrlCore.7z
(Size: 14.44KB, Downloaded 212 times)
Best regards
Iñaki
|
|
|
|
|
Goto Forum:
Current Time: Sun Apr 28 22:59:52 CEST 2024
Total time taken to generate the page: 0.03849 seconds
|