1 #ifndef QEMU_GUI_VNCPANEL_H
2 #define QEMU_GUI_VNCPANEL_H
4 #include <wx/scrolwin.h>
5 #include <wx/dcbuffer.h>
8 class VNCDisplayThread
;
11 #include <rfb/rfbclient.h>
14 class VNCPanel
: public wxScrolledWindow
{
16 VNCPanel(wxWindow
*parent
,wxString host
,int display
);
20 * trys to establish a connection to the given host/display
22 bool Connect(int display
);
23 bool Connect(wxString host
,int display
);
25 * stops the vncdisplaythread relases memory used by the
26 * vncclient, gets called from the destructor.
29 void HandleProcessTermination(wxCommandEvent
&);
31 * paints the contents of the SDL surface to the wxPanel
36 * return the VNCClient
39 rfbClient
* GetVNCClient();
42 * draws the updates requested by VLC to the wxPanel
45 void VNCUpdateRect(int x
,int y
,int w
,int h
);
48 * handles screen resizes and creates/allocates the frame buffer
53 wxCriticalSection
& GetCriticalSection();
54 wxCriticalSection lock
;
56 wxBitmap
* VNCGenerateBitmap(int x
,int y
,int w
,int h
);
58 * Called to paint the panel.
60 * @param event The triggering wxPaintEvent (unused).
62 void OnPaint(wxPaintEvent
&event
);
65 * Called to erase the background.
67 * @param event The triggering wxEraseEvent (unused).
69 void OnEraseBackground(wxEraseEvent
&event
);
72 * Captures all mouse events and sends them to the vncserver
74 void OnMouseEvent(wxMouseEvent
& event
);
77 * Captures all key events and sends them to the vncserver
79 void OnKeyDown(wxKeyEvent
& event
);
80 void OnKeyUp(wxKeyEvent
& event
);
81 rfbKeySym
TranslateKeyCode(wxKeyEvent
& event
);
85 wxMutex
*vncclientMutex
;
88 VNCDisplayThread
*vncdisplaythread
;