From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: David Pirotte Newsgroups: gmane.lisp.guile.user Subject: Re: GNU G-Golf 0.8.0-rc-3 available for testing Date: Mon, 6 May 2024 22:39:03 -0300 Message-ID: <20240506223903.4651070a@tintin> References: <20240417025615.0b6c50f5@tintin> <871q73vcz4.fsf@pelzflorian.de> <20240418192132.245200a9@tintin> <87cyql1e56.fsf@pelzflorian.de> <20240420015158.50031f08@tintin> <877cgepwm1.fsf@pelzflorian.de> <20240430215102.2f6f74b7@tintin> <87r0em7xpk.fsf@pelzflorian.de> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/4xtmQ88IFVLVM=556x1OViH"; protocol="application/pgp-signature"; micalg=pgp-sha512 Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3341"; mail-complaints-to="usenet@ciao.gmane.io" Cc: guile-user To: "pelzflorian (Florian Pelz)" Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Tue May 07 03:39:57 2024 Return-path: Envelope-to: guile-user@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1s49oD-0000dX-CS for guile-user@m.gmane-mx.org; Tue, 07 May 2024 03:39:57 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s49np-0001sQ-Vw; Mon, 06 May 2024 21:39:34 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s49nd-0001rg-RM for guile-user@gnu.org; Mon, 06 May 2024 21:39:23 -0400 Original-Received: from mail.all2all.org ([79.99.200.14] helo=moses.all2all.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s49nb-0002Em-IL for guile-user@gnu.org; Mon, 06 May 2024 21:39:21 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by moses.all2all.org (Postfix) with ESMTP id 02E1767C007A; Tue, 7 May 2024 03:39:13 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at moses.all2all.org Original-Received: from moses.all2all.org ([127.0.0.1]) by localhost (moses.all2all.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cIPidm1ZGxth; Tue, 7 May 2024 03:39:12 +0200 (CEST) Original-Received: from tintin (unknown [168.227.187.176]) by moses.all2all.org (Postfix) with ESMTPSA id EE31A67C0074; Tue, 7 May 2024 03:39:10 +0200 (CEST) In-Reply-To: <87r0em7xpk.fsf@pelzflorian.de> X-Mailer: Claws Mail 4.2.0 (GTK 3.24.41; x86_64-pc-linux-gnu) Received-SPF: pass client-ip=79.99.200.14; envelope-from=david@altosw.be; helo=moses.all2all.org X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.user:19603 Archived-At: --Sig_/4xtmQ88IFVLVM=556x1OViH Content-Type: multipart/mixed; boundary="MP_/3Hb5YTPa0M8_fUXjJO3lx8A" --MP_/3Hb5YTPa0M8_fUXjJO3lx8A Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi Florian, > ... > pygobject GTK3 examples are working. I will experiment and try to > write Vala/C code that breaks now. I thought they had Gtk-4 examples as well. But anyway, I cooked a pygobject version of this drawing-widget example, attached. Could you: install pygobject [ run its test-suite ? - it used to fail, in Guix Drop this example somewhere: chmod a+x drawing-widget.py ./drawing-widget.py Thanks, David --MP_/3Hb5YTPa0M8_fUXjJO3lx8A Content-Type: text/x-python Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename=drawing-widget.py #!/usr/bin/env python3 # -*- mode: python; coding: utf-8 -*- =20 import gi gi.require_version("Gtk", "4.0") =20 from gi.repository import Gtk, Gdk, Graphene =20 class DrawingWidget(Gtk.Widget): def do_snapshot(self, snapshot): width =3D self.get_width() / 2 height =3D self.get_height() / 2 color =3D Gdk.RGBA() =20 color.parse("rgba(237, 20, 20, 1.0)") snapshot.append_color( color, # Gdk.RGBA(red=3D0.18, green=3D0.8, blue=3D0.44, alpha=3D1.0), Graphene.Rect.alloc().init(0, 0, width, height) ) =20 color.parse("rgba(46, 204, 112, 1.0)") snapshot.append_color( color, # Gdk.RGBA(red=3D0.18, green=3D0.8, blue=3D0.44, alpha=3D1.0), Graphene.Rect.alloc().init(width, 0, width, height) ) =20 color.parse("rgba(252, 189, 74, 1.0)") snapshot.append_color( color, # Gdk.RGBA(red=3D0.18, green=3D0.8, blue=3D0.44, alpha=3D1.0), Graphene.Rect.alloc().init(0, height, width, height) ) =20 color.parse("rgba(41, 127, 186, 1.0)") snapshot.append_color( color, # Gdk.RGBA(red=3D0.18, green=3D0.8, blue=3D0.44, alpha=3D1.0), Graphene.Rect.alloc().init(width, height, width, height) ) def on_activate(app): window =3D Gtk.ApplicationWindow( title=3D"Drawing Widget", default_width=3D320, default_height=3D320, application=3Dapp, child=3DDrawingWidget(hexpand=3DTrue, vexpand=3DTrue) ) window.present() =20 app =3D Gtk.Application(application_id=3D'com.example.App') app.connect('activate', on_activate) app.run(None) --MP_/3Hb5YTPa0M8_fUXjJO3lx8A-- --Sig_/4xtmQ88IFVLVM=556x1OViH Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEhCJlRZtBM3furJHe83T9k6MFetcFAmY5hjcACgkQ83T9k6MF etfzawf/YBccg4frIm4uswaYwxDh3f+pQ8TKu/snLnz/xt1fAvwn0bMdM8PYbnS6 /kqF+6v6miM3LQalc35R4jsATWU8z+UfQD+Yo2PawMAxrHhaiWcSxhXAMX9vz5ax FNLNprBy1e9KQsgVTGQIWQzQ4n/vh+IF41665Yxc2i3gBGiVfKRoV8SS44UhAuvl tbbNCBy1XGl2q2Im/dJPaVGKcRwEUdMQsLuYOMcMgo5tp3GUgaurfLvYGTiXWerU vcIYmCirQaBmS1qxrPzRZXXXyNRYXtQVnDUyHIStzdC0/EEaZ1B/DgxWTp38ctWZ wSVnazfz1/megiXgjaDLfA3U36lMvg== =//1b -----END PGP SIGNATURE----- --Sig_/4xtmQ88IFVLVM=556x1OViH--