gtkada-wrapper-devel Mailing List for GTK Ada Simplified Wrapper (Page 2)
Brought to you by:
bechir_zalila
You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(23) |
Dec
(7) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <bec...@us...> - 2006-11-25 01:59:32
|
Revision: 7 http://svn.sourceforge.net/gtkada-wrapper/?rev=7&view=rev Author: bechir_zalila Date: 2006-11-24 17:59:33 -0800 (Fri, 24 Nov 2006) Log Message: ----------- * Create the build directories when packaging Modified Paths: -------------- trunk/src/Makefile.am Modified: trunk/src/Makefile.am =================================================================== --- trunk/src/Makefile.am 2006-11-25 01:58:11 UTC (rev 6) +++ trunk/src/Makefile.am 2006-11-25 01:59:33 UTC (rev 7) @@ -29,3 +29,8 @@ for f in $(srcdir)/libs/lib*; do \ $(INSTALL) -m 444 $$f $(DESTDIR)$(libdir); \ done + +dist-hook: + mkdir -p $(distdir)/objects + mkdir -p $(distdir)/libs + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bec...@us...> - 2006-11-25 01:58:11
|
Revision: 6 http://svn.sourceforge.net/gtkada-wrapper/?rev=6&view=rev Author: bechir_zalila Date: 2006-11-24 17:58:11 -0800 (Fri, 24 Nov 2006) Log Message: ----------- * Now the stub compiles. Added athe action a dn command types that list the possible user commands. Modified Paths: -------------- trunk/src/Makefile.am trunk/src/gtkada_wrapper.adb trunk/src/gtkada_wrapper.ads Added Paths: ----------- trunk/src/libs/ trunk/src/objects/ Modified: trunk/src/Makefile.am =================================================================== --- trunk/src/Makefile.am 2006-11-25 00:18:45 UTC (rev 5) +++ trunk/src/Makefile.am 2006-11-25 01:58:11 UTC (rev 6) @@ -14,6 +14,9 @@ all-local: $(GNATMAKE) -P $(PROJECT_FILE) $(GNATFLAGS) +clean-local: + $(GNATCLEAN) -P $(PROJECT_FILE) $(GNATFLAGS) + install-data-local: $(INSTALL) -d $(DESTDIR)$(headers_dir) $(INSTALL) -d $(DESTDIR)$(ali_dir) @@ -25,4 +28,4 @@ done for f in $(srcdir)/libs/lib*; do \ $(INSTALL) -m 444 $$f $(DESTDIR)$(libdir); \ - done \ No newline at end of file + done Modified: trunk/src/gtkada_wrapper.adb =================================================================== --- trunk/src/gtkada_wrapper.adb 2006-11-25 00:18:45 UTC (rev 5) +++ trunk/src/gtkada_wrapper.adb 2006-11-25 01:58:11 UTC (rev 6) @@ -1,24 +1,156 @@ +with Unchecked_Deallocation; + package body Gtkada_Wrapper is - ----------------------- - -- Clear_Main_Window -- - ----------------------- + -- The actions the user can do - procedure Clear_Main_Window is + type Action_Kind is + (A_None, + A_Clear_Drawing_Area, + A_Line_Color, + A_Fill_Color, + A_Thickness, + A_Angle, + A_Rotate, + A_Jump_With_Length, + A_Jump_With_End, + A_Line_With_Length, + A_Line_With_End, + A_Line_With_Start_Length, + A_Line_With_Start_End, + A_Spot, + A_Image, + A_Text, + A_Rafresh, + A_Get_Mouse_Pointer, + A_Clear_Text_Area, + A_Put_String, + A_Put_Character, + A_New_Line, + A_Put_Line_String, + A_Put_Line_Character, + A_Get_String, + A_Get_Line_String, + A_Get_Immediate_Character); + + type String_Ptr is access all String; + procedure Free is new Unchecked_Deallocation (String, String_Ptr); + pragma Unreferenced (Free); + + -- The command data + + type Command (Action : Action_Kind) is record + case Action is + when A_None + | A_Clear_Drawing_Area + | A_Rafresh + | A_Clear_Text_Area + | A_Get_String + | A_Get_Line_String + | A_Get_Immediate_Character => + null; + + when A_Line_Color | A_Fill_Color => + Color : Color_Type; + + when A_Thickness => + Thickness : Float; + + when A_Angle | A_Rotate => + Angle : Float; + + when A_Jump_With_End + | A_Line_With_End + | A_Line_With_Start_End + | A_Jump_With_Length + | A_Line_With_Length + | A_Line_With_Start_Length => + + X_Start : Float; + Y_Start : Float; + + case Action is + when A_Jump_With_End + | A_Line_With_End + | A_Line_With_Start_End => + X_End : Float; + Y_End : Float; + + when A_Jump_With_Length + | A_Line_With_Length + | A_Line_With_Start_Length => + Distance : Float; + + when others => + null; + end case; + + when A_Spot => + Diameter : Float; + + when A_Image | A_Text => + X_Justify : X_Justification_Type; + Y_Justify : Y_Justification_Type; + + case Action is + when A_Image => + File_Name : String_Ptr; + Scale : Float; + + when A_Text => + Text : String_Ptr; + Size : Float; + + when others => + null; + end case; + + when A_Get_Mouse_Pointer => + X : Float; + Y : Float; + Button : Natural; + + when A_New_Line => + N_Lines : Positive; + + when A_Put_String | A_Put_Line_String => + Str : String_Ptr; + + when A_Put_Character | A_Put_Line_Character => + Char : Character; + end case; + end record; + pragma Unreferenced (Command); + + ------------------------ + -- Clear_Drawing_Area -- + ------------------------ + + procedure Clear_Drawing_Area is begin null; - end Clear_Main_Window; + end Clear_Drawing_Area; + --------------------- + -- Clear_Text_Area -- + --------------------- + + procedure Clear_Text_Area is + begin + null; + end Clear_Text_Area; + ------------------------ -- Create_Main_Window -- ------------------------ procedure Create_Main_Window - (X_Max : Float := 512.0; - Y_Max : Float := 512.0; - Text_Area : Boolean := False; + (X_Max : Float := 512.0; + Y_Max : Float := 512.0; + Text_Area : Boolean := False; Drawing_Area : Boolean := True) is + pragma Unreferenced (X_Max, Y_Max, Text_Area, Drawing_Area); begin null; end Create_Main_Window; @@ -38,7 +170,7 @@ function Get return String is begin - return Get; + return ""; end Get; --------------- @@ -47,7 +179,7 @@ function Get_Angle return Float is begin - return Get_Angle; + return 0.0; end Get_Angle; -------------------- @@ -56,7 +188,7 @@ function Get_Fill_Color return Color_Type is begin - return Get_Fill_Color; + return Black; end Get_Fill_Color; ------------------- @@ -64,6 +196,7 @@ ------------------- procedure Get_Immediate (Item : out Character) is + pragma Unreferenced (Item); begin null; end Get_Immediate; @@ -74,7 +207,7 @@ function Get_Line return String is begin - return Get_Line; + return ""; end Get_Line; -------------------- @@ -83,7 +216,7 @@ function Get_Line_Color return Color_Type is begin - return Get_Line_Color; + return Black; end Get_Line_Color; ----------------------- @@ -95,6 +228,7 @@ Y : out Float; Button : out Natural) is + pragma Unreferenced (X, Y, Button); begin null; end Get_Mouse_Pointer; @@ -104,6 +238,7 @@ ------------------ procedure Get_Position (X : out Float; Y : out Float) is + pragma Unreferenced (X, Y); begin null; end Get_Position; @@ -114,7 +249,7 @@ function Get_Thickness return Float is begin - return Get_Thickness; + return 0.0; end Get_Thickness; ------------------ @@ -127,6 +262,7 @@ X_Justification : X_Justification_Type := Center; Y_Justification : Y_Justification_Type := Center) is + pragma Unreferenced (File_Name, Scale, X_Justification, Y_Justification); begin null; end Insert_Image; @@ -141,6 +277,7 @@ X_Justification : X_Justification_Type := Center; Y_Justification : Y_Justification_Type := Center) is + pragma Unreferenced (Text, Size, X_Justification, Y_Justification); begin null; end Insert_Text; @@ -150,6 +287,7 @@ ---------- procedure Jump (Distance : Float) is + pragma Unreferenced (Distance); begin null; end Jump; @@ -159,6 +297,7 @@ ---------- procedure Jump (X : Float; Y : Float) is + pragma Unreferenced (X, Y); begin null; end Jump; @@ -168,6 +307,7 @@ ---------- procedure Line (Distance : Float) is + pragma Unreferenced (Distance); begin null; end Line; @@ -177,6 +317,7 @@ ---------- procedure Line (X : Float; Y : Float) is + pragma Unreferenced (X, Y); begin null; end Line; @@ -190,6 +331,7 @@ Y_Start : Float; Distance : Float) is + pragma Unreferenced (X_Start, Y_Start, Distance); begin null; end Line; @@ -204,6 +346,7 @@ X_End : Float; Y_End : Float) is + pragma Unreferenced (X_Start, Y_Start, X_End, Y_End); begin null; end Line; @@ -213,6 +356,7 @@ -------------- procedure New_Line (Spacing : Positive := 1) is + pragma Unreferenced (Spacing); begin null; end New_Line; @@ -222,6 +366,7 @@ --------- procedure Put (Item : String) is + pragma Unreferenced (Item); begin null; end Put; @@ -231,6 +376,7 @@ --------- procedure Put (Item : Character) is + pragma Unreferenced (Item); begin null; end Put; @@ -240,6 +386,7 @@ -------------- procedure Put_Line (Item : String) is + pragma Unreferenced (Item); begin null; end Put_Line; @@ -249,6 +396,7 @@ -------------- procedure Put_Line (Item : Character) is + pragma Unreferenced (Item); begin null; end Put_Line; @@ -268,7 +416,9 @@ function RGB (R : Integer; G : Integer; B : Integer) return Color_Type is begin - return RGB (R, G, B); + return Color_Type'(R => Single_Color (R mod 256), + G => Single_Color (G mod 256), + B => Single_Color (B mod 256)); end RGB; ------------ @@ -276,6 +426,7 @@ ------------ procedure Rotate (Angle : Float) is + pragma Unreferenced (Angle); begin null; end Rotate; @@ -285,6 +436,7 @@ --------------- procedure Set_Angle (Angle : Float) is + pragma Unreferenced (Angle); begin null; end Set_Angle; @@ -294,6 +446,7 @@ -------------------- procedure Set_Fill_Color (C : Color_Type) is + pragma Unreferenced (C); begin null; end Set_Fill_Color; @@ -303,6 +456,7 @@ -------------------- procedure Set_Line_Color (C : Color_Type) is + pragma Unreferenced (C); begin null; end Set_Line_Color; @@ -312,6 +466,7 @@ ------------------ procedure Set_Position (X : Float; Y : Float) is + pragma Unreferenced (X, Y); begin null; end Set_Position; @@ -321,6 +476,7 @@ ------------------- procedure Set_Thickness (T : Float) is + pragma Unreferenced (T); begin null; end Set_Thickness; @@ -330,6 +486,7 @@ ---------- procedure Spot (Radius : Float := 4.0) is + pragma Unreferenced (Radius); begin null; end Spot; Modified: trunk/src/gtkada_wrapper.ads =================================================================== --- trunk/src/gtkada_wrapper.ads 2006-11-25 00:18:45 UTC (rev 5) +++ trunk/src/gtkada_wrapper.ads 2006-11-25 01:58:11 UTC (rev 6) @@ -12,9 +12,9 @@ package Gtkada_Wrapper is procedure Create_Main_Window - (X_Max : Float := 512.0; - Y_Max : Float := 512.0; - Text_Area : Boolean := False; + (X_Max : Float := 512.0; + Y_Max : Float := 512.0; + Text_Area : Boolean := False; Drawing_Area : Boolean := True); -- Creates the main window of the application. X_Max and Y_Max -- represent respectively the width and the height of each one of @@ -23,11 +23,6 @@ -- parts. Note that at least one of these two flags has to be set -- to true. - procedure Clear_Main_Window; - -- Clear the main window. If the drwing area exists, then it will - -- be ``blanked''. If the text area exist then all text will be - -- erased. - procedure Destroy_Main_Window; -- Close and destroy the main window @@ -72,6 +67,9 @@ White : constant Color_Type; -- Predefined colors + procedure Clear_Drawing_Area; + -- If the drwing area exists, then it will be ``blanked'' + procedure Set_Line_Color (C : Color_Type); -- Set the line color of the virtual brush to C @@ -183,6 +181,9 @@ -- Text Area Specific Routines -- --------------------------------- + procedure Clear_Text_Area; + -- If the text area exist then all text will be erased. + procedure Put (Item : String); -- Type the given text on the current cursor position of the text -- area. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bec...@us...> - 2006-11-25 00:18:45
|
Revision: 5 http://svn.sourceforge.net/gtkada-wrapper/?rev=5&view=rev Author: bechir_zalila Date: 2006-11-24 16:18:45 -0800 (Fri, 24 Nov 2006) Log Message: ----------- * Removed the call to a subprogram from the spec it is declared in. Modified Paths: -------------- trunk/src/gtkada_wrapper.ads Modified: trunk/src/gtkada_wrapper.ads =================================================================== --- trunk/src/gtkada_wrapper.ads 2006-11-25 00:05:56 UTC (rev 4) +++ trunk/src/gtkada_wrapper.ads 2006-11-25 00:18:45 UTC (rev 5) @@ -183,21 +183,21 @@ -- Text Area Specific Routines -- --------------------------------- - procedure Put(Item : String); + procedure Put (Item : String); -- Type the given text on the current cursor position of the text -- area. - procedure Put(Item : Character); + procedure Put (Item : Character); -- Same as above but with a character - procedure New_Line(Spacing : Positive := 1); + procedure New_Line (Spacing : Positive := 1); -- Jump to the beginning of the last line of the next 'Spacing' -- lines. - procedure Put_Line(Item : String); + procedure Put_Line (Item : String); -- Equivalent to Put (Item); New_Line; - procedure Put_Line(Item : Character); + procedure Put_Line (Item : Character); -- Equivalent to Put (Item); New_Line; function Get return String; @@ -206,7 +206,7 @@ function Get_Line return String; -- Equivalent to ... := Get; New_Line; - procedure Get_Immediate(Item : out Character); + procedure Get_Immediate (Item : out Character); -- Block until the user press a key. The value of the key is -- stored in Item. The user does not need to press ENTER. @@ -222,18 +222,18 @@ B : Single_Color; end record; - Black : constant Color_Type := RGB (0, 0, 0); - Red : constant Color_Type := RGB (255, 0, 0); - Green : constant Color_Type := RGB (0, 255, 0); - Yellow : constant Color_Type := RGB (255, 255, 0); - Blue : constant Color_Type := RGB (0, 0, 255); - Magenta : constant Color_Type := RGB (255, 0, 255); - Cyan : constant Color_Type := RGB (0, 255, 255); - Dark_Gray : constant Color_Type := RGB (77, 77, 77); - Orange : constant Color_Type := RGB (255, 165, 0); - Pink : constant Color_Type := RGB (255, 192, 203); - Gray : constant Color_Type := RGB (127, 127, 127); - Light_Gray : constant Color_Type := RGB (179, 179, 179); - White : constant Color_Type := RGB (255, 255, 255); + Black : constant Color_Type := (0, 0, 0); + Red : constant Color_Type := (255, 0, 0); + Green : constant Color_Type := (0, 255, 0); + Yellow : constant Color_Type := (255, 255, 0); + Blue : constant Color_Type := (0, 0, 255); + Magenta : constant Color_Type := (255, 0, 255); + Cyan : constant Color_Type := (0, 255, 255); + Dark_Gray : constant Color_Type := (77, 77, 77); + Orange : constant Color_Type := (255, 165, 0); + Pink : constant Color_Type := (255, 192, 203); + Gray : constant Color_Type := (127, 127, 127); + Light_Gray : constant Color_Type := (179, 179, 179); + White : constant Color_Type := (255, 255, 255); end Gtkada_Wrapper; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bec...@us...> - 2006-11-25 00:05:57
|
Revision: 4 http://svn.sourceforge.net/gtkada-wrapper/?rev=4&view=rev Author: bechir_zalila Date: 2006-11-24 16:05:56 -0800 (Fri, 24 Nov 2006) Log Message: ----------- * Adde a stub for the library and for an example directory Modified Paths: -------------- trunk/TODO trunk/configure.ac trunk/src/Makefile.am Added Paths: ----------- trunk/examples/ trunk/examples/Makefile.am trunk/examples/empty_windows/ trunk/examples/empty_windows/Makefile.am trunk/examples/empty_windows/README trunk/src/gtkada_wrapper.adb trunk/src/gtkada_wrapper.ads trunk/src/gtkada_wrapper.gpr Modified: trunk/TODO =================================================================== --- trunk/TODO 2006-11-24 23:18:02 UTC (rev 3) +++ trunk/TODO 2006-11-25 00:05:56 UTC (rev 4) @@ -0,0 +1,9 @@ +/src: + * Complete the code + +/doc: + * Write the documentation + +/: + * Add a projects subdirectory that will contain the project + files that will be installed. Modified: trunk/configure.ac =================================================================== --- trunk/configure.ac 2006-11-24 23:18:02 UTC (rev 3) +++ trunk/configure.ac 2006-11-25 00:05:56 UTC (rev 4) @@ -86,6 +86,8 @@ AC_OUTPUT([ Makefile doc/Makefile + examples/Makefile + examples/empty_windows/Makefile src/Makefile ]) Added: trunk/examples/Makefile.am =================================================================== --- trunk/examples/Makefile.am (rev 0) +++ trunk/examples/Makefile.am 2006-11-25 00:05:56 UTC (rev 4) @@ -0,0 +1 @@ +SRCDIRS=empty_windows \ No newline at end of file Added: trunk/examples/empty_windows/Makefile.am =================================================================== Added: trunk/examples/empty_windows/README =================================================================== --- trunk/examples/empty_windows/README (rev 0) +++ trunk/examples/empty_windows/README 2006-11-25 00:05:56 UTC (rev 4) @@ -0,0 +1,3 @@ +This example test the creation, the display, and the destruction of a +main windows. The main windows is destroyed when the user close it or +clic on it. Modified: trunk/src/Makefile.am =================================================================== --- trunk/src/Makefile.am 2006-11-24 23:18:02 UTC (rev 3) +++ trunk/src/Makefile.am 2006-11-25 00:05:56 UTC (rev 4) @@ -0,0 +1,28 @@ +ADA_SPECS_WITH_BODY = + +ADA_SPECS = $(ADA_SPECS_WITH_BODY) + +ADA_BODIES = $(ADA_SPECS_WITH_BODY:.ads=.adb) + +PROJECT_FILE = gtkada_wrapper.gpr + +EXTRA_DIST = $(PROJECT_FILE) $(ADA_SPECS) $(ADA_BODIES) + +headers_dir = $(includedir)/gtkada_wrapper +ali_dir = $(libdir)/gtkada_wrappe + +all-local: + $(GNATMAKE) -P $(PROJECT_FILE) $(GNATFLAGS) + +install-data-local: + $(INSTALL) -d $(DESTDIR)$(headers_dir) + $(INSTALL) -d $(DESTDIR)$(ali_dir) + for f in $(ADA_SPECS) $(ADA_BODIES); do \ + $(INSTALL) -m 444 $$f $(DESTDIR)$(headers_dir); \ + done; \ + for f in $(srcdir)/libs/*.ali; do \ + $(INSTALL) -m 444 $$f $(DESTDIR)$(ali_dir); \ + done + for f in $(srcdir)/libs/lib*; do \ + $(INSTALL) -m 444 $$f $(DESTDIR)$(libdir); \ + done \ No newline at end of file Added: trunk/src/gtkada_wrapper.adb =================================================================== --- trunk/src/gtkada_wrapper.adb (rev 0) +++ trunk/src/gtkada_wrapper.adb 2006-11-25 00:05:56 UTC (rev 4) @@ -0,0 +1,337 @@ +package body Gtkada_Wrapper is + + ----------------------- + -- Clear_Main_Window -- + ----------------------- + + procedure Clear_Main_Window is + begin + null; + end Clear_Main_Window; + + ------------------------ + -- Create_Main_Window -- + ------------------------ + + procedure Create_Main_Window + (X_Max : Float := 512.0; + Y_Max : Float := 512.0; + Text_Area : Boolean := False; + Drawing_Area : Boolean := True) + is + begin + null; + end Create_Main_Window; + + ------------------------- + -- Destroy_Main_Window -- + ------------------------- + + procedure Destroy_Main_Window is + begin + null; + end Destroy_Main_Window; + + --------- + -- Get -- + --------- + + function Get return String is + begin + return Get; + end Get; + + --------------- + -- Get_Angle -- + --------------- + + function Get_Angle return Float is + begin + return Get_Angle; + end Get_Angle; + + -------------------- + -- Get_Fill_Color -- + -------------------- + + function Get_Fill_Color return Color_Type is + begin + return Get_Fill_Color; + end Get_Fill_Color; + + ------------------- + -- Get_Immediate -- + ------------------- + + procedure Get_Immediate (Item : out Character) is + begin + null; + end Get_Immediate; + + -------------- + -- Get_Line -- + -------------- + + function Get_Line return String is + begin + return Get_Line; + end Get_Line; + + -------------------- + -- Get_Line_Color -- + -------------------- + + function Get_Line_Color return Color_Type is + begin + return Get_Line_Color; + end Get_Line_Color; + + ----------------------- + -- Get_Mouse_Pointer -- + ----------------------- + + procedure Get_Mouse_Pointer + (X : out Float; + Y : out Float; + Button : out Natural) + is + begin + null; + end Get_Mouse_Pointer; + + ------------------ + -- Get_Position -- + ------------------ + + procedure Get_Position (X : out Float; Y : out Float) is + begin + null; + end Get_Position; + + ------------------- + -- Get_Thickness -- + ------------------- + + function Get_Thickness return Float is + begin + return Get_Thickness; + end Get_Thickness; + + ------------------ + -- Insert_Image -- + ------------------ + + procedure Insert_Image + (File_Name : String; + Scale : Float := 1.0; + X_Justification : X_Justification_Type := Center; + Y_Justification : Y_Justification_Type := Center) + is + begin + null; + end Insert_Image; + + ----------------- + -- Insert_Text -- + ----------------- + + procedure Insert_Text + (Text : String; + Size : Float := 10.0; + X_Justification : X_Justification_Type := Center; + Y_Justification : Y_Justification_Type := Center) + is + begin + null; + end Insert_Text; + + ---------- + -- Jump -- + ---------- + + procedure Jump (Distance : Float) is + begin + null; + end Jump; + + ---------- + -- Jump -- + ---------- + + procedure Jump (X : Float; Y : Float) is + begin + null; + end Jump; + + ---------- + -- Line -- + ---------- + + procedure Line (Distance : Float) is + begin + null; + end Line; + + ---------- + -- Line -- + ---------- + + procedure Line (X : Float; Y : Float) is + begin + null; + end Line; + + ---------- + -- Line -- + ---------- + + procedure Line + (X_Start : Float; + Y_Start : Float; + Distance : Float) + is + begin + null; + end Line; + + ---------- + -- Line -- + ---------- + + procedure Line + (X_Start : Float; + Y_Start : Float; + X_End : Float; + Y_End : Float) + is + begin + null; + end Line; + + -------------- + -- New_Line -- + -------------- + + procedure New_Line (Spacing : Positive := 1) is + begin + null; + end New_Line; + + --------- + -- Put -- + --------- + + procedure Put (Item : String) is + begin + null; + end Put; + + --------- + -- Put -- + --------- + + procedure Put (Item : Character) is + begin + null; + end Put; + + -------------- + -- Put_Line -- + -------------- + + procedure Put_Line (Item : String) is + begin + null; + end Put_Line; + + -------------- + -- Put_Line -- + -------------- + + procedure Put_Line (Item : Character) is + begin + null; + end Put_Line; + + ------------- + -- Rafresh -- + ------------- + + procedure Rafresh is + begin + null; + end Rafresh; + + --------- + -- RGB -- + --------- + + function RGB (R : Integer; G : Integer; B : Integer) return Color_Type is + begin + return RGB (R, G, B); + end RGB; + + ------------ + -- Rotate -- + ------------ + + procedure Rotate (Angle : Float) is + begin + null; + end Rotate; + + --------------- + -- Set_Angle -- + --------------- + + procedure Set_Angle (Angle : Float) is + begin + null; + end Set_Angle; + + -------------------- + -- Set_Fill_Color -- + -------------------- + + procedure Set_Fill_Color (C : Color_Type) is + begin + null; + end Set_Fill_Color; + + -------------------- + -- Set_Line_Color -- + -------------------- + + procedure Set_Line_Color (C : Color_Type) is + begin + null; + end Set_Line_Color; + + ------------------ + -- Set_Position -- + ------------------ + + procedure Set_Position (X : Float; Y : Float) is + begin + null; + end Set_Position; + + ------------------- + -- Set_Thickness -- + ------------------- + + procedure Set_Thickness (T : Float) is + begin + null; + end Set_Thickness; + + ---------- + -- Spot -- + ---------- + + procedure Spot (Radius : Float := 4.0) is + begin + null; + end Spot; + +end Gtkada_Wrapper; Property changes on: trunk/src/gtkada_wrapper.adb ___________________________________________________________________ Name: svn:keywords + Id Name: svn:eol-style + native Added: trunk/src/gtkada_wrapper.ads =================================================================== --- trunk/src/gtkada_wrapper.ads (rev 0) +++ trunk/src/gtkada_wrapper.ads 2006-11-25 00:05:56 UTC (rev 4) @@ -0,0 +1,239 @@ +-- $Id$ +-- AUTHOR: Bechir Zalila <bec...@en...> + +-- 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. + +-- This package has been inspired from the Ada TurtleGraphic project +-- available at http://www.eecs.usma.edu/research/ + +package Gtkada_Wrapper is + + procedure Create_Main_Window + (X_Max : Float := 512.0; + Y_Max : Float := 512.0; + Text_Area : Boolean := False; + Drawing_Area : Boolean := True); + -- Creates the main window of the application. X_Max and Y_Max + -- represent respectively the width and the height of each one of + -- the windows parts: the drawing area and the typing area. The + -- flags Text_Area and Drawing_Area control the creation of these + -- parts. Note that at least one of these two flags has to be set + -- to true. + + procedure Clear_Main_Window; + -- Clear the main window. If the drwing area exists, then it will + -- be ``blanked''. If the text area exist then all text will be + -- erased. + + procedure Destroy_Main_Window; + -- Close and destroy the main window + + ------------------------------------ + -- Drawing Area Specific Routines -- + ------------------------------------ + + -- All the drawing is performed using a virtual brush. the brush + -- has the following intrinsic characteristics: + + -- 1 - A position relatively to the lower left corner of the + -- drowing area. This position can be got/set using the Cartesian + -- coordinate system as we as the Polar coordinate system. + + -- 2 - An Orientation relatively to the horizontal orientation and + -- counter clockwise. For the sake of simplicity, all the angles + -- are expressed in 'Degree'. + + -- Its obvious that only one of these characteristics is + -- sufficient to perform all kinds of drawing. However, combining + -- both systems may simplify enormously some complex drawings. + + type Color_Type is private; + -- The color type + + function RGB (R : Integer; G : Integer; B : Integer) return Color_Type; + -- Create an RGB (Red Green Blue) color. All the given parameter + -- are considered modulo 256. + + Black : constant Color_Type; + Red : constant Color_Type; + Green : constant Color_Type; + Yellow : constant Color_Type; + Blue : constant Color_Type; + Magenta : constant Color_Type; + Cyan : constant Color_Type; + Orange : constant Color_Type; + Pink : constant Color_Type; + Dark_Gray : constant Color_Type; + Gray : constant Color_Type; + Light_Gray : constant Color_Type; + White : constant Color_Type; + -- Predefined colors + + procedure Set_Line_Color (C : Color_Type); + -- Set the line color of the virtual brush to C + + function Get_Line_Color return Color_Type; + -- Return the Current line color of the virtual brush + + procedure Set_Fill_Color (C : Color_Type); + -- Set the fill color of the virtual brush to C. The fill + -- color is the color of the inside part of closed drawn forms + -- (circles, square...). + + function Get_Fill_Color return Color_Type; + -- Return the Current fill color of the virtual brush + + procedure Set_Thickness (T : Float); + -- Set the thickness of the virtual brush to T + + function Get_Thickness return Float; + -- Get the current thickness of the virtual brush + + -- FIXME: May be add routines for line style + + procedure Set_Angle (Angle : Float); + -- Set the angle between the horizontal and the virtual brush + -- orientation to 'Angle'. + + function Get_Angle return Float; + -- Return the angle between the horizontal and the virtual brush + -- orientation. + + procedure Rotate (Angle : Float); + -- Modify the virtual brush orientation to + -- Angle+Current_Orientation. + + procedure Set_Position (X : Float; Y : Float); + -- Set the current Cartesian position of the virtual brush to + -- (X,Y). + + procedure Get_Position (X : out Float; Y : out Float); + -- Get the current Cartesian position of the virtual brush + + procedure Jump (Distance : Float); + -- Jump straight forward the given distance in the direction the + -- virtual brush without drawing any line. + + procedure Jump (X : Float; Y : Float); + -- Same as above but using the Cartesian coordinate + + procedure Line (Distance : Float); + -- Jump straight forward the given distance in the direction the + -- virtual brush and draws a line between the start and the end + -- points. The color, style and thickness of the line are + -- specified using the appropriate routines. + + procedure Line (X : Float; Y : Float); + -- Same as above but using the Cartesian coordinate + + procedure Line (X_Start : Float; + Y_Start : Float; + Distance : Float); + -- Same as above but start from (X_Start, Y_Start). At the end of + -- execution, the virtual brush is located at the end of the drwn + -- line. + + procedure Line + (X_Start : Float; + Y_Start : Float; + X_End : Float; + Y_End : Float); + -- Same as above, but with the Cartesian destination. + + procedure Spot (Radius : Float := 4.0); + -- Draw a spot in the current position with the given radius + + type X_Justification_Type is (Left, Center, Right); + type Y_Justification_Type is (Top, Center, Bottom); + procedure Insert_Image + (File_Name : String; + Scale : Float := 1.0; + X_Justification : X_Justification_Type := Center; + Y_Justification : Y_Justification_Type := Center); + -- Draw a graphic justified at the virtual brush's current + -- location. This will draw any graphic that Gtk understands, + -- including JPEG, GIF, BMP, PNG, PBM, TIFF, and perhaps some + -- others. + + procedure Insert_Text + (Text : String; + Size : Float := 10.0; + X_Justification : X_Justification_Type := Center; + Y_Justification : Y_Justification_Type := Center); + -- Draw a text string justified at the virtual brush's current + -- location. The size is expressed in points. + + -- FIXME: Add routines for predefined forms (circle, square...) + + procedure Rafresh; + -- Redraw the drawing area + + procedure Get_Mouse_Pointer + (X : out Float; + Y : out Float; + Button : out Natural); + -- Wait for a mous button action and stores the mouse pointer + -- coordinate in X and Y and the mouse button used to do the + -- action. + + --------------------------------- + -- Text Area Specific Routines -- + --------------------------------- + + procedure Put(Item : String); + -- Type the given text on the current cursor position of the text + -- area. + + procedure Put(Item : Character); + -- Same as above but with a character + + procedure New_Line(Spacing : Positive := 1); + -- Jump to the beginning of the last line of the next 'Spacing' + -- lines. + + procedure Put_Line(Item : String); + -- Equivalent to Put (Item); New_Line; + + procedure Put_Line(Item : Character); + -- Equivalent to Put (Item); New_Line; + + function Get return String; + -- Block until the user types a string followed by pressing ENTER + + function Get_Line return String; + -- Equivalent to ... := Get; New_Line; + + procedure Get_Immediate(Item : out Character); + -- Block until the user press a key. The value of the key is + -- stored in Item. The user does not need to press ENTER. + + -- FIXME: Maybe some I/O function for intergers, floats... + +private + + type Single_Color is mod 256; + + type Color_Type is record + R : Single_Color; + G : Single_Color; + B : Single_Color; + end record; + + Black : constant Color_Type := RGB (0, 0, 0); + Red : constant Color_Type := RGB (255, 0, 0); + Green : constant Color_Type := RGB (0, 255, 0); + Yellow : constant Color_Type := RGB (255, 255, 0); + Blue : constant Color_Type := RGB (0, 0, 255); + Magenta : constant Color_Type := RGB (255, 0, 255); + Cyan : constant Color_Type := RGB (0, 255, 255); + Dark_Gray : constant Color_Type := RGB (77, 77, 77); + Orange : constant Color_Type := RGB (255, 165, 0); + Pink : constant Color_Type := RGB (255, 192, 203); + Gray : constant Color_Type := RGB (127, 127, 127); + Light_Gray : constant Color_Type := RGB (179, 179, 179); + White : constant Color_Type := RGB (255, 255, 255); + +end Gtkada_Wrapper; Property changes on: trunk/src/gtkada_wrapper.ads ___________________________________________________________________ Name: svn:keywords + Id Name: svn:eol-style + native Added: trunk/src/gtkada_wrapper.gpr =================================================================== --- trunk/src/gtkada_wrapper.gpr (rev 0) +++ trunk/src/gtkada_wrapper.gpr 2006-11-25 00:05:56 UTC (rev 4) @@ -0,0 +1,40 @@ +project GTKAda_Wrapper is + for Library_Kind use "static"; + for Source_Dirs use ("."); + for Object_Dir use "objects"; + for Library_Dir use "libs"; + + for Library_Name use "gtkada_wrapper"; + + -- Build options + + type Build_Type is ("release", "debug"); + Build : Build_Type := External ("BUILD", "debug"); + + -- Compiler flags + + package Compiler is + case Build is + when "debug" => + for Default_Switches ("Ada") use + ("-g", "-gnat05", "-gnatfy", "-gnatwae", "-gnatoa", + "-fstack-check", "-gnatg"); + when "release" => + for Default_Switches ("Ada") use + ("-g", "-O2", "-gnat05", "-gnatfy", "-gnatwae", "-gnatpn", + "-gnatg"); + end case; + end Compiler; + + -- Binder options + + package Binder is + case Build is + when "debug" => + for Default_Switches ("Ada") use + ("-E"); + when "release" => + null; + end case; + end Binder; +end GTKAda_Wrapper; \ No newline at end of file Property changes on: trunk/src/gtkada_wrapper.gpr ___________________________________________________________________ Name: svn:keywords + Id Name: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bec...@us...> - 2006-11-24 23:18:06
|
Revision: 3 http://svn.sourceforge.net/gtkada-wrapper/?rev=3&view=rev Author: bechir_zalila Date: 2006-11-24 15:18:02 -0800 (Fri, 24 Nov 2006) Log Message: ----------- * Added some vital documentation. Modified Paths: -------------- trunk/AUTHORS trunk/COPYING trunk/INSTALL trunk/Makefile.am trunk/NEWS trunk/README Modified: trunk/AUTHORS =================================================================== --- trunk/AUTHORS 2006-11-24 22:53:48 UTC (rev 2) +++ trunk/AUTHORS 2006-11-24 23:18:02 UTC (rev 3) @@ -0,0 +1,2 @@ +Bechir Zalila <bec...@us...> + Modified: trunk/COPYING =================================================================== --- trunk/COPYING 2006-11-24 22:53:48 UTC (rev 2) +++ trunk/COPYING 2006-11-24 23:18:02 UTC (rev 3) @@ -0,0 +1,341 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + <signature of Ty Coon>, 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. + Modified: trunk/INSTALL =================================================================== --- trunk/INSTALL 2006-11-24 22:53:48 UTC (rev 2) +++ trunk/INSTALL 2006-11-24 23:18:02 UTC (rev 3) @@ -0,0 +1,38 @@ + --------------------- + -- GTKAda_Wrapper -- + --------------------- + +SYSTEM REQUIREMENTS: +==================== + +1 - GNAT GPL 2006 or higher + +2 - GTKAda 2.8.0 or higher. GTKAda must be installed in the same prefix +as GNAT so that the file gtkada.gpr is located in +<ADA_LIB_PATH>/gnat. This is necessary to be able to put 'with +"gtkada"' in the several project files and to avoid the modification +of the LD_LIBRARY_PATH of the system. + +INSTALLATION: +============= + +1 - ./configure [options] + see ./configure --help for more details + +2 - make + +3 - make install + +USE OF GTKAda-Wrapper: +====================== + +The result of the build is a library installed in the location +provided by the user via the --prefix option of ./configure. By +default the prefix is /usr/local. + +To compile applications using GTKAda_Wrapper, simply create a GNAT +project file for your application an include 'with +"path/to/gtkada_wrapper.gpr"'. If you installed GTKAda_Wrapper in the +same prefix as GNAT, you can omit the full path to gtkada_wrapper.gpr +an simply put 'with "gtkada_wrapper.gpr"' instead. + Modified: trunk/Makefile.am =================================================================== --- trunk/Makefile.am 2006-11-24 22:53:48 UTC (rev 2) +++ trunk/Makefile.am 2006-11-24 23:18:02 UTC (rev 3) @@ -1 +1,5 @@ SUBDIRS=doc src +AUTOMAKE_OPTIONS = no-dependencies +ACLOCAL_AMFLAGS = -I support +CLEANFILES = config-stamp + Modified: trunk/NEWS =================================================================== --- trunk/NEWS 2006-11-24 22:53:48 UTC (rev 2) +++ trunk/NEWS 2006-11-24 23:18:02 UTC (rev 3) @@ -0,0 +1,2 @@ +GTKAda_Wrapper 0.1 (2006-xx-xx): +================================ Modified: trunk/README =================================================================== --- trunk/README 2006-11-24 22:53:48 UTC (rev 2) +++ trunk/README 2006-11-24 23:18:02 UTC (rev 3) @@ -0,0 +1,13 @@ + --------------------- + -- GTKAda_Wrapper -- + --------------------- + +GTKAda wrapper is a very simplified interface to GTKAda. It is +intended to be used by beginner Ada programmers (students at the +beginning of the computer science courses) to easily build graphical +applications. + +To INSTALL GTKAda-Wrapper, see the INSTALL file. + +The documentation of the GTKAda-Wrapper library is located in the doc +directory. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bec...@us...> - 2006-11-24 22:53:48
|
Revision: 2 http://svn.sourceforge.net/gtkada-wrapper/?rev=2&view=rev Author: bechir_zalila Date: 2006-11-24 14:53:48 -0800 (Fri, 24 Nov 2006) Log Message: ----------- * Directory hierarchy an build mechanism Added Paths: ----------- trunk/AUTHORS trunk/COPYING trunk/ChangeLog trunk/INSTALL trunk/Makefile.am trunk/NEWS trunk/README trunk/TODO trunk/configure.ac trunk/doc/ trunk/doc/Makefile.am trunk/src/ trunk/src/Makefile.am trunk/support/ trunk/support/ada.m4 trunk/support/reconfig Added: trunk/AUTHORS =================================================================== Added: trunk/COPYING =================================================================== Added: trunk/ChangeLog =================================================================== Added: trunk/INSTALL =================================================================== Added: trunk/Makefile.am =================================================================== --- trunk/Makefile.am (rev 0) +++ trunk/Makefile.am 2006-11-24 22:53:48 UTC (rev 2) @@ -0,0 +1 @@ +SUBDIRS=doc src Added: trunk/NEWS =================================================================== Added: trunk/README =================================================================== Added: trunk/TODO =================================================================== Added: trunk/configure.ac =================================================================== --- trunk/configure.ac (rev 0) +++ trunk/configure.ac 2006-11-24 22:53:48 UTC (rev 2) @@ -0,0 +1,91 @@ +AC_PREREQ(2.57) +AC_INIT(GTKAda-Wrapper, 0.1, gtk...@li...) +AC_CONFIG_SRCDIR(src) +AC_CONFIG_AUX_DIR(support) + +########################################## +# Initialization. +########################################## + +AC_CANONICAL_SYSTEM +AM_INIT_AUTOMAKE +LIBVERSIONINFO=0:1:0 +AC_SUBST(LIBVERSIONINFO) + +########################################## +# Check fo various programs. +########################################## + +AC_CHECK_PROG(MV, mv, mv) +AC_CHECK_PROG(RM, rm, rm) +AC_CHECK_PROG(CP, cp, cp) +AC_CHECK_PROG(GREP, grep, grep) +AC_PROG_RANLIB +AM_PROG_WORKING_ADA +AC_CHECK_PROG(GNATCLEAN, gnatclean, gnatclean) +AC_EXEEXT + +########################################## +# GTKAda +########################################## + +GTKADA_INCS="" +GTKADA_LIBS="" +GTKADA_FLAGS="" +has_gtkada=no + +AC_MSG_CHECKING([GTKAda]) +if gtkada-config --help 2>&1 | ${GREP} '^Usage.*gtkada-config' > /dev/null 2>&1; then + GTKADA_INCS="`gtkada-config --cflags`" + GTKADA_LIBS="`gtkada-config --libs`" + GTKADA_FLAGS=`gtkada-config` + has_gtkada=yes +else + has_gtkada=no +fi +AC_MSG_RESULT($has_gtkada) +AM_CONDITIONAL(HAS_GTKADA, test x"$has_gtkada" = xyes) + +AC_SUBST(GTKADA_INCS) +AC_SUBST(GTKADA_LIBS) +AC_SUBST(GTKADA_FLAGS) + +########################################## +# Check for maintainer (debug) mode. +########################################## + +GNATFLAGS="" + +define(DEBUG_OPTIONS, [dnl + GNATFLAGS="-XBUILD=debug" + debug=true]) +define(NODEBUG_OPTIONS, [dnl + GNATFLAGS="-XBUILD=release" + debug=false]) + +AC_ARG_ENABLE(debug, +[ --enable-debug Turn on debugging options], +[if [[ "$enableval" = "yes" ]]; then + DEBUG_OPTIONS +else + NODEBUG_OPTIONS +fi], +[NODEBUG_OPTIONS]) + +AC_SUBST(GNATFLAGS) +AM_CONDITIONAL(DEBUG, test x$debug = xtrue) + +########################################## +# Output generated files +########################################## + +dnl Important! One file per line, nothing before +dnl or after except whitespace! This section +dnl is edited automatically by make_distrib. + +AC_OUTPUT([ + Makefile + doc/Makefile + src/Makefile +]) + Added: trunk/doc/Makefile.am =================================================================== Added: trunk/src/Makefile.am =================================================================== Added: trunk/support/ada.m4 =================================================================== --- trunk/support/ada.m4 (rev 0) +++ trunk/support/ada.m4 2006-11-24 22:53:48 UTC (rev 2) @@ -0,0 +1,64 @@ +dnl Ada compiler handling +dnl Adapted from a similar file creted by Samuel Tardieu + +dnl Usage: AM_TRY_ADA(gnatmake, filename, content, pragmas, success, failure) +dnl Compile, bind and link an Ada program and report its success or failure + +AC_DEFUN([AM_TRY_ADA], +[mkdir conftest +cat > conftest/src.ada <<EOF +[$3] +EOF +cat > conftest/gnat.adc <<EOF +[$4] +EOF +ac_try="cd conftest && $GNATCHOP -q src.ada && $1 $2 > /dev/null 2>../conftest.out" +if AC_TRY_EVAL(ac_try); then + ifelse([$5], , :, [rm -rf conftest* + $5]) +else + ifelse([$6], , :, [ rm -rf conftest* + $6]) +fi +rm -f conftest*]) + +dnl Usage: AM_PROG_GNATMAKE +dnl Look for an Ada make + +AC_DEFUN([AM_PROG_GNATMAKE], +[AC_CHECK_PROGS(GNATMAKE, gnatmake gnatgcc adagcc gcc)]) + +dnl Usage: AM_PROG_GNATCHOP +dnl Look for GNATCHOP program + +AC_DEFUN([AM_PROG_GNATCHOP], +[AC_CHECK_PROG(GNATCHOP, gnatchop, gnatchop)]) + +dnl Usage: AM_PROG_GNATCHOP +dnl Look for GNATCHOP program + +AC_DEFUN([AM_PROG_GNATCLEAN], +[AC_CHECK_PROG(GNATCLEAN, gnatclean, gnatclean)]) + +dnl Usage: AM_TRY_ADA(gnatmake, filename, content, pragmas, success, failure) +dnl Compile, bind and link an Ada program and report its success or failure + +dnl Usage: AM_PROG_WORKING_ADA +dnl Try to compile a simple Ada program to test the compiler installation +dnl (especially the standard libraries such as Ada.Text_IO) + +AC_DEFUN([AM_PROG_WORKING_ADA], +[AC_REQUIRE([AM_PROG_GNATMAKE]) +AC_REQUIRE([AM_PROG_GNATCHOP]) +AC_REQUIRE([AM_PROG_GNATCLEAN]) +AC_MSG_CHECKING([if the Ada compiler works]) +AM_TRY_ADA([$GNATMAKE -c],[check.adb], +[with Ada.Text_IO; +procedure Check is +begin + null; +end Check; +], [], [AC_MSG_RESULT(yes)], +[AC_MSG_RESULT(no) +AC_MSG_ERROR([Ada compiler is not working])])]) + Added: trunk/support/reconfig =================================================================== --- trunk/support/reconfig (rev 0) +++ trunk/support/reconfig 2006-11-24 22:53:48 UTC (rev 2) @@ -0,0 +1,12 @@ +#! /bin/sh + +rm -f aclocal.m4 support/libtool.m4 configure + +echo "Running aclocal" +aclocal -I support + +echo "Running autoconf" +autoconf + +echo "Running automake" +automake --add-missing --copy Property changes on: trunk/support/reconfig ___________________________________________________________________ Name: svn:executable + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |