Type conversions

Hi everyone,

I am trying to use X11 library to draw incoming video frames to a drawing area. I have found out that Gdk::Pixbuf::render_to_drawable method is very slow to draw the incoming frames. The first thing to do is to query your video adapter in X11. The function prototype is: XvQueryAdaptors(Display*, Window*, int, XvAdaptorInfo). However, I don't know how to make the type conversions. I have created a class for my drawing area like as follows:
class CustomDrawingArea : public Gtk::DrawingArea
Next I've creat an object from this class and add it to my GUI. In order to get the display and the window I used: Window* window = (Window*)(drawingarea->get_window()); //drawingarea is the object from the above class Of course this didn't work out. get_window() method returns Glib::RefPtr<Gdk::Window> and this does not match to Window class in X11. Would you please tell me how to make this type conversion or am I completely doing something wrong? I really have to use the X11 library to draw fast. Thank you very much for your response and your time.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]