Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.ada > #49462

Re: GtkAda.Image

From "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Newsgroups comp.lang.ada
Subject Re: GtkAda.Image
Date 2021-09-09 18:03 +0200
Organization Aioe.org NNTP Server
Message-ID <shdb7s$1frc$1@gioia.aioe.org> (permalink)
References (1 earlier) <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>

Show all headers | View raw


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

Back to comp.lang.ada | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

GtkAda.Image AdaMagica <christ-usch.grein@t-online.de> - 2021-09-01 01:42 -0700
  Re: GtkAda.Image "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> - 2021-09-01 11:02 +0200
    Re: GtkAda.Image AdaMagica <christ-usch.grein@t-online.de> - 2021-09-02 11:16 -0700
      Re: GtkAda.Image "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> - 2021-09-02 22:10 +0200
        Re: GtkAda.Image AdaMagica <christ-usch.grein@t-online.de> - 2021-09-03 00:32 -0700
          Re: GtkAda.Image AdaMagica <christ-usch.grein@t-online.de> - 2021-09-09 08:31 -0700
            Re: GtkAda.Image "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> - 2021-09-09 18:03 +0200
              Re: GtkAda.Image AdaMagica <christ-usch.grein@t-online.de> - 2021-09-11 06:35 -0700

csiph-web