1----------------------------------------------------------------------- 2-- GtkAda - Ada95 binding for Gtk+/Gnome -- 3-- -- 4-- Copyright (C) 1998-2000 E. Briot, J. Brobecker and A. Charlet -- 5-- Copyright (C) 2000-2001 ACT-Europe -- 6-- -- 7-- This library is free software; you can redistribute it and/or -- 8-- modify it under the terms of the GNU General Public -- 9-- License as published by the Free Software Foundation; either -- 10-- version 2 of the License, or (at your option) any later version. -- 11-- -- 12-- This library is distributed in the hope that it will be useful, -- 13-- but WITHOUT ANY WARRANTY; without even the implied warranty of -- 14-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- 15-- General Public License for more details. -- 16-- -- 17-- You should have received a copy of the GNU General Public -- 18-- License along with this library; if not, write to the -- 19-- Free Software Foundation, Inc., 59 Temple Place - Suite 330, -- 20-- Boston, MA 02111-1307, USA. -- 21-- -- 22-- As a special exception, if other files instantiate generics from -- 23-- this unit, or you link this unit with other files to produce an -- 24-- executable, this unit does not by itself cause the resulting -- 25-- executable to be covered by the GNU General Public License. This -- 26-- exception does not however invalidate any other reasons why the -- 27-- executable file might be covered by the GNU Public License. -- 28----------------------------------------------------------------------- 29 30package body Gdk.Image is 31 32 ------------- 33 -- Gdk_New -- 34 ------------- 35 36 procedure Gdk_New 37 (Image : out Gdk_Image; 38 Image_Type : Gdk_Image_Type; 39 Visual : Gdk.Gdk_Visual; 40 Width : Gint; 41 Height : Gint) 42 is 43 function Internal 44 (Image_Type : Gdk_Image_Type; 45 Visual : Gdk.Gdk_Visual; 46 Width : Gint; 47 Height : Gint) return Gdk_Image; 48 pragma Import (C, Internal, "gdk_image_new"); 49 50 begin 51 Image := Internal (Image_Type, Visual, Width, Height); 52 end Gdk_New; 53 54 --------- 55 -- Get -- 56 --------- 57 58 procedure Get 59 (Image : out Gdk_Image; 60 Drawable : Gdk.Gdk_Drawable; 61 X : Gint; 62 Y : Gint; 63 Width : Gint; 64 Height : Gint) 65 is 66 function Internal 67 (Drawable : Gdk.Gdk_Drawable; 68 X : Gint; 69 Y : Gint; 70 Width : Gint; 71 Height : Gint) return Gdk_Image; 72 pragma Import (C, Internal, "gdk_image_get"); 73 74 begin 75 Image := Internal (Drawable, X, Y, Width, Height); 76 end Get; 77 78end Gdk.Image; 79