1998-11-09 13:37:38 -05:00
|
|
|
// /////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: vidxanm.h
|
|
|
|
// Purpose: wxMMedia
|
|
|
|
// Author: Guilhem Lavaux
|
|
|
|
// Created: 1997
|
|
|
|
// Updated: 1998
|
|
|
|
// Copyright: (C) 1997, 1998, Guilhem Lavaux
|
|
|
|
// License: wxWindows license
|
|
|
|
// /////////////////////////////////////////////////////////////////////////////
|
|
|
|
/* Real -*- C++ -*- */
|
|
|
|
#ifndef __VID_xanim_H__
|
|
|
|
#define __VID_xanim_H__
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(WXMMEDIA_INTERNAL) && (defined(__X__) || defined(__WXGTK__))
|
|
|
|
#include <X11/Xlib.h>
|
|
|
|
#include <X11/Xatom.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "vidbase.h"
|
|
|
|
|
|
|
|
#ifdef WXMMEDIA_INTERNAL
|
|
|
|
typedef struct wxXANIMinternal {
|
|
|
|
Display *xanim_dpy;
|
|
|
|
Window xanim_window;
|
|
|
|
Atom xanim_atom, xanim_ret;
|
|
|
|
} wxXANIMinternal;
|
|
|
|
|
|
|
|
#ifndef __XANIM_COMMAND__
|
|
|
|
#define __XANIM_COMMAND__ "/usr/X11R6/bin/xanim"
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
class wxVideoXANIM : public wxVideoBaseDriver {
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxVideoXANIM)
|
|
|
|
protected:
|
1999-08-14 08:06:35 -04:00
|
|
|
bool m_xanim_started, m_paused;
|
|
|
|
struct wxXANIMinternal *m_internal;
|
|
|
|
wxString m_filename;
|
1998-11-09 13:37:38 -05:00
|
|
|
public:
|
|
|
|
wxVideoXANIM();
|
|
|
|
wxVideoXANIM(wxInputStream& str);
|
1999-08-14 08:06:35 -04:00
|
|
|
~wxVideoXANIM();
|
1998-11-09 13:37:38 -05:00
|
|
|
|
1999-08-29 10:40:11 -04:00
|
|
|
bool Play();
|
1999-08-14 08:06:35 -04:00
|
|
|
bool Pause();
|
|
|
|
bool Resume();
|
1999-08-29 10:40:11 -04:00
|
|
|
bool Stop();
|
1998-11-09 13:37:38 -05:00
|
|
|
|
1999-08-14 08:06:35 -04:00
|
|
|
bool SetVolume(wxUint8 vol);
|
|
|
|
bool Resize(wxUint16 w, wxUint16 h);
|
1999-08-29 10:40:11 -04:00
|
|
|
bool GetSize(wxSize& size) const;
|
1998-11-09 13:37:38 -05:00
|
|
|
|
1999-08-14 08:06:35 -04:00
|
|
|
bool IsCapable(wxVideoType v_type);
|
1998-11-09 13:37:38 -05:00
|
|
|
|
1999-08-14 08:06:35 -04:00
|
|
|
bool AttachOutput(wxVideoOutput& output);
|
|
|
|
void DetachOutput();
|
1998-11-09 13:37:38 -05:00
|
|
|
|
|
|
|
protected:
|
|
|
|
///
|
|
|
|
bool RestartXANIM();
|
|
|
|
///
|
|
|
|
bool SendCommand(const char *command, char **ret = NULL,
|
|
|
|
wxUint32 *size = NULL);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|