Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Linux is addictive, I'm hooked! -- MaDsen Wikholm's .sig


devel / comp.lang.ada / GtkAda.Image

SubjectAuthor
* GtkAda.ImageAdaMagica
`* Re: GtkAda.ImageDmitry A. Kazakov
 `* Re: GtkAda.ImageAdaMagica
  `* Re: GtkAda.ImageDmitry A. Kazakov
   `* Re: GtkAda.ImageAdaMagica
    `* Re: GtkAda.ImageAdaMagica
     `* Re: GtkAda.ImageDmitry A. Kazakov
      `- Re: GtkAda.ImageAdaMagica

1
GtkAda.Image

<2fee8bdc-8803-4ca4-8633-57a41b26b761n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5770&group=comp.lang.ada#5770

  copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:a05:620a:2298:: with SMTP id o24mr7195585qkh.235.1630485753599;
Wed, 01 Sep 2021 01:42:33 -0700 (PDT)
X-Received: by 2002:a25:582:: with SMTP id 124mr35427795ybf.462.1630485753425;
Wed, 01 Sep 2021 01:42:33 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.ada
Date: Wed, 1 Sep 2021 01:42:33 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=94.31.103.138; posting-account=rmHyLAoAAADSQmMWJF0a_815Fdd96RDf
NNTP-Posting-Host: 94.31.103.138
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <2fee8bdc-8803-4ca4-8633-57a41b26b761n@googlegroups.com>
Subject: GtkAda.Image
From: christ-u...@t-online.de (AdaMagica)
Injection-Date: Wed, 01 Sep 2021 08:42:33 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 1
 by: AdaMagica - Wed, 1 Sep 2021 08:42 UTC

Calling Gtk.Image.Gtk_New (Lady, "Ada_9X.bmp"); with a nonexisting file does not report any problem. It just creates a tiny placeholder.
Is there a way to get a warning in this case? The GtkAda_RM is silent on this.

Re: GtkAda.Image

<sgnfie$889$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5771&group=comp.lang.ada#5771

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!aioe.org!Hx95GBhnJb0Xc8StPhH8AA.user.46.165.242.91.POSTED!not-for-mail
From: mail...@dmitry-kazakov.de (Dmitry A. Kazakov)
Newsgroups: comp.lang.ada
Subject: Re: GtkAda.Image
Date: Wed, 1 Sep 2021 11:02:06 +0200
Organization: Aioe.org NNTP Server
Message-ID: <sgnfie$889$1@gioia.aioe.org>
References: <2fee8bdc-8803-4ca4-8633-57a41b26b761n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="8457"; posting-host="Hx95GBhnJb0Xc8StPhH8AA.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.13.0
Content-Language: en-US
X-Notice: Filtered by postfilter v. 0.9.2
 by: Dmitry A. Kazakov - Wed, 1 Sep 2021 09:02 UTC

On 2021-09-01 10:42, AdaMagica wrote:
> Calling Gtk.Image.Gtk_New (Lady, "Ada_9X.bmp"); with a nonexisting file does not report any problem. It just creates a tiny placeholder.
> Is there a way to get a warning in this case? The GtkAda_RM is silent on this.

"...If the file isn't found or can't be loaded, the resulting
Gtk.Image.Gtk_Image will display a "broken image" icon. This function
never returns null, it always returns a valid Gtk.Image.Gtk_Image widget..."

Embed Ada_9X.bmp into your GtkAda program. It will always be there, no
need to care about shipping the image file with your program.

--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de

Re: GtkAda.Image

<540ef7e6-4a3e-49e4-ae25-c9a0ee57985en@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5786&group=comp.lang.ada#5786

  copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:a05:622a:394:: with SMTP id j20mr4341509qtx.196.1630606571248;
Thu, 02 Sep 2021 11:16:11 -0700 (PDT)
X-Received: by 2002:a25:ea51:: with SMTP id o17mr6745408ybe.253.1630606570925;
Thu, 02 Sep 2021 11:16:10 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.ada
Date: Thu, 2 Sep 2021 11:16:10 -0700 (PDT)
In-Reply-To: <sgnfie$889$1@gioia.aioe.org>
Injection-Info: google-groups.googlegroups.com; posting-host=94.31.103.138; posting-account=rmHyLAoAAADSQmMWJF0a_815Fdd96RDf
NNTP-Posting-Host: 94.31.103.138
References: <2fee8bdc-8803-4ca4-8633-57a41b26b761n@googlegroups.com> <sgnfie$889$1@gioia.aioe.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <540ef7e6-4a3e-49e4-ae25-c9a0ee57985en@googlegroups.com>
Subject: Re: GtkAda.Image
From: christ-u...@t-online.de (AdaMagica)
Injection-Date: Thu, 02 Sep 2021 18:16:11 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 4
 by: AdaMagica - Thu, 2 Sep 2021 18:16 UTC

> Embed Ada_9X.bmp into your GtkAda program. It will always be there, no
> need to care about shipping the image file with your program.

Tnanks, Dmitry, I thought about this but do not know how to do this.
Christoph

Re: GtkAda.Image

<sgrb32$646$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5788&group=comp.lang.ada#5788

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!aioe.org!x6YkKUCkj2qHLwbKnVEeag.user.46.165.242.91.POSTED!not-for-mail
From: mail...@dmitry-kazakov.de (Dmitry A. Kazakov)
Newsgroups: comp.lang.ada
Subject: Re: GtkAda.Image
Date: Thu, 2 Sep 2021 22:10:10 +0200
Organization: Aioe.org NNTP Server
Message-ID: <sgrb32$646$1@gioia.aioe.org>
References: <2fee8bdc-8803-4ca4-8633-57a41b26b761n@googlegroups.com>
<sgnfie$889$1@gioia.aioe.org>
<540ef7e6-4a3e-49e4-ae25-c9a0ee57985en@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="6278"; posting-host="x6YkKUCkj2qHLwbKnVEeag.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.13.0
Content-Language: en-US
X-Notice: Filtered by postfilter v. 0.9.2
 by: Dmitry A. Kazakov - Thu, 2 Sep 2021 20:10 UTC

On 2021-09-02 20:16, AdaMagica wrote:
>> Embed Ada_9X.bmp into your GtkAda program. It will always be there, no
>> need to care about shipping the image file with your program.
>
> Tnanks, Dmitry, I thought about this but do not know how to do this.

I have a small Ada utility program converting an XPM image to Ada
packages. E.g. open BMP in GIMP and export it as XPM.

http://www.dmitry-kazakov.de/ada/gtkada_contributions.htm#3

--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de

Re: GtkAda.Image

<1cc1fc02-3ce5-4756-ae43-78c3110a2bden@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5793&group=comp.lang.ada#5793

  copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:ae9:f44c:: with SMTP id z12mr2110251qkl.433.1630654343477;
Fri, 03 Sep 2021 00:32:23 -0700 (PDT)
X-Received: by 2002:a25:1346:: with SMTP id 67mr3146107ybt.405.1630654343346;
Fri, 03 Sep 2021 00:32:23 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.ada
Date: Fri, 3 Sep 2021 00:32:23 -0700 (PDT)
In-Reply-To: <sgrb32$646$1@gioia.aioe.org>
Injection-Info: google-groups.googlegroups.com; posting-host=94.31.103.138; posting-account=rmHyLAoAAADSQmMWJF0a_815Fdd96RDf
NNTP-Posting-Host: 94.31.103.138
References: <2fee8bdc-8803-4ca4-8633-57a41b26b761n@googlegroups.com>
<sgnfie$889$1@gioia.aioe.org> <540ef7e6-4a3e-49e4-ae25-c9a0ee57985en@googlegroups.com>
<sgrb32$646$1@gioia.aioe.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <1cc1fc02-3ce5-4756-ae43-78c3110a2bden@googlegroups.com>
Subject: Re: GtkAda.Image
From: christ-u...@t-online.de (AdaMagica)
Injection-Date: Fri, 03 Sep 2021 07:32:23 +0000
Content-Type: text/plain; charset="UTF-8"
 by: AdaMagica - Fri, 3 Sep 2021 07:32 UTC

Dmitry A. Kazakov schrieb am Donnerstag, 2. September 2021 um 22:10:13 UTC+2:
> I have a small Ada utility program converting an XPM image to Ada
> packages. E.g. open BMP in GIMP and export it as XPM.

Thanks, I'll try it
Christoph

Re: GtkAda.Image

<03326986-05d8-48fc-9f9e-b19ca5b1fa13n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5858&group=comp.lang.ada#5858

  copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:ac8:6a0c:: with SMTP id t12mr3324391qtr.159.1631201490506;
Thu, 09 Sep 2021 08:31:30 -0700 (PDT)
X-Received: by 2002:a5b:142:: with SMTP id c2mr4777988ybp.425.1631201490295;
Thu, 09 Sep 2021 08:31:30 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.ada
Date: Thu, 9 Sep 2021 08:31:30 -0700 (PDT)
In-Reply-To: <1cc1fc02-3ce5-4756-ae43-78c3110a2bden@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=94.31.101.123; posting-account=rmHyLAoAAADSQmMWJF0a_815Fdd96RDf
NNTP-Posting-Host: 94.31.101.123
References: <2fee8bdc-8803-4ca4-8633-57a41b26b761n@googlegroups.com>
<sgnfie$889$1@gioia.aioe.org> <540ef7e6-4a3e-49e4-ae25-c9a0ee57985en@googlegroups.com>
<sgrb32$646$1@gioia.aioe.org> <1cc1fc02-3ce5-4756-ae43-78c3110a2bden@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <03326986-05d8-48fc-9f9e-b19ca5b1fa13n@googlegroups.com>
Subject: Re: GtkAda.Image
From: christ-u...@t-online.de (AdaMagica)
Injection-Date: Thu, 09 Sep 2021 15:31:30 +0000
Content-Type: text/plain; charset="UTF-8"
 by: AdaMagica - Thu, 9 Sep 2021 15:31 UTC

AdaMagica schrieb am Freitag, 3. September 2021 um 09:32:24 UTC+2:
> Dmitry A. Kazakov schrieb am Donnerstag, 2. September 2021 um 22:10:13 UTC+2:
> > I have a small Ada utility program converting an XPM image to Ada
> > packages. E.g. open BMP in GIMP and export it as XPM.
> Thanks, I'll try it
> Christoph
Dmitry,
I've produced the files Ada_9X_xpm-image.ads/adb .
Problem is: Ada_9X_xpm.adb starts thus:

with Gdk.Pixbuf.Conversions; <-- GNAT complains: file not found
package body Ada_9X_xpm is

Have I overlooked something in your documentation?
Christoph

Re: GtkAda.Image

<shdb7s$1frc$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5859&group=comp.lang.ada#5859

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!aioe.org!x6YkKUCkj2qHLwbKnVEeag.user.46.165.242.91.POSTED!not-for-mail
From: mail...@dmitry-kazakov.de (Dmitry A. Kazakov)
Newsgroups: comp.lang.ada
Subject: Re: GtkAda.Image
Date: Thu, 9 Sep 2021 18:03:09 +0200
Organization: Aioe.org NNTP Server
Message-ID: <shdb7s$1frc$1@gioia.aioe.org>
References: <2fee8bdc-8803-4ca4-8633-57a41b26b761n@googlegroups.com>
<sgnfie$889$1@gioia.aioe.org>
<540ef7e6-4a3e-49e4-ae25-c9a0ee57985en@googlegroups.com>
<sgrb32$646$1@gioia.aioe.org>
<1cc1fc02-3ce5-4756-ae43-78c3110a2bden@googlegroups.com>
<03326986-05d8-48fc-9f9e-b19ca5b1fa13n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="49004"; posting-host="x6YkKUCkj2qHLwbKnVEeag.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.14.0
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-US
 by: Dmitry A. Kazakov - Thu, 9 Sep 2021 16:03 UTC

On 2021-09-09 17:31, AdaMagica wrote:
> AdaMagica schrieb am Freitag, 3. September 2021 um 09:32:24 UTC+2:
>> Dmitry A. Kazakov schrieb am Donnerstag, 2. September 2021 um 22:10:13 UTC+2:
>>> I have a small Ada utility program converting an XPM image to Ada
>>> packages. E.g. open BMP in GIMP and export it as XPM.
>> Thanks, I'll try it
>> Christoph
> Dmitry,
> I've produced the files Ada_9X_xpm-image.ads/adb .
> Problem is: Ada_9X_xpm.adb starts thus:
>
> with Gdk.Pixbuf.Conversions; <-- GNAT complains: file not found
> package body Ada_9X_xpm is
>
> Have I overlooked something in your documentation?

It is a helper package from the GtkAda contributions:

----------------------------------
-- GtkAda 2.14.2 introduced a backward incompatibility by making
-- Gdk_Pixbuf a tagged type rather than plain pointer. This package is
-- provided for backward compatibility of the GtkAda Contributions.
--
-- !!WARNING!! Use only with GtkAda >= 2.14.2
--
with Gdk.Pixbuf; use Gdk.Pixbuf;
with GLib.Object; use GLib.Object;
with System; use System;

with Glib.Properties;
with Gtk.Cell_Renderer_Pixbuf;

package Gdk.Pixbuf.Conversions is
--
-- From_Address -- Ada object creation
--
-- Object - Obtained from a GDK call
--
-- Returns :
--
-- The Ada object
--
function From_Address (Object : Address) return Gdk_Pixbuf
renames Convert;
--
-- To_Address -- Getting C object address
--
-- Object - An Ada object
--
-- Returns :
--
-- The C object's address
--
function To_Address
( Object : access GObject_Record'Class
) return Address renames GLib.Object.Get_Object;
--
-- Set_Pixbuf_Property -- Set pixbuf property
--
procedure Set_Pixbuf_Property
( Object : access GObject_Record'Class;
Name : Glib.Properties.Property_Object :=
Gtk.Cell_Renderer_Pixbuf.Pixbuf_Property;
Value : access GObject_Record'Class
) renames Glib.Properties.Set_Property;

subtype To_Value is Gdk_Pixbuf;

end Gdk.Pixbuf.Conversions;
----------------------------------

--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de

Re: GtkAda.Image

<46deaa48-df36-4d6e-9cf4-e7798dd6ff25n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5883&group=comp.lang.ada#5883

  copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:a0c:f10b:: with SMTP id i11mr2337892qvl.67.1631367309412;
Sat, 11 Sep 2021 06:35:09 -0700 (PDT)
X-Received: by 2002:a5b:142:: with SMTP id c2mr3682670ybp.425.1631367309284;
Sat, 11 Sep 2021 06:35:09 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.ada
Date: Sat, 11 Sep 2021 06:35:08 -0700 (PDT)
In-Reply-To: <shdb7s$1frc$1@gioia.aioe.org>
Injection-Info: google-groups.googlegroups.com; posting-host=94.31.101.123; posting-account=rmHyLAoAAADSQmMWJF0a_815Fdd96RDf
NNTP-Posting-Host: 94.31.101.123
References: <2fee8bdc-8803-4ca4-8633-57a41b26b761n@googlegroups.com>
<sgnfie$889$1@gioia.aioe.org> <540ef7e6-4a3e-49e4-ae25-c9a0ee57985en@googlegroups.com>
<sgrb32$646$1@gioia.aioe.org> <1cc1fc02-3ce5-4756-ae43-78c3110a2bden@googlegroups.com>
<03326986-05d8-48fc-9f9e-b19ca5b1fa13n@googlegroups.com> <shdb7s$1frc$1@gioia.aioe.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <46deaa48-df36-4d6e-9cf4-e7798dd6ff25n@googlegroups.com>
Subject: Re: GtkAda.Image
From: christ-u...@t-online.de (AdaMagica)
Injection-Date: Sat, 11 Sep 2021 13:35:09 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 7
 by: AdaMagica - Sat, 11 Sep 2021 13:35 UTC

Dmitry A. Kazakov schrieb am Donnerstag, 9. September 2021 um 18:03:11 UTC+2:
> It is a helper package from the GtkAda contributions:

I replaced the call of your Gdk.Pixbuf.Conversions.From_Address in the generated file by
the original Gdk.Pixbuf.Convert.

The embedding works fine. Thanks again.
Christoph

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor