Lgi
About
LGI is a GUI framework for abstracting out all the operating system dependencies that you can produce portable code. It handles all the graphical interface functions, threading and semaphores, network connectivity and lots of other bits and peices to help build small, fast and reliable applications.

The strengths of LGI is that it's a small enough library that one person can understand it all. Also it's not too much of a burden on an application, both in increased download time and memory footprint. LGI at the moment compresses to about 300kb, which while not insignificant is quite a bit smaller than the other options.

Ultimately however size is a secondary consideration to the core feature of LGI and that is portability. Currently 3 serious ports exist: Win32, Mac and Linux. There is also a legacy BeOS port which is unsupported.

I have completed some basic documentation (available online here) for the library, and there are a number of example apps with source code available from this site as well.

Related Information:

Latest Trunk Code:

svn co https://lgi.svn.sourceforge.net/svnroot/lgi/trunk lgi

Releases:

Version: v3.3.0 [Stable]
Version: v3.2.1 [Stable]
Version: v3.2.0 [Stable]
Version: v3.02 [Stable]
Version: v3.01 [Stable]
Version: v3.00 [Stable]
Version: v2.20 [Stable]
Version: v2.10 [Stable]
Version: v2.00 [Stable]
Version: v1.99 [Stable]
Ports Status
Ordered by maturity:
  • Win32 (XP/Vista/Win7)
    This is the most stable and featured port, as it's the plaform I use the most. Everything works in Windows, and it's the fastest due to the speed of the Win32 Graphical Subsystem. I longer support or test on any version of windows before XP.
  • Mac OS X (>=10.5.0)
    The newest port of Lgi, most things are working but there are less used areas that need implementing or fixing. The GUI code is fairly complete and solid, although some more optimization is needed. Threads, sockets etc all work too.
  • Linux/Gtk+ (>=2.6)
    This is currently being rewritten to target Gtk+ as I simply do not have to time to frig with XCB/XLIB to make it work. There is some basic code working but lots of things still need to be done to make a large application run well.
  • MingW
    I ported the win32 code to gcc/MingW and there is working makefiles. The code isn't extensively tested but the IDE runs ok, YMMV. The underlying Win32 code is very good, so there would only be problems that Cygwin/GCC introduced.
  • BeOS (Zeta)
    This is an old old port from the r5 days that I recently updated to work on Zeta for v2. Most of the basic functionality works to put windows on the screen. But lots of little quirks still exist or things arent implemented. However that said some of the design concepts for Lgi came straight out of BeOS, so that BeOS port often is the "cleanest" of the implementations, having a direct mapping to the native API instead of convoluted hacks to make things work. Currently the BeOS port doesn't run very well on Zeta, there is some problem with locks getting stuck in really weird places. I consider this port deprecated at the moment.
Features

Building LGI

Windows

Support Libraries

For full graphics and charset support download (or check you already have) iconv, libpng, zlib and libjpeg; then add their include paths to your compilers include paths. Or find the defineds in Lgi.h for the various libraries and set them to 0.

Visual Studio 6,2005,2008,2010

Install a supported version of Visual Studio. Build the appropriate workspace:
  • vc6: Lgi.dsw
  • vs2005: Lgi_vc8.sln
  • vs2008: Lgi_vc9.sln
  • vs2010: Lgi_vc10.sln

Adding build folders to the shared library path:

Add this to your path:
  • [install_path]/Lgi/trunk/Lib

Mac

Install XCode

Go to the Apple Developer site and grab XCode

Build

Open Lgi.xcodeproj in XCode and run the build command.

Linux

Building on Ubuntu 10.4:
sudo apt-get install subversion
sudo apt-get install g++
sudo apt-get install libgtk2.0-dev
svn co https://lgi.svn.sourceforge.net/svnroot/lgi Lgi
cd Lgi/trunk
ln -s Makefile.linux makefile
make
Adding build folders to the shared library path:
cd /usr/local/lib
sudo ln -s [install_path]/Lgi/trunk/DebugX/liblgid.so liblgid.so
sudo ln -s [install_path]/Lgi/trunk/ReleaseX/liblgi.so liblgi.so
M$ VC++ 6 Tip
Add this to your Common/MsDev98/Bin/AUTOEXP.DAT file to show various LGI types inline:
; LGI types
GRegion =x1=<x1> y1=<y1> x2=<x2> y2=<y2>
GMessage =msg=<Msg,wm> a=<a> b=<b>
GDateTime =<_Year>/<_Month>/<_Day> <_Hours>:<_Minutes>:<_Seconds>
History:
3.3.0 [Stable]
Download: Source + Docs [Common, 3764K, 10/6/2009]

Changes:
  • Added a module license file describing all the non-memecode sources and their license.
  • Removed the GPL'd NTLM code from the base distribution. You can re-enable it by defining "GPL_COMPATIBLE" to 1. This allows the whole library to be used as LGPL by default.
  • Implemented RunTemporary for the new vm based scripting engine. This allows you to execute fragments of code in the context of a larger body of code, usually to call a pre-defined method. The first use of this was in the GHtml control to handle scripting events.
  • Added a deep copy operator for the new GHashTbl template class. As I'm using it so much these days I should make it safe to use in common ways.
  • [GCC] Fixed a number of classes with the same name in separate C++ files that are conflicting. This seems to only be an issue on Linux and not Mac, and I'm not sure why.
  • Fixed the iterator functions of GHashTbl not return the correct NULL value when nothing is found. They were returning '0' instead of the classes NullValue setting.
  • [Mac] Fixed the native GFileSelect to handle multiple file extensions in the same Type def, i.e. "*.txt;*.doc;*.pdf".
  • [Script] Added support for 'while' loops.
  • [Script] Fixed if statements to cope with block and non-block parts in both the conditional and else sides of the statement.
  • Added VC9 (Visual Studio 2008) project files, renamed VC8 to Lgi_vc8.sln and Lgi_vc8.vjproj.
  • Fixed the layout of spanning cells in LgiRes's table layouts.
  • Fixed the spelling of some API's from 'Relitive' to 'Relative'.
  • Fixed GArray::DeleteAt not destroying objects correctly.
  • Fixed GUri parsing mailto's.
  • Collapsed the GDeviceContext object into the GSurface object... making them one. There was no need for 2 objects.
  • Fixed several issues in finding and displaying controls in LgiRes.
  • [Linux] Major rewrite of the Linux port to use XCB, Pango and Cairo. Moved implementation into native Lgi objects instead of XWidget etc. Removed all Xlib references, it wasn't threadsafe anyway. Too many changes to list individually.
  • Changes the painting of list and tree items to use a context that contains the fore and background colours. These colours now take into account the new foreground and background fill settings on the GList class. The allows you to set the colours for the item without having to inherit a specific subclass of GListItem or GTreeItem.
  • [Win32] New crash handler just saves out a minidump instead. It doesn't try and build a stack trace anymore.
  • Refactored the GView.cpp files so that about 70% of it's content is in a cross platform "GViewCommon.cpp" so that it's easier to maintain and more consistent between supported OS's.
  • Fixed the default OnNavigate handler to parse the arguments for email correctly, instead of ignoring them and passing "mailto:addr@isp.com" on the command line for the email client.
3.2.1 [Stable]
Download: Source + Docs [Common, 3674K, 20/10/2008]
3.2.0 [Stable]
Download: Source + Docs [Common, 3636K, 12/9/2008]
3.02 [Stable]
Download: Sources + Docs [Common, 1899K, 4/10/2007]
3.01 [Stable]
Download: Source + Docs Zip [Common, 2982K, 20/6/2007]
3.00 [Stable]
Download: Source + Docs Zip [Common, 2928K, 1/5/2007]
2.30 [Stable]
2.20 [Stable]
Download: Lgi-20060502 [Common, 2827K, 2/5/2006]
Download: Lgi-20060418 [Common, 2686K, 18/4/2006]
Download: Lgi-20051026 [Common, 2730K, 26/10/2005]
2.10 [Stable]
Download: Source+Docs [Common, 2842K, 27/7/2005]
2.00 [Stable]
Download: Source+Docs [Common, 3896K, 26/10/2004]
1.99 [Stable]
Download: Source+Docs [Common, 2609K, 7/5/2004]
1.98 [Stable]
1.97 [Stable]
1.96 [Stable]
1.95 [Unstable]
1.90 [Stable]
1.85 [Stable]
1.80 [Stable]
1.70 [Stable]
1.66 [Stable]
1.65 [Stable]
1.60 [Stable]
1.51 [Stable]
1.50 [Unstable]
1.45 [Stable]
1.40 [Stable]
1.31 [Stable]
1.30 [Stable]