I'm porting a code from PyGtk to PyGI(PyGObject). There is my code:
import gi
gi.require_version('Gtk','2.0')
from gi.repository import Gtk, Gdk, GObject
w, h = 100,100
# pixmap = gtk.gdk.Pixmap(None, w, h, 1)
pixmap = Gdk.Pixmap(None, w, h, 1) # I Change to it and get error
ctx = pixmap.cairo_create()
My error is:
GObject.init() takes exactly 0 arguments (4 given)
... And Then I Change "Gdk.Pixmap(None, w, h, 1)" To "Gdk.Pixmap.new(None, w, h, 1)"I get this error:
TypeError: Argument 0 does not allow None as a value
ThankYou :)