GTK+ 3.0 released in February 2011. But unfortunately gtksharp doesn't support it yet.
Are they going to support it?
As far as I know, yes. One of the big improvements in GTK 3 was to make it much easier to automatically generate bindings to other languages.
In the meantime you might want to check out Vala, a C#-like language that supports GTK 3.
Related
New to Gtk. I tried to compile a GtkSocket example in c, but it gives error unknow type name 'GtkSocket'.
Is it supported in Windows OS?
If not, is there any way I can embed gvim in a gtk+3 applicaton?
Also is there any link where can I know which Gtk feature is supported on which OS?
Thanks
From reference manual:
The GtkPlug and GtkSocket widgets are now X11-specific, and you have
to include the gtk/gtkx.h header to use them.
Afaik, there is no list of features supported by which backend/os. For APIs difference, GtkSocket is pretty much the biggest difference. But there are several backend specific APIs, usually with a different namespace, such as x11/win32.. This is quite common with portable libraries.
I don't know a proper way to embed an application on win32. There are other stackoverflow questions about this, since this is not gtk specific. For example QT How to embed an application into QT widget that you could adapt to Gtk+ application.
all I need some window to host webkit or/and cairo drwaing, but i have to deal with all that first to understand what I'm doing.
now. I'm lost and no more understand what's all that about.
and things get worse when I try working with binding or trying to figure what are dependencies for something.
for example: in python, pyGtk deprecated and replaced by pyGObject(sometimes called pyGl!!)
there are many sites, many downloads and versions, mixed outdated and new references,but not one architectural view of the whole thing.
what I don't understand..is how all these things mixed with each other in too many sites,packages and versions?
The short story:
If you're programming for GTK 2, use pyGTK.
If you're programming for GTK 3, use pyGObject.
The long story:
From what I understood, pyGTK was based on pyGObject. GObject is the "object" API of GTK. GTK is developped in C, which is not an object-oriented language. GObject is a library that provides advanced object-oriented facilies. All GTK objects inherit from the GObject class provided by that library.
Then came the GObject-introspection work. Its goal was to make bindings maintenance easier, and use source code annotations to automatically generate most of the bindings code for each language (python, C++, etc.). This resulted in the python side in pyGI, the python bindings based on the GObject introspection work. That's when people were told to use it for GTK3 development.
Since then, the GObject-introspection work once provided by pyGI has been integrated into GObject. pyGObject eventually became what developers should use for python development in GTK3.
Please read:
https://wiki.gnome.org/Projects/PyGObject
About the GNOME/GTK relationship:
GTK is the toolkit used by the GNOME project. It has been extracted from the GIMP, hence its name (GTK stands for: GIMP Tool Kit). GTK is a core part of the GNOME project, and GTK developers often also are involved in the GNOME project.
My understanding of those components you mentioned:
Think of GI as an interface that the core GNOME libraries conform to.
PyGI doesn't exist any more; it's now part of PyGObject in the GNOME 3 setup.
What is the relation between GTK, GTK+ and GTK2?
I'm confused by the GTK terminology. According to Wikipedia, there seem to be bindings to GTK+ that are called GTK (GtkAda) and GTK2 (gtk2hs, Gtk2-Perl).
Could someone clear this up for me?
The first incarnation of the project was called GTK (which stood for GIMP Toolkit).
At some very early point, while the project was still part of The GIMP (and before version 1.0), it was renamed to GTK+. Despite this, people often referred to it as GTK out of convenience or ignorance.
The GTK+ name was used for more than 20 years through versions 1.x, 2.x, and 3.x, but the "GIMP Toolkit" expansion was dropped. I don't know when exactly this happened but perhaps during the 1.x → 2.x transition.
There is nothing officially called GTK2. It's just what some people call the 2.x series of GTK+.
On 2019-02-06, the project was renamed back to GTK, which will affect version 4.0 onwards.
GTK/GTK+ and GTK2 are different versions of the same API. GTK is an old, deprecated version, GTK2 is the previous one, GTK+ 3/GTK3 is the current version.
GTK+ is the correct name of the old API, but most people just call it GTK.
The C++ bindings for GTK+ are part of the project GTKmm.
GTK is the library for creating GUI-s for Linux / GNU. It has several versions (I think the latest is version 3).
In order for other programming languages to use it (other than C), there have to exist libraries that can bind GTK to that particular language.
PHP-GTK means that there's a library binding GTK to PHP enabling PHP to create apps that can be displayed in a nice interface. It supports, however, only up to version 2.2 of the GTK.
Same goes for other languages, they have a prefix / suffix and (GtkAda for example) those libraries also tell you up to what version they support GTK (since you might want to try newer GTK functions that aren't available in the library binding GTK to your language).
Glade helped me get started on a project quickly, but I've found it harder to maintain in the long run, and I'm thinking about switching it all to native code. In what circumstances would you choose glade, and when would you use native code?
I would personally only use native code for performance reasons. I find it much easier to work with gtkbuilder. Have you used glade or gtkbuilder? With Glade 3, gtkbuilder format is easy to use and easy to layout and design. Also, gtkbuilder is easier to load widgets from than glade was.
if by native code you mean "direct GTK calls to build ui", then i'd switch to it for several reasons:
if widgets are built dynamically depending on user preferences, etc
if i use a lot of custom widgets, esp. contained within each other (for example GDL docking panels)
to maintain backwards compatibility with older version of GTK
upd: also i'm still using glade2.x which has code generation (patched it to compile against latest gtk2). it really helps to get quickstart on "gui build from code", and works with both ancient and newer GTK versions. though i'm afraid i will have some troubles porting to gtk3 :)
and i never choose gtkbuilder over other alternatives, 'cause it is not available in (still widespread) older GTK versions.. dunno if i'll ever switch to it.. maybe when gtk3 comes out.
i'm using windows xp what would be a good c compiler?
i want to learn c so that i can better understand the objective-c language for the iphone.
i have a great background in php so hopefully something will make sense
ps:
what sections should i put more focus on when learning c in getting prepared for objective-c?
thanks
Duplicate:
c compiler for windows
C/C++ Compiler for windows
Which C Compiler do you recommend for windows
GCC is a free, open source, high quality, compiler. You can get it with cygwin.
Microsoft makes a C compiler that comes with Visual Studio, which is Microsoft's integrated development environment. You can download the "Express" edition of Visual C++ to give it a try.
Also, Intel makes a good compiler.
The iphone uses the gcc compiler. This is available for windows using MinGW/MSYS or other compatibility packages.
Apple has Objective-C tutorials which assume very little C experience; I'd be tempted to just dive in. If you get stuck, then get K&R. (I don't know if php has types and pointers, otherwise you'll get stuck straight away)
Visual C++ express is free, has a really nice IDE and compiles C code.
I'd use gcc by downloading cygwin.
Gcc is the way, you can install mingw which is a native windows port.
I also recommend gcc, but don't get too used to GNU extensions such as asprintf() if you want to write portable code. On some systems, strdup() is lacking, amongst many others. The compiler itself won't spoil you, but glibc will.
On the one hand you have POSIX, on the other hand you have ISO/c89/c99, then you have gcc.
I highly recommend gcc, with the above warnings in mind while you continue to explore other compilers. For instance, it can be fun to code around the limits of Lestes if you enjoy dabbling in C++.
In any event, gcc is very powerful, boasts superior optimizations and can be so -pedantic that you think its out to get you. But, don't forget about portable code .. or where/if portability kludges are actually appropriate.
Cygwin is also highly recommended, as DasBoot posted.
You could have a look at this free e-book Programming in C in 7 days as a starter where they use Dev-CPP for windows
Note
It includes only the first 7 lessons of the more complete e-book “Quickly
Learn Programming in C”
Normally I would recommend Pelles C for programming C in windows. It is a good user friendly programming environment that has the best c99 compliance that i've seen... However, here I'm going to tell you that you should use gcc right off but not on windows. Use Linux (maybe Ubuntu?).
The reason I say to use gcc on Linux is because you want to develop for the iphone. I would suggest getting comfortable with the tools you are likely to use. I don't imagine you using the official iphone sdk (you'd need a Mac for that) so I think you'll be using the free tool chain. It does not compile on windows so switch to a supported platform and get comfortable with the tools.
I personally recommend MinGW. You can download it off SourceForge. It even works on a 64 bit configuration. I don't think it supports objective C. However, I found it useful while running C code on windows.
I don't have any idea about objective C and what parts of C you need to focus on while learning so as to make the transition easy. I'll leave that to someone with more experience.
gcc included in cygwin is a perfect first choice if you want to learn C on your Window XP platform. cygwin/gcc includes a basic Objective-C environment.
Anyway if you want to target iPhone, the best move would be to change to a Mac platform (which can natively run XP for smoothing the switch) in order to get Xcode, the Mac and iPhone development environment. You will also be able to learn CocoaTouch, the iPhone OS.
In parallel, you can register to the iPhone Dev Center for accessing all resources for learning iPhone programming.
If you're after a compiler that can compile both C and Objective-C, a GCC port to Windows is probably your best bet.
When learning C, concentrate on pointers, arrays, strings and memory management - those are the things that will trip you up coming from a managed environment of any kind.
The best thing about gcc is that it has a lot of features and supports the latest language standard. But for fast compilation and a nice programming environment you can't beat Lcc-Win32.
GCC is the cheapest compiler, Intel the fastest, MSVC the most featured.