aboutsummaryrefslogtreecommitdiff
path: root/vendor/glfw/native_linux.odin
blob: e1aebbbf76c74d778e07f2dee6193f4768f44326 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#+build linux

package glfw

import "vendor:x11/xlib"

@(default_calling_convention="c", link_prefix="glfw")
foreign {
	GetX11Display :: proc() -> ^xlib.Display ---
	GetX11Window :: proc(window:  WindowHandle) -> xlib.Window ---
	GetX11Adapter :: proc(monitor: MonitorHandle) -> xlib.RRCrtc ---
	GetX11Monitor :: proc(monitor: MonitorHandle) -> xlib.RROutput ---
	SetX11SelectionString :: proc(string:  cstring) ---
	GetX11SelectionString :: proc() -> cstring ---

	// Functions added in 3.4, Linux links against system glfw so we define these as weak to be able
	// to check at runtime if they are available.

	@(linkage="weak")
	GetWaylandDisplay :: proc()                       -> rawptr /* struct wl_display* */ ---
	@(linkage="weak")
	GetWaylandWindow  :: proc(window:  WindowHandle)  -> rawptr /* struct wl_surface* */ ---
	@(linkage="weak")
	GetWaylandMonitor :: proc(monitor: MonitorHandle) -> rawptr /* struct wl_output*  */ ---
}