1------------------------------------------------------------------------------
2--                  GtkAda - Ada95 binding for Gtk+/Gnome                   --
3--                                                                          --
4--      Copyright (C) 1998-2000 E. Briot, J. Brobecker and A. Charlet       --
5--                     Copyright (C) 1998-2015, AdaCore                     --
6--                                                                          --
7-- This library is free software;  you can redistribute it and/or modify it --
8-- under terms of the  GNU General Public License  as published by the Free --
9-- Software  Foundation;  either version 3,  or (at your  option) any later --
10-- version. This library is distributed in the hope that it will be useful, --
11-- but WITHOUT ANY WARRANTY;  without even the implied warranty of MERCHAN- --
12-- TABILITY or FITNESS FOR A PARTICULAR PURPOSE.                            --
13--                                                                          --
14-- As a special exception under Section 7 of GPL version 3, you are granted --
15-- additional permissions described in the GCC Runtime Library Exception,   --
16-- version 3.1, as published by the Free Software Foundation.               --
17--                                                                          --
18-- You should have received a copy of the GNU General Public License and    --
19-- a copy of the GCC Runtime Library Exception along with this program;     --
20-- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see    --
21-- <http://www.gnu.org/licenses/>.                                          --
22--                                                                          --
23------------------------------------------------------------------------------
24
25with Gtkada.Types; use Gtkada.Types;
26with Interfaces.C.Strings;
27with Interfaces.C;  use Interfaces.C;
28
29package body Gtk.Rc is
30
31   -------------------
32   -- Get_Theme_Dir --
33   -------------------
34
35   function Get_Theme_Dir return String is
36      function Internal return Chars_Ptr;
37      pragma Import (C, Internal, "gtk_rc_get_theme_dir");
38
39      S   : constant Chars_Ptr := Internal;
40      Str : constant String := Strings.Value (S);
41
42   begin
43      g_free (S);
44      return Str;
45   end Get_Theme_Dir;
46
47end Gtk.Rc;
48