[Gtkada-wrapper-devel] SF.net SVN: gtkada-wrapper: [16] trunk/src
Brought to you by:
bechir_zalila
From: <bec...@us...> - 2006-11-26 23:58:44
|
Revision: 16 http://svn.sourceforge.net/gtkada-wrapper/?rev=16&view=rev Author: bechir_zalila Date: 2006-11-26 15:58:45 -0800 (Sun, 26 Nov 2006) Log Message: ----------- * Disable debug by default. Minor reformatting Modified Paths: -------------- trunk/src/gtkada_wrapper.adb trunk/src/gtkada_wrapper.ads Modified: trunk/src/gtkada_wrapper.adb =================================================================== --- trunk/src/gtkada_wrapper.adb 2006-11-26 23:48:18 UTC (rev 15) +++ trunk/src/gtkada_wrapper.adb 2006-11-26 23:58:45 UTC (rev 16) @@ -31,11 +31,12 @@ with Protected_Queue; -pragma Debug_Policy (Check); -- 'Ignore' Or 'Check' +pragma Debug_Policy (Ignore); +-- To control the debug message display: 'Ignore' Or 'Check' package body Gtkada_Wrapper is - procedure O (Message : String) renames Ada.Text_IO.Put_Line; + procedure O (Message : String); -- For debugging purpose procedure Quit (Window : access Gtk.Window.Gtk_Window_Record'Class); @@ -856,7 +857,7 @@ procedure Do_Jump_With_Length (Cmd : Command) is begin - pragma Debug (O ("")); + pragma Debug (O ("Do_Jump_With_Length: begin")); Brush_X := Brush_X + Cmd.Distance * Cos (Angle, 360.0); Brush_X := Brush_Y + Cmd.Distance * Sin (Angle, 360.0); @@ -864,7 +865,7 @@ pragma Debug (O ("Changed the virtual brush position to (" & Brush_X'Img & ", " & Brush_Y'Img & ")")); - pragma Debug (O ("")); + pragma Debug (O ("Do_Jump_With_Length: done")); end Do_Jump_With_Length; ------------------- @@ -1101,7 +1102,7 @@ Height - Gint (Y_End)); pragma Debug (O ("Line drawn between" - & "(" & X_Start'Img & ", " & Y_Start'Img & ") and" + & "(" & X_Start'Img & ", " & Y_Start'Img & ") and " & "(" & X_End'Img & ", " & Y_End'Img & ")")); pragma Debug (O ("Draw_Line: done")); end Draw_Line; @@ -1461,9 +1462,9 @@ Cmd := Command_Queue.Dequeue; if Dispatch_Table (Cmd.Action) /= null then - pragma Debug (O ("")); + pragma Debug (O ("Main_Loop: executing command")); Dispatch_Table (Cmd.Action).all (Cmd); - pragma Debug (O ("")); + pragma Debug (O ("Main_Loop: done")); end if; end if; @@ -1487,6 +1488,16 @@ pragma Debug (O ("New_Line : enqueued")); end New_Line; + ------- + -- O -- + ------- + + procedure O (Message : String) is + begin + Ada.Text_IO.Put ("DEBUG: "); + Ada.Text_IO.Put_Line (Message); + end O; + --------- -- Put -- --------- @@ -1547,7 +1558,7 @@ pragma Unreferenced (Window); begin Gtk.Main.Main_Quit; - pragma Debug (O ("")); + pragma Debug (O ("Quit: done")); end Quit; ------------- Modified: trunk/src/gtkada_wrapper.ads =================================================================== --- trunk/src/gtkada_wrapper.ads 2006-11-26 23:48:18 UTC (rev 15) +++ trunk/src/gtkada_wrapper.ads 2006-11-26 23:58:45 UTC (rev 16) @@ -2,7 +2,7 @@ -- Copyright (C) 2006 Bechir Zalila <bec...@en...> -- See COPYING file for license --- This package provides a simplified api to build graphic Ada +-- This package provides a simplified API to build graphic Ada -- applications. Its purpose is to encapsulate the complexity of GTK -- (and GTKAda) and provide a simple way to build graphical Ada -- application for beginner programmers. @@ -59,8 +59,8 @@ -- Create an RGB (Red Green Blue) color. All the given parameter -- are considered modulo 65536, the maximal value of a color -- composant. - -- IMPORTANT NOTE: All custom color must be declared *before* the - -- call to Create_Main_Window + -- IMPORTANT NOTE: All custom colors must be declared + -- *before* the call to Create_Main_Window Black : constant Color_Type; Red : constant Color_Type; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |