⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 playlist.h

📁 Yet another mp3 player, but this time using SVGALib under Linux. The idea was to use a 320x240 disp
💻 H
字号:
/*   playlist.h  Playlist management class  This program 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 program 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, www.gnu.org.  Copyright (C) 2000  Simon Harrison (email smh@N_O_S_P_A_M@dr.com)*/#ifndef PLAYLIST_DOT_H#define PLAYLIST_DOT_H#include <stdio.h>#include <string.h>class CListItem {   char* text;   int len;   CListItem* next;   CListItem();   public :   CListItem(char* value);   ~CListItem() { if (len) delete text; }   SetNext( CListItem* n ) { next = n; }   char* GetText () { return len?text:""; }   CListItem* GetNext() { return next; }};class CPlayList {   CListItem* plist;   CListItem* ptemp;   CListItem* ptempprev;   int Entries;   bool changed;   // indicate whether the playlist has changed.   public:   CPlayList() : plist(NULL),Entries(0),changed(true) { ;}   ~CPlayList() { while (ChopHead()) { ;} }   bool NeedsRedraw() {   // find out if the list has changed.      bool r = changed;       changed=false;      return r;    }   Add( char* text );   char* GetHead() { return plist?plist->GetText():NULL; }   int ChopHead();   DebugWriteOut();   SetPtrAtIndex( int n ) {  // starting point for quick retrieve      int t=n;      ptemp = plist;      while (t-- && ptemp)        ptemp = ptemp->GetNext();   }   char* GetNext() {  // get next value.      if (ptemp) {        CListItem* t;        t = ptemp;        ptemp = ptemp->GetNext();        return t->GetText();      } else {        return NULL;      }   }   DeleteAtIndex( int i );   // zero based index.   int GetEntries() { return Entries; }   int ReadFromFile( char* fname );   int WriteToFile( char* fname );   void Clean();};#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -