Main Page | Class Hierarchy | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages | Examples

vetWindowGTK Class Reference

Inheritance diagram for vetWindowGTK:

vetOutput

Public Member Functions

 vetWindowGTK (GtkWidget *mainWindow=NULL)
 Default constructor initializes variables and canvas.
 vetWindowGTK (unsigned int width, unsigned int height, GtkWidget *mainWindow=NULL)
 Default constructor initializes variables.
 ~vetWindowGTK ()
 Default destructor, wait for pending events and flush.
VETRESULT run ()
 Currently not used.
VETRESULT show (bool doShowWindow=true)
 Show canvas and if selected also main window.
VETRESULT hide (bool doHideWindow=true)
 Hide canvas and if selected also main window.
GtkWidget * dump_canvas ()
 Dump canvas' address.
GtkWidget * dump_window ()
 Dump (main) window's address.
void setDithering (int value=0)
 Set display dithering mode.
int getDithering ()
 Get current display dithering value.
VETRESULT setFrameRate (float fps=0)
 Set display frame rate (elaboration time is not subtracted).
unsigned int getWidth () const
 Get current canvas' width.
unsigned int getHeight () const
 Get current canvas' height.
VETRESULT setHeight (unsigned int value)
 Set current canvas' height.
VETRESULT setWidth (unsigned int value)
 Set current canvas' width.
VETRESULT importFrom (vetFrameYUV420 &img)
 Display frame, conversion to vetFrameRGB24 and data-copy routine.
VETRESULT importFrom (vetFrameRGB24 &img)
 Display frame, data-copy routine. (optimized).
VETRESULT importFrom (vetFrameT< unsigned char > &img)
 Display frame, conversion to vetFrameRGB24 and single channel data-copy routine.

Protected Member Functions

int init ()
 Initialize canvas.

Protected Attributes

GtkWidget * image
 Canvas' handle (created by this class).
GtkWidget * window
 Window's handle (passed or created).
GdkRgbDither currDith
 Current Dithering setting: 0 => GDK_RGB_DITHER_NONE (default) 1 => GDK_RGB_DITHER_NORMAL 2 => GDK_RGB_DITHER_MAX.
unsigned int width
 Canvas' width.
unsigned int height
 Canvas' height.
long v_sleeptime
 Milliseconds to wait after frame (re)drawing.

Detailed Description

Definition at line 79 of file vetWindowGTK.h.


Constructor & Destructor Documentation

vetWindowGTK::vetWindowGTK GtkWidget *  mainWindow = NULL  ) 
 

Default constructor initializes variables and canvas.

Parameters:
[in] mainWindow Main window's handle, if not NULL, it will be created.

Definition at line 38 of file vetWindowGTK.cpp.

References height, image, INFO, init(), setDithering(), v_sleeptime, width, and window.

vetWindowGTK::vetWindowGTK unsigned int  width,
unsigned int  height,
GtkWidget *  mainWindow = NULL
 

Default constructor initializes variables.

Parameters:
width Canvas' width.
height Canvas' height.
[in] mainWindow Main window's handle, if not NULL, it will be created.

Definition at line 59 of file vetWindowGTK.cpp.

References height, image, INFO, init(), setDithering(), v_sleeptime, width, and window.


Member Function Documentation

GtkWidget* vetWindowGTK::dump_canvas  )  [inline]
 

Dump canvas' address.

Returns:
Canvas' handle (where data is displayed)

Definition at line 180 of file vetWindowGTK.h.

References image.

GtkWidget* vetWindowGTK::dump_window  )  [inline]
 

Dump (main) window's address.

Returns:
(main) window's handle (was passed at constructor or created by this class)

Definition at line 187 of file vetWindowGTK.h.

References window.

int vetWindowGTK::getDithering  )  [inline]
 

Get current display dithering value.

Returns:
current dithering mode [0,1,2] -> (NONE, NORMAL, MAX)
See also:
currDith

Definition at line 205 of file vetWindowGTK.h.

References currDith.

unsigned int vetWindowGTK::getHeight  )  const [inline]
 

Get current canvas' height.

Returns:
height in pixel.

Definition at line 228 of file vetWindowGTK.h.

References height.

unsigned int vetWindowGTK::getWidth  )  const [inline]
 

Get current canvas' width.

Returns:
width in pixel.

Definition at line 221 of file vetWindowGTK.h.

References width.

VETRESULT vetWindowGTK::hide bool  doHideWindow = true  ) 
 

Hide canvas and if selected also main window.

