]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/mac/carbon/mediactrl.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/msw/moviectrl.h
3 // Purpose: wxMediaCtrl mac
4 // Author: Ryan Norton <wxprojects@comcast.net>
8 // Copyright: (c) Ryan Norton
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
16 #include "wx/control.h"
20 typedef struct MovieRecord
* WXMOVIE
;
22 typedef struct MovieType
** WXMOVIE
;
33 class wxMediaCtrl
: public wxControl
36 wxMediaCtrl() : m_bLoaded(false)
39 wxMediaCtrl(wxWindow
* parent
, wxWindowID id
, const wxString
& fileName
,
40 const wxPoint
& pos
= wxDefaultPosition
, const wxSize
& size
= wxDefaultSize
,
41 long style
= 0, long driver
= 0, const wxString
& name
= wxPanelNameStr
) : m_bLoaded(false)
42 { Create(parent
, id
, fileName
, pos
, size
, style
, driver
, name
); }
45 wxMediaCtrl(wxWindow
* parent
, wxWindowID id
, const wxURI
& location
,
46 const wxPoint
& pos
= wxDefaultPosition
, const wxSize
& size
= wxDefaultSize
,
47 long style
= 0, long driver
= 0, const wxString
& name
= wxPanelNameStr
) : m_bLoaded(false)
48 { Create(parent
, id
, location
, pos
, size
, style
, driver
, name
); }
52 bool Create(wxWindow
* parent
, wxWindowID id
, const wxString
& fileName
,
53 const wxPoint
& pos
= wxDefaultPosition
, const wxSize
& size
= wxDefaultSize
,
54 long style
= 0, long driver
= 0, const wxString
& name
= wxPanelNameStr
);
56 bool Create(wxWindow
* parent
, wxWindowID id
, const wxURI
& location
,
57 const wxPoint
& pos
= wxDefaultPosition
, const wxSize
& size
= wxDefaultSize
,
58 long style
= 0, long driver
= 0, const wxString
& name
= wxPanelNameStr
);
64 bool Load(const wxString
& fileName
);
65 bool Load(const wxURI
& location
);
67 wxMediaState
GetState();
69 double GetPlaybackRate();
70 bool SetPlaybackRate(double dRate
);
72 bool SetPosition(long where
);
77 virtual void DoMoveWindow(int x
, int y
, int w
, int h
);
78 bool DoCreate(wxWindow
* parent
, wxWindowID id
,
79 const wxPoint
& pos
, const wxSize
& size
,
80 long style
, const wxString
& name
);
82 wxSize
DoGetBestSize() const;
91 class _wxQTTimer
* m_timer
;
93 friend class _wxQTTimer
;
95 DECLARE_DYNAMIC_CLASS(wxMediaCtrl
);
99 class WXDLLEXPORT wxMediaEvent
: public wxNotifyEvent
102 wxMediaEvent(wxEventType commandType
= wxEVT_NULL
, int id
= 0)
103 : wxNotifyEvent(commandType
, id
)
106 wxMediaEvent(const wxMediaEvent
&clone
)
107 : wxNotifyEvent(clone
.GetEventType(), clone
.GetId())
110 virtual wxEvent
*Clone() const { return new wxMediaEvent(*this); }
112 DECLARE_DYNAMIC_CLASS(wxMediaEvent
)
115 #define wxMEDIA_FINISHED_ID 13000
116 DECLARE_EVENT_TYPE(wxEVT_MEDIA_FINISHED
, wxMEDIA_FINISHED_ID
)
117 typedef void (wxEvtHandler::*wxMediaEventFunction
)(wxMediaEvent
&);
118 #define EVT_MEDIA_FINISHED(winid, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_MEDIA_FINISHED, winid, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxMediaEventFunction) & fn, (wxObject *) NULL ),
120 #endif // wxUSE_MOVIECTRL