• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
G T K+ 101
 

G T K+ 101

on

  • 927 views

 

Statistics

Views

Total Views
927
Views on SlideShare
921
Embed Views
6

Actions

Likes
1
Downloads
23
Comments
0

3 Embeds 6

https://twitter.com 3
http://www.slideshare.net 2
http://www.linkedin.com 1

Accessibility

Categories

Upload Details

Uploaded via as OpenOffice

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

G T K+ 101 G T K+ 101 Presentation Transcript

  • Ahmed Mohamed Saeed GTK+ 101 Sun Campus Ambassador [email_address]
  • Agenda
    • Introduction to GTK+
    • Why GTK+?
    • Supporting Libraries
    • GTK Applications Structure
    • GTK Setup and Compilation on NetBeans
    • Demo
  • Introduction
  • History
    • GNU Image Manipulation Program ( GIMP )
      • Peter Mattis, Spencer Kimball, and Josh MacDonald (Class Project!!)
      • Motif
      • GTK
    • GIMP ToolKit ( GTK)
    • Object Oriented and renamed GTK+.
  • What is GTK?
    • “ GTK+ is a highly usable, feature rich toolkit for creating graphical user interfaces which boasts cross platform compatibility and an easy to use API. GTK+ it is written in C, but has bindings to many other popular programming languages” http://www.gtk.org
    • LGPL
    • Part of the GNU Project
    • All written in C!
  • Features
    • Stability
    • Cross Platform
    • Language Bindings
    • Mobile
    • Accommodating
    • Interfaces
    • Foundations
      http://www.gtk.org
  • Why GTK?
  • Did you see the features ?! Why GTK?
  • Where is GTK?
  • GTK Supporting Libraries
  • Glib
    • GLib is a general-purpose utility library, which provides many useful data types, macros, type conversions, string utilities, file utilities, a main loop abstraction, and so on. It works on many UNIX-like platforms, Windows, OS/2 and BeOS. GLib is released under the GNU Library General Public License (GNU LGPL).
  • GObject
    • A generic type system to register arbitrary single-inherited flat and deep derived types as well as interfaces for structured types. It takes care of creation, initialization and memory management of the assorted object and class structures, maintains parent/child relationships and deals with dynamic implementations of such types. That is, their type specific implementations are relocatable/unloadable during runtime.
    • A collection of fundamental type implementations, such as integers, doubles, enums and structured types, to name a few.
    • A sample fundamental type implementation to base object hierarchies upon - the GObject fundamental type.
  • Gobject (Cont'd)
    • A signal system that allows very flexible user customization of virtual/overridable object methods and can serve as a powerful notification mechanism.
    • An extensible parameter/value system, supporting all the provided fundamental types that can be used to generically handle object properties or otherwise parameterized types.
  • GDK
    • GIMP DrawingKit
    • Meant to deal with X Window System
    • Acts as an intermediate layer between GTK+ and Xlib
  • Pango and ATK
    • Pango
      • Texts and fonts rendering along with Cairo
    • ATK
      • Accessibility ToolKit
  • GTK Applications Structure
  • GTK code anatomy
    • Initialization
    • Main Event Loop
    • Data types
    • Call back functions
  • Initialization and the main event loop
    • gtk_init()
      • initializes the GTK environment
      • Should be called at the beginning of the program
      • Terminates the program if it failed to initialize the environment
    • get_main()
      • Starts the event loop that will check for the signals connected to the widgets
  • Data Types (widgets hierarchy)
    • http://www.gtk.org/tutorial1.2/gtk_tut-5.html
  • Call back functions
    • Signals
      • Widgets need to be notified if the user clicked, typed, etc.
      • g_signal_connect (G_OBJECT (window), "destroy", G_CALLBACK (destroy), NULL);
    • Call back functions
      • Simply “Functions that signal handlers call in case that signal occurred”
  • GTK Setup and Compilation on Netbeans/Ubuntu
  • Compilation Parameter
    • Command Line Argument
      • `pkg-config --cflags --libs gtk+-2.0`
      • Don't miss the “`”
  • Demo 1 Setup and Configuration
  • Demo 2 GTK+ 2.0 Tutorial Code Samples walk through
  • THANK YOU!
    • Ahmed Mohamed Saeed
    • Sun Campus Ambassador [email_address]
    GTK+ 101