File : klokka_gui.ads
----------------------------------------------------------------------------
-- Klokka --
-- Copyright (C) 2002 --
-- Preben Randhol --
-- License: Gnat Modified GNU Public License --
-- --
-- This program is free software; you can redistribute it and/or --
-- modify it under the terms of the GNU General Public License as --
-- published by the Free Software Foundation; either version 2 of the --
-- License, or (at your option) any later version. --
-- --
-- This program is distributed in the hope that it will be useful, --
-- but WITHOUT ANY WARRANTY; without even the implied warranty of --
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --
-- General Public License for more details. --
-- --
-- You should have received a copy of the GNU General Public License --
-- along with this program; if not, write to the Free Software --
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA --
-- 02111-1307, USA. --
-- --
-- As a special exception, if other files instantiate generics from --
-- this unit, or you link this unit with other files to produce an --
-- executable, this unit does not by itself cause the resulting --
-- executable to be covered by the GNU General Public License. This --
-- exception does not however invalidate any other reasons why the --
-- executable file might be covered by the GNU Public License. --
-- --
----------------------------------------------------------------------------
with Gtk.Window; use Gtk.Window;
with Gtk.Box; use Gtk.Box;
with Gtk.Drawing_Area; use Gtk.Drawing_Area;
with Gdk.Color; use Gdk.Color;
with Gdk.Pixmap; use Gdk.Pixmap;
with Gdk.GC; use Gdk.GC;
with Gdk.Window; use Gdk.Window;
with Ada.Numerics.Generic_Elementary_Functions;
package Klokka_Gui is
package Math is
new Ada.Numerics.Generic_Elementary_Functions
(Float_Type => Float);
use Math;
type Window_Record is new Gtk_Window_Record with record
Base_Vbox : Gtk_Vbox;
Drawing_Area : Gtk_Drawing_Area;
Clock_GC : Gdk_GC;
Pixmap : Gdk_Pixmap;
Pixmap_Buffer : Gdk_Pixmap;
Background_Pixmap : Gdk_Pixmap;
Draw_Window : Gdk_Window;
Red_Color : Gdk_Color;
Light_Grey_Color : Gdk_Color;
Grey_Color : Gdk_Color;
end record;
type Window_Access is access all Window_Record'Class;
procedure Gtk_New (Window : out Window_Access);
procedure Initialize (Window : access Window_Record'Class);
procedure Clock_Init (Window : access Window_Record'Class);
procedure Draw_Clock;
procedure Update_Clock;
procedure Make;
private
Window : Window_Access;
end Klokka_Gui;