00001 /* 00002 * page_timeline.h Notebook Timeline Page Object 00003 * Copyright (C) 2001 Charles Yates <charles.yates@pandora.be> 00004 * Copyright (C) 2001-2007 Dan Dennedy <dan@dennedy.org> 00005 * 00006 * This program is free software; you can redistribute it and/or modify 00007 * it under the terms of the GNU General Public License as published by 00008 * the Free Software Foundation; either version 2 of the License, or 00009 * (at your option) any later version. 00010 * 00011 * This program is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 * GNU General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU General Public License 00017 * along with this program; if not, write to the Free Software Foundation, 00018 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00019 */ 00020 00021 #ifndef _PAGE_TIMELINE_H 00022 #define _PAGE_TIMELINE_H 00023 00024 #include "kino_common.h" 00025 #include "page.h" 00026 00027 #include <pthread.h> 00028 00029 enum TimelineStatus { 00030 TIMELINE_INIT, 00031 TIMELINE_IDLE, 00032 TIMELINE_STARTING, 00033 TIMELINE_RUNNING, 00034 TIMELINE_RESTART 00035 }; 00036 00040 class PageTimeline : public Page 00041 { 00042 private: 00043 KinoCommon *common; 00044 bool refresh_required; 00045 int action; 00046 int last_begin; 00047 int last_end; 00048 int scene; 00049 GtkIconView *view; 00050 GtkListStore *model; 00051 00052 pthread_t thread; 00053 pthread_mutex_t key; 00054 pthread_mutex_t mutex; 00055 enum TimelineStatus showIconsRunning; 00056 static void* ThreadProxy( void *arg ); 00057 00058 public: 00059 PageTimeline( KinoCommon *common ); 00060 virtual ~PageTimeline() 00061 { } 00062 gulong activate(); 00063 void start( ); 00064 void selectScene( int ); 00065 void showIcons( ); 00066 void refresh( ); 00067 gboolean processKeyboard( GdkEventKey *event ); 00068 gboolean processCommand( char *cmd ); 00069 void timeFormatChanged(); 00070 GtkListStore *getModel() const 00071 { 00072 return model; 00073 } 00074 GtkIconView *getView() const 00075 { 00076 return view; 00077 } 00078 void* Thread(); 00079 }; 00080 00081 00082 #endif
1.4.2