GUI programming in Linux by C




Collecting...


Anjuta (http://anjuta.org/) now has Glade (https://glade.gnome.org/) integrated. Glade uses GTK+/GNOME.

MonoDevelop (http://monodevelop.com/) now has a GUI designer (based on GTK#). If you do not like .NET, then use Gambas like @nelsonhoover suggested. Gambas supports GTK and Qt as a GUI (choose one).

GNOME References -

https://developer.gnome.org/references


GTK References -

http://www.gtk.org/
http://www.gtk.org/documentation.php
http://www.pygtk.org/pygtk2reference/
http://www.pygtk.org/reference.html
https://developer.gnome.org/
https://developer.gnome.org/pygtk/stable/
https://developer.gnome.org/gtk2/stable/
https://developer.gnome.org/gtk3/stable/
https://developer.gnome.org/pygobject/
http://lazka.github.io/pgi-docs/


Glade References -

https://wiki.gnome.org/action/show/Apps/Glade/Tutorials
https://developer.gnome.org/gladeui/stable/


MonoDevelop, Mono, & .NET References -

http://monodevelop.com/
http://monodevelop.com/Documentation
http://monodevelop.com/Documentation/Stetic_GUI_Designer
http://www.mono-project.com/


Gambas & Visual Basic -

http://gambas.sourceforge.net/en/main.html
http://gambaswiki.org
http://gambaswiki.org/wiki/dev/gambas
http://gambaswiki.org/wiki/dev/overview
http://gambaswiki.org/wiki/comp/gb.qt4
http://gambaswiki.org/wiki/comp/gb.gtk
Ubuntu 15.04 (Vivid) [i7-quad]
http://DCJTech.info/
Google.com/+DevynJohnson
DevynCJohnson@Gmail.com

Ref:

  1. http://www.linux.org/threads/best-development-tool-for-creating-gui-in-linux.5794/
  2. http://recolog.blogspot.com/2011/08/gui-programming-with-c-language-on.html
  3. https://glade.gnome.org/
  4. http://www.yolinux.com/TUTORIALS/LinuxTutorialC++.html
  5. http://book.realworldhaskell.org/read/gui-programming-with-gtk-hs.html
  6. https://developer.gnome.org/gtk3/stable/gtk-getting-started.html
  7. http://scentric.net/tutorial/treeview-tutorial.html
  8. http://www.bravegnu.org/gtktext/
  9. http://ricardo.ecn.wfu.edu/~cottrell/cross-gtk/
  10. http://zetcode.com/tutorials/gtktutorial/
  11. http://www.gtk.org/download/win32_tutorial.php

free books

Installation and usage tutorial for Windows

Releasing your program

You should always ship all needed DLLs & files with your binaries. End-users should not be required to download the bundle themselves.

Requirements

GTK+3 is known to work on Windows XP, Vista, 7 and 8 at this date.
Developers might want to have a working MinGW or MSVC installation.

Initial setup

  1. Download the latest all-in-one bundle and extract it using right-click -> "Extract All...". Choose a location at your will ; we will call it %GTKDIR% during next phases.
  2. Add %GTKDIR%\bin to your PATH environment variable :
    • Windows XP : right-click on "My Computer" -> "Properties".
    • Windows Vista/7 : right-click on "Computer" -> "Properties" -> "Advanced system settings".
    Click on "Advanced tab" -> "Environment variables". Double-click on PATH line in "System variables" panel, and add ;%GTKDIR%\bin at the end of the text.
  3. Optionally, open a console (Start -> Run -> "cmd" or Start -> search for "cmd") and type the following commands :
    • pango-querymodules > %GTKDIR%\etc\pango\pango.modules
    • gdk-pixbuf-query-loaders > %GTKDIR%\lib\gdk-pixbuf-2.0\2.10.0\loaders.cache
    • gtk-query-immodules-3.0 > %GTKDIR%\lib\gtk-3.0\3.0.0\immodules.cache
  4. Let's test ! Still in a console or in the "Run" window, run the demo : gtk3-demo

Developing with GTK+3

MinGW

You should have a working installation, i.e. "gcc.exe" already in your PATH.
  1. In the console, verify that "pkg-config" prints out something reasonable by typing :
    pkg-config --cflags --libs gtk+-3.0
  2. Use this output in your further compilation commands, like this one :
    gcc -o gtk3.exe gtk3.c -mms-bitfields -Ic:/gtk3/include/gtk-3.0 -Ic:/gtk3/include/atk-1.0 -Ic:/gtk3/include/cairo [...]
  3. Test the resulting executable (here gtk3.exe) :

MSVC

  1. Open the Visual Studio Command Prompt :
  2. In the console, verify that "pkg-config" prints out something reasonable by typing :
    pkg-config --cflags gtk+-3.0
  3. Use this output in your further compilation commands, like this one, modifying the following : 
    • delete the "-mms-bitfields" switch ;
    • add the "-Dinline= /link /libpath:%GTKDIR% gtk-win32-3.0.lib gobject-2.0.lib" switches at the end.
    For instance :
    cl gtk3.c -mms-bitfields -Ic:/gtk3/include/gtk-3.0 -Ic:/gtk3/include/atk-1.0 [...] -Dinline= /link /libpath:c:/gtk3/lib gtk-win32-3.0.lib gobject-2.0.lib
    ("gtk-win32-3.0.lib gobject-2.0.lib" are a minimal requirement. You may want to add other .lib files as you need them)
  4. Test the resulting executable (here gtk3.exe) :

Comments