]> git.saurik.com Git - wxWidgets.git/blob - utils/wxMMedia2/lib/vidxanm.h
Added view menu items to toggle row and col drag-resizing.
[wxWidgets.git] / utils / wxMMedia2 / lib / vidxanm.h
1 // /////////////////////////////////////////////////////////////////////////////
2 // Name: vidxanm.h
3 // Purpose: wxMMedia
4 // Author: Guilhem Lavaux
5 // Created: 1997
6 // Updated: 1998
7 // Copyright: (C) 1997, 1998, Guilhem Lavaux
8 // License: wxWindows license
9 // /////////////////////////////////////////////////////////////////////////////
10 /* Real -*- C++ -*- */
11 #ifndef __VID_xanim_H__
12 #define __VID_xanim_H__
13
14 #ifdef __GNUG__
15 #pragma interface "vidxanm.h"
16 #endif
17
18 #include "wx/defs.h"
19 #include "wx/string.h"
20 #include "wx/process.h"
21
22 #if defined(WXMMEDIA_INTERNAL) && (defined(__X__) || defined(__WXGTK__))
23 #include <X11/Xlib.h>
24 #include <X11/Xatom.h>
25 #endif
26
27 #include "vidbase.h"
28
29 #ifdef WXMMEDIA_INTERNAL
30 typedef struct wxXANIMinternal {
31 Display *xanim_dpy;
32 Window xanim_window;
33 Atom xanim_atom, xanim_ret;
34 } wxXANIMinternal;
35
36 #ifndef __XANIM_COMMAND__
37 #define __XANIM_COMMAND__ "/usr/X11R6/bin/xanim"
38 #endif
39 #endif
40
41 class wxVideoXANIM : public wxVideoBaseDriver {
42 DECLARE_DYNAMIC_CLASS(wxVideoXANIM)
43 protected:
44 bool m_xanim_started, m_paused;
45 struct wxXANIMinternal *m_internal;
46 wxString m_filename;
47 wxProcess *m_xanim_detector;
48 public:
49 wxVideoXANIM();
50 wxVideoXANIM(wxInputStream& str);
51 ~wxVideoXANIM();
52
53 bool Play();
54 bool Pause();
55 bool Resume();
56 bool Stop();
57
58 bool SetVolume(wxUint8 vol);
59 bool Resize(wxUint16 w, wxUint16 h);
60 bool GetSize(wxSize& size) const;
61
62 bool IsCapable(wxVideoType v_type);
63
64 bool AttachOutput(wxWindow& output);
65 void DetachOutput();
66
67 bool IsPaused();
68 bool IsStopped();
69
70 friend class wxVideoXANIMProcess;
71
72 protected:
73 ///
74 bool RestartXANIM();
75 ///
76 bool SendCommand(const char *command, char **ret = NULL,
77 wxUint32 *size = NULL);
78 };
79
80 #endif