Home
last modified time | relevance | path

Searched refs:_glfw (Results 1 – 25 of 43) sorted by relevance

12

/third_party/flutter/glfw/src/
Dwin32_init.c67 _glfw.win32.winmm.instance = LoadLibraryA("winmm.dll"); in loadLibraries()
68 if (!_glfw.win32.winmm.instance) in loadLibraries()
74 _glfw.win32.winmm.timeGetTime = (TIMEGETTIME_T) in loadLibraries()
75 GetProcAddress(_glfw.win32.winmm.instance, "timeGetTime"); in loadLibraries()
77 _glfw.win32.user32.instance = LoadLibraryA("user32.dll"); in loadLibraries()
78 if (!_glfw.win32.user32.instance) in loadLibraries()
84 _glfw.win32.user32.SetProcessDPIAware = (SETPROCESSDPIAWARE_T) in loadLibraries()
85 GetProcAddress(_glfw.win32.user32.instance, "SetProcessDPIAware"); in loadLibraries()
86 _glfw.win32.user32.ChangeWindowMessageFilterEx = (CHANGEWINDOWMESSAGEFILTEREX_T) in loadLibraries()
87 GetProcAddress(_glfw.win32.user32.instance, "ChangeWindowMessageFilterEx"); in loadLibraries()
[all …]
Dmir_init.c38 memset(_glfw.mir.publicKeys, -1, sizeof(_glfw.mir.publicKeys)); in createKeyTables()
40 _glfw.mir.publicKeys[KEY_GRAVE] = GLFW_KEY_GRAVE_ACCENT; in createKeyTables()
41 _glfw.mir.publicKeys[KEY_1] = GLFW_KEY_1; in createKeyTables()
42 _glfw.mir.publicKeys[KEY_2] = GLFW_KEY_2; in createKeyTables()
43 _glfw.mir.publicKeys[KEY_3] = GLFW_KEY_3; in createKeyTables()
44 _glfw.mir.publicKeys[KEY_4] = GLFW_KEY_4; in createKeyTables()
45 _glfw.mir.publicKeys[KEY_5] = GLFW_KEY_5; in createKeyTables()
46 _glfw.mir.publicKeys[KEY_6] = GLFW_KEY_6; in createKeyTables()
47 _glfw.mir.publicKeys[KEY_7] = GLFW_KEY_7; in createKeyTables()
48 _glfw.mir.publicKeys[KEY_8] = GLFW_KEY_8; in createKeyTables()
[all …]
Dwl_init.c53 _glfw.wl.pointerSerial = serial; in pointerHandleEnter()
54 _glfw.wl.pointerFocus = window; in pointerHandleEnter()
65 _GLFWwindow* window = _glfw.wl.pointerFocus; in pointerHandleLeave()
70 _glfw.wl.pointerSerial = serial; in pointerHandleLeave()
71 _glfw.wl.pointerFocus = NULL; in pointerHandleLeave()
81 _GLFWwindow* window = _glfw.wl.pointerFocus; in pointerHandleMotion()
106 _GLFWwindow* window = _glfw.wl.pointerFocus; in pointerHandleButton()
121 _glfw.wl.xkb.modifiers); in pointerHandleButton()
130 _GLFWwindow* window = _glfw.wl.pointerFocus; in pointerHandleAxis()
189 keymap = xkb_map_new_from_string(_glfw.wl.xkb.context, in keyboardHandleKeymap()
[all …]
Dcocoa_init.m77 memset(_glfw.ns.publicKeys, -1, sizeof(_glfw.ns.publicKeys));
78 memset(_glfw.ns.nativeKeys, -1, sizeof(_glfw.ns.nativeKeys));
80 _glfw.ns.publicKeys[0x1D] = GLFW_KEY_0;
81 _glfw.ns.publicKeys[0x12] = GLFW_KEY_1;
82 _glfw.ns.publicKeys[0x13] = GLFW_KEY_2;
83 _glfw.ns.publicKeys[0x14] = GLFW_KEY_3;
84 _glfw.ns.publicKeys[0x15] = GLFW_KEY_4;
85 _glfw.ns.publicKeys[0x17] = GLFW_KEY_5;
86 _glfw.ns.publicKeys[0x16] = GLFW_KEY_6;
87 _glfw.ns.publicKeys[0x1A] = GLFW_KEY_7;
[all …]
Dx11_init.c49 if (_glfw.x11.xkb.available) in translateKeyCode()
55 keySym = XkbKeycodeToKeysym(_glfw.x11.display, scancode, 0, 1); in translateKeyCode()
77 keySym = XkbKeycodeToKeysym(_glfw.x11.display, scancode, 0, 0); in translateKeyCode()
84 keySyms = XGetKeyboardMapping(_glfw.x11.display, scancode, 1, &dummy); in translateKeyCode()
235 memset(_glfw.x11.publicKeys, -1, sizeof(_glfw.x11.publicKeys)); in createKeyTables()
236 memset(_glfw.x11.nativeKeys, -1, sizeof(_glfw.x11.nativeKeys)); in createKeyTables()
238 if (_glfw.x11.xkb.available) in createKeyTables()
244 XkbDescPtr desc = XkbGetMap(_glfw.x11.display, 0, XkbUseCoreKbd); in createKeyTables()
245 XkbGetNames(_glfw.x11.display, XkbKeyNamesMask, desc); in createKeyTables()
308 _glfw.x11.publicKeys[scancode] = key; in createKeyTables()
[all …]
Dglx_context.c44 glXGetFBConfigAttrib(_glfw.x11.display, fbconfig, attrib, &value); in getGLXFBConfigAttrib()
61 vendor = glXGetClientString(_glfw.x11.display, GLX_VENDOR); in chooseGLXFBConfig()
66 glXGetFBConfigs(_glfw.x11.display, _glfw.x11.screen, &nativeCount); in chooseGLXFBConfig()
112 if (_glfw.glx.ARB_multisample) in chooseGLXFBConfig()
115 if (_glfw.glx.ARB_framebuffer_sRGB || _glfw.glx.EXT_framebuffer_sRGB) in chooseGLXFBConfig()
138 return glXCreateNewContext(_glfw.x11.display, in createLegacyContextGLX()
149 if (!glXMakeCurrent(_glfw.x11.display, in makeContextCurrentGLX()
160 if (!glXMakeCurrent(_glfw.x11.display, None, NULL)) in makeContextCurrentGLX()
173 glXSwapBuffers(_glfw.x11.display, window->context.glx.window); in swapBuffersGLX()
180 if (_glfw.glx.EXT_swap_control) in swapIntervalGLX()
[all …]
Dx11_window.c59 const int fd = ConnectionNumber(_glfw.x11.display); in waitForEvent()
65 FD_SET(_glfw.linux_js.inotify, &fds); in waitForEvent()
67 if (fd < _glfw.linux_js.inotify) in waitForEvent()
68 count = _glfw.linux_js.inotify + 1; in waitForEvent()
103 while (!XCheckTypedWindowEvent(_glfw.x11.display, in waitForVisibilityNotify()
126 _glfw.x11.WM_STATE, in getWindowState()
127 _glfw.x11.WM_STATE, in getWindowState()
154 event->xproperty.atom == _glfw.x11.NET_FRAME_EXTENTS; in isFrameExtentsEvent()
206 return _glfw.x11.publicKeys[scancode]; in translateKey()
215 if (XFindContext(_glfw.x11.display, in findWindowByHandle()
[all …]
Degl_context.c82 eglGetConfigAttrib(_glfw.egl.display, config, attrib, &value); in getEGLConfigAttrib()
97 eglGetConfigs(_glfw.egl.display, NULL, 0, &nativeCount); in chooseEGLConfig()
105 eglGetConfigs(_glfw.egl.display, nativeConfigs, nativeCount, &nativeCount); in chooseEGLConfig()
177 if (!eglMakeCurrent(_glfw.egl.display, in makeContextCurrentEGL()
190 if (!eglMakeCurrent(_glfw.egl.display, in makeContextCurrentEGL()
214 eglSwapBuffers(_glfw.egl.display, window->context.egl.surface); in swapBuffersEGL()
219 eglSwapInterval(_glfw.egl.display, interval); in swapIntervalEGL()
224 const char* extensions = eglQueryString(_glfw.egl.display, EGL_EXTENSIONS); in extensionSupportedEGL()
266 eglDestroySurface(_glfw.egl.display, window->context.egl.surface); in destroyContextEGL()
272 eglDestroyContext(_glfw.egl.display, window->context.egl.handle); in destroyContextEGL()
[all …]
Dx11_monitor.c87 _glfwSplitBPP(DefaultDepth(_glfw.x11.display, _glfw.x11.screen), in vidmodeFromModeInfo()
102 if (_glfw.x11.randr.available && !_glfw.x11.randr.monitorBroken) in _glfwSetVideoModeX11()
117 sr = XRRGetScreenResources(_glfw.x11.display, _glfw.x11.root); in _glfwSetVideoModeX11()
118 ci = XRRGetCrtcInfo(_glfw.x11.display, sr, monitor->x11.crtc); in _glfwSetVideoModeX11()
119 oi = XRRGetOutputInfo(_glfw.x11.display, sr, monitor->x11.output); in _glfwSetVideoModeX11()
140 XRRSetCrtcConfig(_glfw.x11.display, in _glfwSetVideoModeX11()
169 if (_glfw.x11.randr.available && !_glfw.x11.randr.monitorBroken) in _glfwRestoreVideoModeX11()
177 sr = XRRGetScreenResources(_glfw.x11.display, _glfw.x11.root); in _glfwRestoreVideoModeX11()
178 ci = XRRGetCrtcInfo(_glfw.x11.display, sr, monitor->x11.crtc); in _glfwRestoreVideoModeX11()
180 XRRSetCrtcConfig(_glfw.x11.display, in _glfwRestoreVideoModeX11()
[all …]
Dinit.c43 _GLFWlibrary _glfw; variable
125 memset(&_glfw, 0, sizeof(_glfw)); in glfwInit()
133 _glfw.monitors = _glfwPlatformGetMonitors(&_glfw.monitorCount); in glfwInit()
136 _glfw.timerOffset = _glfwPlatformGetTimerValue(); in glfwInit()
151 memset(&_glfw.callbacks, 0, sizeof(_glfw.callbacks)); in glfwTerminate()
153 while (_glfw.windowListHead) in glfwTerminate()
154 glfwDestroyWindow((GLFWwindow*) _glfw.windowListHead); in glfwTerminate()
156 while (_glfw.cursorListHead) in glfwTerminate()
157 glfwDestroyCursor((GLFWcursor*) _glfw.cursorListHead); in glfwTerminate()
159 for (i = 0; i < _glfw.monitorCount; i++) in glfwTerminate()
[all …]
Dvulkan.c52 if (_glfw.vk.available) in _glfwInitVulkan()
55 _glfw.vk.handle = _glfw_dlopen(name); in _glfwInitVulkan()
56 if (!_glfw.vk.handle) in _glfwInitVulkan()
59 _glfw.vk.GetInstanceProcAddr = (PFN_vkGetInstanceProcAddr) in _glfwInitVulkan()
60 _glfw_dlsym(_glfw.vk.handle, "vkGetInstanceProcAddr"); in _glfwInitVulkan()
61 if (!_glfw.vk.GetInstanceProcAddr) in _glfwInitVulkan()
70 _glfw.vk.EnumerateInstanceExtensionProperties = (PFN_vkEnumerateInstanceExtensionProperties) in _glfwInitVulkan()
72 if (!_glfw.vk.EnumerateInstanceExtensionProperties) in _glfwInitVulkan()
110 _glfw.vk.KHR_surface = GLFW_TRUE; in _glfwInitVulkan()
112 _glfw.vk.KHR_win32_surface = GLFW_TRUE; in _glfwInitVulkan()
[all …]
Dwgl_context.c42 assert(_glfw.wgl.ARB_pixel_format); in getPixelFormatAttrib()
44 if (!_glfw.wgl.GetPixelFormatAttribivARB(window->context.wgl.dc, in getPixelFormatAttrib()
65 if (_glfw.wgl.ARB_pixel_format) in choosePixelFormat()
87 if (_glfw.wgl.ARB_pixel_format) in choosePixelFormat()
129 if (_glfw.wgl.ARB_multisample) in choosePixelFormat()
132 if (_glfw.wgl.ARB_framebuffer_sRGB || in choosePixelFormat()
133 _glfw.wgl.EXT_framebuffer_sRGB) in choosePixelFormat()
283 if (_glfw.wgl.EXT_swap_control) in swapIntervalWGL()
284 _glfw.wgl.SwapIntervalEXT(interval); in swapIntervalWGL()
291 if (_glfw.wgl.GetExtensionsStringEXT) in extensionSupportedWGL()
[all …]
Dlinux_joystick.c58 if (!_glfw.linux_js.js[joy].present) in openJoystickDevice()
61 if (strcmp(_glfw.linux_js.js[joy].path, path) == 0) in openJoystickDevice()
67 if (!_glfw.linux_js.js[joy].present) in openJoystickDevice()
90 js = _glfw.linux_js.js + joy; in openJoystickDevice()
137 _glfwInputJoystickChange(js - _glfw.linux_js.js, in pollJoystickEvents()
181 _glfw.linux_js.inotify = inotify_init1(IN_NONBLOCK | IN_CLOEXEC); in _glfwInitJoysticksLinux()
182 if (_glfw.linux_js.inotify == -1) in _glfwInitJoysticksLinux()
193 _glfw.linux_js.watch = inotify_add_watch(_glfw.linux_js.inotify, in _glfwInitJoysticksLinux()
196 if (_glfw.linux_js.watch == -1) in _glfwInitJoysticksLinux()
205 if (regcomp(&_glfw.linux_js.regex, "^js[0-9]\\+$", 0) != 0) in _glfwInitJoysticksLinux()
[all …]
Dwindow.c143 fbconfig = _glfw.hints.framebuffer; in glfwCreateWindow()
144 ctxconfig = _glfw.hints.context; in glfwCreateWindow()
145 wndconfig = _glfw.hints.window; in glfwCreateWindow()
166 window->next = _glfw.windowListHead; in glfwCreateWindow()
167 _glfw.windowListHead = window; in glfwCreateWindow()
174 window->videoMode.refreshRate = _glfw.hints.refreshRate; in glfwCreateWindow()
236 memset(&_glfw.hints, 0, sizeof(_glfw.hints)); in glfwDefaultWindowHints()
239 _glfw.hints.context.client = GLFW_OPENGL_API; in glfwDefaultWindowHints()
240 _glfw.hints.context.source = GLFW_NATIVE_CONTEXT_API; in glfwDefaultWindowHints()
241 _glfw.hints.context.major = 1; in glfwDefaultWindowHints()
[all …]
Degl_context.h135 #define eglGetConfigAttrib _glfw.egl.GetConfigAttrib
136 #define eglGetConfigs _glfw.egl.GetConfigs
137 #define eglGetDisplay _glfw.egl.GetDisplay
138 #define eglGetError _glfw.egl.GetError
139 #define eglInitialize _glfw.egl.Initialize
140 #define eglTerminate _glfw.egl.Terminate
141 #define eglBindAPI _glfw.egl.BindAPI
142 #define eglCreateContext _glfw.egl.CreateContext
143 #define eglDestroySurface _glfw.egl.DestroySurface
144 #define eglDestroyContext _glfw.egl.DestroyContext
[all …]
Dglx_context.h97 #define glXGetFBConfigs _glfw.glx.GetFBConfigs
98 #define glXGetFBConfigAttrib _glfw.glx.GetFBConfigAttrib
99 #define glXGetClientString _glfw.glx.GetClientString
100 #define glXQueryExtension _glfw.glx.QueryExtension
101 #define glXQueryVersion _glfw.glx.QueryVersion
102 #define glXDestroyContext _glfw.glx.DestroyContext
103 #define glXMakeCurrent _glfw.glx.MakeCurrent
104 #define glXSwapBuffers _glfw.glx.SwapBuffers
105 #define glXQueryExtensionsString _glfw.glx.QueryExtensionsString
106 #define glXCreateNewContext _glfw.glx.CreateNewContext
[all …]
Dmonitor.c91 int i, j, monitorCount = _glfw.monitorCount; in _glfwInputMonitorChange()
92 _GLFWmonitor** monitors = _glfw.monitors; in _glfwInputMonitorChange()
94 _glfw.monitors = _glfwPlatformGetMonitors(&_glfw.monitorCount); in _glfwInputMonitorChange()
98 for (i = 0; i < _glfw.monitorCount; i++) in _glfwInputMonitorChange()
102 if (_glfwPlatformIsSameMonitor(_glfw.monitors[i], monitors[j])) in _glfwInputMonitorChange()
104 _glfwFreeMonitor(_glfw.monitors[i]); in _glfwInputMonitorChange()
105 _glfw.monitors[i] = monitors[j]; in _glfwInputMonitorChange()
117 for (j = 0; j < _glfw.monitorCount; j++) in _glfwInputMonitorChange()
119 if (monitors[i] == _glfw.monitors[j]) in _glfwInputMonitorChange()
123 if (j < _glfw.monitorCount) in _glfwInputMonitorChange()
[all …]
Dwin32_tls.c37 _glfw.win32_tls.context = TlsAlloc(); in _glfwInitThreadLocalStorageWin32()
38 if (_glfw.win32_tls.context == TLS_OUT_OF_INDEXES) in _glfwInitThreadLocalStorageWin32()
45 _glfw.win32_tls.allocated = GLFW_TRUE; in _glfwInitThreadLocalStorageWin32()
51 if (_glfw.win32_tls.allocated) in _glfwTerminateThreadLocalStorageWin32()
52 TlsFree(_glfw.win32_tls.context); in _glfwTerminateThreadLocalStorageWin32()
62 TlsSetValue(_glfw.win32_tls.context, context); in _glfwPlatformSetCurrentContext()
67 return TlsGetValue(_glfw.win32_tls.context); in _glfwPlatformGetCurrentContext()
Dmir_window.c66 pthread_mutex_lock(&_glfw.mir.event_mutex); in enqueueEvent()
69 TAILQ_INSERT_TAIL(&_glfw.mir.event_queue->head, new_node, entries); in enqueueEvent()
71 pthread_cond_signal(&_glfw.mir.event_cond); in enqueueEvent()
73 pthread_mutex_unlock(&_glfw.mir.event_mutex); in enqueueEvent()
80 pthread_mutex_lock(&_glfw.mir.event_mutex); in dequeueEvent()
87 pthread_mutex_unlock(&_glfw.mir.event_mutex); in dequeueEvent()
100 mir_connection_get_available_surface_formats(_glfw.mir.connection, formats, in findValidPixelFormat()
135 if (key < sizeof(_glfw.mir.publicKeys) / sizeof(_glfw.mir.publicKeys[0])) in toGLFWKeyCode()
136 return _glfw.mir.publicKeys[key]; in toGLFWKeyCode()
290 spec = mir_connection_create_spec_for_normal_surface(_glfw.mir.connection, in createSurface()
[all …]
Dposix_tls.c37 if (pthread_key_create(&_glfw.posix_tls.context, NULL) != 0) in _glfwInitThreadLocalStoragePOSIX()
44 _glfw.posix_tls.allocated = GLFW_TRUE; in _glfwInitThreadLocalStoragePOSIX()
50 if (_glfw.posix_tls.allocated) in _glfwTerminateThreadLocalStoragePOSIX()
51 pthread_key_delete(_glfw.posix_tls.context); in _glfwTerminateThreadLocalStoragePOSIX()
61 pthread_setspecific(_glfw.posix_tls.context, context); in _glfwPlatformSetCurrentContext()
66 return pthread_getspecific(_glfw.posix_tls.context); in _glfwPlatformGetCurrentContext()
Dwin32_time.c43 _glfw.win32_time.hasPC = GLFW_TRUE; in _glfwInitTimerWin32()
44 _glfw.win32_time.frequency = frequency; in _glfwInitTimerWin32()
48 _glfw.win32_time.hasPC = GLFW_FALSE; in _glfwInitTimerWin32()
49 _glfw.win32_time.frequency = 1000; in _glfwInitTimerWin32()
60 if (_glfw.win32_time.hasPC) in _glfwPlatformGetTimerValue()
72 return _glfw.win32_time.frequency; in _glfwPlatformGetTimerFrequency()
Dwl_monitor.c135 output = wl_registry_bind(_glfw.wl.registry, in _glfwAddOutputWayland()
153 if (_glfw.wl.monitorsCount + 1 >= _glfw.wl.monitorsSize) in _glfwAddOutputWayland()
155 _GLFWmonitor** monitors = _glfw.wl.monitors; in _glfwAddOutputWayland()
156 int size = _glfw.wl.monitorsSize * 2; in _glfwAddOutputWayland()
160 _glfw.wl.monitors = monitors; in _glfwAddOutputWayland()
161 _glfw.wl.monitorsSize = size; in _glfwAddOutputWayland()
164 _glfw.wl.monitors[_glfw.wl.monitorsCount++] = monitor; in _glfwAddOutputWayland()
176 int i, monitorsCount = _glfw.wl.monitorsCount; in _glfwPlatformGetMonitors()
178 if (_glfw.wl.monitorsCount == 0) in _glfwPlatformGetMonitors()
185 _GLFWmonitor* origMonitor = _glfw.wl.monitors[i]; in _glfwPlatformGetMonitors()
[all …]
Dwl_window.c108 if (_glfw.wl.wl_compositor_version < 3) in checkScaleChange()
182 region = wl_compositor_create_region(_glfw.wl.compositor); in setOpaqueRegion()
195 window->wl.surface = wl_compositor_create_surface(_glfw.wl.compositor); in createSurface()
223 window->wl.shell_surface = wl_shell_get_shell_surface(_glfw.wl.shell, in createShellSurface()
270 struct wl_display* display = _glfw.wl.display; in handleEvents()
283 _GLFWwindow* window = _glfw.windowListHead; in handleEvents()
429 if (window == _glfw.wl.pointerFocus) in _glfwPlatformDestroyWindow()
431 _glfw.wl.pointerFocus = NULL; in _glfwPlatformDestroyWindow()
434 if (window == _glfw.wl.keyboardFocus) in _glfwPlatformDestroyWindow()
436 _glfw.wl.keyboardFocus = NULL; in _glfwPlatformDestroyWindow()
[all …]
Dposix_time.c47 _glfw.posix_time.monotonic = GLFW_TRUE; in _glfwInitTimerPOSIX()
48 _glfw.posix_time.frequency = 1000000000; in _glfwInitTimerPOSIX()
53 _glfw.posix_time.monotonic = GLFW_FALSE; in _glfwInitTimerPOSIX()
54 _glfw.posix_time.frequency = 1000000; in _glfwInitTimerPOSIX()
66 if (_glfw.posix_time.monotonic) in _glfwPlatformGetTimerValue()
83 return _glfw.posix_time.frequency; in _glfwPlatformGetTimerFrequency()
Dwin32_joystick.c255 _glfwInputJoystickChange((int) (js - _glfw.win32_js), GLFW_DISCONNECTED); in closeJoystick()
344 if (memcmp(&_glfw.win32_js[joy].guid, &di->guidInstance, sizeof(GUID)) == 0) in deviceCallback()
350 if (!_glfw.win32_js[joy].present) in deviceCallback()
360 if (FAILED(IDirectInput8_CreateDevice(_glfw.win32.dinput8.api, in deviceCallback()
429 js = _glfw.win32_js + joy; in deviceCallback()
456 if (_glfw.win32_js[joy].present && in openXinputDevice()
457 _glfw.win32_js[joy].device == NULL && in openXinputDevice()
458 _glfw.win32_js[joy].index == index) in openXinputDevice()
466 if (!_glfw.win32_js[joy].present) in openXinputDevice()
476 js = _glfw.win32_js + joy; in openXinputDevice()
[all …]

12