mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-22 16:28:19 +02:00
Start work on rendering fonts using FreeType
This commit is contained in:
14
glfw.py
14
glfw.py
@@ -36,6 +36,7 @@
|
||||
|
||||
import os
|
||||
import ctypes.util
|
||||
from collections import namedtuple
|
||||
from ctypes import (Structure, POINTER, CFUNCTYPE, byref, c_char_p, c_int,
|
||||
c_uint, c_double, c_float, c_ushort)
|
||||
|
||||
@@ -580,15 +581,14 @@ def glfwGetMonitorPhysicalSize(monitor):
|
||||
return width.value, height.value
|
||||
|
||||
|
||||
VideoMode = namedtuple('VideoMode', 'width height redBits blueBits greenBits refreshRate')
|
||||
|
||||
|
||||
def glfwGetVideoMode(monitor):
|
||||
_glfw.glfwGetVideoMode.restype = POINTER(GLFWvidmode)
|
||||
c_mode = _glfw.glfwGetVideoMode(monitor)
|
||||
return (c_mode.width,
|
||||
c_mode.height,
|
||||
c_mode.redBits,
|
||||
c_mode.blueBits,
|
||||
c_mode.greenBits,
|
||||
c_mode.refreshRate)
|
||||
c_mode = _glfw.glfwGetVideoMode(monitor).contents
|
||||
return VideoMode(
|
||||
c_mode.width, c_mode.height, c_mode.redBits, c_mode.blueBits, c_mode.greenBits, c_mode.refreshRate)
|
||||
|
||||
|
||||
def GetGammaRamp(monitor):
|
||||
|
||||
Reference in New Issue
Block a user