[Gtkada-wrapper-devel] SF.net SVN: gtkada-wrapper: [29] trunk
Brought to you by:
bechir_zalila
From: <bec...@us...> - 2006-12-02 15:17:37
|
Revision: 29 http://svn.sourceforge.net/gtkada-wrapper/?rev=29&view=rev Author: bechir_zalila Date: 2006-12-02 07:17:34 -0800 (Sat, 02 Dec 2006) Log Message: ----------- * (doc/gtkada_wrapper.texi, doc/Makefile.am): Added documentation. * (src/gtkada_wrapper.ads): Typos * (src/Makefile.am, src/gtkada_wrapper_i.gpr): Added an installable project file and fixed some typos in the Makefile. * (examples/Makefile.common): Minor reformatting * (TODO): Updated todo list Modified Paths: -------------- trunk/TODO trunk/doc/Makefile.am trunk/examples/Makefile.common trunk/src/Makefile.am trunk/src/gtkada_wrapper.ads Added Paths: ----------- trunk/doc/gtkada_wrapper.texi trunk/src/gtkada_wrapper_i.gpr Modified: trunk/TODO =================================================================== --- trunk/TODO 2006-12-01 23:16:32 UTC (rev 28) +++ trunk/TODO 2006-12-02 15:17:34 UTC (rev 29) @@ -1,11 +1,8 @@ /src: - * Fix Bug in text insertion + * Fix Bug in text insertion: somtimes the executable crash when + trying to load a font. /doc: - * Write the documentation /: - * Add a projects subdirectory that will contain the project - files that will be installed. /examples: - * Install examples \ No newline at end of file Modified: trunk/doc/Makefile.am =================================================================== --- trunk/doc/Makefile.am 2006-12-01 23:16:32 UTC (rev 28) +++ trunk/doc/Makefile.am 2006-12-02 15:17:34 UTC (rev 29) @@ -0,0 +1,28 @@ +info_TEXINFOS = gtkada_wrapper.texi +gtkada_wrapper_TEXINFOS = gtkada_wrapper.texi + +EXTRA_DIST = gtkada_wrapper.texi + +all-local: gtkada_wrapper.html gtkada_wrapper.pdf + +gtkada_wrapper.html: gtkada_wrapper.texi + $(MAKEINFO) --html gtkada_wrapper.texi -o gtkada_wrapper.html + +gtkada_wrapper.pdf: gtkada_wrapper.texi + $(TEXI2PDF) gtkada_wrapper.texi + +clean-local: + rm -f *.aux *.log *.dvi *.info *.tmp + rm -f *.cp *.pg *.toc *.vr *.fn *.ky *.tp *~ + rm -rf gtkada_wrapper.html gtkada_wrapper.pdf + +dist-hook: all + cp -r gtkada_wrapper.html gtkada_wrapper.pdf $(distdir) + +install-data-local: all + $(INSTALL) -d $(DESTDIR)$(datadir)/doc/gtkada_wrapper + $(INSTALL_DATA) $(srcdir)/gtkada_wrapper.pdf $(DESTDIR)$(datadir)/doc/gtkada_wrapper + $(INSTALL) -d $(DESTDIR)$(datadir)/doc/gtkada_wrapper/gtkada_wrapper.html + for f in $(srcdir)/gtkada_wrapper.html/*.html; do \ + $(INSTALL_DATA) $$f $(DESTDIR)$(datadir)/doc/gtkada_wrapper/gtkada_wrapper.html; \ + done Added: trunk/doc/gtkada_wrapper.texi =================================================================== --- trunk/doc/gtkada_wrapper.texi (rev 0) +++ trunk/doc/gtkada_wrapper.texi 2006-12-02 15:17:34 UTC (rev 29) @@ -0,0 +1,808 @@ +\input texinfo @c -*-texinfo-*- + +@include version.texi + +@setfilename gtkada_wrapper.info +@settitle GTKAda Wrapper: A Simple Ada 2005 Graphic Library +@afourpaper + +@documentlanguage en +@documentencoding UTF-8 + +@c description and copyright + +@copying +Copyright @copyright{2006} @sc{Bechir Zalila} + +@quotation +Permission is granted to make and distribute verbatim copies of this +entire document without royality provided the copyright notice and +this permission are preserved. +@end quotation +@end copying + +@c title page, contents, copyright + +@titlepage +@title GTKAda Wrapper +@subtitle A Simple Ada 2005 Graphic Library +@subtitle for GTKAda Wrapper @value{EDITION}, @value{UPDATED} +@author @sc{Bechir Zalila} +@page +@vskip 0pt plus 1filll +@insertcopying +@end titlepage + +@iftex +@contents +@end iftex + +@c top node + +@ifnottex +@node Top, About This Guide, (dir), (dir) +@top GTKAda Wrapper +@insertcopying +@end ifnottex + +@c Do not indent examples + +@exampleindent 0 + +@menu +* About This Guide:: +* Installation:: +* Using GTKAda Wrapper:: +* Library Description:: +@end menu + +@c ------------------------------------------------------------------- +@node About This Guide, Installation, Top, Top +@unnumbered About This Guide +@c ------------------------------------------------------------------- + +@noindent +This guide describes the use of GTKAda Wrapper, a simplified Ada 2005 +graphic library over GTKAda. This purpose of this library is to help +beginner programmer (CS Students) to build graphical Ada application +without having to address all the complexity of GTK+. + +@c ------------------------------------------------------------------- +@node Installation, Using GTKAda Wrapper, About This Guide, Top +@chapter Installation +@c ------------------------------------------------------------------- + +@menu +* Supported Platforms:: +* Build requirements:: +* Build instructions:: +* Building Options:: +@end menu + +@c ------------------------------------------------------------------- +@node Supported Platforms, Build requirements, Installation, Installation +@section Supported Platforms +@c ------------------------------------------------------------------- + +This library is supported by all the platforms that can run GNAT and +GTK Ada: + +@itemize @bullet +@item Linux +@item MacOS X +@item Solaris +@item Windows +@item ... +@end itemize + +@c ------------------------------------------------------------------- +@node Build requirements, Build instructions, Supported Platforms, Installation +@section Build requirements +@c ------------------------------------------------------------------- + +@noindent +An Ada compiler: +@itemize @bullet +@item GNAT GPL 2006 or later +(@url{http://libre.adacore.com/dynamic/gnat_gpl_edition.html}) +@item FSF GCC 4.1.1 or later (@url{http://gcc.gnu.org/}) +@end itemize + +GNAT has to be properly installed and the @file{bin} directory of the +GNAT installation directory have to be the first directory of your +@code{PATH} environment variable. + +@noindent +GTKAda library +@itemize @bullet +@item GTKAda 2.8.0 or later (@url{http://libre.adacore.com/GtkAda/}) +@end itemize + +GTKAda has to be compiled and installed in the same install directory +of GNAT for the following reason: +@itemize @bullet +@item This avoid having to indicate the full path to the @file{gtkada.gpr} + project file. +@end itemize + +Besides, we encourage you to compile GTKAda statically (option +@code{--enable-static --disable-shared} of the @file{configure} script +of GTKAda. This allows to build applications that can run on other +platforms that do not have GTKAda installed (GTK+ remains necessary +nevertheless). + +@c ------------------------------------------------------------------- +@node Build instructions, Building Options, Build requirements, Installation +@section Build instructions +@c ------------------------------------------------------------------- + +@noindent +To compile and install GTKAda Wrapper, execute: + + +@example + % ./configure [some options] + % make (or gmake if your make is not GNU make) + % make install (ditto) +@end example + +@noindent +This will install files in standard locations. If you want to choose +another prefix than @file{/usr/local}, give configure a +@option{--prefix=whereveryouwant} argument. + +Here also, we encourage you to install GTKAda Wrapper in the same +install directory of GNAT for the same reason given above. + +Note: at this time, you MUST use GNU make to compile this software. + +@c ------------------------------------------------------------------- +@node Building Options, , Build instructions, Installation +@section Building Options +@c ------------------------------------------------------------------- + +@noindent +Available options for the @file{configure} script include: + +@itemize @bullet + +@item @option{--enable-debug}: enable debugging information generation +and supplementary runtime checks. Note that this option has a +significant space and time cost, and is not recommended for production +use. + +@end itemize + +@c ------------------------------------------------------------------- +@node Using GTKAda Wrapper, Library Description, Installation, Top +@chapter Using GTKAda Wrapper +@c ------------------------------------------------------------------- + +@noindent +To use GTKAda Wrapper, you must add a with clause to the +@code{GTKAda_Wrapper} package. + +The following example gives the source code of an application that +builds an empty windows, waits for a mouse click and then exits. The +file name has to be necessarily @file{empty_window.adb}: + +@example +-- This example, creates an empty default main window then exits + +with Gtkada_Wrapper; use Gtkada_Wrapper; + +with Ada.Text_IO; + +procedure Empty_Window is + X : Float; + Y : Float; + Button : Natural; +begin + -- Create the graphic window + + Create_Main_Window; + + -- Wait for the mouse click + + Get_Mouse_Pointer (X, Y, Button); + + -- Display the properties of the given click + + Ada.Text_IO.Put_Line ("Got Click:"); + Ada.Text_IO.Put_Line (" X = " & X'Img); + Ada.Text_IO.Put_Line (" Y = " & Y'Img); + Ada.Text_IO.Put_Line (" Button = " & Button'Img); + + -- Destroy the graphic window + + Destroy_Main_Window; +end Empty_Window; +@end example + +You must also use the GNAT project files to compile your +application. This makes the application build easy and encapsulates +the complexity of the building process (fetching the necessary include +files and libraries). + +The following example gives the code of the project file relative to +the @file{empty_window.adb}. The file name can have a name different +from the source name. But it must have necessarily the @file{.gpr} +extension and mut be coherent with the package name givent in the +file. In our case, the project file name is @code{empty.gpr} + +@example +with "/full/or/relative/path/to/gtkada_wrapper.gpr"; + +-- In the case you installed GTKAda Wrapper in the same path as GNAT, +-- you can give simply: +-- with "gtkada_wrapper"; + +project Empty is + for main use ("empty_window.adb"); +end Empty; +@end example + +As mentioned in the project file code. If you installed GTKAda Wrapper +in a location different from the GNAT compiler location, you must +indicate event the fill path to @file{gtkada_wrapper.gpr} or the path +to this file relatively to the path of your project file. However, if +you installed GTKAda Wrapper in the same location as the GNAT +compiler, you can indicate simply the name (without even the suffix) +of the GTKAda Wrapper project file. + +Finally, compile you example by issuing: +@example + % gnatmake -P empty.gpr +@end example + +If you followed all the steps given above you should obtain an +executable named @file{empty_window} that you can run. + +@c ------------------------------------------------------------------- +@node Library Description, , Using GTKAda Wrapper, Top +@chapter Library Description +@c ------------------------------------------------------------------- + +@noindent +This chapter describes all the routines provided by the GTKAda Wrapper +library. + +@menu +* Common Routines:: +* Drawing Area:: +* Text Area:: +@end menu + +@c ------------------------------------------------------------------- +@node Common Routines, Drawing Area, Library Description, Library Description +@section Common Routines +@c ------------------------------------------------------------------- + +@noindent +We give here the routines that control the creation and destruction of +the graphical window. + +@example +@b{ +Lost_Main_Window : exception; +} +@end example + +This exception is raised if the user tries to manipulate the windows +before creating it or after destroying it. + +@example +@b{ +procedure Create_Main_Window + (X_Max : Float := 512.0; + Y_Max : Float := 512.0; + Text_Area : Boolean := False; + Drawing_Area : Boolean := True); +} +@end example + +This procedure creates the main window of the +application. @code{X_Max} and @code{Y_Max} represent respectively the +width and the height of each one of the windows parts: the drawing +area and the text area. The flags @code{Text_Area} and +@code{Drawing_Area} control the creation of these parts. Note that at +least one of these two flags has to be set to @code{True}. + +@example +@b{ +procedure Destroy_Main_Window; +} +@end example + +This procedure closes and destroys the main window. + +You may, during the execution of your application, create and destroy +as many windows as you want. However, one single windows at most has +to exist at a given time. + +@c ------------------------------------------------------------------- +@node Drawing Area, Text Area, Common Routines, Library Description +@section Drawing Area +@c ------------------------------------------------------------------- + +@noindent +All the drawing is performed using a virtual brush. the brush has the +following intrinsic characteristics: + +@enumerate +@item A position relatively to the lower left corner of the drawing +area. This position can be got/set using the Cartesian coordinate +system as we as the Polar coordinate system. + +@item An Orientation relatively to the horizontal orientation and +counter clockwise. For the sake of simplicity, all the angles are +expressed in ``Degree''. +@end enumerate + +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. + +@example +@b{ +type Color_Type is private; +} +@end example + +This is the color type used to perform all the drawings. The type is a +private type since the user has not to know the internals of the type +to use it. + +@example +@b{ +function RGB (R : Integer; G : Integer; B : Integer) return Color_Type; +} +@end example + +This function cretes an RGB (Red Green Blue) color. All the given +parameter are considered modulo 65536, the maximal value of a color +composant. + +@b{IMPORTANT NOTE:} All custom colors must be declared +@b{@i{before}} the call to @code{Create_Main_Window}. + +The library defines some predefined colors that may be used without +calling @code{RGB}: + +@itemize @bullet +@item Black +@item Red +@item Green +@item Yello +@item Blue +@item Magenta +@item Cyan +@item Orange +@item Pink +@item Dark_Gray +@item Gray +@item Light_Gray +@item White +@end itemize + +All the routines below: +@itemize @bullet +@item are thread-safe, in the sence that the call to a routine is +``atomic'' to avoid interference between different tasks calling +different routines. + +@item verify the existence of the graphical window and the drawing +area and raise an error if on of themhas not been created. +@end itemize + +@example +@b{ +procedure Clear_Drawing_Area; +} +@end example + +This procedure ``blanks' the drawing area. + +@example +@b{ +procedure Set_Color (C : Color_Type); +} +@end example + +This procedure sets the color of the virtual brush to @code{C}. + +@example +@b{ +function Get_Color return Color_Type; +} +@end example + +This function returns the current color of the virtual brush. + +@example +@b{ +procedure Set_Thickness (T : Float); +} +@end example + +This procedure sets the thickness of the virtual brush to @code{T}. + +@example +@b{ +function Get_Thickness return Float; +} +@end example + +This function returns the current thickness of the virtual brush. + +@example +@b{ +procedure Set_Angle (Angle : Float); +} +@end example + +This procedure sets the angle between the horizontal and the virtual +brush orientation to @code{Angle} + +@example +@b{ +function Get_Angle return Float; +} +@end example + +This function returns the angle between the horizontal and the virtual +brush orientation. + +@example +@b{ +procedure Rotate (Angle : Float); +} +@end example + +This procedure modifies the virtual brush orientation to @code{Angle + +Current_Orientation}. + +@example +@b{ +procedure Set_Position (X : Float; Y : Float); +} +@end example + +This function sets the current Cartesian position of the virtual brush +to @code{(X,Y)}. + +@example +@b{ +procedure Get_Position (X : out Float; Y : out Float); +} +@end example + +This procedure gets the current Cartesian position of the virtual +brush. + +@example +@b{ +procedure Jump (Distance : Float); +} +@end example + +This procedure jumps straight forward the given distance in the +direction the virtual brush without drawing any line. + +@example +@b{ +procedure Jump (X : Float; Y : Float); +} +@end example + +Same as above but using the Cartesian coordinate. + +@example +@b{ +procedure Line (Distance : Float); +} +@end example + +This procedure jumps 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. + +@example +@b{ +procedure Line (X : Float; Y : Float); +} +@end example + +Same as above but using the Cartesian coordinate. + +@example +@b{ +procedure Line (X_Start : Float; + Y_Start : Float; + Distance : Float); +} +@end example + +Same as above but start from @code{(X_Start, Y_Start)}. At the end of +execution, the virtual brush is located at the end of the drwn line. + +@example +@b{ +procedure Line + (X_Start : Float; + Y_Start : Float; + X_End : Float; + Y_End : Float); +} +@end example + +Same as above, but with the Cartesian destination. + +@example +@b{ +procedure Point; +} +@end example + +This procedure draws a point in the current position. + +@example +@b{ +procedure Point (Center_X : Float; Center_Y : Float); +} +@end example + +Same as above but with a custom position. + +@example +@b{ +type X_Justification_Type is (Left, Center, Right); +type Y_Justification_Type is (Top, Center, Bottom); +} +@end example + +These two enumeration types are used to align horizontally and +vertically inserted text and images (see below). + +@example +@b{ +procedure Insert_Image + (File_Name : String; + Scale : Float := 1.0; + X_Justification : X_Justification_Type := Center; + Y_Justification : Y_Justification_Type := Center); +} +@end example + +This procedure draws 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. + +@b{IMPORTANT NOTE:} If the given path to the image is a relative path, +the image location is calculated relatively to the working directory. + +@example +@b{ +procedure Insert_Text + (Text : String; + Size : Float := 10.0; + X_Justification : X_Justification_Type := Center; + Y_Justification : Y_Justification_Type := Center); +} +@end example + +This procedure draws a text string justified at the virtual brush's +current location. The size is expressed in @i{Pixels}. + +@example +@b{ +procedure Draw_Circle (Radius : Float); +} +@end example + +This procedure draws a circle with radius @code{Radius} and with the +center at the current position of the virtual brush. + +@example +@b{ +procedure Draw_Circle + (Center_X : Float; + Center_Y : Float; + Radius : Float); +} +@end example + +Same as above but the position of the center is given. + +@example +@b{ +procedure Fill_Circle (Radius : Float); +} +@end example + +This procedure fills a circle with radius @code{Radius} and with the +center at the current position of the virtual brush. Note that the +actual radius of the filled circle is @code{Radius - 1} pixel. + +@example +@b{ +procedure Fill_Circle + (Center_X : Float; + Center_Y : Float; + Radius : Float); +} +@end example + +Same as above but the position of the center is given. + +@example +@b{ +procedure Draw_Rectangle + (First_X : Float; + First_Y : Float; + Width : Float; + Height : Float); +} +@end example + +This procedure draws a rectangle having the specified bottom left +edge. + +@example +@b{ +procedure Fill_Rectangle + (First_X : Float; + First_Y : Float; + Width : Float; + Height : Float); +} +@end example + +This procedure fills a rectangle having the specified bottom left edge +edges. Note that the actual sizes of the filled rectangle is reduced +by 1 pixel. + +@example +@b{ +type Float_Array is array (Positive range <>) of Float; +} +@end example + +This type defines an array of Float. It must be instantiated with tha +actual size. + +@example +@b{ +procedure Draw_Polygon (Edges : Float_Array); +} +@end example + +This procedure draws a polygon by linking the given edges. The array +must be in the form @code{(X1, Y1, X2, Y2..., Xn, Yn)}. There fore its +length must be even. If the length of 'Edges' is odd, raise +Constraint_Error. + +@example +@b{ +procedure Fill_Polygon (Edges : Float_Array); +} +@end example + +This procedure fills a polygon as it would have been drawn by the +subprogram above. + +@example +@b{ +procedure Rafresh; +} +@end example + +This procedure redraws the drawing area. + +@example +@b{ +procedure Get_Mouse_Pointer + (X : out Float; + Y : out Float; + Button : out Natural); +} +@end example + +This procedure waits for a mouse button action and stores the mouse +pointer coordinate in @code{X} and @code{Y} and the mouse button used +to do the action. If the user closes the windows before giving a mouse +click, @code{Lost_Main_Window} will be raised. + +@c ------------------------------------------------------------------- +@node Text Area, , Drawing Area, Library Description +@section Text Area +@c ------------------------------------------------------------------- + +@noindent +We give here the routines that allow the user to interact wi the test area. + +All the routines below: +@itemize @bullet +@item are thread-safe, in the sence that the call to a routine is +``atomic'' to avoid interference between different tasks calling +different routines. + +@item verify the existence of the graphical window and the text area +and raise an error if on of themhas not been created. +@end itemize + +@example +@b{ +procedure Clear_Text_Area; +} +@end example + +This procedure erases all the text of the text area. + +@example +@b{ +procedure Put (Item : String); +} +@end example + +This procedure inserts the given text on the current cursor position +of the text area. + +@example +@b{ +procedure Put (Item : Character); +} +@end example + +Same as above but with a character + +@example +@b{ +procedure New_Line (Spacing : Positive := 1); +} +@end example + +This procedure jumps to the beginning of the last line of the next +@code{Spacing} lines. + +@example +@b{ +procedure Put_Line (Item : String); +} +@end example + +This procedure is equivalent to @code{Put (Item); New_Line;}. + +@example +@b{ +procedure Put_Line (Item : Character); +} +@end example + +This procedure is equivalent to @code{Put (Item); New_Line;}. + +@example +@b{ +function Get_Line return String; +} +@end example + +This function blocks until the user types a string followed by +pressing @i{ENTER} + +@example +@b{ +function Get_Immediate return Character; +} +@end example + +This function blocks until the user press a key corresponding to a +graphical character. The value of the key is stored in Item. The user +does not need to press @i{ENTER}. + +@c end + +@bye + + Modified: trunk/examples/Makefile.common =================================================================== --- trunk/examples/Makefile.common 2006-12-01 23:16:32 UTC (rev 28) +++ trunk/examples/Makefile.common 2006-12-02 15:17:34 UTC (rev 29) @@ -5,4 +5,3 @@ clean-local: $(GNATCLEAN) -P $(PROJECT_FILE) $(GNATFLAGS) - Modified: trunk/src/Makefile.am =================================================================== --- trunk/src/Makefile.am 2006-12-01 23:16:32 UTC (rev 28) +++ trunk/src/Makefile.am 2006-12-02 15:17:34 UTC (rev 29) @@ -14,11 +14,12 @@ ADA_BODIES = $(ADA_SPECS_WITH_BODY:.ads=.adb) PROJECT_FILE = gtkada_wrapper.gpr +PROJECT_FILE_I = gtkada_wrapper_i.gpr -EXTRA_DIST = $(PROJECT_FILE) $(ADA_SPECS) $(ADA_BODIES) +EXTRA_DIST = $(PROJECT_FILE) $(PROJECT_FILE_I) $(ADA_SPECS) $(ADA_BODIES) headers_dir = $(includedir)/gtkada_wrapper -ali_dir = $(libdir)/gtkada_wrappe +ali_dir = $(libdir)/gtkada_wrapper all-local: $(GNATMAKE) -P $(PROJECT_FILE) $(GNATFLAGS) @@ -29,6 +30,8 @@ install-data-local: $(INSTALL) -d $(DESTDIR)$(headers_dir) $(INSTALL) -d $(DESTDIR)$(ali_dir) + $(INSTALL) -d $(DESTDIR)$(libdir)/gnat + $(INSTALL) -m 444 $(PROJECT_FILE_I) $(DESTDIR)$(libdir)/gnat/$(PROJECT_FILE) for f in $(ADA_SPECS) $(ADA_BODIES); do \ $(INSTALL) -m 444 $$f $(DESTDIR)$(headers_dir); \ done; \ @@ -37,6 +40,7 @@ done for f in $(srcdir)/libs/lib*; do \ $(INSTALL) -m 444 $$f $(DESTDIR)$(libdir); \ + $(INSTALL) -m 444 $$f $(DESTDIR)$(ali_dir); \ done dist-hook: Modified: trunk/src/gtkada_wrapper.ads =================================================================== --- trunk/src/gtkada_wrapper.ads 2006-12-01 23:16:32 UTC (rev 28) +++ trunk/src/gtkada_wrapper.ads 2006-12-02 15:17:34 UTC (rev 29) @@ -25,13 +25,13 @@ 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 + -- the windows parts: the drawing area and the text 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. + -- to True. procedure Destroy_Main_Window; - -- Close and destroy the main window + -- Closes and destroys the main window ------------------------------------ -- Drawing Area Specific Routines -- @@ -41,7 +41,7 @@ -- 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 + -- drawing 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 @@ -78,7 +78,7 @@ -- Predefined colors procedure Clear_Drawing_Area; - -- If the drwing area exists, then it will be ``blanked'' + -- If the drawing area exists, then it will be ``blanked'' procedure Set_Color (C : Color_Type); -- Set the color of the virtual brush to C @@ -229,7 +229,7 @@ (X : out Float; Y : out Float; Button : out Natural); - -- Wait for a mous button action and stores the mouse pointer + -- Wait for a mouse button action and stores the mouse pointer -- coordinate in X and Y and the mouse button used to do the -- action. If the user closes the windows before giving a mouse -- click, 'Lost_Main_Window' will be raised. Added: trunk/src/gtkada_wrapper_i.gpr =================================================================== --- trunk/src/gtkada_wrapper_i.gpr (rev 0) +++ trunk/src/gtkada_wrapper_i.gpr 2006-12-02 15:17:34 UTC (rev 29) @@ -0,0 +1,40 @@ +with "gtkada"; + +project GTKAda_Wrapper is + for Library_Kind use "static"; + for Source_Dirs use ("../../include/gtkada_wrapper"); + for Library_Dir use "../gtkada_wrapper"; + for Library_Kind use "static"; + for Library_Name use "gtkada_wrapper"; + for Externally_Built use "true"; + + 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; Property changes on: trunk/src/gtkada_wrapper_i.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. |