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).
Related
I'm running Orange 3.2 and 2.7, but both are missing key widgets for my work.
My installation of 2.7 came without the 'Discretize' (although I've had it included before). So I moved on to 3.2, which now appears not to have the 'Regression trees' which I also use.
Anyone else experienced this?
Any tips?
Can I copy widgets from one generation to another?
Thanks,
Orange 2.7 vs Orange 3.2 are based on two different major Python versions (2.7 and 3+) and are thus largely incompatible out-of-the-box. Not all Orange2 widgets appear to have been ported to the new version yet. Discretize missing for you in Orange2, however, appears to be a bug, which you should report on their issue tracker.
How did you install Orange? Which operating system do you use?
If you are on Windows, I would guess that you probably manually installed some libraries (before or after installing Orange) whose versions are incompatible with Orange. In particular, the discretization widget uses Qwt and also Orange's custom extensions of some Qt classes, written in C++. You are probably also missing most visualization widgets.
Os X does not have this problem since Python is included in a bundle.
Can you run Orange from command line with arguments -l 4 --force-discovery and report what it says about the discretization widget?
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?
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.
I am building an application which has GtkMenu widget. I am using Glade RAD tool to develop UI and while creating project in Glade I have specified version of GTK as 2.16 which supports GtkMenu and GtkMenuItems.
So I used GtkMenu everywhere in app (for File Menu and for Right Click Menu).
But I tried this application on my target platform, which has GTK+ 2.14 installed
Does not recognize GtkMenu or GtkMenuItem.
What should I do now? I need to use GtkMenu with GtkMenuItems but I can't upgrade target platform to use GTK+ 2.16.
So questions are:
Does GTK+ 2.14 support GtkMenu and GtkImageMenuItem/GtkMenuItems?
If not what should we use instead?
GtkMenu is a core GTK+ class. It's been in there since the first (2.0) version of the current series, and was even in GTK+ 1.x.
I think the same holds true for GtkMenuItem; there are things (like the submenu property) that are noted as having been added in 2.12, for instance.
Not sure what that says about your problem; perhaps you're mis-interpreting some error message?
UPDATE: It does seem GtkImageMenuItem is new; perhaps you can emulate it using a plain menu item?
The issue isn't that GTK+ 2.14 doesn't support GtkMenu and friends. It's that the UI building infrastructure, GtkBuilder, doesn't support creating them from XML specifications. Unfortunately I'm not sure what the recommended solution is/was; I'm dealing with the same problem myself.
Gtk 2.14 definitly support menuitem, menubar etc..
You are most likely saving your user interface as a gtkbuilder UI.
GtkBuilder is taking over libglade. Unfortunatly, GtkBuilder in gtk2.14 doesn't yet support the construction of menubar and menuitem, even though gtk2.14 totally support menubar and menuitem.
What are your options?
Stay as you are, your project is fully operational on gtk >= 2.16 (gtkbuilder can create menuitem in gtk >=2.16)
Save your user interface as a glade user interface and then your project will work fine on gtk 2.14. You will need to use libglade instead of gtkbuilder to load the interface, connect the signals etc. However it is a bad option since libglade will slowly diseapear.
If building your app on gtk2.14 is really important, then you will want to build your menu without gtkbuilder, but directly write the code. (you will need to see the 2.14 documentation, go to http://library.gnome.org/devel/gtk/2.14/GtkMenuBar.html ).
I'll go for option 3. Good luck.
Christophe