Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

L1394_MM::Window Class Reference
[L1394_Display]

This abstract class represents the interface for all windows. More...

#include <l1394_window.h>

Inheritance diagram for L1394_MM::Window:

L1394::EventHandle L1394_MM::XShmImg List of all members.

Public Member Functions

 Window (l1394_converter dec)
virtual ~Window ()
 destructor
virtual unsigned char * getBuffer () const =0
 This function return the window buffer to write data in it.
virtual void setTitle (const char *title)=0
 With this function you can set the title of window.
virtual void update ()=0
 This function update the display.
virtual int getColorDepth () const =0
 This function return the color depth of the window.
virtual void start ()
 This function starts the converter and diplay the frames.
virtual void stop ()
 This function stops the running window.
virtual void connect (L1394::Device *)
 This function connects an L1394::Device to this window.
virtual void disconnect ()
 Disconnects a previous connected device, so the window can be reused by another device.
bool isRunning () const
 Returns true, if the window is started, else false.

Protected Member Functions

L1394::DevicegetDevice () const

Protected Attributes

L1394::internal::Messagemessage

Detailed Description

This abstract class represents the interface for all windows.

If you want to use your own window classes with this library, you inherit the new window class from this class and implement the abstract functions. For Example see class XShmImg.

Author:
Michael Repplinger

Definition at line 36 of file l1394_window.h.


Constructor & Destructor Documentation

L1394_MM::Window::Window l1394_converter  dec  ) 
 

\ fn Window() \ brief constructor

Definition at line 32 of file l1394_window.cpp.

References L1394::Singleton< T, CreationPolicy, LifetimePolicy, ThreadingModel >::getInstance(), and message.

L1394_MM::Window::~Window  )  [virtual]
 

destructor

Definition at line 37 of file l1394_window.cpp.

References L1394::Thread::join(), L1394::Device::removeEventHandle(), and stop().


Member Function Documentation

L1394_MM::Window::connect L1394::Device device  )  [virtual]
 

This function connects an L1394::Device to this window.

This class inherits from class EventHandle and adds themself to the device eventhandling. If the device is deleted this object delete themself and you must not delete the window object.

Parameters:
device,: pointer to the device.

Definition at line 95 of file l1394_window.cpp.

References L1394::ThreadMutex::lock(), L1394::NODE_DESTROY, and L1394::ThreadMutex::unlock().

Referenced by main().

void L1394_MM::Window::disconnect  )  [virtual]
 

Disconnects a previous connected device, so the window can be reused by another device.

Definition at line 103 of file l1394_window.cpp.

References L1394::ThreadMutex::lock(), and L1394::ThreadMutex::unlock().

Referenced by L1394_MM::XShmImg::nodeDestroy().

L1394_MM::Window::getBuffer  )  const [pure virtual]
 

This function return the window buffer to write data in it.

If the window has no own buffer, the assigned buffer will be returned, if it is set, if not NULL is returned.

Returns:
char* : pointer to buffer, represent as char array.

Implemented in L1394_MM::XShmImg.

L1394_MM::Window::getColorDepth  )  const [pure virtual]
 

This function return the color depth of the window.

This value depends on your X-Server settings.

Returns:
int : the color depth as integer value, normally 16 or 24

Implemented in L1394_MM::XShmImg.

L1394::Device* L1394_MM::Window::getDevice  )  const [inline, protected]
 

Definition at line 121 of file l1394_window.h.

Referenced by L1394_MM::XShmImg::nodeDestroy(), and L1394_MM::XShmImg::start().

bool L1394_MM::Window::isRunning  )  const [inline]
 

Returns true, if the window is started, else false.

Definition at line 117 of file l1394_window.h.

void L1394_MM::Window::setTitle const char *  title  )  [pure virtual]
 

With this function you can set the title of window.

Parameters:
title : const char* with the name of the window

Implemented in L1394_MM::XShmImg.

L1394_MM::Window::start  )  [virtual]
 

This function starts the converter and diplay the frames.

You don't need to reimplement this function if you use the run_static function to run the window.

Reimplemented in L1394_MM::XShmImg.

Definition at line 50 of file l1394_window.cpp.

References L1394::Thread::start().

Referenced by L1394_MM::XShmImg::start().

L1394_MM::Window::stop  )  [virtual]
 

This function stops the running window.

Definition at line 110 of file l1394_window.cpp.

References L1394::ThreadMutex::lock(), and L1394::ThreadMutex::unlock().

Referenced by main(), L1394_MM::XShmImg::nodeDestroy(), L1394_MM::XShmImg::nodeDisabled(), ~Window(), and L1394_MM::XShmImg::~XShmImg().

void L1394_MM::Window::update  )  [pure virtual]
 

This function update the display.

This function must be called to show changes on the buffer.

Implemented in L1394_MM::XShmImg.


Member Data Documentation

L1394::internal::Message* L1394_MM::Window::message [protected]
 

Definition at line 122 of file l1394_window.h.

Referenced by L1394_MM::XShmImg::nodeDestroy(), and Window().


The documentation for this class was generated from the following files:
Generated on Wed Aug 24 00:36:46 2005 for L1394 by doxygen 1.4.2
L1394 library (NMM) grahics.cs.uni-sb.de/~repplix/l1394_home/