glfwSetWindowTaskbarProgress Renamed parameter completed to value

This commit is contained in:
GamesTrap 2023-03-01 22:27:52 +01:00
parent 3e7b016a00
commit a480de9b1d
No known key found for this signature in database
GPG Key ID: 31DFD452434ECDA3
12 changed files with 22 additions and 23 deletions

View File

@ -3365,7 +3365,7 @@ GLFWAPI void glfwSetWindowIcon(GLFWwindow* window, int count, const GLFWimage* i
* @ref GLFW_TASKBAR_PROGRESS_DISABLED, @ref GLFW_TASKBAR_PROGRESS_INDETERMINATE,
* @ref GLFW_TASKBAR_PROGRESS_NORMAL, @ref GLFW_TASKBAR_PROGRESS_ERROR
* and @ref GLFW_TASKBAR_PROGRESS_PAUSED.
* @param[in] completed The amount of completed progress to set. Valid range is 0 to 100.
* @param[in] value The amount of completed progress to set. Valid range is 0 to 100.
* This is ignored if progressState is set to @ref GLFW_TASKBAR_PROGRESS_DISABLED.
*
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
@ -3391,7 +3391,7 @@ GLFWAPI void glfwSetWindowIcon(GLFWwindow* window, int count, const GLFWimage* i
*
* @ingroup window
*/
GLFWAPI void glfwSetWindowTaskbarProgress(GLFWwindow* window, const int progressState, int completed);
GLFWAPI void glfwSetWindowTaskbarProgress(GLFWwindow* window, const int progressState, int value);
/*! @brief Retrieves the position of the content area of the specified window.
*
@ -6510,3 +6510,4 @@ GLFWAPI VkResult glfwCreateWindowSurface(VkInstance instance, GLFWwindow* window
#endif
#endif /* _glfw3_h_ */

View File

@ -218,7 +218,7 @@ GLFWbool _glfwCreateWindowCocoa(_GLFWwindow* window, const _GLFWwndconfig* wndco
void _glfwDestroyWindowCocoa(_GLFWwindow* window);
void _glfwSetWindowTitleCocoa(_GLFWwindow* window, const char* title);
void _glfwSetWindowIconCocoa(_GLFWwindow* window, int count, const GLFWimage* images);
void _glfwSetWindowTaskbarProgressCocoa(_GLFWwindow* window, const int taskbarState, int completed);
void _glfwSetWindowTaskbarProgressCocoa(_GLFWwindow* window, const int taskbarState, int value);
void _glfwGetWindowPosCocoa(_GLFWwindow* window, int* xpos, int* ypos);
void _glfwSetWindowPosCocoa(_GLFWwindow* window, int xpos, int ypos);
void _glfwGetWindowSizeCocoa(_GLFWwindow* window, int* width, int* height);

View File

@ -1032,7 +1032,7 @@ void _glfwSetWindowIconCocoa(_GLFWwindow* window,
"Cocoa: Regular windows do not have icons on macOS");
}
void _glfwSetWindowTaskbarProgressCocoa(_GLFWwindow* window, const int progressState, int completed)
void _glfwSetWindowTaskbarProgressCocoa(_GLFWwindow* window, const int progressState, int value)
{
_glfwInputError(GLFW_FEATURE_UNIMPLEMENTED,
"Cocoa: Window taskbar progress is not implemented");

View File

@ -89,7 +89,7 @@ GLFWbool _glfwCreateWindowNull(_GLFWwindow* window, const _GLFWwndconfig* wndcon
void _glfwDestroyWindowNull(_GLFWwindow* window);
void _glfwSetWindowTitleNull(_GLFWwindow* window, const char* title);
void _glfwSetWindowIconNull(_GLFWwindow* window, int count, const GLFWimage* images);
void _glfwSetWindowTaskbarProgressNull(_GLFWwindow* window, const int taskbarState, int completed);
void _glfwSetWindowTaskbarProgressNull(_GLFWwindow* window, const int taskbarState, int value);
void _glfwSetWindowMonitorNull(_GLFWwindow* window, _GLFWmonitor* monitor, int xpos, int ypos, int width, int height, int refreshRate);
void _glfwGetWindowPosNull(_GLFWwindow* window, int* xpos, int* ypos);
void _glfwSetWindowPosNull(_GLFWwindow* window, int xpos, int ypos);

View File

@ -187,7 +187,7 @@ void _glfwSetWindowIconNull(_GLFWwindow* window, int count, const GLFWimage* ima
{
}
void _glfwSetWindowTaskbarProgressNull(_GLFWwindow* window, const int progressState, int completed)
void _glfwSetWindowTaskbarProgressNull(_GLFWwindow* window, const int progressState, int value)
{
}

View File

@ -618,7 +618,7 @@ GLFWbool _glfwCreateWindowWin32(_GLFWwindow* window, const _GLFWwndconfig* wndco
void _glfwDestroyWindowWin32(_GLFWwindow* window);
void _glfwSetWindowTitleWin32(_GLFWwindow* window, const char* title);
void _glfwSetWindowIconWin32(_GLFWwindow* window, int count, const GLFWimage* images);
void _glfwSetWindowTaskbarProgressWin32(_GLFWwindow* window, const int taskbarState, int completed);
void _glfwSetWindowTaskbarProgressWin32(_GLFWwindow* window, const int taskbarState, int value);
void _glfwGetWindowPosWin32(_GLFWwindow* window, int* xpos, int* ypos);
void _glfwSetWindowPosWin32(_GLFWwindow* window, int xpos, int ypos);
void _glfwGetWindowSizeWin32(_GLFWwindow* window, int* width, int* height);

View File

@ -1596,7 +1596,7 @@ void _glfwSetWindowIconWin32(_GLFWwindow* window, int count, const GLFWimage* im
}
}
void _glfwSetWindowTaskbarProgressWin32(_GLFWwindow* window, const int progressState, int completed)
void _glfwSetWindowTaskbarProgressWin32(_GLFWwindow* window, const int progressState, int value)
{
HRESULT res = S_OK;
int32_t winProgressState = 0;
@ -1610,7 +1610,7 @@ void _glfwSetWindowTaskbarProgressWin32(_GLFWwindow* window, const int progressS
if(!window->win32.TaskbarList)
return;
res = window->win32.TaskbarList->lpVtbl->SetProgressValue(window->win32.TaskbarList, window->win32.handle, completed, 100);
res = window->win32.TaskbarList->lpVtbl->SetProgressValue(window->win32.TaskbarList, window->win32.handle, value, 100);
if(res != S_OK)
{
_glfwInputErrorWin32(GLFW_PLATFORM_ERROR, "Win32: Failed to set taskbar progress value");

View File

@ -558,7 +558,7 @@ GLFWAPI void glfwSetWindowIcon(GLFWwindow* handle,
_glfw.platform.setWindowIcon(window, count, images);
}
GLFWAPI void glfwSetWindowTaskbarProgress(GLFWwindow* handle, const int progressState, int completed)
GLFWAPI void glfwSetWindowTaskbarProgress(GLFWwindow* handle, const int progressState, int value)
{
_GLFWwindow* window = (_GLFWwindow*) handle;
@ -566,12 +566,7 @@ GLFWAPI void glfwSetWindowTaskbarProgress(GLFWwindow* handle, const int progress
_GLFW_REQUIRE_INIT();
if (completed < 0)
{
_glfwInputError(GLFW_INVALID_VALUE, "Invalid progress amount for window taskbar progress");
return;
}
else if (completed > 100)
if (value < 0 || value > 100)
{
_glfwInputError(GLFW_INVALID_VALUE, "Invalid progress amount for window taskbar progress");
return;
@ -585,7 +580,7 @@ GLFWAPI void glfwSetWindowTaskbarProgress(GLFWwindow* handle, const int progress
return;
}
_glfw.platform.setWindowTaskbarProgress(window, progressState, completed);
_glfw.platform.setWindowTaskbarProgress(window, progressState, value);
}
GLFWAPI void glfwGetWindowPos(GLFWwindow* handle, int* xpos, int* ypos)
@ -1182,3 +1177,4 @@ GLFWAPI void glfwPostEmptyEvent(void)
_GLFW_REQUIRE_INIT();
_glfw.platform.postEmptyEvent();
}

View File

@ -446,7 +446,7 @@ GLFWbool _glfwCreateWindowWayland(_GLFWwindow* window, const _GLFWwndconfig* wnd
void _glfwDestroyWindowWayland(_GLFWwindow* window);
void _glfwSetWindowTitleWayland(_GLFWwindow* window, const char* title);
void _glfwSetWindowIconWayland(_GLFWwindow* window, int count, const GLFWimage* images);
void _glfwSetWindowTaskbarProgressWayland(_GLFWwindow* window, const int taskbarState, int completed);
void _glfwSetWindowTaskbarProgressWayland(_GLFWwindow* window, const int taskbarState, int value);
void _glfwGetWindowPosWayland(_GLFWwindow* window, int* xpos, int* ypos);
void _glfwSetWindowPosWayland(_GLFWwindow* window, int xpos, int ypos);
void _glfwGetWindowSizeWayland(_GLFWwindow* window, int* width, int* height);

View File

@ -1902,12 +1902,12 @@ void _glfwSetWindowIconWayland(_GLFWwindow* window,
"Wayland: The platform does not support setting the window icon");
}
void _glfwSetWindowTaskbarProgressWayland(_GLFWwindow* window, const int taskbarState, int completed)
void _glfwSetWindowTaskbarProgressWayland(_GLFWwindow* window, const int taskbarState, int value)
{
(void)window;
const double progressValue = (double)completed / 100.0;
const dbus_bool_t progressVisible = (taskbarState != GLFW_TASKBAR_PROGRESS_DISABLED);
const double progressValue = (double)value / 100.0;
_glfwUpdateTaskbarProgressDBusPOSIX(progressVisible, progressValue);
}
@ -2901,3 +2901,4 @@ GLFWAPI struct wl_surface* glfwGetWaylandWindow(GLFWwindow* handle)
}
#endif // _GLFW_WAYLAND

View File

@ -905,7 +905,7 @@ GLFWbool _glfwCreateWindowX11(_GLFWwindow* window, const _GLFWwndconfig* wndconf
void _glfwDestroyWindowX11(_GLFWwindow* window);
void _glfwSetWindowTitleX11(_GLFWwindow* window, const char* title);
void _glfwSetWindowIconX11(_GLFWwindow* window, int count, const GLFWimage* images);
void _glfwSetWindowTaskbarProgressX11(_GLFWwindow* window, const int taskbarState, int completed);
void _glfwSetWindowTaskbarProgressX11(_GLFWwindow* window, const int taskbarState, int value);
void _glfwGetWindowPosX11(_GLFWwindow* window, int* xpos, int* ypos);
void _glfwSetWindowPosX11(_GLFWwindow* window, int xpos, int ypos);
void _glfwGetWindowSizeX11(_GLFWwindow* window, int* width, int* height);

View File

@ -2152,12 +2152,12 @@ void _glfwSetWindowIconX11(_GLFWwindow* window, int count, const GLFWimage* imag
XFlush(_glfw.x11.display);
}
void _glfwSetWindowTaskbarProgressX11(_GLFWwindow* window, const int taskbarState, int completed)
void _glfwSetWindowTaskbarProgressX11(_GLFWwindow* window, const int taskbarState, int value)
{
(void)window;
const double progressValue = (double)completed / 100.0;
const dbus_bool_t progressVisible = (taskbarState != GLFW_TASKBAR_PROGRESS_DISABLED);
const double progressValue = (double)value / 100.0;
_glfwUpdateTaskbarProgressDBusPOSIX(progressVisible, progressValue);
}
@ -3362,3 +3362,4 @@ GLFWAPI const char* glfwGetX11SelectionString(void)
}
#endif // _GLFW_X11