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
54 wxBitmap
* VNCGenerateBitmap(int x
,int y
,int w
,int h
);
56 * Called to paint the panel.
58 * @param event The triggering wxPaintEvent (unused).
60 void OnPaint(wxPaintEvent
&event
);
63 * Called to erase the background.
65 * @param event The triggering wxEraseEvent (unused).
67 void OnEraseBackground(wxEraseEvent
&event
);
70 * Captures all mouse events and sends them to the vncserver
72 void OnMouseEvent(wxMouseEvent
& event
);
76 * Captures all key events and sends them to the vncserver
78 void OnKeyDown(wxKeyEvent
& event
);
79 void OnKeyUp(wxKeyEvent
& event
);
80 rfbKeySym
TranslateKeyCode(wxKeyEvent
& event
);
86 VNCDisplayThread
*vncdisplaythread
;