00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #include "remote.h"
00029
00030 #define MY_GTK_RESPONSE_RUN -100
00031 #define MY_GTK_RESPONSE_STOP -101
00032 #define MY_GTK_RESPONSE_PAUSE -102
00033
00034 class RemoteControl : public DlgBase, public remote_crtl{
00035 public:
00036 RemoteControl();
00037 ~RemoteControl();
00038
00039 void run();
00040 static void dlg_clicked(GtkDialog * dialog, gint button_number, RemoteControl *rc);
00041
00042
00043
00044
00045 static gboolean InputFunction (GIOChannel *src,
00046 GIOCondition condition,
00047 void *rc);
00048 static void Check_ec(Gtk_EntryControl* ec, gpointer arglist){
00049 ec->CheckRemoteCmd((gchar **)arglist);
00050 };
00051 static void CbAction_ra(remote_action_cb* ra, gpointer arglist){
00052 if(ra->cmd && ((gchar**)arglist)[1])
00053 if(! strcmp(((gchar**)arglist)[1], ra->cmd))
00054 (*ra->RemoteCb) (ra->widget, ra->data);
00055 };
00056
00057 virtual int addcmd(gchar **cmdargvlist);
00058 virtual int checkentry(gchar **cmdargvlist){
00059 g_slist_foreach(gapp->RemoteEntryList, (GFunc) Check_ec, (gpointer)cmdargvlist);
00060 return 0;
00061 };
00062 virtual int checkactions(gchar **cmdargvlist){
00063 g_slist_foreach(gapp->RemoteActionList, (GFunc) CbAction_ra, (gpointer)cmdargvlist);
00064 return 0;
00065 };
00066 virtual void waitfkt(){ gapp->check_events(); };
00067
00068 void stop();
00069 void pause();
00070 void resume();
00071 void play();
00072
00073 private:
00074 int pause_flg;
00075 GtkWidget *Dlg;
00076 GtkWidget *list;
00077 gint ncol;
00078 gint op;
00079 GIOChannel *gio;
00080 };