Skip to content

Commit

Permalink
Merge pull request odin-lang#4678 from clindholm/glfw_get_monitor_wor…
Browse files Browse the repository at this point in the history
…karea

vendor/glfw: add GetMonitorWorkarea binding
  • Loading branch information
laytan authored Jan 15, 2025
2 parents 0cb04f5 + 93e8f50 commit e55b652
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions vendor/glfw/bindings/bindings.odin
Original file line number Diff line number Diff line change
Expand Up @@ -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) ---

Expand Down
4 changes: 4 additions & 0 deletions vendor/glfw/wrapper.odin
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e55b652

Please sign in to comment.