diff --git a/Makefile.am b/Makefile.am index 4790c0386..7d33df09a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -17,7 +17,6 @@ SUBDIRS = \ @xml_dir@ \ @v4l_dir@ \ @crypt_dir@ \ - @corba_dir@ \ @qt4_dir@ \ @gtk_dir@ \ @opengl_dir@ \ diff --git a/TODO b/TODO index 80b901577..fa0d79f39 100644 --- a/TODO +++ b/TODO @@ -40,8 +40,6 @@ INTERPRETER DEVELOPMENT ENVIRONMENT -- Loading a "form" component needs calling InitControl on classes that are not - member of the list of controls. - Bookmarks in editor. - Manage Object properties in IDE. - Put a language code in comments, and hide them as needed by the user. @@ -57,7 +55,6 @@ GUI RELATED STUFF - Deleting a currently expanding item in TreeView crashes. - A Settings property everywhere? Mmmfff... At least for ColumnView, GridView. -- A MultiContainer property. - TabStrip.TextFont. - Standard dialog must remember their size. - Form.KeyPreview @@ -90,5 +87,4 @@ NETWORK COMPONENTS -- State of gb.corba ? - Put version number in *.component files, and use it when making dependencies in the IDE. diff --git a/app/src/MakeWebSite/.settings b/app/src/MakeWebSite/.settings index fb5924f82..c6460db15 100644 --- a/app/src/MakeWebSite/.settings +++ b/app/src/MakeWebSite/.settings @@ -24,11 +24,12 @@ SearchComment=False SearchString=True [OpenFile] -File[1]="/home/benoit/gambas/3.0/trunk/app/src/MakeWebSite/.src/MMain.module:120.0" +Active=1 +File[1]="/home/benoit/gambas/3.0/trunk/app/src/MakeWebSite/.src/MMain.module:12.36" File[2]="/home/benoit/gambas/3.0/trunk/app/src/MakeWebSite/.src/CAuthor.class:29.0" -Active=3 -File[3]="/home/benoit/gambas/3.0/trunk/app/src/MakeWebSite/news/2010-03-01.html:12.3" -Count=3 +File[3]="/home/benoit/gambas/3.0/trunk/app/src/MakeWebSite/news/2010-03-01.html:14.0" +File[4]="/home/benoit/gambas/3.0/trunk/app/src/MakeWebSite/news/2010-03-07.html:3.70" +Count=4 [Watches] Count=0 diff --git a/app/src/MakeWebSite/.src/MMain.module b/app/src/MakeWebSite/.src/MMain.module index bd1205699..dda403438 100644 --- a/app/src/MakeWebSite/.src/MMain.module +++ b/app/src/MakeWebSite/.src/MMain.module @@ -10,7 +10,7 @@ Private Const NBR_NEWS As Integer = 3 Sub InitVar() - Dim aStable As String[] = ["2.20.0", "2.19.0", "2.18.0", "2.17.0"] + Dim aStable As String[] = ["2.20.1", "2.19.0", "2.18.0", "2.17.0"] 'DIM aDev AS String[] = ["92", "91", "90", "51"] $cVar["STABLE_VERSION"] = aStable[0] diff --git a/app/src/MakeWebSite/gambas.sourceforge.net/compilation.html b/app/src/MakeWebSite/gambas.sourceforge.net/compilation.html index f575b7a96..e15532c5d 100644 --- a/app/src/MakeWebSite/gambas.sourceforge.net/compilation.html +++ b/app/src/MakeWebSite/gambas.sourceforge.net/compilation.html @@ -32,7 +32,7 @@ The way to do that depends on your distribution.

Gambas source package on your machine. For example, you can use wget in the terminal:

-
[linux@home ~]$ wget http://gambas.sourceforge.net/gambas-2.20.0.tar.bz2
+
[linux@home ~]$ wget http://gambas.sourceforge.net/gambas-2.20.1.tar.bz2
 

Then, you must unpack the downloaded archive in a well chosen place. @@ -40,18 +40,18 @@ For example, in your home directory.

[linux@home ~] cd ~
 
-[linux@home ~]$ bunzip2 gambas-2.20.0.tar.bz2
+[linux@home ~]$ bunzip2 gambas-2.20.1.tar.bz2
 
-[linux@home ~]$ tar xf gambas-2.20.0.tar
+[linux@home ~]$ tar xf gambas-2.20.1.tar
 
 [linux@home ~]$ ls
-... gambas-2.20.0 ...
+... gambas-2.20.1 ...
 

A gambas directory has been created with the contents of the archive. Enter it !

-
[linux@home ~]$ cd gambas-2.20.0
+
[linux@home ~]$ cd gambas-2.20.1
 

Then you can launch the compilation of the sources with the two following @@ -62,7 +62,7 @@ system in order to adapt the compilation process. It is a script located in the source directory, so you could be obliged to add "./" before the command name to launch it.

-
[linux@home gambas-2.20.0]$ ./configure
+
[linux@home gambas-2.20.1]$ ./configure
 ...
 
@@ -89,7 +89,7 @@ following options to configure :

For example :

-
[linux@home gambas-2.20.0]$ ./configure --disable-db-component
+
[linux@home gambas-2.20.1]$ ./configure --disable-db-component
 

Note that if you forgot to install a development package, the components that @@ -99,7 +99,7 @@ output of the configure command.

When configure ends without any error, you can launch the compilation with make.

-
[linux@home gambas-2.20.0]$ make
+
[linux@home gambas-2.20.1]$ make
 ...
 
@@ -113,7 +113,7 @@ to you to go to the mailing-list to carefully expose your problem with Gambas. To do that, you must be root. So we are going to use the su command :

-
[linux@home gambas-2.20.0]$ su -c "make install"
+
[linux@home gambas-2.20.1]$ su -c "make install"
 Password:
 ...
 
@@ -126,7 +126,7 @@ Read the INSTALL file in the source directory for more details.

For example, to install Gambas under /usr, just type the following:

-
[linux@home gambas-2.20.0]$ ./configure --prefix=/usr
+
[linux@home gambas-2.20.1]$ ./configure --prefix=/usr
 

Note that symbolic links are created in the /usr/bin folder so that @@ -138,7 +138,7 @@ symbolic links are not created.

Once everything is done, you can launch the development environment.

-
[linux@home gambas-2.20.0]$ gambas
+
[linux@home gambas-2.20.1]$ gambas
 

Or for the development version:

diff --git a/app/src/MakeWebSite/gambas.sourceforge.net/download.html b/app/src/MakeWebSite/gambas.sourceforge.net/download.html index 4aa2781de..5ddc69979 100644 --- a/app/src/MakeWebSite/gambas.sourceforge.net/download.html +++ b/app/src/MakeWebSite/gambas.sourceforge.net/download.html @@ -80,8 +80,8 @@ $ ./reconf-all - gambas2-2.20.0.tar.bz2 - 2.20.0 + gambas2-2.20.1.tar.bz2 + 2.20.1 tar.bz2 diff --git a/app/src/MakeWebSite/gambas.sourceforge.net/home.html b/app/src/MakeWebSite/gambas.sourceforge.net/home.html index aaa2747f6..494444467 100644 --- a/app/src/MakeWebSite/gambas.sourceforge.net/home.html +++ b/app/src/MakeWebSite/gambas.sourceforge.net/home.html @@ -20,7 +20,7 @@
- {Last stable version is}
2.20.0 + {Last stable version is}
2.20.1 (Changelog)
@@ -65,6 +65,20 @@
+
+ + +
+
07 3월 2010 - Release of Gambas 2.20.1
+
+
+
+This release fixes the behaviour of the ComboBox Click event, and so the IDE translation dialog. +

+See the ChangeLog for other little fixes. +

+
+
@@ -109,23 +123,6 @@ See the full ChangeLog for the other bug fixes.
-
- - -
-
29 11월 2009 - Gambas Wiki License
-
-
-
-

The Gambas Wiki documentation now uses the -Creative Commons Attribution-ShareAlike (CC-BY-SA) 3.0 license. -

As using different licenses for different parts of the wiki will be a nightmare to manage, -people that have written some pieces -of the documentation and who do not agree with that license must just tell me: I will remove their -contribution from the wiki. -

-
-
{Older News...} diff --git a/app/src/MakeWebSite/gambas.sourceforge.net/news.html b/app/src/MakeWebSite/gambas.sourceforge.net/news.html index 343d469a1..5f70fae03 100644 --- a/app/src/MakeWebSite/gambas.sourceforge.net/news.html +++ b/app/src/MakeWebSite/gambas.sourceforge.net/news.html @@ -11,6 +11,20 @@
{News Archive}
+
+ + +
+
07 3월 2010 - Release of Gambas 2.20.1
+
+
+
+This release fixes the behaviour of the ComboBox Click event, and so the IDE translation dialog. +

+See the ChangeLog for other little fixes. +

+
+
diff --git a/app/src/MakeWebSite/news/2010-03-07.html b/app/src/MakeWebSite/news/2010-03-07.html new file mode 100644 index 000000000..798f94be7 --- /dev/null +++ b/app/src/MakeWebSite/news/2010-03-07.html @@ -0,0 +1,4 @@ +Release of Gambas 2.20.1 +This release fixes the behaviour of the ComboBox Click event, and so the IDE translation dialog. +