Parameters:
[in] doHideWindow if true (default) hide also main window, else hide only canvas.
Returns:
VETRET_OK

Definition at line 204 of file vetWindowGTK.cpp.

References image, VETRET_OK, and window.

VETRESULT vetWindowGTK::importFrom vetFrameT< unsigned char > &  img  )  [virtual]
 

Display frame, conversion to vetFrameRGB24 and single channel data-copy routine.

Parameters:
[in] img VETLib Grey Frame to be displayed.
Returns:
VETRET_OK if everything is fine, VETRET_INTERNAL_ERR else.
Note:
Input operator (<<) call directly this function.
See also:
operator << (vetFrameT&)

Implements vetOutput.

Definition at line 305 of file vetWindowGTK.cpp.

References image, INFO, VETRET_INTERNAL_ERR, and VETRET_NOT_IMPLEMENTED.

VETRESULT vetWindowGTK::importFrom vetFrameRGB24 img  )  [virtual]
 

Display frame, data-copy routine. (optimized).

Parameters:
[in] img VETLib Cache24 Frame to be displayed.
Returns:
VETRET_OK if everything is fine, VETRET_INTERNAL_ERR else.
Note:
Input operator (<<) call directly this function.
See also:
operator << (vetFrameRGB24&)

Implements vetOutput.

Definition at line 274 of file vetWindowGTK.cpp.

References currDith, vetFrameRGB24::data, vetFrame::height, image, INFO, VETRET_INTERNAL_ERR, VETRET_OK, and vetFrame::width.

VETRESULT vetWindowGTK::importFrom vetFrameYUV420 img  )  [virtual]
 

Display frame, conversion to vetFrameRGB24 and data-copy routine.

Parameters:
[in] img VETLib Cache Frame to be displayed.
Returns:
VETRET_OK if everything is fine, VETRET_INTERNAL_ERR else.
Note:
Input operator (<<) call directly this function.
See also:
operator << (vetFrameYUV420&)

Implements vetOutput.

Definition at line 247 of file vetWindowGTK.cpp.

References vetFrame::height, image, INFO, VETRET_INTERNAL_ERR, VETRET_OK_DEPRECATED, and vetFrame::width.

int vetWindowGTK::init  )  [protected]
 

Initialize canvas.

Returns:
VETRET_OK

Definition at line 88 of file vetWindowGTK.cpp.

References destroy(), expose(), height, image, VETRET_OK, width, and window.

Referenced by vetWindowGTK().

VETRESULT vetWindowGTK::run  )  [inline]
 

Currently not used.

Returns:
VETRET_NOT_IMPLEMENTED

Definition at line 153 of file vetWindowGTK.h.

References VETRET_NOT_IMPLEMENTED.

void vetWindowGTK::setDithering int  value = 0  ) 
 

Set display dithering mode.

Parameters:
[in] value can be [0,1,2] -> (NONE, NORMAL, MAX)
See also:
currDith

Definition at line 221 of file vetWindowGTK.cpp.

References currDith.

Referenced by vetWindowGTK().

VETRESULT vetWindowGTK::setFrameRate float  fps = 0  ) 
 

Set display frame rate (elaboration time is not subtracted).

Parameters:
[in] frames per second (default is 0, no sleep)
Returns:
VETRET_PARAM_ERR if fps is lower than 0, VETRET_OK else.

Definition at line 164 of file vetWindowGTK.cpp.

References v_sleeptime, VETRET_OK, and VETRET_PARAM_ERR.

VETRESULT vetWindowGTK::setHeight unsigned int  value  )  [virtual]
 

Set current canvas' height.

Returns:
height in pixel.

Implements vetOutput.

Definition at line 124 of file vetWindowGTK.cpp.

References height, image, VETRET_ILLEGAL_USE, VETRET_OK, and width.

VETRESULT vetWindowGTK::setWidth unsigned int  value  )  [virtual]
 

Set current canvas' width.

Returns:
width in pixel.

Implements vetOutput.

Definition at line 142 of file vetWindowGTK.cpp.

References height, image, VETRET_ILLEGAL_USE, VETRET_OK, and width.

VETRESULT vetWindowGTK::show bool  doShowWindow = true  ) 
 

Show canvas and if selected also main window.

Parameters:
[in] doShowWindow if true (default) show also main window, else show only canvas.
Returns:
VETRET_OK

Definition at line 185 of file vetWindowGTK.cpp.

References image, VETRET_OK, and window.


The documentation for this class was generated from the following files:
Generated on Tue Jan 24 11:59:44 2006 for VETLib by  doxygen 1.4.4