Chabot College Fall 2002 Removed Fall 2006

advertisement
Chabot College
Fall 2002
Removed Fall 2006
Course Outline for Computer Science 18F
LINUX GNOME AND GTK+ PROGRAMMING I
Catalog Description:
Computer Science 18F - Linux Gnome and GTK+ Programming I
2 units
Linux GUI programming using GTK+, and an overview of a few other Unix X-window
programming toolkits (KDE, ncurses). Windows, widgets, signal and event handling, controls,
input, lists, dialogs and menus. Development of small GTK+ programming projects under Linux.
Prerequisite: Computer Science 18B (completed with a grade of C or higher). Strongly
recommended: Computer Science 18C (completed with a grade of C or higher). 1.5 hours
lecture, 1.5 hours laboratory.
Prerequisite Skills:
Before entering the course the student should be able to:
1. identify the differences between the C standard libraries and Linux libraries;
2. design, write, debug and document well-structured programs of small- to medium- length in the
C language, using Linux system resources and the Linux libraries;
3. demonstrate familiarity with processes under Linux and create, signal, and kill processes;
4. demonstrate familiarity with Linux multitasking and describe, at a high level, how multitasking is
done in Linux;
5. demonstrate familiarility with semaphores in Linux and write C programs that correctly use
semaphores;
6. demonstrate familiarity with interprocess communication (IPC) signals in Linux and write C
programs that correctly send and handle signals;
7. demonstrate familiarity with shared resources (such as shared memory) in Linux and write C
programs that correctly use shared resources;
8. demonstrate familiarity with other Linux IPC tools, such as pipes and message queues, and
write C programs that use these tools;
9. identify parent and child processes, and user and group ids of processes;
10. demonstrate familiarity with the internal workings of a simple shell, and write a simple shell;
11. demonstrate familiarity with daemons and write a simple daemon;
12. handle runtime errors from within C programs;
13. demonstrate familiarity with networks as a user.
Expected Outcomes for Students:
Upon completion of the course the student should be able to:
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
identify the major components, data types, and data structures provided by the
GTK+/Gnome libraries, GLib, GDK, GTK+, ImLib, etc;
develop an application in C using the GTK+/gnome libraries;
use Gnome widgets in a C-language application under Linux;
use the basic window tools provided in the GTK+: windows, combo boxes, etc.;
handle the most common events in a GUI environment from within a C program: mouse
actions, signals, keystrokes, etc.;
set the size, position, layout, and captions on windows;
add controls such as buttons to a window;
use a packing box to organize controls;
add widgets to a window;
use widgets to add labels, input text boxes, toggle buttons, check buttons, radio buttons and
frames to a window;
use list and bulk data widgets in a windowing application;
use dialog boxes in a window;
use a menu in a window.
Chabot College
Course Outline for Computer Science 18F
Fall 2002
Course Content:
1.
2.
3.
4.
5.
6.
7.
8.
X-window system and its multiple variants, the family of X-development packages
a.
Why GTK+ and GNOME?
GLib and GLib applications
a.
GLib data types
b.
compiling GLib applications
c.
GLib macros
d.
GLib error handling
e.
GLib memory management
f.
GLib lists
g.
GLib trees
h.
GStrings (strings)
i.
Timers
GTK+ system
a.
GIMP and the GIMP ToolKit
b.
Drawing a simple window and the window's properties
c.
Using GTK+ objects in C (a non-object-oriented language)
d.
Signals and signal handlers
e.
Events and event handlers
f.
Signals and events together
Laying out the user interface
a.
Window captions
b.
Controlling window size and position
c.
Adding widgets to a window (and what's a widget?)
d.
Linking signal handlers to widgets
e.
Having GTK+ automatically arrange widgets in a window
More kinds of widgets
a.
Text entry boxes
b.
Check buttons
c.
Presenting lists of items
d.
Frames
e.
Fadio buttons
Lists and bulk data
a.
Different types of list boxes in GTK+ and how to use them
b.
Figuring out which items in a list have been selected by the user
c.
Displaying and configuring combo boxes
Dialog Boxes
a.
GtkWindow, the foundation of a dialog
b.
GtkDialog widget and how to use it
c.
Working with "modal" windows
d.
Pre-built GTK+ dialogs for file and color selection
Menus
a.
Building a menu
b.
Adding check items to a menu
c.
Adding radio buttons to a menu
d.
Responding to menu signals
e.
Menus in a hurry
Methods of Presentation:
1.
2.
Lecture
In-class example programs with explanations and demonstrations
Page 2
Chabot College
Course Outline for Computer Science 18F
Fall 2002
Assignments and Methods of Evaluating Student Progress:
1. Typical Assignments
a. Small programming assignments illustrating main points from lecture
1) Create programs that draw windows with various tools
2) Create a program that opens and closes several windows at once
b. Non-programming homework to reinforce concepts from lectures and reading
1) Check out the Free Software Foundation
2) Research the widget library and report on more types of widgets
2.
Methods of Evaluating Student Progress
a.
Midterm exam(s)
b.
Optional short quizzes
c.
Final Exam
d.
Programming Assignments
Textbook(s) (Typical):
Beginning GTK+/GNOME Programming, Peter Wright, Wrox Press, 2000
Special Student Materials:
Computer lab fee
Diskettes
Optional zip disk
Revised: July 2001
Keith Mehl
CS 18F Outline Fall 2002
hps
Page 3
Download