Browse Source

Merge pull request #4678 from clindholm/glfw_get_monitor_workarea

vendor/glfw: add GetMonitorWorkarea binding
Laytan 7 months ago
parent
commit
e55b652916
2 changed files with 5 additions and 0 deletions
  1. 1 0
      vendor/glfw/bindings/bindings.odin
  2. 4 0
      vendor/glfw/wrapper.odin

+ 1 - 0
vendor/glfw/bindings/bindings.odin

@@ -71,6 +71,7 @@ foreign glfw {
 	GetPrimaryMonitor      :: proc() -> MonitorHandle ---
 	GetMonitors            :: proc(count: ^c.int) -> [^]MonitorHandle ---
 	GetMonitorPos          :: proc(monitor: MonitorHandle, xpos, ypos: ^c.int) ---
+	GetMonitorWorkarea     :: proc(monitor: MonitorHandle, xpos, ypos, width, height: ^c.int) ---
 	GetMonitorPhysicalSize :: proc(monitor: MonitorHandle, widthMM, heightMM: ^c.int) ---
 	GetMonitorContentScale :: proc(monitor: MonitorHandle, xscale, yscale: ^f32) ---
 

+ 4 - 0
vendor/glfw/wrapper.odin

@@ -33,6 +33,10 @@ GetMonitorPos :: proc "c" (monitor: MonitorHandle) -> (xpos, ypos: c.int) {
 	glfw.GetMonitorPos(monitor, &xpos, &ypos)
 	return
 }
+GetMonitorWorkarea :: proc "c" (monitor: MonitorHandle) -> (xpos, ypos, width, height: c.int) {
+	glfw.GetMonitorWorkarea(monitor, &xpos, &ypos, &width, &height)
+	return
+}
 GetMonitorPhysicalSize :: proc "c" (monitor: MonitorHandle) -> (widthMM, heightMM: c.int) {
 	glfw.GetMonitorPhysicalSize(monitor, &widthMM, &heightMM)
 	return