summaryrefslogtreecommitdiffstats
path: root/src/modules/mediaplayer/mp_winampinterface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/mediaplayer/mp_winampinterface.cpp')
-rw-r--r--src/modules/mediaplayer/mp_winampinterface.cpp52
1 files changed, 26 insertions, 26 deletions
diff --git a/src/modules/mediaplayer/mp_winampinterface.cpp b/src/modules/mediaplayer/mp_winampinterface.cpp
index ae157782..6bc3e24b 100644
--- a/src/modules/mediaplayer/mp_winampinterface.cpp
+++ b/src/modules/mediaplayer/mp_winampinterface.cpp
@@ -27,7 +27,7 @@
#ifdef COMPILE_ON_WINDOWS
-#include <qtextcodec.h>
+#include <tqtextcodec.h>
#include "kvi_locale.h"
#include "kvi_module.h"
@@ -62,9 +62,9 @@
// ** IPC_GETLISTLENGTH returns the length of the current playlist, in
// ** tracks.
-#define IPC_GETEQDATA 127
-// ** int data=SendMessage(hwnd_winamp,WM_WA_IPC,pos,IPC_GETEQDATA);
-// ** IPC_GETEQDATA queries the status of the EQ.
+#define IPC_GETETQDATA 127
+// ** int data=SendMessage(hwnd_winamp,WM_WA_IPC,pos,IPC_GETETQDATA);
+// ** IPC_GETETQDATA queries the status of the EQ.
// ** The value returned depends on what 'pos' is set to:
// ** Value Meaning
// ** ------------------
@@ -73,11 +73,11 @@
// ** 11 Enabled. zero if disabled, nonzero if enabled.
// ** 12 Autoload. zero if disabled, nonzero if enabled.
-#define IPC_SETEQDATA 128
-// ** SendMessage(hwnd_winamp,WM_WA_IPC,pos,IPC_GETEQDATA);
-// ** SendMessage(hwnd_winamp,WM_WA_IPC,value,IPC_SETEQDATA);
-// ** IPC_SETEQDATA sets the value of the last position retrieved
-// ** by IPC_GETEQDATA. This is pretty lame, and we should provide
+#define IPC_SETETQDATA 128
+// ** SendMessage(hwnd_winamp,WM_WA_IPC,pos,IPC_GETETQDATA);
+// ** SendMessage(hwnd_winamp,WM_WA_IPC,value,IPC_SETETQDATA);
+// ** IPC_SETETQDATA sets the value of the last position retrieved
+// ** by IPC_GETETQDATA. This is pretty lame, and we should provide
// ** an extended version that lets you do a MAKELPARAM(pos,value).
// ** someday...
@@ -156,7 +156,7 @@
#define WINAMP_CMD_STOP WINAMP_BUTTON4
#define WINAMP_CMD_NEXT WINAMP_BUTTON5
-#define WINAMP_CMD_QUIT 40001
+#define WINAMP_CMD_TQUIT 40001
#define KVIRC_WM_USER 63112
@@ -167,10 +167,10 @@
#define KVIRC_WM_USER_TRANSFER 15000
-static QTextCodec * mediaplayer_get_codec()
+static TQTextCodec * mediaplayer_get_codec()
{
- QTextCodec * c= QTextCodec::codecForName(KVI_OPTION_STRING(KviOption_stringWinampTextEncoding));
- if(!c)c = QTextCodec::codecForLocale();
+ TQTextCodec * c= TQTextCodec::codecForName(KVI_OPTION_STRING(KviOption_stringWinampTextEncoding));
+ if(!c)c = TQTextCodec::codecForLocale();
return c;
}
@@ -237,7 +237,7 @@ MP_WINAMP_WM_COMMAND(stop,WINAMP_CMD_STOP)
MP_WINAMP_WM_COMMAND(next,WINAMP_CMD_NEXT)
MP_WINAMP_WM_COMMAND(prev,WINAMP_CMD_PREV)
MP_WINAMP_WM_COMMAND(pause,WINAMP_CMD_PAUSE)
-MP_WINAMP_WM_COMMAND(quit,WINAMP_CMD_QUIT)
+MP_WINAMP_WM_COMMAND(quit,WINAMP_CMD_TQUIT)
int KviWinampInterface::length()
@@ -280,7 +280,7 @@ int KviWinampInterface::channels()
return ret;
}
-KviMediaPlayerInterface::PlayerStatus KviWinampInterface::status()
+KviMediaPlayerInterface::PlayertqStatus KviWinampInterface::status()
{
HWND hWinamp = find_winamp(this);
int ret = 1000;
@@ -303,9 +303,9 @@ KviMediaPlayerInterface::PlayerStatus KviWinampInterface::status()
return KviMediaPlayerInterface::Unknown;
}
-QString KviWinampInterface::mrl()
+TQString KviWinampInterface::mrl()
{
- QString ret;
+ TQString ret;
HWND hWinamp = find_winamp(this);
if(hWinamp)
{
@@ -328,7 +328,7 @@ QString KviWinampInterface::mrl()
szBuffer[i] = SendMessage(hWinamp,WM_USER,KVIRC_WM_USER,KVIRC_WM_USER_TRANSFER + i);
}
szBuffer[len] = '\0';
- QTextCodec *c=mediaplayer_get_codec();
+ TQTextCodec *c=mediaplayer_get_codec();
if (c) ret = c->toUnicode(szBuffer);
else ret=szBuffer;
if(!ret.startsWith("http://",false))
@@ -338,9 +338,9 @@ QString KviWinampInterface::mrl()
return ret;
}
-QString KviWinampInterface::nowPlaying()
+TQString KviWinampInterface::nowPlaying()
{
- QString ret;
+ TQString ret;
HWND hWinamp = find_winamp(this);
if(hWinamp)
{
@@ -363,7 +363,7 @@ QString KviWinampInterface::nowPlaying()
}
szBuffer[ len ] = '\0';
- QTextCodec *c=mediaplayer_get_codec();
+ TQTextCodec *c=mediaplayer_get_codec();
if (c) ret = c->toUnicode(szBuffer);
else ret=szBuffer;
}
@@ -371,12 +371,12 @@ QString KviWinampInterface::nowPlaying()
return ret;
}
-bool KviWinampInterface::playMrl(const QString &mrl)
+bool KviWinampInterface::playMrl(const TQString &mrl)
{
HWND hWinamp = find_winamp(this);
if(hWinamp)
{
- QTextCodec *c=mediaplayer_get_codec();
+ TQTextCodec *c=mediaplayer_get_codec();
KviStr szMrl = c ? c->fromUnicode(mrl) : mrl.utf8();
COPYDATASTRUCT cds;
cds.dwData = IPC_PLAYFILE;
@@ -501,8 +501,8 @@ bool KviWinampInterface::setEqData(int &iPos, int &iVal)
HWND hWinamp = find_winamp(this);
if(hWinamp)
{
- SendMessage(hWinamp,WM_USER,iPos,IPC_GETEQDATA);
- SendMessage(hWinamp,WM_USER,iVal,IPC_SETEQDATA);
+ SendMessage(hWinamp,WM_USER,iPos,IPC_GETETQDATA);
+ SendMessage(hWinamp,WM_USER,iVal,IPC_SETETQDATA);
return true;
}
return false;
@@ -514,7 +514,7 @@ int KviWinampInterface::getEqData(int &ival)
int ret = -1;
if(hWinamp)
{
- ret = SendMessage(hWinamp,WM_USER,ival,IPC_GETEQDATA);
+ ret = SendMessage(hWinamp,WM_USER,ival,IPC_GETETQDATA);
return ret;
}
return ret;