/* * Image plugin to VDR (C++) * * (C) 2004-2005 Andreas Brachold * based on (C) 2003 Kai Tobias Burwieck * * This code is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This code is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * Or, point your browser to http://www.gnu.org/copyleft/gpl.html */ // --- cImageControl --------------------------------------------------------- #ifndef ___DVB_IMAGE_CONTROL_H #define ___DVB_IMAGE_CONTROL_H #include #include #include #include "menu-image.h" #include "commands.h" #define memberof(x) (sizeof(x)/sizeof(*x)) class cImage; class cSlideShow; class cImageControl : public cOsdObject { /** View our picture in a slideshow */ bool m_bSlideShowActiv; /** date at image was open*/ time_t m_tStarted; /** Remember the active Slideshow mode before Jump or Zoom used */ bool m_bSlideShowBefore; private: cOsd *osd; cMenuImageBrowse *pBrowser; cMenuMP3Playlist *pCommands; uint64_t Start; int effect, w, h, picturesize, alpha, depth, newwidth, newheight, rotate; int volume; bool visible, musicplays,flush, CanLoadCover; cPixmap *Layer0Pixmap; cPixmap *Layer1Pixmap; cPixmap *Layer2Pixmap; // #################################################### // bitmap /* int newheight; int newwidth; bool LoadNonXpm(const char *Filename, int width, int height, bool ratio); bool Load(const std::string &Filename, int width = 0, int height = 0, bool ratio = false); */ // ################################################### void ShowOSD(bool open=false); void HideOSD(void); void ShowProgress(void); /** Deliver the current number of viewed Image */ int ImageCurrent(void) const; /** Deliver the total number of viewed Image */ int ImageTotal(void) const; /** Deliver the filename from the current number of viewed Image */ const char* FileName() const; /** Toogle between Play and Stop of the current SlideShow */ void ToogleSlideShowActiv(void); /** Path of current imagefile */ char CurrImageFile[255]; /** Load Music **/ void PlayMusic(void); void LoadPicture(void); bool BuildAreas(void); void BuildDefault(void); void FadeIn(void); void FadeOut(void); void CrossFade(void); void NextImage(int Step); void PrevImage(int Step); void GotoImage(unsigned int Pict); void OriginalImage(bool bCached); void IncSlideTime(void); void DecSlideTime(void); bool CheckAccess() const; inline void Flush(void); public: cImageControl(void); virtual ~ cImageControl(); virtual eOSState ProcessKey(eKeys Key); virtual void Show(void); virtual void Hide(void); static void SetSlideShow(cSlideShow * pNewSlideShow); protected: void SlideImage(); cString ServiceID; bool ServiceAvailable; }; #endif //___DVB_IMAGE_CONTROL_H