mirror of
https://github.com/glfw/glfw.git
synced 2024-11-29 21:37:27 +00:00
Renamed GLFW_TASKBAR_PROGRESS_NOPROGRESS to GLFW_TASKBAR_PROGRESS_DISABLED
This commit is contained in:
parent
1071cf1950
commit
3e7b016a00
@ -1169,7 +1169,7 @@ glfwSetWindowTaskbarProgress(window, GLFW_TASKBAR_PROGRESS_NORMAL, 50);
|
||||
@endcode
|
||||
|
||||
There are different taskbar progress states available for you to use:
|
||||
- @ref GLFW_TASKBAR_PROGRESS_NOPROGRESS
|
||||
- @ref GLFW_TASKBAR_PROGRESS_DISABLED
|
||||
- @ref GLFW_TASKBAR_PROGRESS_INDETERMINATE
|
||||
- @ref GLFW_TASKBAR_PROGRESS_NORMAL
|
||||
- @ref GLFW_TASKBAR_PROGRESS_ERROR
|
||||
|
@ -1280,7 +1280,7 @@ extern "C" {
|
||||
*
|
||||
* Used by @ref window_taskbar_progress.
|
||||
*/
|
||||
#define GLFW_TASKBAR_PROGRESS_NOPROGRESS 0
|
||||
#define GLFW_TASKBAR_PROGRESS_DISABLED 0
|
||||
/*! @brief Display the progress bar in an indeterminate state.
|
||||
*
|
||||
* Display the progress bar in an indeterminate state.
|
||||
@ -3362,11 +3362,11 @@ GLFWAPI void glfwSetWindowIcon(GLFWwindow* window, int count, const GLFWimage* i
|
||||
*
|
||||
* @param[in] window The window whose taskbar progress to set.
|
||||
* @param[in] progressState State of the progress to be displayed in the taskbar. Valid values are:
|
||||
* @ref GLFW_TASKBAR_PROGRESS_NOPROGRESS, @ref GLFW_TASKBAR_PROGRESS_INDETERMINATE,
|
||||
* @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.
|
||||
* This is ignored if progressState is set to @ref GLFW_TASKBAR_PROGRESS_NOPROGRESS.
|
||||
* This is ignored if progressState is set to @ref GLFW_TASKBAR_PROGRESS_DISABLED.
|
||||
*
|
||||
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
|
||||
* GLFW_INVALID_VALUE, @ref GLFW_INVALID_ENUM, @ref GLFW_PLATFORM_ERROR,
|
||||
@ -6510,4 +6510,3 @@ GLFWAPI VkResult glfwCreateWindowSurface(VkInstance instance, GLFWwindow* window
|
||||
#endif
|
||||
|
||||
#endif /* _glfw3_h_ */
|
||||
|
||||
|
@ -109,8 +109,8 @@ void _glfwInitDBusPOSIX(void)
|
||||
if(_glfw.dbus.connection)
|
||||
{
|
||||
//Window NULL is safe here because it won't get
|
||||
//used inside th eSetWindowTaskbarProgress function
|
||||
_glfw.platform.setWindowTaskbarProgress(NULL, GLFW_TASKBAR_PROGRESS_NOPROGRESS, 0);
|
||||
//used inside the SetWindowTaskbarProgress function
|
||||
_glfw.platform.setWindowTaskbarProgress(NULL, GLFW_TASKBAR_PROGRESS_DISABLED, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -577,7 +577,7 @@ GLFWAPI void glfwSetWindowTaskbarProgress(GLFWwindow* handle, const int progress
|
||||
return;
|
||||
}
|
||||
|
||||
if (progressState != GLFW_TASKBAR_PROGRESS_NOPROGRESS && progressState != GLFW_TASKBAR_PROGRESS_INDETERMINATE &&
|
||||
if (progressState != GLFW_TASKBAR_PROGRESS_DISABLED && progressState != GLFW_TASKBAR_PROGRESS_INDETERMINATE &&
|
||||
progressState != GLFW_TASKBAR_PROGRESS_NORMAL && progressState != GLFW_TASKBAR_PROGRESS_ERROR &&
|
||||
progressState != GLFW_TASKBAR_PROGRESS_PAUSED)
|
||||
{
|
||||
@ -1182,4 +1182,3 @@ GLFWAPI void glfwPostEmptyEvent(void)
|
||||
_GLFW_REQUIRE_INIT();
|
||||
_glfw.platform.postEmptyEvent();
|
||||
}
|
||||
|
||||
|
@ -1906,8 +1906,8 @@ void _glfwSetWindowTaskbarProgressWayland(_GLFWwindow* window, const int taskbar
|
||||
{
|
||||
(void)window;
|
||||
|
||||
const dbus_bool_t progressVisible = (taskbarState != GLFW_TASKBAR_PROGRESS_NOPROGRESS);
|
||||
const double progressValue = (double)completed / 100.0;
|
||||
const dbus_bool_t progressVisible = (taskbarState != GLFW_TASKBAR_PROGRESS_DISABLED);
|
||||
|
||||
_glfwUpdateTaskbarProgressDBusPOSIX(progressVisible, progressValue);
|
||||
}
|
||||
@ -2901,4 +2901,3 @@ GLFWAPI struct wl_surface* glfwGetWaylandWindow(GLFWwindow* handle)
|
||||
}
|
||||
|
||||
#endif // _GLFW_WAYLAND
|
||||
|
||||
|
@ -2156,8 +2156,8 @@ void _glfwSetWindowTaskbarProgressX11(_GLFWwindow* window, const int taskbarStat
|
||||
{
|
||||
(void)window;
|
||||
|
||||
const dbus_bool_t progressVisible = (taskbarState != GLFW_TASKBAR_PROGRESS_NOPROGRESS);
|
||||
const double progressValue = (double)completed / 100.0;
|
||||
const dbus_bool_t progressVisible = (taskbarState != GLFW_TASKBAR_PROGRESS_DISABLED);
|
||||
|
||||
_glfwUpdateTaskbarProgressDBusPOSIX(progressVisible, progressValue);
|
||||
}
|
||||
@ -3362,4 +3362,3 @@ GLFWAPI const char* glfwGetX11SelectionString(void)
|
||||
}
|
||||
|
||||
#endif // _GLFW_X11
|
||||
|
||||
|
@ -420,7 +420,7 @@ int main(int argc, char** argv)
|
||||
|
||||
static int progress = 0;
|
||||
if(nk_button_label(nk, "No progress"))
|
||||
glfwSetWindowTaskbarProgress(window, GLFW_TASKBAR_PROGRESS_NOPROGRESS, progress);
|
||||
glfwSetWindowTaskbarProgress(window, GLFW_TASKBAR_PROGRESS_DISABLED, progress);
|
||||
if (nk_button_label(nk, "Indeterminate"))
|
||||
glfwSetWindowTaskbarProgress(window, GLFW_TASKBAR_PROGRESS_INDETERMINATE, progress);
|
||||
if (nk_button_label(nk, "Normal"))
|
||||
|
Loading…
Reference in New Issue
Block a user