Re: IDE compiled with GTK2
4) Putting the cursor at Column 1, keep in the Shift key and press the Right Arrow key - so you highlight the line. You get a really cool wave effect in the editor. :-) The text expands and contracts in width while highlighting. G. On 13/11/06, Graeme Geldenhuys [EMAIL PROTECTED] wrote: Hi, I haven't followed the GTK2 discussions, so this might have been covered before. Sorry in advance if this has been covered. I thought I would try running Lazarus compiled with GTK2, even though my apps I create will be compiled with GTK1. I'm very impressed with how much the GTK2 support has improved since I last tried it (a couple months back). A few editor problems: 1) The cursor isn't drawn on the correct place, compared the the text. It seems the text/character width isn't calculated correctly, to know where to draw the I beam cursor. 2) Line spacing seems a bit too much. There is quite some wasted space between lines and could be placed closer together. [Ah, setting the editor line spacing to 0 seems to fix this.] 3) What font currently works well with Lazarus and GTK2, to minimize the problem in (1). I currently have it set to 'Monospace 11'. Regards, - Graeme - -- Graeme Geldenhuys Location: S 34° 03.168' E018° 49.342' http://tinyurl.com/y6lc26 There's no place like 127.0.0.1 -- Graeme Geldenhuys Location: S 34° 03.168' E018° 49.342' http://tinyurl.com/y6lc26 There's no place like 127.0.0.1 _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
RE: Java AWT Native Interface (JAWT)
Title: RE: Java AWT Native Interface (JAWT) You might try the JNI_xp.zip fromhttp://www.delphi-jedi.org/APILIBRARYfor the JNI headers instead (says it also contains a Linux port)Mind you though that although JNI is a required API for a JVM to support (it spurred the Sun-MS legal battle against MSJVM which initially didn't have JNI support [they added support for it just before they decided to settle the case and retire MSJVM]), the JAWT API specification (by Sun) is an optional one for JVMs to implement (the Sun and IBM JVMs on Windows do support it from what I know, not sure about the JVMs for Linux/Unix/OS-X). JAWT is for having Java code draw into native peers from other applications (calling the Java code via JNI) -Original Message- From: George Birbilis [mailto:[EMAIL PROTECTED]] Sent: Monday, November 13, 2006 5:25 AM To: 'lazarus@miraclec.com' Subject: Java AWT Native Interface (JAWT) http://jawt2delphi.onestop.net/ If anyone wants to try it with Lazarus, can help them port it if it needs any changes (don't think it does though, it's pretty simple [needs you to pass it a Window handle from the Delphi/Lazarus side for Java to draw in it]). Feel free to use it and/or include in Lazarus (apart from my JAWT headers port, I use there a rather older JNI [Java Native Interface] headers port, so first one should check if there's newer version of that one and its license [it was free license from what I remember, the .pas files for the JNI stuff should mention the licensing at their start]) avast! Antivirus: Outbound message clean. Virus Database (VPS): 0647-0, 09/11/2006Tested on: 13/11/2006 11:41:13 ðìavast! - copyright (c) 1988-2006 ALWIL Software.
[lazarus] JEDI QuickTime
http://www.delphi-jedi.org/TEAM_QTM_HOME Anyone wants to try with Lazarus and help in adding it to the supported targets? (Apple QuickTime is available on Windows and MacOS [older QuickTime] and MacOS-X only, although there are third party APIs for other platforms to play some of the media supported by QuickTime [see QuickTime alternative, various libaries for Linux etc.] - those third party APIs aren't compatible with the QuickTime API though I think, they can just open and play some QuickTime media) Btw, at JEDI they also have a cross-platform port for SDL (Simple DirectMedia Library) that should work on Linux etc. too (in case the port isn't included with Lazarus too, would be easy to port their port) George Birbilis ([EMAIL PROTECTED]) Computer Informatics Engineer Microsoft MVP J# for 2004-2006 Borland Spirit of Delphi ++ QuickTime, Delphi, ActiveX, .NET components ++ http://www.kagi.com/birbilis ++ Robotics ++ http://www.mech.upatras.gr/~Robotics http://www.mech.upatras.gr/~robgroup _ avast! Antivirus http://www.avast.com : Outbound message clean. Virus Database (VPS): 0647-0, 09/11/2006 Tested on: 13/11/2006 11:45:04 p? avast! - copyright (c) 1988-2006 ALWIL Software. _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] JEDI QuickTime
On Mon, 13 Nov 2006, George Birbilis wrote: http://www.delphi-jedi.org/TEAM_QTM_HOME Anyone wants to try with Lazarus and help in adding it to the supported targets? (Apple QuickTime is available on Windows and MacOS [older QuickTime] and MacOS-X only, although there are third party APIs for other platforms to play some of the media supported by QuickTime [see QuickTime alternative, various libaries for Linux etc.] - those third party APIs aren't compatible with the QuickTime API though I think, they can just open and play some QuickTime media) Btw, at JEDI they also have a cross-platform port for SDL (Simple DirectMedia Library) that should work on Linux etc. too (in case the port isn't included with Lazarus too, would be easy to port their port) As far as I know, the Jedi SDL port works already with FPC/Lazarus, I believe Marco Van De Voort keeps in contact with Jedi, and makes sure some of their core libraries work with FPC. Michael. _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: IDE compiled with GTK2
On Mon, 13 Nov 2006 11:18:37 +0200 Graeme Geldenhuys [EMAIL PROTECTED] wrote: 4) Putting the cursor at Column 1, keep in the Shift key and press the Right Arrow key - so you highlight the line. You get a really cool wave effect in the editor. :-) The text expands and contracts in width while highlighting. Please create bug reports, so they won't be forgotten. Mattias G. On 13/11/06, Graeme Geldenhuys [EMAIL PROTECTED] wrote: Hi, I haven't followed the GTK2 discussions, so this might have been covered before. Sorry in advance if this has been covered. I thought I would try running Lazarus compiled with GTK2, even though my apps I create will be compiled with GTK1. I'm very impressed with how much the GTK2 support has improved since I last tried it (a couple months back). A few editor problems: 1) The cursor isn't drawn on the correct place, compared the the text. It seems the text/character width isn't calculated correctly, to know where to draw the I beam cursor. 2) Line spacing seems a bit too much. There is quite some wasted space between lines and could be placed closer together. [Ah, setting the editor line spacing to 0 seems to fix this.] 3) What font currently works well with Lazarus and GTK2, to minimize the problem in (1). I currently have it set to 'Monospace 11'. Regards, - Graeme - -- Graeme Geldenhuys Location: S 34° 03.168' E018° 49.342' http://tinyurl.com/y6lc26 There's no place like 127.0.0.1 _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: IDE compiled with GTK2
On 13/11/06, Mattias Gaertner [EMAIL PROTECTED] wrote: On Mon, 13 Nov 2006 11:18:37 +0200 Graeme Geldenhuys [EMAIL PROTECTED] wrote: 4) Putting the cursor at Column 1, keep in the Shift key and press the Right Arrow key - so you highlight the line. You get a really cool wave effect in the editor. :-) The text expands and contracts in width while highlighting. Please create bug reports, so they won't be forgotten. Mattias As I said, I wasn't sure if they where covered before, so wanted to make sure first... I guess they haven't, so will created the bug reports. Thanks. -- Graeme Geldenhuys Location: S 34° 03.168' E018° 49.342' http://tinyurl.com/y6lc26 There's no place like 127.0.0.1 _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] I need a printer mono font
Am Montag, 13. November 2006 00:30 meinte Terry A Haimann: Hello, When I do the following: Printer.BeginDoc; Printer.Canvas.Pen.Color := 0; Printer.Canvas.Font.Name := 'Courier'; Printer.Canvas.Font.Size := 8; The font is not mono spaced, what should I be doing instead? Use 'Courier New'. It is mono spaced with Linux and Win32 GTK. Regards Th. Moritz _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] icoutils
http://www.nongnu.org/icoutils/ in case you haven't heard of it
[lazarus] best way to communicate throught sockets whith lazarus
HiWhat is the best unit or the best way to communicate my program throught sockets?Lazarus 0.9.20 fpc 2.0.4 Thanks, Access over 1 million songs - Yahoo! Music Unlimited.
[lazarus] Changing the IDE
Can I set the user interface to multiple document view instead of multiple top-level documents? Does anyone know? I would prefer a Multiple document interface (or rather an IDE-style interface).
Re: [lazarus] Java AWT Native Interface (JAWT)
On Mon, Nov 13, 2006 at 05:25:04AM +0200, George Birbilis wrote: http://jawt2delphi.onestop.net/ If anyone wants to try it with Lazarus, can help them port it if it needs any changes (don't think it does though, it's pretty simple [needs you to pass it a Window handle from the Delphi/Lazarus side for Java to draw in it]). Feel free to use it and/or include in Lazarus (apart from my JAWT headers port, I use there a rather older JNI [Java Native Interface] headers port, so first one should check if there's newer version of that one and its license [it was free license from what I remember, the .pas files for the JNI stuff should mention the licensing at their start]) We have been aware of both possibilities for years now, as well as several Corba/ORB solutions. They occasionally get mentioned as a nice one to have, like this post. However somehow nobody ports them. Maybe you will be the one to change this? _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] JEDI QuickTime
On Mon, 13 Nov 2006, George Birbilis wrote: and play some QuickTime media) Btw, at JEDI they also have a cross-platform port for SDL (Simple DirectMedia Library) that should work on Linux etc. too (in case the port isn't included with Lazarus too, would be easy to port their port) As far as I know, the Jedi SDL port works already with FPC/Lazarus, I believe Marco Van De Voort keeps in contact with Jedi, and makes sure some of their core libraries work with FPC. More Jonas atm, SDL started working on OS X if I understood correctly. http://www.savagesoftware.com.au/download/JEDI-MACOSX.png Jedi Math: used to work with minimal changes. After the last release the current SVN significantly changes stuff, and includes FPC/Laz support bottom up. (by Darius Blazdijk). Jedi JCL: used to work on win32, and parts on Linux/FreeBSD, except for some more exotic libs. Haven't tested in 1 - 1.5 years. Jedi ApiLib: in FPC SVN. Needs to be checked against their bugtracker. Other api's: not tested. (telephone, acm etc). JVCL: quickly tried about a year to go, too many missing components and RTL functionality to do a mass porting. Some selected components might be portable though. License problems (designtime components are statically linked against GPL code) Nearly all Jedi (and other Delphi Open Source projects) need more and better demoes. Submitting nice demoes that work with Lazarus and Delphi is a possible route to raise interest. _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] best way to communicate throught sockets whith lazarus
On 11/13/06, Carlos Avogaro [EMAIL PROTECTED] wrote: Hi What is the best unit or the best way to communicate my program throught sockets? Lazarus 0.9.20 fpc 2.0.4 Thanks, There is several packages out there for such usage, I myself like to use http://wiki.lazarus.freepascal.org/lNet wich provies both visual and non visual ways (and works quite well at least for my usage). -- Lepidosteus http://lepidosteus.com _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] best way to communicate throught sockets whith lazarus
Not sure if this is they type of thing you were interested inhttp://www.ararat.cz/synapse/index.htm From the Website: Synchronous TCP/IP Library for Delphi, C++ Builder, Kylix and FreePascalOn 11/13/06, Carlos Avogaro [EMAIL PROTECTED] wrote:HiWhat is the best unit or the best way to communicate my program throught sockets? Lazarus 0.9.20 fpc 2.0.4 Thanks, Access over 1 million songs - Yahoo! Music Unlimited. -- Gerald Pöttler[EMAIL PROTECTED]
[lazarus] Printers4Lazarus broken
Since some days lazarus cant be started because winsock.dll isnt found when i have installed Printers4Lazarus Ive found only an export to winsock.drv. Maybe fpc 2.1.1 renames exports automatically since one week ?? Can anybody confirm this also for fpc 2.0.4 ? Can somebody of the fpc developer take a look if thers an problem with the export statement ? regards Christian _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Printers4Lazarus broken
Christian Ulrich schreef: Since some days lazarus cant be started because winsock.dll isnt found when i have installed Printers4Lazarus Ive found only an export to winsock.drv. Maybe fpc 2.1.1 renames exports automatically since one week ?? Can anybody confirm this also for fpc 2.0.4 ? Can somebody of the fpc developer take a look if thers an problem with the export statement ? This has already been fixed in fpc 2.1.1. Other issues with fpc 2.1.1 remain, among others a compilation problem with sets. Vincent P.S. next time start a new thread by create a new mail. Now your mail shows up in the [lazarus] best way to communicate throught sockets whith lazarus thread, which might very well be skipped by fpc developers on this list. _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] PATCH for gtk2 bug 970
Hi, this patch fixes bug 970 Regards, Andrew Index: lcl/interfaces/gtk/gtklistsl.inc === --- lcl/interfaces/gtk/gtklistsl.inc(revision 10195) +++ lcl/interfaces/gtk/gtklistsl.inc(working copy) @@ -80,7 +80,13 @@ // get itemindex and area ItemIndex:=g_list_index(GtkList^.children,Data); + {$IFDEF GTK1} AreaRect:=Bounds(Area^.x,Area^.y,Area^.Width,Area^.Height); + {$ELSE} + with Widget^.allocation do begin +AreaRect:=Bounds(x,y,width,height); + end; + {$ENDIF} // collect state flags State:=[odPainted];
Re: [lazarus] Printers4Lazarus broken
Christian Ulrich schreef: in witch revision is this fixed ?? It was fixed in revision 5243. the actual isnt compileable :( True. Vincent _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] ANN: ZipFile component
Why this component is under GPL and not LGPL ?? any special reason for this ? No particular reason. Do you want to link it to propriatary software? Darius Christian Vincent Snijders schrieb: Michael Van Canneyt schreef: On Sat, 11 Nov 2006, Darius Blaszijk wrote: I would like to announce the beta release of the TZipFile component. TZipFile is a component written from scratch with platform independcy in mind. It encapsulates a zipfile and provides all nescesary methods to access files stored internally as if they were stored uncompressed on the filesystem. The component can for instance be used as an interface to open document type files. Currently compression is not supported yet, but this feature is under construction and will be implemented anytime soon. Ehm... TZipper exists in the FCL since some time ? (fcl/inc/zipper) It compresses one or more files to a zip file. Lack of docs and no lpk. :-) At least TZipFile has a wiki page Vincent _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] PATCH for gtk2 bug 7257
Hi the attached patch fixes bug 7257 http://www.freepascal.org/mantis/view.php?id=7257 Regards Andrew Index: lcl/interfaces/gtk2/gtk2wsstdctrls.pp === --- lcl/interfaces/gtk2/gtk2wsstdctrls.pp (revision 10195) +++ lcl/interfaces/gtk2/gtk2wsstdctrls.pp (working copy) @@ -132,9 +132,13 @@ class procedure SetCallbacks(const AGtkWidget: PGtkWidget; const AWidgetInfo: PWidgetInfo); virtual; public class function CreateHandle(const AWinControl: TWinControl; const AParams: TCreateParams): TLCLIntfHandle; override; +class function GetSelStart(const ACustomEdit: TCustomEdit): integer; override; +class function GetSelLength(const ACustomEdit: TCustomEdit): integer; override; class function GetStrings(const ACustomMemo: TCustomMemo): TStrings; override; class procedure SetColor(const AWinControl: TWinControl);override; class procedure SetFont(const AWinControl: TWinControl;const AFont : TFont);override; +class procedure SetSelStart(const ACustomEdit: TCustomEdit; NewStart: integer); override; +class procedure SetSelLength(const ACustomEdit: TCustomEdit; NewLength: integer); override; end; { TGtk2WSEdit } Index: lcl/interfaces/gtk2/gtk2wscustommemo.inc === --- lcl/interfaces/gtk2/gtk2wscustommemo.inc(revision 10195) +++ lcl/interfaces/gtk2/gtk2wscustommemo.inc(working copy) @@ -169,5 +169,89 @@ end; end; +class procedure TGtk2WSCustomMemo.SetSelStart(const ACustomEdit: TCustomEdit; + NewStart: integer); +var + TextView: PGtkTextView; + TextBuffer: PGtkTextBuffer; + TextIter: TGtkTextIter; +begin + if not ACustomEdit.HandleAllocated then exit; + TextView := PGtkTextView(GetWidgetInfo(Pointer(ACustomEdit.Handle), False)^.CoreWidget); if not ACustomEdit.HandleAllocated then exit; + TextBuffer := gtk_text_view_get_buffer(TextView); + gtk_text_buffer_get_iter_at_offset(TextBuffer, @TextIter, NewStart); + gtk_text_buffer_place_cursor(TextBuffer, @TextIter); +end; +class procedure TGtk2WSCustomMemo.SetSelLength(const ACustomEdit: TCustomEdit; + NewLength: integer); +var + TextView: PGtkTextView; + TextBuffer: PGtkTextBuffer; + StartIter, EndIter: TGtkTextIter; + SelStart: Integer; +begin + if not ACustomEdit.HandleAllocated then exit; + TextView := PGtkTextView(GetWidgetInfo(Pointer(ACustomEdit.Handle), False)^.CoreWidget); if not ACustomEdit.HandleAllocated then exit; + TextBuffer := gtk_text_view_get_buffer(TextView); + SelStart := GetSelStart(ACustomEdit); + gtk_text_buffer_get_iter_at_offset(TextBuffer, @StartIter, SelStart); + gtk_text_buffer_get_iter_at_offset(TextBuffer, @StartIter, SelStart+NewLength); + + // missing in the bindings! + //gtk_text_buffer_select_range(TextBuffer, @StartIter, @EndIter); + + // remove this line when gtk_text_buffer_select_range is available + gtk_text_buffer_move_mark(TextBuffer, gtk_text_buffer_get_insert(TextBuffer), @StartIter); +end; + +class function TGtk2WSCustomMemo.GetSelStart(const ACustomEdit: TCustomEdit + ): integer; +var + TextView: PGtkTextView; + TextBuffer: PGtkTextBuffer; + TextMark: PGtkTextMark; + TextIter: TGtkTextIter; + StartIter, EndIter: TGtkTextIter; + StartPos, EndPos: Integer; +begin + Result := 0; + if not ACustomEdit.HandleAllocated then exit; + + TextView := PGtkTextView(GetWidgetInfo(Pointer(ACustomEdit.Handle), False)^.CoreWidget); if not ACustomEdit.HandleAllocated then exit; + TextBuffer := gtk_text_view_get_buffer(TextView); + TextMark := gtk_text_buffer_get_insert(TextBuffer); + gtk_text_buffer_get_iter_at_mark(TextBuffer, @TextIter, TextMark); + + Result := gtk_text_iter_get_offset(@TextIter); + if GetSelLength(ACustomEdit) = 0 then Exit; + + if not gtk_text_buffer_get_selection_bounds(TextBuffer, @StartIter, @EndIter) then Exit; + + StartPos := gtk_text_iter_get_offset(@StartIter); + EndPos := gtk_text_iter_get_offset(@EndIter); + + Result := Min(StartPos, EndPos); +end; + +class function TGtk2WSCustomMemo.GetSelLength(const ACustomEdit: TCustomEdit + ): integer; +var + TextView: PGtkTextView; + TextBuffer: PGtkTextBuffer; + StartIter, EndIter: TGtkTextIter; + TmpStr: String; +begin + Result := 0; + if not ACustomEdit.HandleAllocated then exit; + + TextView := PGtkTextView(GetWidgetInfo(Pointer(ACustomEdit.Handle), False)^.CoreWidget); if not ACustomEdit.HandleAllocated then exit; + TextBuffer := gtk_text_view_get_buffer(TextView); + if not gtk_text_buffer_get_selection_bounds(TextBuffer, @StartIter, @EndIter) then Exit; + + Result := Abs(gtk_text_iter_get_offset(@EndIter) - gtk_text_iter_get_offset(@StartIter)); +end; + + +
Re: [lazarus] More Unicode implementation details
Felipe Monteiro de Carvalho wrote: Hello, Here is my first patch. I checked that Window Titles work correct with UTF-8 if you recompile win32 with WindowsUnicodeSupport I also checked that titles work correctly with Ansi if you don?t set that define Marc, please review this. I created a global variable on win32proc called UnicodeEnabledOS that says if we are running on a NT version or a 9x version. OK, it took some time, I've aplied a modified version. r10196 Some things. The $IFDEFs aren't really needed when the $ELSE part is the same as the else of the UnicodeEnabledOS if. In the end we want a LCL version without $IFDEFs anyway. So I removed then in 2 places. The only doubt I have there is about the classname. for unicode it is translated to wide. Thats ok. For ansi it isn't translated (so both elses were the same). I wonder if window classnames should be translated form utf to ansi. IMO not. Also when creating a window, I've added a translation to the windowcaption. Further I've my doubts about the next functions (besides that maybe using a overloaded funtion makes it easier) function Utf8PCharToPWideChar(param: PChar): PWideChar; function Utf8ToPWideChar(param: string): PWideChar; Both return the result of Utf8Decode() as PWideChar. I didn't lookup the Result of Utf8Decode(), but I assume it is a WideString. AFAIK it get destroyed if you leave Utf8ToPWideChar functions, so in fact the result is pointing to nothing. So I would propose to remove both functions. I left them for now, since the code isn't enabled by default. Marc _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives