C481 B581 Computer Graphics
Dana Vrajitoru

Graphical User Interfaces (GUI) in Gnome

Links: Complete reference for GTK.
A resource site for gnome.

Graphical Libraries in Gnome

Name Conventions
 
G glib constant or macro Gnome Gnome object or data structure
g glib data type GNOME_ Gnome constant or macro
g_ glib function gnome_ Gnome function
Gdk GDK object or data structure Gtk GTK object or data structure
gdk_ GDK function gtk_ GTK function
GDK_ GDK constant or macro GTK_ GTK constant

Drawable Area

Pixmap Pixmap and Drawable Areas Pixmap and Drawable Areas

Color in Gnome

Graphical Context Popup Dialogs A Question Dialog
#include <gnome.h>
void cbfunction(gint reply, gpointer data)
{
  if (reply == GNOME_YES)
    gprint(“the answer is yes\n”);
  else
    gprint(“the answer is no\n”);
}
int main(int argc, char **argv) {
  gnome_init(“questiondialog”, “1.0”, argc, argv);
  gnome_question_dialog(“Do you want to quit?”,
            (GnomeReplyCallback)cbfunction, NULL);
  gtk_main();
  exit(0);
}
GdkColor
struct _GdkColor {
  gulong pixel;
  gushort red;
  gushort green;
  gushort blue;
}
GdkPixmap: a GdkWindow GdkColormap