From 6d13ebbb8b9854713a5597df71a12f8dd9a36c34 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Fri, 20 May 2016 22:09:35 +0300 Subject: Use pybind11 instead of SWIG --- py/iact.py | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'py/iact.py') diff --git a/py/iact.py b/py/iact.py index 073e4ca..82511c3 100755 --- a/py/iact.py +++ b/py/iact.py @@ -6,6 +6,7 @@ import pykms from time import sleep from math import sin from math import cos +from helpers import * card = pykms.Card() @@ -21,29 +22,22 @@ crtc = conn.get_current_crtc() #crtc.set_mode(conn, fb, mode) i = 0 -for p in card.get_planes(): +for p in card.planes: globals()["plane"+str(i)] = p i=i+1 i = 0 -for c in card.get_crtcs(): +for c in card.crtcs: globals()["crtc"+str(i)] = c i=i+1 -for p in crtc.get_possible_planes(): - if p.plane_type() == 0: +for p in crtc.possible_planes: + if p.plane_type == pykms.PlaneType.Overlay: plane = p break def set_plane(x, y): - crtc.set_plane(plane, fb, x, y, fb.width(), fb.height(), 0, 0, fb.width(), fb.height()) - -def props(o): - o.refresh_props() - map = o.get_prop_map() - for propid in map: - prop = card.get_prop(propid) - print("%-15s %d (%#x)" % (prop.name(), map[propid], map[propid])) + crtc.set_plane(plane, fb, x, y, fb.width, fb.height, 0, 0, fb.width, fb.height) set_plane(0, 0) -- cgit v1.2.3