SqueakGTK
Gwenael Casaccio
SqueakGTK
• Presentation of GTK+
• GLib
• GDK, Pango, Cairo
• GTK+
• SqueakGTK tools (Omnibrowser, launcher)
• To do
• Con...
GTK+
• Open source toolkit (LGPL)
• Created for the GIMP
• Written in C
• Multi platform
GTK+
X11 Win32 (Quartz)
GLib
GDK Pango Cairo
Figure 2.9: The GTK+ stack
All parts of the GTK+ stack are written in C, and ...
GLib
• Cross platform utility
• Linked list, hash tables, binary trees, ...
• C object model : GObject
• Fundamental types...
GObject
• Single inherited class structure
• Signals
• Independent type system (GType)
• Memory management : reference cou...
GDK
• Drawing : pixmaps, drawables, graphic
pattern
• Events : mouse, keyboard, window, ...
• Fonts : metrics
Pango
• Rendering text
• Internationalized
• Different font backends
• Integration with Cairo
Cairo
• Vector graphic-based
• Device-independant API
• 2D
• Several backends (PDF, PostScript, SVG, ...)
• GTK+ integrati...
Cairo
• Shape rendering
• Alpha blending
• Gradient drawing
• OpenGL acceleration
GTK+
• Now code our first application
GTK+
• First create a window
GTK+
• Now how to add a widget ?
Widgets
Widgets
• ...
Layout
• GtkFixed
Layouts
• GtkVBox
Layouts
• GtkTable
GTK+ Events
• when: anEvent send: aMessage to: anObject
• when: anEvent do: aBloc
inside GTK+
• Each GtkWidget inherit from GPointer
• C pointer store in a ByteArray
• Each Gtk classes call primitives
inside GTK+ events
• Handle events :
• Do we have an event ?
• Handle events
GTK+
• Events
• Active waiting for events (morphs, ...)
• GTK+ events handling
first process :
[self waitForEvents] repeat....
SqueakGTK
• Omnibrowser
• Launcher
• Inspector
• Browser
To do
• Restore the state of the interface
• Write tutorials
• Improve the tools
• Create a desktop
• Support of GObjectIn...
Conclusion
• Support multiple operating system
• Powerful and flexible user interface
• Stable
• http://code.google.com/p/s...
Upcoming SlideShare
Loading in …5
×

SqueakGTK

903 views
816 views

Published on

SqueakGTK. Gwenael Casaccio. ESUG 2008, Amsterdam

Published in: Technology, Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
903
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
5
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

SqueakGTK

  1. 1. SqueakGTK Gwenael Casaccio
  2. 2. SqueakGTK • Presentation of GTK+ • GLib • GDK, Pango, Cairo • GTK+ • SqueakGTK tools (Omnibrowser, launcher) • To do • Conclusions
  3. 3. GTK+ • Open source toolkit (LGPL) • Created for the GIMP • Written in C • Multi platform
  4. 4. GTK+ X11 Win32 (Quartz) GLib GDK Pango Cairo Figure 2.9: The GTK+ stack All parts of the GTK+ stack are written in C, and hence there is no support for object-orientation features in the language. GTK+ still boasts itself as an object-oriented toolkit. This is thanks to GObject, which is a part of GLib. GObject is an object system which is used extensively by GTK+. It is designed to be easy to be used by other programming languages, both interpreted and compiled. GObject supports object inheritance as well as interfaces. Objects can also have named properties. There also exists a general purpose notification mechanism for objects called signals. GTK+ Stack
  5. 5. GLib • Cross platform utility • Linked list, hash tables, binary trees, ... • C object model : GObject • Fundamental types (Float, String, ...) • Enumeration
  6. 6. GObject • Single inherited class structure • Signals • Independent type system (GType) • Memory management : reference counting
  7. 7. GDK • Drawing : pixmaps, drawables, graphic pattern • Events : mouse, keyboard, window, ... • Fonts : metrics
  8. 8. Pango • Rendering text • Internationalized • Different font backends • Integration with Cairo
  9. 9. Cairo • Vector graphic-based • Device-independant API • 2D • Several backends (PDF, PostScript, SVG, ...) • GTK+ integration
  10. 10. Cairo • Shape rendering • Alpha blending • Gradient drawing • OpenGL acceleration
  11. 11. GTK+ • Now code our first application
  12. 12. GTK+ • First create a window
  13. 13. GTK+ • Now how to add a widget ?
  14. 14. Widgets
  15. 15. Widgets • ...
  16. 16. Layout • GtkFixed
  17. 17. Layouts • GtkVBox
  18. 18. Layouts • GtkTable
  19. 19. GTK+ Events • when: anEvent send: aMessage to: anObject • when: anEvent do: aBloc
  20. 20. inside GTK+ • Each GtkWidget inherit from GPointer • C pointer store in a ByteArray • Each Gtk classes call primitives
  21. 21. inside GTK+ events • Handle events : • Do we have an event ? • Handle events
  22. 22. GTK+ • Events • Active waiting for events (morphs, ...) • GTK+ events handling first process : [self waitForEvents] repeat. Second process : [self handleEvents] repeat.
  23. 23. SqueakGTK • Omnibrowser • Launcher • Inspector • Browser
  24. 24. To do • Restore the state of the interface • Write tutorials • Improve the tools • Create a desktop • Support of GObjectInspector • ...
  25. 25. Conclusion • Support multiple operating system • Powerful and flexible user interface • Stable • http://code.google.com/p/squeakgtk/

×