summaryrefslogtreecommitdiff
path: root/plugins/MirandaG15/src/LCDFramework
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2021-12-26 20:31:39 +0300
committerGeorge Hazan <ghazan@miranda.im>2021-12-26 20:31:39 +0300
commitcddcd7483a7c472598af098e759e5d309024f606 (patch)
treeb0a227d6e087c41958cc84d27bc323353248aae5 /plugins/MirandaG15/src/LCDFramework
parent1039b2829a264280493ba0fa979214fe024dc70c (diff)
DWORD -> uint32_t
Diffstat (limited to 'plugins/MirandaG15/src/LCDFramework')
-rw-r--r--plugins/MirandaG15/src/LCDFramework/CLCDConnectionLogitech.cpp20
-rw-r--r--plugins/MirandaG15/src/LCDFramework/CLCDConnectionLogitech.h10
-rw-r--r--plugins/MirandaG15/src/LCDFramework/CLCDDevice.h2
-rw-r--r--plugins/MirandaG15/src/LCDFramework/CLCDGfx.cpp4
-rw-r--r--plugins/MirandaG15/src/LCDFramework/CLCDGfx.h4
-rw-r--r--plugins/MirandaG15/src/LCDFramework/CLCDOutputManager.cpp8
-rw-r--r--plugins/MirandaG15/src/LCDFramework/CLCDOutputManager.h11
-rw-r--r--plugins/MirandaG15/src/LCDFramework/CLCDScreen.cpp2
-rw-r--r--plugins/MirandaG15/src/LCDFramework/CLCDScreen.h4
-rw-r--r--plugins/MirandaG15/src/LCDFramework/CLCDTextLog.h2
10 files changed, 34 insertions, 33 deletions
diff --git a/plugins/MirandaG15/src/LCDFramework/CLCDConnectionLogitech.cpp b/plugins/MirandaG15/src/LCDFramework/CLCDConnectionLogitech.cpp
index 33ed23a2e9..134295b142 100644
--- a/plugins/MirandaG15/src/LCDFramework/CLCDConnectionLogitech.cpp
+++ b/plugins/MirandaG15/src/LCDFramework/CLCDConnectionLogitech.cpp
@@ -31,7 +31,7 @@ void CLCDConnectionLogitech::runDrawingThread()
m_hStopEvent = CreateEvent(nullptr, FALSE, FALSE, nullptr);
m_hDrawEvent = CreateEvent(nullptr, FALSE, FALSE, nullptr);
- DWORD dwRes = 0;
+ uint32_t dwRes = 0;
while (1) {
HANDLE hArray[2] = {m_hStopEvent, m_hDrawEvent};
@@ -40,7 +40,7 @@ void CLCDConnectionLogitech::runDrawingThread()
break;
}
else if (dwRes == WAIT_OBJECT_0 + 1) {
- DWORD rc;
+ uint32_t rc;
if (GetConnectionState() != CONNECTED) {
continue;
}
@@ -227,7 +227,7 @@ CLgLCDDevice* CLCDConnectionLogitech::GetConnectedDevice()
//************************************************************************
bool CLCDConnectionLogitech::Connect(int iIndex)
{
- DWORD rc;
+ uint32_t rc;
lgLcdOpenByTypeContext OpenContext;
if (m_bConnected && (iIndex == 0 || iIndex == GetConnectedDevice()->GetIndex()))
return true;
@@ -335,7 +335,7 @@ bool CLCDConnectionLogitech::HIDReadData(uint8_t* data)
return false;
}
- DWORD dwRes = WaitForSingleObject(hReadEvent, 0);
+ uint32_t dwRes = WaitForSingleObject(hReadEvent, 0);
if (dwRes == WAIT_OBJECT_0) {
bool bRes = false;
if (GetOverlappedResult(m_hHIDDeviceHandle, &olRead, &TransBytes, false)) {
@@ -347,7 +347,7 @@ bool CLCDConnectionLogitech::HIDReadData(uint8_t* data)
olRead.hEvent = hReadEvent;
if (!ReadFile(m_hHIDDeviceHandle, privateBuffer, 9, &TransBytes, &olRead)) {
- DWORD error = GetLastError();
+ uint32_t error = GetLastError();
if (error != ERROR_IO_PENDING) {
return false;
}
@@ -358,12 +358,12 @@ bool CLCDConnectionLogitech::HIDReadData(uint8_t* data)
return false;
}
-void CLCDConnectionLogitech::OnSoftButtonCB(DWORD state)
+void CLCDConnectionLogitech::OnSoftButtonCB(uint32_t state)
{
m_dwButtonState = state;
}
-void CLCDConnectionLogitech::OnNotificationCB(DWORD notificationCode, DWORD notifyParm1, DWORD, DWORD, DWORD)
+void CLCDConnectionLogitech::OnNotificationCB(uint32_t notificationCode, uint32_t notifyParm1, uint32_t, uint32_t, uint32_t)
{
CLgLCDDevice *device;
@@ -513,7 +513,7 @@ bool CLCDConnectionLogitech::GetButtonState(int iButton)
if (!GetConnectionState() == CONNECTED)
return false;
- DWORD dwButton = GetButtonId(iButton);
+ uint32_t dwButton = GetButtonId(iButton);
if (m_dwButtonState & dwButton)
return true;
@@ -528,7 +528,7 @@ bool CLCDConnectionLogitech::HideApplet()
if (!GetConnectionState() == CONNECTED)
return false;
- DWORD rc;
+ uint32_t rc;
rc = lgLcdUpdateBitmap(m_hDevice, &m_lcdBitmap.hdr, LGLCD_ASYNC_UPDATE(LGLCD_PRIORITY_IDLE_NO_SHOW));
if (rc != ERROR_SUCCESS)
@@ -626,7 +626,7 @@ uint8_t *CLCDConnectionLogitech::GetPixelBuffer()
//************************************************************************
// CLCDConnectionLogitech::HandleErrorFromAPI
//************************************************************************
-void CLCDConnectionLogitech::HandleErrorFromAPI(DWORD dwRes)
+void CLCDConnectionLogitech::HandleErrorFromAPI(uint32_t dwRes)
{
switch (dwRes) {
// all is well
diff --git a/plugins/MirandaG15/src/LCDFramework/CLCDConnectionLogitech.h b/plugins/MirandaG15/src/LCDFramework/CLCDConnectionLogitech.h
index 916b0f9110..237eb8f11c 100644
--- a/plugins/MirandaG15/src/LCDFramework/CLCDConnectionLogitech.h
+++ b/plugins/MirandaG15/src/LCDFramework/CLCDConnectionLogitech.h
@@ -90,8 +90,8 @@ public:
//----------------------------------------------
//----------------------------------------------
// Special functions for callbacks
- void OnSoftButtonCB(DWORD state);
- void OnNotificationCB(DWORD notificationCode, DWORD notifyParm1, DWORD notifyParm2, DWORD notifyParm3, DWORD notifyParm4);
+ void OnSoftButtonCB(uint32_t state);
+ void OnNotificationCB(uint32_t notificationCode, uint32_t notifyParm1, uint32_t notifyParm2, uint32_t notifyParm3, uint32_t notifyParm4);
//----------------------------------------------
// Special functions for the volume wheel hook
// Activates/Deactivates the volumewheel hook
@@ -121,7 +121,7 @@ private:
bool m_bVolumeWheelHook;
// handles API Errors
- void HandleErrorFromAPI(DWORD dwRes);
+ void HandleErrorFromAPI(uint32_t dwRes);
int m_iNumQVGADevices;
int m_iNumBWDevices;
@@ -135,10 +135,10 @@ private:
int m_iPixels;
int m_hDevice;
int m_hConnection;
- DWORD m_dwButtonState;
+ uint32_t m_dwButtonState;
int m_iPriority;
- DWORD m_dwForegroundCheck;
+ uint32_t m_dwForegroundCheck;
bool m_bSetAsForeground;
std::vector<CLgLCDDevice*> m_lcdDevices;
diff --git a/plugins/MirandaG15/src/LCDFramework/CLCDDevice.h b/plugins/MirandaG15/src/LCDFramework/CLCDDevice.h
index 657b31e999..e177a9b210 100644
--- a/plugins/MirandaG15/src/LCDFramework/CLCDDevice.h
+++ b/plugins/MirandaG15/src/LCDFramework/CLCDDevice.h
@@ -38,7 +38,7 @@ private:
int m_iBPP;
public:
- CLgLCDDevice(DWORD type, SIZE size, int buttons, int BPP) : CLCDDevice(type)
+ CLgLCDDevice(uint32_t type, SIZE size, int buttons, int BPP) : CLCDDevice(type)
{
m_size = size;
m_iButtons = buttons;
diff --git a/plugins/MirandaG15/src/LCDFramework/CLCDGfx.cpp b/plugins/MirandaG15/src/LCDFramework/CLCDGfx.cpp
index 7d994666a7..977f645441 100644
--- a/plugins/MirandaG15/src/LCDFramework/CLCDGfx.cpp
+++ b/plugins/MirandaG15/src/LCDFramework/CLCDGfx.cpp
@@ -368,7 +368,7 @@ void CLCDGfx::EndDraw(void)
uint8_t *pScreen1 = m_pSavedBitmapBits;
uint8_t *pScreen2 = m_pBitmapBits;
- DWORD dwTimeElapsed = GetTickCount() - m_dwTransitionStart;
+ uint32_t dwTimeElapsed = GetTickCount() - m_dwTransitionStart;
/* if(m_eTransition == TRANSITION_BT || m_eTransition == TRANSITION_TB)
{
@@ -587,7 +587,7 @@ int CLCDGfx::findNearestMatch(uint8_t *targetArray, int iSourceIndex)
//************************************************************************
void CLCDGfx::Cache()
{
- DWORD dwStart = GetTickCount();
+ uint32_t dwStart = GetTickCount();
// Initialize pixels
if (m_eTransition == TRANSITION_MORPH) {
diff --git a/plugins/MirandaG15/src/LCDFramework/CLCDGfx.h b/plugins/MirandaG15/src/LCDFramework/CLCDGfx.h
index 2246064e43..6ccb5075e8 100644
--- a/plugins/MirandaG15/src/LCDFramework/CLCDGfx.h
+++ b/plugins/MirandaG15/src/LCDFramework/CLCDGfx.h
@@ -67,7 +67,7 @@ protected:
bool m_bInitialized;
- DWORD m_dwTransitionStart;
+ uint32_t m_dwTransitionStart;
bool m_bTransition;
ETransitionType m_eTransition;
@@ -75,7 +75,7 @@ protected:
vector<SLCDPixel*> m_LStaticPixels;
double m_dWave;
- DWORD m_dwLastDraw;
+ uint32_t m_dwLastDraw;
};
#endif \ No newline at end of file
diff --git a/plugins/MirandaG15/src/LCDFramework/CLCDOutputManager.cpp b/plugins/MirandaG15/src/LCDFramework/CLCDOutputManager.cpp
index 1694707897..4291450ea0 100644
--- a/plugins/MirandaG15/src/LCDFramework/CLCDOutputManager.cpp
+++ b/plugins/MirandaG15/src/LCDFramework/CLCDOutputManager.cpp
@@ -149,8 +149,8 @@ void CLCDOutputManager::InitializeGfxObject()
int iButtonCount = m_pLcdConnection->GetButtonCount();
m_pbButtonStates = (bool*)malloc(sizeof(bool)*iButtonCount);
- m_pdwButtonRepeatTimers = (DWORD*)malloc(sizeof(DWORD)*iButtonCount);
- m_pdwButtonRepeatStarts = (DWORD*)malloc(sizeof(DWORD)*iButtonCount);
+ m_pdwButtonRepeatTimers = (uint32_t*)malloc(sizeof(uint32_t)*iButtonCount);
+ m_pdwButtonRepeatStarts = (uint32_t*)malloc(sizeof(uint32_t)*iButtonCount);
for (int i = 0; i < iButtonCount; i++) {
m_pbButtonStates[i] = false;
m_pdwButtonRepeatTimers[i] = 0;
@@ -236,7 +236,7 @@ bool CLCDOutputManager::Update()
iId = m_pLcdConnection->GetButtonId(i);
// reduce the delay by 5% per second
- DWORD dwNewDelay = m_dwButtonRepeatDelay - ((float)m_dwButtonRepeatDelay * 0.05 * (GetTickCount() - m_pdwButtonRepeatStarts[i]) / 250);
+ uint32_t dwNewDelay = m_dwButtonRepeatDelay - ((float)m_dwButtonRepeatDelay * 0.05 * (GetTickCount() - m_pdwButtonRepeatStarts[i]) / 250);
// delay may not be less than 25% of the original value
if (dwNewDelay < m_dwButtonRepeatDelay * 0.25)
dwNewDelay = m_dwButtonRepeatDelay * 0.25;
@@ -354,7 +354,7 @@ void CLCDOutputManager::StartTransition(ETransitionType eTransition, LPRECT rect
//************************************************************************
// specifies the button repeat delay
//************************************************************************
-void CLCDOutputManager::SetButtonRepeatDelay(DWORD dwDelay)
+void CLCDOutputManager::SetButtonRepeatDelay(uint32_t dwDelay)
{
m_dwButtonRepeatDelay = dwDelay;
}
diff --git a/plugins/MirandaG15/src/LCDFramework/CLCDOutputManager.h b/plugins/MirandaG15/src/LCDFramework/CLCDOutputManager.h
index 076f41a570..8d9f6d68cd 100644
--- a/plugins/MirandaG15/src/LCDFramework/CLCDOutputManager.h
+++ b/plugins/MirandaG15/src/LCDFramework/CLCDOutputManager.h
@@ -46,7 +46,7 @@ public:
CLCDConnection *GetLCDConnection();
// specifies the button repeat delay
- void SetButtonRepeatDelay(DWORD dwDelay);
+ void SetButtonRepeatDelay(uint32_t dwDelay);
// starts a screen transition
void StartTransition(ETransitionType eTransition = TRANSITION_RANDOM, LPRECT rect = nullptr);
@@ -58,6 +58,7 @@ public:
// Called by the LCDManager to open a config dialog
static DWORD WINAPI configDialogCallback(IN int connection, IN const PVOID pContext);
+
protected:
void InitializeGfxObject();
void DeinitializeGfxObject();
@@ -88,12 +89,12 @@ protected:
private:
static CLCDOutputManager *m_pInstance;
- DWORD m_dwLastUpdate = 0;
- DWORD m_dwButtonRepeatDelay = 300;
+ uint32_t m_dwLastUpdate = 0;
+ uint32_t m_dwButtonRepeatDelay = 300;
bool m_bInitialized = false;
bool *m_pbButtonStates = nullptr;
- DWORD *m_pdwButtonRepeatTimers = nullptr;
- DWORD *m_pdwButtonRepeatStarts = nullptr;
+ uint32_t *m_pdwButtonRepeatTimers = nullptr;
+ uint32_t *m_pdwButtonRepeatStarts = nullptr;
tstring m_strAppletName;
CLCDConnection *m_pLcdConnection = nullptr;
diff --git a/plugins/MirandaG15/src/LCDFramework/CLCDScreen.cpp b/plugins/MirandaG15/src/LCDFramework/CLCDScreen.cpp
index e2d878db2f..65d6756e66 100644
--- a/plugins/MirandaG15/src/LCDFramework/CLCDScreen.cpp
+++ b/plugins/MirandaG15/src/LCDFramework/CLCDScreen.cpp
@@ -124,7 +124,7 @@ bool CLCDScreen::Draw(CLCDGfx *pGfx)
//************************************************************************
// Set the screen's time until expiration
//************************************************************************
-void CLCDScreen::SetExpiration(DWORD dwTime)
+void CLCDScreen::SetExpiration(uint32_t dwTime)
{
if (dwTime == INFINITE)
m_dwExpiration = INFINITE;
diff --git a/plugins/MirandaG15/src/LCDFramework/CLCDScreen.h b/plugins/MirandaG15/src/LCDFramework/CLCDScreen.h
index f8b6c432e1..1ae251afe0 100644
--- a/plugins/MirandaG15/src/LCDFramework/CLCDScreen.h
+++ b/plugins/MirandaG15/src/LCDFramework/CLCDScreen.h
@@ -22,7 +22,7 @@ public:
virtual bool Draw(CLCDGfx *pGfx);
// Sets the screen's time until expiration
- void SetExpiration(DWORD dwTime);
+ void SetExpiration(uint32_t dwTime);
// Check if the screen has expired
bool HasExpired();
@@ -60,7 +60,7 @@ public:
private:
SIZE m_Size;
bool m_bAlert = false;
- DWORD m_dwExpiration = INFINITE;
+ uint32_t m_dwExpiration = INFINITE;
vector<CLCDObject*> m_Objects;
};
diff --git a/plugins/MirandaG15/src/LCDFramework/CLCDTextLog.h b/plugins/MirandaG15/src/LCDFramework/CLCDTextLog.h
index bd94745e5e..0109af5198 100644
--- a/plugins/MirandaG15/src/LCDFramework/CLCDTextLog.h
+++ b/plugins/MirandaG15/src/LCDFramework/CLCDTextLog.h
@@ -79,7 +79,7 @@ private:
int m_iTextLines = 0;
int m_iLastScrollDirection = 0;
- DWORD m_dwLastScroll = 0;
+ uint32_t m_dwLastScroll = 0;
list<CLogEntry*> m_Entrys;
CLCDBar *m_pScrollbar = nullptr;