+See the ChangeLog for other little fixes. diff --git a/app/src/gambas3/.lang/.pot b/app/src/gambas3/.lang/.pot index 6b95d993f..95220e99e 100644 --- a/app/src/gambas3/.lang/.pot +++ b/app/src/gambas3/.lang/.pot @@ -358,8 +358,8 @@ msgstr "" #: FMakeExecutable.class:138 FMenu.class:1065 FNewConnection.class:586 #: FNewTable.class:162 FNewTranslation.class:64 FOpenProject.class:455 #: FPasteSpecial.class:273 FPropertyProject.class:252 -#: FReportBorderChooser.class:215 FReportCoordChooser.class:120 -#: FSelectExtraFile.class:72 FSelectIcon.class:266 FTableChooser.class:139 +#: FReportBorderChooser.class:213 FReportCoordChooser.class:120 +#: FSelectExtraFile.class:72 FSelectIcon.class:268 FTableChooser.class:139 #: FText.class:101 msgid "OK" msgstr "" @@ -444,8 +444,8 @@ msgstr "" #: FMakeInstall.class:309 FMenu.class:1070 FNewConnection.class:317 #: FNewTable.class:168 FNewTranslation.class:70 FOpenProject.class:151 #: FOption.class:585 FPasteSpecial.class:279 FPropertyProject.class:1240 -#: FReportBorderChooser.class:209 FReportCoordChooser.class:114 -#: FSave.class:118 FSelectExtraFile.class:78 FSelectIcon.class:271 +#: FReportBorderChooser.class:207 FReportCoordChooser.class:114 +#: FSave.class:118 FSelectExtraFile.class:78 FSelectIcon.class:273 #: FTableChooser.class:145 FTextEditor.class:462 FText.class:107 #: FTranslate.class:617 Project.module:351 msgid "Cancel" @@ -911,7 +911,7 @@ msgstr "" msgid "Options" msgstr "" -#: FCreateFile.class:800 FReportBorderChooser.class:237 +#: FCreateFile.class:800 FReportBorderChooser.class:235 msgid "Width" msgstr "" @@ -1953,7 +1953,7 @@ msgstr "" msgid "Link to" msgstr "" -#: FInfo.class:343 FSelectIcon.class:235 FTranslate.class:69 +#: FInfo.class:343 FSelectIcon.class:237 FTranslate.class:69 msgid "Size" msgstr "" @@ -2385,7 +2385,7 @@ msgstr "" msgid "Make installation package" msgstr "" -#: FMain.class:2552 FSelectIcon.class:214 Project.module:1264 +#: FMain.class:2552 FSelectIcon.class:216 Project.module:1264 msgid "Project" msgstr "" @@ -3430,15 +3430,15 @@ msgstr "" msgid "Remove All" msgstr "" -#: FReportBorderChooser.class:203 +#: FReportBorderChooser.class:201 msgid "Select a border" msgstr "" -#: FReportBorderChooser.class:221 +#: FReportBorderChooser.class:219 msgid "Draw a border" msgstr "" -#: FReportBorderChooser.class:243 +#: FReportBorderChooser.class:241 msgid "Color" msgstr "" @@ -3488,11 +3488,11 @@ msgstr "" msgid "Select an extra file" msgstr "" -#: FSelectIcon.class:201 +#: FSelectIcon.class:203 msgid "Select a picture" msgstr "" -#: FSelectIcon.class:222 +#: FSelectIcon.class:224 msgid "Stock" msgstr "" diff --git a/app/src/gambas3/.src/Dialog/FReportBorderChooser.class b/app/src/gambas3/.src/Dialog/FReportBorderChooser.class index 6a9d2b0d8..ab48c6f32 100644 --- a/app/src/gambas3/.src/Dialog/FReportBorderChooser.class +++ b/app/src/gambas3/.src/Dialog/FReportBorderChooser.class @@ -100,10 +100,10 @@ Public Sub dwgBorder_Draw() Paint.Brush = Paint.Color($iColor) - If HasBorder("Left") Then Paint.Rectangle(0, 0, fWidth, Paint.Height) - If HasBorder("Right") Then Paint.Rectangle(Paint.Width - fWidth, 0, fWidth, Paint.Height) - If HasBorder("Top") Then Paint.Rectangle(0, 0, Paint.Width, fWidth) - If HasBorder("Bottom") Then Paint.Rectangle(0, Paint.Height - fWidth, Paint.Width, fWidth) + If HasBorder("Left") Then Paint.Rectangle(1, 1, fWidth, Paint.Height - 2) + If HasBorder("Right") Then Paint.Rectangle(Paint.Width - fWidth - 1, 1, fWidth, Paint.Height - 2) + If HasBorder("Top") Then Paint.Rectangle(1, 1, Paint.Width - 2, fWidth) + If HasBorder("Bottom") Then Paint.Rectangle(1, Paint.Height - fWidth - 1, Paint.Width - 2, fWidth) Paint.Fill @@ -175,8 +175,6 @@ Public Sub dwgBorder_MouseDown() Endif Endif - Debug sWhere - SetBorder(sWhere, Not HasBorder(sWhere)) dwgBorder.Refresh diff --git a/app/src/gambas3/.src/Dialog/FSelectIcon.class b/app/src/gambas3/.src/Dialog/FSelectIcon.class index 84e6643b0..1ac5872bd 100644 --- a/app/src/gambas3/.src/Dialog/FSelectIcon.class +++ b/app/src/gambas3/.src/Dialog/FSelectIcon.class @@ -126,7 +126,9 @@ Private Sub SetSize(sSize As String) As Boolean Endif $sSize = sSize + Object.Lock(cmbSize) cmbSize.Text = sSize + Object.Unlock(cmbSize) RefreshStock End diff --git a/app/src/gambas3/.src/Editor/Form/FProperty.class b/app/src/gambas3/.src/Editor/Form/FProperty.class index 461c31202..7bf04b607 100644 --- a/app/src/gambas3/.src/Editor/Form/FProperty.class +++ b/app/src/gambas3/.src/Editor/Form/FProperty.class @@ -159,7 +159,7 @@ Public Sub RefreshAll() grdProperty.Rows.Count = aProp.Count + 2 grdProperty.Clear - grdProperty.Rows.Height = -1 + grdProperty.Rows.Height = grdProperty.Font.Height() + 6 grdProperty.Columns.Count = 2 diff --git a/app/src/gambas3/.src/FOption.form b/app/src/gambas3/.src/FOption.form index 9911c5119..0c5949e4f 100644 --- a/app/src/gambas3/.src/FOption.form +++ b/app/src/gambas3/.src/FOption.form @@ -432,12 +432,12 @@ Spacing = True Indent = True { Label26 Label - MoveScaled(0,0,25,4) + MoveScaled(0,0,18,4) Expand = True Text = ("Editor") } { txtEditorFont ButtonBox - MoveScaled(30,0,35,4) + MoveScaled(19,0,46,4) } } { HBox24 HBox @@ -445,12 +445,12 @@ Spacing = True Indent = True { Label18 Label - MoveScaled(0,0,25,4) + MoveScaled(0,0,18,4) Expand = True Text = ("Console") } { txtConsoleFont ButtonBox - MoveScaled(30,0,35,4) + MoveScaled(19,0,46,4) } } { Label27 Label diff --git a/comp/src/gb.report/.info b/comp/src/gb.report/.info index eed783ff5..17ed6bfff 100644 --- a/comp/src/gb.report/.info +++ b/comp/src/gb.report/.info @@ -86,7 +86,7 @@ s _HiddenControls C s -Report,ReportControl,ReportContainer +Report,ReportControl,ReportContainer,ReportFrame _IsForm C b diff --git a/comp/src/gb.report/.src/Report.class b/comp/src/gb.report/.src/Report.class index 51e84b07a..b83e4430c 100644 --- a/comp/src/gb.report/.src/Report.class +++ b/comp/src/gb.report/.src/Report.class @@ -5,7 +5,7 @@ Export Inherits ReportVBox Public Const _Properties As String = "*,-Left,-Top,-Width,-Height" -Public Const _HiddenControls As String = "Report,ReportControl,ReportContainer" +Public Const _HiddenControls As String = "Report,ReportControl,ReportContainer,ReportFrame" Public Const _IsForm As Boolean = True 'Public Constants diff --git a/configure.ac b/configure.ac index 632e7bfde..95587d7a1 100644 --- a/configure.ac +++ b/configure.ac @@ -26,7 +26,6 @@ GB_CONFIG_SUBDIRS(sdlsound, gb.sdl.sound) GB_CONFIG_SUBDIRS(xml, gb.xml) GB_CONFIG_SUBDIRS(v4l, gb.v4l) GB_CONFIG_SUBDIRS(crypt, gb.crypt) -GB_CONFIG_SUBDIRS(corba, gb.corba) GB_CONFIG_SUBDIRS(qt4, gb.qt4) GB_CONFIG_SUBDIRS(gtk, gb.gtk) GB_CONFIG_SUBDIRS(opengl, gb.opengl) diff --git a/examples/examples/Games/GameOfLife/.settings b/examples/examples/Games/GameOfLife/.settings index 464c7408c..322597492 100644 --- a/examples/examples/Games/GameOfLife/.settings +++ b/examples/examples/Games/GameOfLife/.settings @@ -19,8 +19,8 @@ SearchString=True [OpenFile] File[1]="/home/benoit/gambas/3.0/link/share/gambas3/examples/Games/GameOfLife/.src/CGameField.class:75.0" -File[2]="/home/benoit/gambas/3.0/link/share/gambas3/examples/Games/GameOfLife/.src/FMain.class:26.0" -Active=3 +Active=2 +File[2]="/home/benoit/gambas/3.0/link/share/gambas3/examples/Games/GameOfLife/.src/FMain.class:65.6" File[3]="/home/benoit/gambas/3.0/link/share/gambas3/examples/Games/GameOfLife/.src/FMain.form" Count=3 diff --git a/gb.corba/AUTHORS b/gb.corba/AUTHORS deleted file mode 100644 index e69de29bb..000000000 diff --git a/gb.corba/COPYING b/gb.corba/COPYING deleted file mode 100644 index d60c31a97..000000000 --- a/gb.corba/COPYING +++ /dev/null @@ -1,340 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 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. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - -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. - - , 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. diff --git a/gb.corba/ChangeLog b/gb.corba/ChangeLog deleted file mode 100644 index e69de29bb..000000000 diff --git a/gb.corba/INSTALL b/gb.corba/INSTALL deleted file mode 100644 index 095b1eb40..000000000 --- a/gb.corba/INSTALL +++ /dev/null @@ -1,231 +0,0 @@ -Installation Instructions -************************* - -Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004 Free -Software Foundation, Inc. - -This file is free documentation; the Free Software Foundation gives -unlimited permission to copy, distribute and modify it. - -Basic Installation -================== - -These are generic installation instructions. - - The `configure' shell script attempts to guess correct values for -various system-dependent variables used during compilation. It uses -those values to create a `Makefile' in each directory of the package. -It may also create one or more `.h' files containing system-dependent -definitions. Finally, it creates a shell script `config.status' that -you can run in the future to recreate the current configuration, and a -file `config.log' containing compiler output (useful mainly for -debugging `configure'). - - It can also use an optional file (typically called `config.cache' -and enabled with `--cache-file=config.cache' or simply `-C') that saves -the results of its tests to speed up reconfiguring. (Caching is -disabled by default to prevent problems with accidental use of stale -cache files.) - - If you need to do unusual things to compile the package, please try -to figure out how `configure' could check whether to do them, and mail -diffs or instructions to the address given in the `README' so they can -be considered for the next release. If you are using the cache, and at -some point `config.cache' contains results you don't want to keep, you -may remove or edit it. - - The file `configure.ac' (or `configure.in') is used to create -`configure' by a program called `autoconf'. You only need -`configure.ac' if you want to change it or regenerate `configure' using -a newer version of `autoconf'. - -The simplest way to compile this package is: - - 1. `cd' to the directory containing the package's source code and type - `./configure' to configure the package for your system. If you're - using `csh' on an old version of System V, you might need to type - `sh ./configure' instead to prevent `csh' from trying to execute - `configure' itself. - - Running `configure' takes awhile. While running, it prints some - messages telling which features it is checking for. - - 2. Type `make' to compile the package. - - 3. Optionally, type `make check' to run any self-tests that come with - the package. - - 4. Type `make install' to install the programs and any data files and - documentation. - - 5. You can remove the program binaries and object files from the - source code directory by typing `make clean'. To also remove the - files that `configure' created (so you can compile the package for - a different kind of computer), type `make distclean'. There is - also a `make maintainer-clean' target, but that is intended mainly - for the package's developers. If you use it, you may have to get - all sorts of other programs in order to regenerate files that came - with the distribution. - -Compilers and Options -===================== - -Some systems require unusual options for compilation or linking that the -`configure' script does not know about. Run `./configure --help' for -details on some of the pertinent environment variables. - - You can give `configure' initial values for configuration parameters -by setting variables in the command line or in the environment. Here -is an example: - - ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix - - *Note Defining Variables::, for more details. - -Compiling For Multiple Architectures -==================================== - -You can compile the package for more than one kind of computer at the -same time, by placing the object files for each architecture in their -own directory. To do this, you must use a version of `make' that -supports the `VPATH' variable, such as GNU `make'. `cd' to the -directory where you want the object files and executables to go and run -the `configure' script. `configure' automatically checks for the -source code in the directory that `configure' is in and in `..'. - - If you have to use a `make' that does not support the `VPATH' -variable, you have to compile the package for one architecture at a -time in the source code directory. After you have installed the -package for one architecture, use `make distclean' before reconfiguring -for another architecture. - -Installation Names -================== - -By default, `make install' will install the package's files in -`/usr/local/bin', `/usr/local/man', etc. You can specify an -installation prefix other than `/usr/local' by giving `configure' the -option `--prefix=PREFIX'. - - You can specify separate installation prefixes for -architecture-specific files and architecture-independent files. If you -give `configure' the option `--exec-prefix=PREFIX', the package will -use PREFIX as the prefix for installing programs and libraries. -Documentation and other data files will still use the regular prefix. - - In addition, if you use an unusual directory layout you can give -options like `--bindir=DIR' to specify different values for particular -kinds of files. Run `configure --help' for a list of the directories -you can set and what kinds of files go in them. - - If the package supports it, you can cause programs to be installed -with an extra prefix or suffix on their names by giving `configure' the -option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. - -Optional Features -================= - -Some packages pay attention to `--enable-FEATURE' options to -`configure', where FEATURE indicates an optional part of the package. -They may also pay attention to `--with-PACKAGE' options, where PACKAGE -is something like `gnu-as' or `x' (for the X Window System). The -`README' should mention any `--enable-' and `--with-' options that the -package recognizes. - - For packages that use the X Window System, `configure' can usually -find the X include and library files automatically, but if it doesn't, -you can use the `configure' options `--x-includes=DIR' and -`--x-libraries=DIR' to specify their locations. - -Specifying the System Type -========================== - -There may be some features `configure' cannot figure out automatically, -but needs to determine by the type of machine the package will run on. -Usually, assuming the package is built to be run on the _same_ -architectures, `configure' can figure that out, but if it prints a -message saying it cannot guess the machine type, give it the -`--build=TYPE' option. TYPE can either be a short name for the system -type, such as `sun4', or a canonical name which has the form: - - CPU-COMPANY-SYSTEM - -where SYSTEM can have one of these forms: - - OS KERNEL-OS - - See the file `config.sub' for the possible values of each field. If -`config.sub' isn't included in this package, then this package doesn't -need to know the machine type. - - If you are _building_ compiler tools for cross-compiling, you should -use the `--target=TYPE' option to select the type of system they will -produce code for. - - If you want to _use_ a cross compiler, that generates code for a -platform different from the build platform, you should specify the -"host" platform (i.e., that on which the generated programs will -eventually be run) with `--host=TYPE'. - -Sharing Defaults -================ - -If you want to set default values for `configure' scripts to share, you -can create a site shell script called `config.site' that gives default -values for variables like `CC', `cache_file', and `prefix'. -`configure' looks for `PREFIX/share/config.site' if it exists, then -`PREFIX/etc/config.site' if it exists. Or, you can set the -`CONFIG_SITE' environment variable to the location of the site script. -A warning: not all `configure' scripts look for a site script. - -Defining Variables -================== - -Variables not defined in a site shell script can be set in the -environment passed to `configure'. However, some packages may run -configure again during the build, and the customized values of these -variables may be lost. In order to avoid this problem, you should set -them in the `configure' command line, using `VAR=value'. For example: - - ./configure CC=/usr/local2/bin/gcc - -will cause the specified gcc to be used as the C compiler (unless it is -overridden in the site shell script). - -`configure' Invocation -====================== - -`configure' recognizes the following options to control how it operates. - -`--help' -`-h' - Print a summary of the options to `configure', and exit. - -`--version' -`-V' - Print the version of Autoconf used to generate the `configure' - script, and exit. - -`--cache-file=FILE' - Enable the cache: use and save the results of the tests in FILE, - traditionally `config.cache'. FILE defaults to `/dev/null' to - disable caching. - -`--config-cache' -`-C' - Alias for `--cache-file=config.cache'. - -`--quiet' -`--silent' -`-q' - Do not print messages saying which checks are being made. To - suppress all normal output, redirect it to `/dev/null' (any error - messages will still be shown). - -`--srcdir=DIR' - Look for the package's source code in directory DIR. Usually - `configure' can determine that directory automatically. - -`configure' also accepts some other, not widely useful, options. Run -`configure --help' for more details. - diff --git a/gb.corba/Makefile.am b/gb.corba/Makefile.am deleted file mode 100644 index 433f114c4..000000000 --- a/gb.corba/Makefile.am +++ /dev/null @@ -1,3 +0,0 @@ -ACLOCAL_AMFLAGS = -I m4 --install -SUBDIRS = @CORBA_DIR@ -EXTRA_DIST = reconf gambas.h gb*.h diff --git a/gb.corba/NEWS b/gb.corba/NEWS deleted file mode 100644 index e69de29bb..000000000 diff --git a/gb.corba/README b/gb.corba/README deleted file mode 100644 index 772a36d7b..000000000 --- a/gb.corba/README +++ /dev/null @@ -1,56 +0,0 @@ -** IMPORTANT NOTES - -Before installing gb.corba, compiling it and then complaining, please read the -following remarks CAREFULLY! -To compile gb.corba, you must install the following packages on your system : - - The omniORB4 core. - - The libomniorb4 - - The libomniorb4-dev - - The libomniorb4-nameserver - -** HOW TO COMPILE GB.CORBA ? - -1) First, check that you installed all the needed development packages - -2) Copy the gb.corba dir in to gambas directory. - -3) When done, type the following magic sentences in a shell. - '#' represents your shell prompt, and "..." are the - messages printed during the configuration and compilation. - - This command analyzes the system and configure the package: - - # ./configure - ... - - This command compiles the programs: - - # make - ... - - And finally this command installs everything: - - # su -c "make install" - Password: - ... - - If something fails during this process, try to type the - following command before ./configure : - - # ./reconf - - If it does not work, I need to know what happened exactly. - To do so, type the following command : - - # ( ./configure; make; make install ) > output.txt 2>&1 - - And send me the file "output.txt" by mail, with every other - detail about your computer and your distribution you find - useful. -3) If everything was fine, type "gambas" to run the development - environment. There are an example in the "gambas-examples" - directory. - -Enjoy it ! - -Carlo. diff --git a/gb.corba/acinclude.m4 b/gb.corba/acinclude.m4 deleted file mode 120000 index d84c32a31..000000000 --- a/gb.corba/acinclude.m4 +++ /dev/null @@ -1 +0,0 @@ -../acinclude.m4 \ No newline at end of file diff --git a/gb.corba/component.am b/gb.corba/component.am deleted file mode 120000 index 2f0eee34f..000000000 --- a/gb.corba/component.am +++ /dev/null @@ -1 +0,0 @@ -../component.am \ No newline at end of file diff --git a/gb.corba/configure.ac b/gb.corba/configure.ac deleted file mode 100644 index 214dbe4c0..000000000 --- a/gb.corba/configure.ac +++ /dev/null @@ -1,18 +0,0 @@ -dnl ---- configure.ac for gb.corba - -AC_INIT(configure.ac) -AC_CONFIG_MACRO_DIR([m4]) -GB_INIT(gb.corba) -AC_PROG_LIBTOOL -GB_COMPONENT( - corba, - CORBA, - [CORBA component], - [src], - [GB_FIND(CORBA.h, /usr/share/ace /usr/local/lib /usr/local /usr/lib /usr, omniORB4/include include/omniORB4 include)], - [GB_FIND(libomniORB4.$SHLIBEXT libomniDynamic4.$SHLIBEXT, /usr/share/ace /usr/local /usr, lib)], - [$THREAD_LIB -D_MT -DHAVE_CONFIG_FILE -lomniORB4 -lomniDynamic4 ]) - - - -AC_OUTPUT( Makefile src/Makefile ) diff --git a/gb.corba/gambas.h b/gb.corba/gambas.h deleted file mode 120000 index 03677ecd0..000000000 --- a/gb.corba/gambas.h +++ /dev/null @@ -1 +0,0 @@ -../main/share/gambas.h \ No newline at end of file diff --git a/gb.corba/gb_common.h b/gb.corba/gb_common.h deleted file mode 120000 index 707d79da6..000000000 --- a/gb.corba/gb_common.h +++ /dev/null @@ -1 +0,0 @@ -../main/share/gb_common.h \ No newline at end of file diff --git a/gb.corba/ltmain.sh b/gb.corba/ltmain.sh deleted file mode 120000 index 50b1c074f..000000000 --- a/gb.corba/ltmain.sh +++ /dev/null @@ -1 +0,0 @@ -../ltmain.sh \ No newline at end of file diff --git a/gb.corba/m4 b/gb.corba/m4 deleted file mode 120000 index 7d49a2a4b..000000000 --- a/gb.corba/m4 +++ /dev/null @@ -1 +0,0 @@ -../m4 \ No newline at end of file diff --git a/gb.corba/reconf b/gb.corba/reconf deleted file mode 120000 index 48a376da6..000000000 --- a/gb.corba/reconf +++ /dev/null @@ -1 +0,0 @@ -../reconf \ No newline at end of file diff --git a/gb.corba/src/CCorbaApplication.cpp b/gb.corba/src/CCorbaApplication.cpp deleted file mode 100644 index 3379fcbe2..000000000 --- a/gb.corba/src/CCorbaApplication.cpp +++ /dev/null @@ -1,892 +0,0 @@ -/*************************************************************************** - - CCorbaApplication.cpp - - (c) 2005 Carlo Sorda - - 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, 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., 675 Mass Ave, Cambridge, MA 02139, USA. - -***************************************************************************/ -#define __CCORBA_APPLICATION_CPP - - -#include -#include -#include - -#include "main.h" -#include "gambas.h" -#include "gb_common.h" -#include "CCorbaApplication.h" - -#include - -#ifdef HAVE_STD -# include - using namespace std; -#else -# include -#endif - -//#define CORBA_DEBUG 0 - -//CORBA::Object_var corbaobj; - - -typedef - struct { - char *dcop; - GB_TYPE type; - } - TYPE_CONV; - -void CORBA_init(void) -{ -} -void CORBA_exit(void) -{ - -} - -// static void hello(CORBA::Object_ptr obj) -// { -// -// CORBA::String_var arg = (const char*) "Hello!"; -// CORBA::Request_var req = obj->_request("echoString"); -// req->add_in_arg() <<= arg; -// req->set_return_type(CORBA::_tc_string); -// -// req->invoke(); -// -// if( req->env()->exception() ) { -// cout << "echo_diiclt: An exception was thrown!" << endl; -// return; -// } -// -// const char* ret; -// req->return_value() >>= ret; -// -// cerr << "I said, \"" << (char*)arg << "\"." << endl -// << "The Echo object replied, \"" << ret <<"\"." << endl; -// } -// static void hello_deferred(CORBA::Object_ptr obj) -// { -// CORBA::String_var arg = (const char*) "Hello!"; -// CORBA::Request_var req = obj->_request("echoString"); -// req->add_in_arg() <<= arg; -// req->set_return_type(CORBA::_tc_string); -// -// req->send_deferred(); -// cerr << "Sending deferred request: "; -// while( !req->poll_response() ) -// cerr << '#'; -// cerr << endl << "Response received." << endl; -// -// if( req->env()->exception() ) { -// cout << "echo_diiclt: An exception was thrown!" << endl; -// return; -// } -// -// const char* ret; -// req->return_value() >>= ret; -// -// cerr << "I said, \"" << (char*)arg << "\"." << endl -// << "The Echo object replied, \"" << ret <<"\"." << endl; -// } -static CORBA::Object_ptr -getObjectReference(CORBA::ORB_ptr orb, CCORBA_COSNAMING *CosNaming_) -{ - //corbalocAddress = "corbaloc::iiop:172.22.201.24:10435/NameService"; - CosNaming::NamingContext_var rootContext; - #ifdef CORBA_DEBUG - cout << "prima di try" << endl; - #endif - try { - // Obtain a reference to the root context of the Name service: - CORBA::Object_var obj; - obj = orb->resolve_initial_references("NameService"); - - //cout << "dentro try " << corbalocAddress << endl; - // Narrow the reference returned. - rootContext = CosNaming::NamingContext::_narrow(obj); - #ifdef CORBA_DEBUG - cout << "rootContext = CosNaming::NamingContext::_narrow(obj);" << endl; - #endif - - if( CORBA::is_nil(rootContext) ) { - cerr << "Failed to narrow the root naming context." << endl; - return CORBA::Object::_nil(); - } - } - catch(CORBA::ORB::InvalidName& ex) { - // This should not happen! - GB.Error("Service required is invalid [does not exist]."); - cerr << "Service required is invalid [does not exist]." << endl; - return CORBA::Object::_nil(); - } - catch(...) { - // This should not happen! - GB.Error("Errore generale"); - cerr << "Errore generale." << endl; - return CORBA::Object::_nil(); - } - - - #ifdef CORBA_DEBUG - cout << "dopo try"<< endl; - #endif - // Create a name object, containing the name test/context: - CosNaming::Name name; - name.length(CosNaming_->name.length()); - - for (unsigned int i =0;iname.length();i++){ - name[i].id = CosNaming_->name[i].id; // string copied - #ifdef CORBA_DEBUG - cout << "id=" << name[i].id << endl; - #endif - if ( CosNaming_->name[i].kind != 0 ){ - name[i].kind = CosNaming_->name[i].kind; // string copied - #ifdef CORBA_DEBUG - cout << "kind=" << name[i].kind << endl; - #endif - } - - } - - //~ name[0].id = (const char*) CosNaming_->id; // string copied - //~ if ( CosNaming_->kind != 0 ) - //~ name[0].kind = (const char*) CosNaming_->kind; // string copied - - #ifdef CORBA_DEBUG - cout << "Dopo assegnazione name"<< endl; - #endif - - //name[0].kind = (const char*) ""; // string copied - // Note on kind: The kind field is used to indicate the type - // of the object. This is to avoid conventions such as that used - // by files (name.type -- e.g. test.ps = postscript etc.) - - -// Create a name object, containing the name test/context: -// CosNaming::Name name; -// name.length(2); -// -// name[0].id = (const char*) "test"; // string copied -// name[0].kind = (const char*) "my_context"; // string copied -// name[1].id = (const char*) "Echo"; -// name[1].kind = (const char*) "Object"; - - try { - // Resolve the name to an object reference. - #ifdef CORBA_DEBUG - cout << "Prima di resolve()"<< endl; - #endif - return rootContext->resolve(name); - - } - catch(CosNaming::NamingContext::NotFound& ex) { - // This exception is thrown if any of the components of the - // path [contexts or the object] aren't found: - GB.Error("Context not found."); - cerr << "Context not found." << endl; - } - catch(CORBA::COMM_FAILURE& ex) { - GB.Error("Caught system exception COMM_FAILURE -- unable to contact the naming service."); - cerr << "Caught system exception COMM_FAILURE -- unable to contact the " << "naming service." << endl; - } - catch(CORBA::SystemException&) { - GB.Error("Caught a CORBA::SystemException while using the naming service."); - cerr << "Caught a CORBA::SystemException while using the naming service." << endl; - } - - return CORBA::Object::_nil(); -} -//~ static void getdress(CORBA::Object_ptr obj) -//~ { - //~ cout << "Sto eseguendo getddress()" << endl; - //~ CORBA::String_var arg = (const char*) "34343434"; - //~ CORBA::String_var arg1 = (const char*) "3434"; - - //~ CORBA::Request_var req = obj->_request("getddress"); - //~ req->add_in_arg() <<= arg; - //~ req->add_in_arg() <<= arg1; - //~ req->set_return_type(CORBA::_tc_string); - - //~ req->invoke(); - - //~ if( req->env()->exception() ) { - //~ cout << "echo_diiclt: An exception was thrown!" << endl; - //~ return; - //~ } - - //~ const char* ret; - //~ req->return_value() >>= ret; - - //~ cerr << "I said, \"" << (char*)arg << "\"." << "\"" << (char*)arg1 << "\"." <value; - -// 1 Type 4 AS Integer -// 2 Type 7 AS Float -// 3 Type 8 AS Date -// 4 Type 3 AS Short -// 5 Type 2 AS Byte -// 6 Type 5 AS Long -// 7 Type 16 AS Object -// 8 Type 9-10 AS String -// 9 Type 6 AS Single -// 10 Type 15 AS Variant - req = corbaobj->_request(name); - - for (i = 1; i < n; i++) - { - arg = &args[i]; - - #ifdef CORBA_DEBUG - cout << "Count=" << i << " " << " Type = " << arg->type << endl; - #endif - - //string -> char* - if (arg->type == 10){ - CORBA::String_var argument = (const char*)GB.ToZeroString((GB_STRING*)arg); - //CORBA::String_var argument = (const char*)"2323"; - - req->add_in_arg() <<= argument; - #ifdef CORBA_DEBUG - if (i > 1) - cout << ","; - - cout << "\"" << argument << "\""; - #endif - } - //integer -> short(int) - //short -> short - else if (arg->type == 4 || arg->type == 3){ - CORBA::Short value = ((GB_INTEGER *)arg)->value; - //req = corbaobj->_request(name); - req->add_in_arg() <<= value; - #ifdef CORBA_DEBUG - if (i > 1) - cout << ","; - - cout << value; - #endif - } - //float -> float - else if (arg->type == 7){ - CORBA::Double value = ((GB_FLOAT *)arg)->value; - //req = corbaobj->_request(name); - req->add_in_arg() <<= value; - #ifdef CORBA_DEBUG - if (i == 1) - cout << value; - else - cout << "," << value; - #endif - } - //float -> float - else if (arg->type == 6){ - CORBA::Float value = ((GB_FLOAT *)arg)->value; - //req = corbaobj->_request(name); - req->add_in_arg() <<= value; - #ifdef CORBA_DEBUG - if (i == 1) - cout << value; - else - cout << "," << value; - #endif - } - //long -> long - else if (arg->type == 5){ - CORBA::Long value = ((GB_LONG *)arg)->value; - //req = corbaobj->_request(name); - req->add_in_arg() <<= value; - #ifdef CORBA_DEBUG - if (i == 1) - cout << value; - else - cout << "," << value; - #endif - } -// //Boolean -// else if (arg->type == 1){ -// CORBA::Long value = ((GB_BOOLEAN *)arg)->value; -// req->add_in_arg() <<= value; -// #ifdef CORBA_DEBUG -// if (i > 1) -// cout << ","; -// -// cout << value; -// #endif -// } - - - } - #ifdef CORBA_DEBUG - cout << " ) " << endl; - #endif - - if (retType == 0) - req->set_return_type(CORBA::_tc_void); - else if (retType == 10) - req->set_return_type(CORBA::_tc_string); - else if (retType == 4 || retType == 3) - req->set_return_type (CORBA::_tc_short); - else if (retType == 7) - req->set_return_type (CORBA::_tc_float); - else if (retType == 8) - req->set_return_type (CORBA::_tc_double); - else if (retType == 5) - req->set_return_type (CORBA::_tc_long); - else if (retType == 16) - req->set_return_type (CORBA::_tc_Object); - else if (retType == 20) - req->set_return_type (CORBA::_tc_ushort); - else if (retType == 30){ - req->set_return_type (CORBA::_tc_any); - cout << "rettype = 30" << endl; - } -// else if (retType == 1) -// req->set_return_type (CORBA::_tc_boolean); - - req->invoke(); - - if( req->env()->exception() ) { - cout << "An exception was thrown!" << endl; - GB.Error("An exception was thrown!"); - return false; - } - #ifdef CORBA_DEBUG - cout << "Command was executed!"<return_value() >>= ret; - GB.ReturnNewZeroString(ret); - } - //int - else if (retType == 4 || retType == 3){ - CORBA::Short ret = 0; - req->return_value() >>= ret; - GB.ReturnInteger(ret); - } - //float - else if (retType == 20 ){ - CORBA::UShort ret = 0; - req->return_value() >>= ret; - GB.ReturnInteger(ret); - } - - //float - else if (retType == 7 ){ - CORBA::Float ret = 0; - req->return_value() >>= ret; - GB.ReturnFloat(ret); - } - else if (retType == 8 ){ - CORBA::Double ret = 0; - req->return_value() >>= ret; - GB.ReturnFloat(ret); - } - - else if (retType == 5 ){ - CORBA::Long ret = 0; - req->return_value() >>= ret; - GB.ReturnLong(ret); - } - else if (retType == 16){ - CCORBA_OBJECT *_object = 0; - GB.New(POINTER(&_object), GB.FindClass("CORBAObject"), NULL, NULL); - //_object->ref = new DCOPRef(dcopref); - - //req->set_return_type (CORBA::_tc_Object); - // Extract the returned object reference from the request. - req->return_value () >>= CORBA::Any::to_object (_object->obj_var_.out ()); - GB.ReturnObject(_object); - } - else if (retType == 30){ - #ifdef CORBA_DEBUG - cout << "retType=30" << endl; - #endif - GB_ARRAY array; - //const char *data; - CORBA::Any temp; - - //req->set_return_type (CORBA::_tc_any); - req->return_value () >>= temp; - - CORBA::StringSeq* elem_ptr = new CORBA::StringSeq(); - - temp >>= elem_ptr; - - - n =elem_ptr->length(); - cout << "n:" << n << endl; - - GB.Array.New(&array, GB_T_STRING, n); - for (i = 0; i < n; i++) - { - //data = *elem_ptr[i]; - //GB.NewString((char **)GB.Array.Get(array, i), data, 0); - } - - GB.ReturnObject(array); - - - - //~ CCORBA_OBJECT *_object = 0; - //~ GB.New((void **)&_object, GB.FindClass("CORBAObject"), NULL, NULL); - //~ //_object->ref = new DCOPRef(dcopref); - - //~ req->set_return_type (CORBA::_tc_Object); - //~ // Extract the returned object reference from the request. - //~ req->return_value () >>= CORBA::Any::to_object (_object->obj_var_.out ()); - //~ GB.ReturnObject(_object); - } - - -/* //Boolean - else if (retType == 1 ){ - CORBA::Boolean ret = false; - req->return_value() >>= ret; - GB.ReturnBoolean(ret); - }*/ - return false; -} -#undef THIS -#define THIS ((CCORBA_COSNAMING *)_object) -BEGIN_METHOD_VOID(CCORBA_COSNAMING_new) - THIS->kind = 0; - THIS->id = 0; - - //~ for (int i =0;iname.length();i++){ - //~ name[i].id = CosNaming_->name[i].id; // string copied - //~ if ( CosNaming_->name[i].kind != 0 ) - //~ name[i].kind = CosNaming_->name[i].kind; // string copied - - //~ } - -END_METHOD - -BEGIN_METHOD_VOID(CCORBA_COSNAMING_free) - -END_METHOD -BEGIN_METHOD_VOID(CCORBA_COSNAMING_length) - - if (READ_PROPERTY) - GB.ReturnInteger(THIS->name.length()); - else - THIS->name.length((VPROP(GB_INTEGER))); -END_METHOD -BEGIN_PROPERTY(CCORBA_COSNAMING_id) - char* id_ = 0; - - if (READ_PROPERTY){ - if (!THIS->name[THIS->index].id) - GB.ReturnNewString(NULL,0); - else - GB.ReturnNewString(THIS->name[THIS->index].id,0); - - return ; - } - GB.StoreString(PROP(GB_STRING), &id_); - - THIS->name[THIS->index].id = strdup(id_); - #ifdef CORBA_DEBUG - cout << "id = " << id_<< endl; - #endif - GB.FreeString(&id_); - -END_METHOD -BEGIN_PROPERTY(CCORBA_COSNAMING_kind) - char* kind_=0; - - if (READ_PROPERTY){ - if (!THIS->name[THIS->index].kind) - GB.ReturnNewString(NULL,0); - else - GB.ReturnNewString(THIS->name[THIS->index].kind,0); - - return ; - } - - GB.StoreString(PROP(GB_STRING), &kind_); - THIS->name[THIS->index].kind = strdup(kind_); - #ifdef CORBA_DEBUG - cout << "kind = " << kind_<< endl; - #endif - GB.FreeString(&kind_); - - -END_METHOD - -BEGIN_METHOD(CCORBA_COSNAMING_get, GB_INTEGER index) - - long index = VARG(index); - - THIS->index = index; - RETURN_SELF(); - -END_METHOD - -GB_DESC CCORBACosNamingNameDesc[] = -{ - GB_DECLARE(".CosNamingName",0), GB_VIRTUAL_CLASS(), - - GB_PROPERTY("id", "s", CCORBA_COSNAMING_id), - GB_PROPERTY("kind", "s", CCORBA_COSNAMING_kind), - - GB_END_DECLARE -}; -GB_DESC CCORBACosNamingNamesDesc[] = -{ - GB_DECLARE("CORBACosNamingName", sizeof(CCORBA_COSNAMING)), - - GB_METHOD("_free", NULL, CCORBA_COSNAMING_free, NULL), - - //~ GB_PROPERTY("id", "s", CCORBA_COSNAMING_id), - //~ GB_PROPERTY("kind", "s", CCORBA_COSNAMING_kind), - - GB_METHOD("_get", ".CosNamingName", CCORBA_COSNAMING_get, "(Index)i"), - GB_PROPERTY("length", "i", CCORBA_COSNAMING_length), - //GB_METHOD("_put", NULL, CCORBA_COSNAMING_put, "(id)s(kind)s"), - //GB_METHOD("length", NULL, CCORBA_COSNAMING_length, "(length)i"), - - GB_END_DECLARE -}; - -#undef THIS -#define THIS ((CCORBA_APPLICATION *)_object) - -/*! - CORBAApplication - E' possibile creare un oggetto CORBAClient attraverso lo IOR del server CORBA di - cui si vogliono richiedere i servizi. - E' Possibile creare un oggetto CORBAClient attraverso un URI dell'oggetto remoto o del NameServer - - GAMBAS2 Sample - Statis Sub main() - Dim CorbaApp as CORBAApplication - Dim IOR as string - Dim URI as string - - IOR = "IOR:00945405945045945094509...." - CorbaApp = new CORBAApplication(IOR) - - 'or you can crete a new object by URI like this - URI = "corbaloc:iiop:localhost:10435/Nameservice" - CorbaApp = new CORBAApplication(IOR) - - end sub -*/ -BEGIN_METHOD_VOID(CCORBA_APPLICATION_new) -END_METHOD - -BEGIN_METHOD(CCORBA_APPLICATION_InitIOR,GB_STRING IOR) - - int argc = 1; - char **argv = 0; - char* sIOR_; - CCORBA_OBJECT *_obj = 0; - - sIOR_= GB.ToZeroString(ARG(IOR)); - if (strlen(sIOR_) == 0){ - GB.Error("IOR must be not zero lenght!"); - return; - } - - //strcpy(THIS->IOR,sIOR_); - argv = (char**)malloc(sizeof(char*)*(1)); - argv[0] = strdup("omniORB4"); - - try { - THIS->orb = CORBA::ORB_init(argc, argv, "omniORB4"); - - if( CORBA::is_nil(THIS->orb) ) - GB.Error("ORB not initialized!"); - - -/* THIS->obj_var_ = THIS->orb->string_to_object(sIOR_); - if( CORBA::is_nil(THIS->obj_var_) ) - GB.Error("Remote CORBA OBJECT not initialized!");*/ - - GB.New(POINTER(&_obj), GB.FindClass("CORBAObject"), NULL, NULL); - _obj->obj_var_ = THIS->orb->string_to_object(sIOR_); - - free(argv[0]); - free(argv); - - GB.ReturnObject(_obj); - - } - catch(CORBA::COMM_FAILURE& ex) { - GB.Error("Caught system exception COMM_FAILURE -- unable to contact the object."); - cerr << "Caught system exception COMM_FAILURE -- unable to contact the object." << endl; - } - catch(CORBA::SystemException&) { - GB.Error("Caught a CORBA::SystemException."); - cerr << "Caught a CORBA::SystemException." << endl; - } - catch(CORBA::Exception&) { - GB.Error("Caught CORBA::Exception."); - cerr << "Caught CORBA::Exception." << endl; - } - catch(omniORB::fatalException& fe) { - GB.Error("Caught omniORB::fatalException:"); - cerr << "Caught omniORB::fatalException:" << endl; -/* cerr << " file: " << fe.file() << endl; - cerr << " line: " << fe.line() << endl; - cerr << " mesg: " << fe.errmsg() << endl;*/ - } - catch(...) { - GB.Error("Caught unknown exception."); - cerr << "Caught unknown exception." << endl; - } - - - - //GB.ReturnBoolean(true); -END_METHOD -BEGIN_METHOD(CCORBA_APPLICATION_InitURI,GB_OBJECT CosNamingName;GB_STRING NameServiceURI) - - int argc = 3; - char **argv = 0; - - //char* URI_; - //char* CorbaServerName_; - CCORBA_OBJECT *_obj = 0; - CCORBA_COSNAMING *CosNaming_ = 0; - - THIS->URI = GB.ToZeroString(ARG(NameServiceURI)); - - argv = (char**)malloc(sizeof(char*)*(3)); - argv[0] = strdup("omniORB4"); - argv[1] = strdup("-ORBInitRef"); - //argv[2] = strdup("NameService=corbaloc:iiop:stargate:10435/NameService"); - argv[2] = THIS->URI; - - - CosNaming_ = (CCORBA_COSNAMING*) VARG(CosNamingName); - - if (strlen(THIS->URI) == 0){ - GB.Error("NameServiceURI must be not zero lenght!"); - return; - } - -// cout << "riga 3" << endl; -// strcpy(THIS->CorbaServerName,CorbaServerName_); -// cout << "riga 4" << endl; -// strcpy(THIS->URI,URI_); -// cout << "riga 5" << endl; - - try { - THIS->orb = CORBA::ORB_init(argc, argv); - if( CORBA::is_nil(THIS->orb) ) - GB.Error("ORB not initialized!"); - - GB.New(POINTER(&_obj), GB.FindClass("CORBAObject"), NULL, NULL); - _obj->obj_var_ = getObjectReference(THIS->orb,CosNaming_); - #ifdef CORBA_DEBUG - cout << "Dopo il getObject..."<< endl; - #endif - -// free(argv[2]); -// free(argv[1]); -// free(argv[0]); -// free(argv); - - GB.ReturnObject(_obj); -} - catch(CORBA::COMM_FAILURE& ex) { - GB.Error("Caught system exception COMM_FAILURE -- unable to contact the object."); - cerr << "Caught system exception COMM_FAILURE -- unable to contact the object." << endl; - } - catch(CORBA::SystemException&) { - GB.Error("Caught a CORBA::SystemException."); - cerr << "Caught a CORBA::SystemException." << endl; - } - catch(CORBA::Exception&) { - GB.Error("Caught CORBA::Exception."); - cerr << "Caught CORBA::Exception." << endl; - } - catch(omniORB::fatalException& fe) { - GB.Error("Caught omniORB::fatalException:"); - cerr << "Caught omniORB::fatalException:" << endl; - } - catch(...) { - GB.Error("Caught unknown exception."); - cerr << "Caught unknown exception." << endl; - } - -/*cout << "prima della liberazione della memoria" << endl; - - free(argv[2]); - free(argv[1]); - free(argv[0]); - free(argv); -cout << "dopo della liberazione della memoria" << endl;*/ -END_METHOD - -BEGIN_METHOD_VOID(CCORBA_APPLICATION_free) - //THIS->orb must not nil - THIS->orb->destroy(); -END_METHOD -BEGIN_METHOD_VOID(CCORBA_APPLICATION_exit) - -END_METHOD -BEGIN_METHOD(CCORBA_APPLICATION_unknown, GB_VALUE param[0]) - - //GB_VALUE *arg; -// //int i; - int n; - //int retType; - GB_VALUE *args; - - n = GB.NParam(); - args = ARG(param[0]); - -// for (i = 1; i < n; i++) -// { -// arg = &args[i]; -// printf("i= %d Type= %d\n",i,arg->type); -// } -// return ; - - if (GB.IsProperty()) - { - -/* if (call_method(THIS, NULL, GB.GetUnknown(), NULL, 0, false)) - get_object(THIS, GB.GetUnknown()); - */ - //Return type -// arg = &args[0]; -// retType = ((GB_INTEGER *)arg)->value; -// -// if (callIdl(retType, GB.GetUnknown(), ARG(param[0]), GB.NParam())) -// cout << "Tutto bene" << endl; -// else -// cout << "Errore" << endl; -// - //call_method(THIS, THIS->object, GB.GetUnknown(), ARG(param[0]), GB.NParam(), true); - //GB.FreeString(&THIS->object); - - } - else - { - - //Return type - if (callIdlMethod(THIS->obj_var_,GB.GetUnknown(), ARG(param[0]), GB.NParam())){ - #ifdef CORBA_DEBUG - cout << "Tutto bene" << endl; - #endif - } - else{ - #ifdef CORBA_DEBUG - cout << "Errore" << endl; - #endif - } - - //call_method(THIS, THIS->object, GB.GetUnknown(), ARG(param[0]), GB.NParam(), true); - //GB.FreeString(&THIS->object); - } - -END_METHOD - - - -GB_DESC CCORBAApplicationDesc[] = -{ - GB_DECLARE("CORBAApplication",sizeof(CCORBA_APPLICATION)), - GB_METHOD("_new",NULL,CCORBA_APPLICATION_new,NULL), - GB_METHOD("_free", NULL, CCORBA_APPLICATION_free, NULL), - - GB_CONSTANT("CorbaStringSequence", "i", 30), - GB_CONSTANT("CorbaObjectSequence", "i", 31), - GB_CONSTANT("CorbaObject", "i", 16), - GB_CONSTANT("CorbaFloat", "i", 7), - GB_CONSTANT("CorbaDouble", "i", 8), - GB_CONSTANT("CorbaString", "i", 10), - GB_CONSTANT("CorbaShort", "i", 3), - GB_CONSTANT("CorbaUShort", "i", 20), - - GB_CONSTANT("CorbaInteger", "i", 4), - GB_CONSTANT("CorbaLong", "i", 5), - GB_CONSTANT("CorbaVoid", "i", 0), - - GB_STATIC_METHOD("_exit", NULL, CCORBA_APPLICATION_exit, NULL), - GB_METHOD("_unknown", "v", CCORBA_APPLICATION_unknown, "."), - - //GB_METHOD("InitIOR", "b", CCORBA_APPLICATION_InitIOR, "(IOR)s"), - GB_METHOD("InitIOR", "CORBAObject", CCORBA_APPLICATION_InitIOR, "(IOR)s"), - GB_METHOD("InitURI", "CORBAObject", CCORBA_APPLICATION_InitURI, "(CosNamingName)CORBACosNamingName;(NameServiceURI)s"), - - GB_END_DECLARE -}; - -#undef THIS -#define THIS ((CCORBA_OBJECT *)_object) - -BEGIN_METHOD_VOID(CCORBA_OBJECT_free) - -END_METHOD - -BEGIN_PROPERTY(CCORBA_OBJECT_IOR) - GB.ReturnNewZeroString(THIS->IOR); -END_PROPERTY -BEGIN_METHOD(CCORBA_OBJECT_unknown, GB_VALUE param[0]) - - callIdlMethod(THIS->obj_var_, GB.GetUnknown(), ARG(param[0]), GB.NParam()); - -END_METHOD - -GB_DESC CCORBAObjectDesc[] = -{ - GB_DECLARE("CORBAObject", sizeof(CCORBA_OBJECT)), GB_NOT_CREATABLE(), - - GB_METHOD("_free", NULL, CCORBA_OBJECT_free, NULL), - GB_METHOD("_unknown", "v", CCORBA_OBJECT_unknown, "."), - - GB_PROPERTY_READ("IOR", "s", CCORBA_OBJECT_IOR), - GB_END_DECLARE -}; diff --git a/gb.corba/src/CCorbaApplication.h b/gb.corba/src/CCorbaApplication.h deleted file mode 100644 index 0ede920b0..000000000 --- a/gb.corba/src/CCorbaApplication.h +++ /dev/null @@ -1,81 +0,0 @@ -/*************************************************************************** - - CCorbaApplication.h - - (c) 2005 Carlo Sorda - - 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, 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., 675 Mass Ave, Cambridge, MA 02139, USA. - -***************************************************************************/ - -#ifndef __CCORBA_H -#define __CCORBA_H - -#include "gambas.h" -#include - -#ifndef __CCORBAAPPLICATION_CPP - extern GB_DESC CCORBAApplicationDesc[]; - extern GB_DESC CCORBAObjectDesc[]; - extern GB_DESC CCORBACosNamingNamesDesc[]; - extern GB_DESC CCORBACosNamingNameDesc[]; -#endif - -typedef - struct { - GB_BASE ob; - CosNaming::Name name; - char* id; - char* kind; - int index; - } -CCORBA_COSNAMING; - -typedef - struct { - GB_BASE ob; - GB_COLLECTION *cosname; - } - CCORBA_COSNAMINGS; - -typedef - struct { - GB_BASE ob; - char* URI; - char* IOR; - char* CorbaServerName; - // Storage of the object objref.; - CORBA::Object_var obj_var_; - } -CCORBA_OBJECT; - - -typedef - struct { - GB_BASE ob; - char* name; - char* object; - char* URI; - char* IOR; - char* CorbaServerName; - CORBA::ORB_var orb; - CORBA::Object_var obj_var_; - } - CCORBA_APPLICATION; - -void CORBA_init(void); -void CORBA_exit(void); - -#endif /* __CCORBA_H */ diff --git a/gb.corba/src/Makefile.am b/gb.corba/src/Makefile.am deleted file mode 100644 index 0fc16f5f5..000000000 --- a/gb.corba/src/Makefile.am +++ /dev/null @@ -1,12 +0,0 @@ -COMPONENT = gb.corba -include $(top_srcdir)/component.am - -INCLUDES = @CORBA_INC@ - -gblib_LTLIBRARIES = gb.corba.la - -gb_corba_la_LIBADD = @CORBA_LIB@ -gb_corba_la_LDFLAGS = -module @LD_FLAGS@ @CORBA_LDFLAGS@ -gb_corba_la_CXXFLAGS = $(AM_CXXFLAGS) -fexceptions - -gb_corba_la_SOURCES = main.cpp main.h CCorbaApplication.cpp CCorbaApplication.h diff --git a/gb.corba/src/gb.corba.component b/gb.corba/src/gb.corba.component deleted file mode 100644 index a2c8a65aa..000000000 --- a/gb.corba/src/gb.corba.component +++ /dev/null @@ -1,7 +0,0 @@ -[Component] -Key=gb.corba -Name=CORBA Client -Name[fr]=Client CORBA -Name[tr]=CORBA İstemcisi -Author=Carlo Sorda -Alpha=1 diff --git a/gb.corba/src/main.cpp b/gb.corba/src/main.cpp deleted file mode 100644 index 0320fb077..000000000 --- a/gb.corba/src/main.cpp +++ /dev/null @@ -1,95 +0,0 @@ -/*************************************************************************** - - main.cpp - - (c) 2005 Carlo Sorda - - 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, 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., 675 Mass Ave, Cambridge, MA 02139, USA. - -***************************************************************************/ - -#define __MAIN_CPP - -#include -#include -#include -#include -#include - -#include "gambas.h" -#include "gb_common.h" - -#include "main.h" -#include "CCorbaApplication.h" - -extern "C" { - -GB_INTERFACE GB EXPORT; - -} /* extern "C" */ - -static void cl_wait(long duration) -{ - -} - -static void cl_init(void) -{ - -} - -static void cl_exit(void) -{ - -} - -static int cl_loop(void) -{ - while(1) - { - - } - - return 0; -} -extern "C" { - - GB_DESC *GB_CLASSES[] EXPORT = - { - CCORBAApplicationDesc, - CCORBAObjectDesc, - CCORBACosNamingNamesDesc, - CCORBACosNamingNameDesc, - - - NULL - }; - - int EXPORT GB_INIT(void) - { - GB.Hook(GB_HOOK_WAIT, (void *)cl_wait); - GB.Hook(GB_HOOK_LOOP, (void *)cl_loop); - - - - return -1; - } - - void EXPORT GB_EXIT() - { - cl_exit(); - } - -} //extern "C" diff --git a/gb.corba/src/main.h b/gb.corba/src/main.h deleted file mode 100644 index d0746bb4a..000000000 --- a/gb.corba/src/main.h +++ /dev/null @@ -1,36 +0,0 @@ -/*************************************************************************** - - main.h - - (c) 2005 Carlo Sorda - - 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, 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., 675 Mass Ave, Cambridge, MA 02139, USA. - -***************************************************************************/ - -#ifndef __MAIN_H -#define __MAIN_H - - #include "gambas.h" - #include "gb_common.h" - - - #ifndef __MAIN_CPP - extern "C" GB_INTERFACE GB; - #endif /* __MAIN_C */ - - - -#endif diff --git a/gb.gtk/src/gcombobox.cpp b/gb.gtk/src/gcombobox.cpp index dda6de6db..f5f1902eb 100644 --- a/gb.gtk/src/gcombobox.cpp +++ b/gb.gtk/src/gcombobox.cpp @@ -384,11 +384,7 @@ void gComboBox::setText(const char *vl) int index = find(vl); if (index >= 0) - { - lock(); setIndex(index); - unlock(); - } else if (entry) gTextBox::setText(vl); } diff --git a/gb.qt4/src/CContainer.cpp b/gb.qt4/src/CContainer.cpp index e9c4ac8d8..56a84aad8 100755 --- a/gb.qt4/src/CContainer.cpp +++ b/gb.qt4/src/CContainer.cpp @@ -493,21 +493,22 @@ void MyContainer::hideEvent(QHideEvent *e) }*/ } +void MyContainer::setStaticContents(bool on) +{ + setAttribute(Qt::WA_StaticContents, on && _frame == BORDER_NONE); +} + void MyContainer::setFrameStyle(int frame) { int margin; - _frame = frame; - - setAttribute(Qt::WA_StaticContents, frame == BORDER_NONE); - if (_frame == BORDER_NONE) - margin = 0; - else if (_frame == BORDER_PLAIN) - margin = 1; - else - margin = 2; + _frame = frame; + + setStaticContents(true); + margin = frameWidth(); setContentsMargins(margin, margin, margin, margin); + update(); } diff --git a/gb.qt4/src/CContainer.h b/gb.qt4/src/CContainer.h index db9e02385..b4fca464a 100644 --- a/gb.qt4/src/CContainer.h +++ b/gb.qt4/src/CContainer.h @@ -121,6 +121,7 @@ public: protected: + virtual void setStaticContents(bool on); virtual void showEvent(QShowEvent *); virtual void hideEvent(QHideEvent *); virtual void paintEvent(QPaintEvent *); diff --git a/gb.qt4/src/CDrawingArea.cpp b/gb.qt4/src/CDrawingArea.cpp index 512520424..19bedc1ae 100644 --- a/gb.qt4/src/CDrawingArea.cpp +++ b/gb.qt4/src/CDrawingArea.cpp @@ -132,6 +132,60 @@ void MyDrawingArea::setFrozen(bool f) _frozen = f; } +void MyDrawingArea::redraw(QRect &r, bool frame) +{ + QPainter *p; + void *_object = CWidget::getReal(this); + + if (!_object) + return; + + //qDebug("paint: %d %d %d %d", event->rect().x(), event->rect().y(), event->rect().width(), event->rect().height()); + + if (_use_paint) + { + PAINT_begin(THIS); + p = PAINT_get_current(); + } + else + { + DRAW_begin(THIS); + p = DRAW_get_current(); + } + + if (!isTransparent()) + { + p->translate(-r.x(), -r.y()); + } + + if (!_use_paint) + { + //p->setBrushOrigin(-r.x(), -r.y()); + DRAW_clip(r.x(), r.y(), r.width(), r.height()); + } + else + PAINT_clip(r.x(), r.y(), r.width(), r.height()); + + //p->setClipRegion(event->region().intersect(contentsRect())); + //p->setBrushOrigin(-r.x(), -r.y()); + + p->save(); + + GB.Raise(THIS, EVENT_draw, 0); + + p->restore(); + + if (frame) + { + p->setRenderHint(QPainter::Antialiasing, false); + drawFrame(p); + } + + if (_use_paint) + PAINT_end(); + else + DRAW_end(); +} void MyDrawingArea::paintEvent(QPaintEvent *event) { @@ -154,60 +208,14 @@ void MyDrawingArea::paintEvent(QPaintEvent *event) r = event->rect().intersect(rect()); if (r.isValid()) { - QPainter *p; - void *_object = CWidget::getReal(this); - - if (!_object) - return; - if (!isTransparent()) { cache = new QPixmap(r.width(), r.height()); cache->fill(this, r.x(), r.y()); } + + redraw(r, true); - //qDebug("paint: %d %d %d %d", event->rect().x(), event->rect().y(), event->rect().width(), event->rect().height()); - - if (_use_paint) - { - PAINT_begin(THIS); - p = PAINT_get_current(); - } - else - { - DRAW_begin(THIS); - p = DRAW_get_current(); - } - - if (!isTransparent()) - { - p->translate(-r.x(), -r.y()); - } - - if (!_use_paint) - { - p->setBrushOrigin(-r.x(), -r.y()); - DRAW_clip(r.x(), r.y(), r.width(), r.height()); - } - else - PAINT_clip(r.x(), r.y(), r.width(), r.height()); - - //p->setClipRegion(event->region().intersect(contentsRect())); - //p->setBrushOrigin(-r.x(), -r.y()); - - p->save(); - - GB.Raise(THIS, EVENT_draw, 0); - - p->restore(); - p->setRenderHint(QPainter::Antialiasing, false); - drawFrame(p); - - if (_use_paint) - PAINT_end(); - else - DRAW_end(); - if (!isTransparent()) { paint.drawPixmap(r.x(), r.y(), *cache); @@ -308,6 +316,11 @@ void MyDrawingArea::updateBackground() } } +void MyDrawingArea::setStaticContents(bool on) +{ +} + + void MyDrawingArea::updateCache() { if (_background) @@ -355,6 +368,12 @@ void MyDrawingArea::setTransparent(bool on) updateCache(); } +void MyDrawingArea::hideEvent(QHideEvent *e) +{ + if (_background) + _set_background = true; + MyContainer::hideEvent(e); +} /*************************************************************************** @@ -462,6 +481,24 @@ BEGIN_PROPERTY(CDRAWINGAREA_transparent) END_PROPERTY +BEGIN_METHOD(DrawingArea_Refresh, GB_INTEGER x; GB_INTEGER y; GB_INTEGER w; GB_INTEGER h) + + if (WIDGET->isCached()) + { + QRect r; + + if (!MISSING(x) && !MISSING(y)) + r.setRect(VARG(x), VARG(y), VARGOPT(w, WIDGET->width()), VARGOPT(h, WIDGET->height())); + else + r.setRect(0, 0, WIDGET->width(), WIDGET->height()); + + WIDGET->redraw(r, false); + } + + CCONTROL_refresh(_object, _param); + +END_METHOD + GB_DESC CDrawingAreaDesc[] = { GB_DECLARE("DrawingArea", sizeof(CDRAWINGAREA)), GB_INHERITS("Container"), @@ -480,6 +517,7 @@ GB_DESC CDrawingAreaDesc[] = GB_PROPERTY("Transparent", "b", CDRAWINGAREA_transparent), GB_METHOD("Clear", NULL, CDRAWINGAREA_clear, NULL), + GB_METHOD("Refresh", NULL, DrawingArea_Refresh, "[(X)i(Y)i(Width)i(Height)i]"), GB_EVENT("Draw", NULL, NULL, &EVENT_draw), diff --git a/gb.qt4/src/CDrawingArea.h b/gb.qt4/src/CDrawingArea.h index 72a389cb5..fceadf7c9 100644 --- a/gb.qt4/src/CDrawingArea.h +++ b/gb.qt4/src/CDrawingArea.h @@ -88,14 +88,17 @@ public: bool isPaint() { return _use_paint; } void setPaint(bool on) { _use_paint = on; } + void redraw(QRect &r, bool frame = false); bool isTransparent() { return _transparent; } void setTransparent(bool on); protected: + virtual void setStaticContents(bool on); virtual void resizeEvent(QResizeEvent *); virtual void paintEvent(QPaintEvent *); + virtual void hideEvent(QHideEvent *); //virtual void drawContents(QPainter *p); virtual void setPalette(const QPalette &); diff --git a/gb.qt4/src/CTextBox.cpp b/gb.qt4/src/CTextBox.cpp index 1d3065507..950cb1bb2 100644 --- a/gb.qt4/src/CTextBox.cpp +++ b/gb.qt4/src/CTextBox.cpp @@ -480,9 +480,7 @@ BEGIN_PROPERTY(CCOMBOBOX_text) COMBOBOX->lineEdit()->setText(text); pos = combo_find_item(THIS, text); - COMBOBOX->blockSignals(true); combo_set_current_item(_object, pos); - COMBOBOX->blockSignals(false); } END_PROPERTY diff --git a/gb.qt4/src/CWidget.h b/gb.qt4/src/CWidget.h index c04cc0ed3..347c23dbe 100644 --- a/gb.qt4/src/CWidget.h +++ b/gb.qt4/src/CWidget.h @@ -104,6 +104,7 @@ extern CWIDGET *CWIDGET_active_control; #define QCONTAINER(_ob) CWidget::getContainerWidget((CCONTAINER *)_ob) DECLARE_METHOD(CCONTROL_delete); +DECLARE_METHOD(CCONTROL_refresh); DECLARE_PROPERTY(CCONTROL_tag); DECLARE_PROPERTY(CWIDGET_border_full); DECLARE_PROPERTY(CWIDGET_border_simple);