00001 
00015 #ifndef SIGNALS_H
00016 #define SIGNALS_H
00017 
00018 
00022 
00023 
00024 
00025 
00026 
00027 
00028 
00029 
00030 
00031 
00032 
00033 
00034 
00035 
00036 
00037 
00038 
00039 
00040 
00041 
00042 
00043 
00044 
00045 
00046 
00047 
00048 
00049 
00050 
00051 
00052 
00053 
00054 
00055 
00056 
00057 
00058 
00059 
00060 enum SLIM_DEFAULT_SIGNAL_ID{
00061     
00062     SLIM_MEDIA_PLAY_EVENT = 128,
00063     SLIM_MEDIA_STOP_EVENT,
00064     SLIM_MEDIA_PAUSE_EVENT,
00065     SLIM_MEDIA_NEXT_EVENT,
00066     SLIM_MEDIA_PREVIOUS_EVENT,
00067 
00068     
00069     SLIM_MEDIA_REPEAT_EVENT,
00070     SLIM_MEDIA_REPEATALL_EVENT,
00071 
00072     
00073     SLIM_MEDIA_CURRENT_POS_UPDATE_EVENT,
00074     SLIM_MEDIA_REQUEST_POS_UPDATE_EVENT,
00075 
00076     
00077      
00078 };
00079 
00080 
00082 enum SMP_SIGNAL_TYPE {
00083     SMP_KEYDOWN,
00084     SMP_KEYUP,
00085     SMP_MOUSEMOTION,
00086     SMP_MOUSEBUTTONDOWN,
00087     SMP_MOUSEBUTTONUP,
00088 
00089     SMP_USEREVENT
00090 };
00091 
00092 
00093 
00094 
00096 struct SMPKeyboardEvent{
00097     SMP_SIGNAL_TYPE type; 
00098     uint8_t state;
00099 };
00100 
00102 struct SMPMouseMotionEvent{
00103     SMP_SIGNAL_TYPE type; 
00104     uint8_t state;
00105     uint16_t x, y;
00106     int16_t xrel, yrel;
00107 };
00108 
00110 struct SMPMouseButtonEvent{
00111     SMP_SIGNAL_TYPE type;   
00112     uint8_t button;
00113     uint8_t state;
00114     uint16_t x, y;
00115 };
00116 
00118 struct SMPUserEvent{
00120     SMP_SIGNAL_TYPE type; 
00122     int code;
00124     void *data;
00125 };
00126 
00131 class SMPSignal{
00132 public:
00134     SMP_SIGNAL_TYPE type;
00137     uint8_t dest_port; 
00140     uint8_t ref_count;
00142     union{
00144         SMPKeyboardEvent key;
00146         SMPMouseMotionEvent motion;
00148         SMPMouseButtonEvent button;
00149 
00151         SMPUserEvent user;
00152     };
00153 };
00154 
00155 
00156 #endif
00157