\documentclass[a4paper,twoside]{article}
\usepackage[procnames,noindent]{lgrind}
\usepackage{fancyhdr,a4wide}
\usepackage{german}
\usepackage{makeidx}
\pagestyle{fancy}

\makeindex

\begin{document}
\renewcommand{\footrulewidth}{0.4pt}
\fancyhead[C]{\lgrindhead}
\fancyhead[LO,RE]{\lgrindfilesize~Bytes\\\lgrindmodtime}
\fancyhead[RO,LE]{\bfseries \lgrindfilename\\\lgrindmodday.\lgrindmodmonth.\lgrindmodyear}
\fancyfoot[C]{\bfseries\thepage}
\setlength{\headheight}{24pt}
\begin{lgrind}
\BGfont
\File{scribble.c}{1999}{11}{18}{14:25}{4621}
\L{\LB{\C{}/*_example-start_scribble-simple_scribble-simple.c_*/\CE{}}}
\L{\LB{}}
\L{\LB{\C{}/*_GTK_-_The_GIMP_Toolkit}}
\L{\LB{_*_Copyright_(C)_1995-1997_Peter_Mattis,_Spencer_Kimball_and_Josh_MacDonald}}
\L{\LB{_*}}
\L{\LB{_*_This_library_is_free_software;_you_can_redistribute_it_and/or}}
\L{\LB{_*_modify_it_under_the_terms_of_the_GNU_Library_General_Public}}
\L{\LB{_*_License_as_published_by_the_Free_Software_Foundation;_either}}
\L{\LB{_*_version_2_of_the_License,_or_(at_your_option)_any_later_version.}}
\L{\LB{_*}}
\L{\LB{_*_This_library_is_distributed_in_the_hope_that_it_will_be_useful,}}
\L{\LB{_*_but_WITHOUT_ANY_WARRANTY;_without_even_the_implied_warranty_of}}
\L{\LB{_*_MERCHANTABILITY_or_FITNESS_FOR_A_PARTICULAR_PURPOSE.}\Tab{57}{See_the_GNU}}
\L{\LB{_*_Library_General_Public_License_for_more_details.}}
\L{\LB{_*}}
\L{\LB{_*_You_should_have_received_a_copy_of_the_GNU_Library_General_Public}}
\L{\LB{_*_License_along_with_this_library;_if_not,_write_to_the}}
\L{\LB{_*_Free_Software_Foundation,_Inc.,_59_Temple_Place_-_Suite_330,}}
\L{\LB{_*_Boston,_MA_02111-1307,_USA.}}
\L{\LB{_*/\CE{}}}
\L{\LB{}}
\L{\LB{\K{\#include}_\<\V{gtk}/\V{gtk}.\V{h}\>}}
\L{\LB{}}
\L{\LB{\C{}/*_Backing_pixmap_for_drawing_area_*/\CE{}}}
\L{\LB{\K{static}_\V{GdkPixmap}_*\V{pixmap}_=_\V{NULL};}}
\L{\LB{}}
\L{\LB{\C{}/*_Create_a_new_backing_pixmap_of_the_appropriate_size_*/\CE{}}}
\L{\LB{\K{static}_\V{gint}}}
\index{configure\_event}\Proc{configure\_event}\L{\LB{\V{configure\_event}_(\V{GtkWidget}_*\V{widget},_\V{GdkEventConfigure}_*\V{event})}}
\L{\LB{\{}}
\L{\LB{}\Tab{4}{\K{if}_(\V{pixmap})}}
\L{\LB{}\Tab{8}{\V{gdk\_pixmap\_unref}(\V{pixmap});}}
\L{\LB{}}
\L{\LB{}\Tab{4}{\V{pixmap}_=_\V{gdk\_pixmap\_new}(\V{widget}\-\!\>\V{window},}}
\L{\LB{}\Tab{28}{\V{widget}\-\!\>\V{allocation}.\V{width},}}
\L{\LB{}\Tab{28}{\V{widget}\-\!\>\V{allocation}.\V{height},}}
\L{\LB{}\Tab{28}{\-\N{1});}}
\L{\LB{}\Tab{4}{\V{gdk\_draw\_rectangle}_(\V{pixmap},}}
\L{\LB{}\Tab{24}{\V{widget}\-\!\>\V{style}\-\!\>\V{white\_gc},}}
\L{\LB{}\Tab{24}{\V{TRUE},}}
\L{\LB{}\Tab{24}{\N{0},_\N{0},}}
\L{\LB{}\Tab{24}{\V{widget}\-\!\>\V{allocation}.\V{width},}}
\L{\LB{}\Tab{24}{\V{widget}\-\!\>\V{allocation}.\V{height});}}
\L{\LB{}}
\L{\LB{}\Tab{4}{\K{return}_\V{TRUE};}}
\L{\LB{\}}}
\L{\LB{}}
\L{\LB{\C{}/*_Redraw_the_screen_from_the_backing_pixmap_*/\CE{}}}
\L{\LB{\K{static}_\V{gint}}}
\index{expose\_event}\Proc{expose\_event}\L{\LB{\V{expose\_event}_(\V{GtkWidget}_*\V{widget},_\V{GdkEventExpose}_*\V{event})}}
\L{\LB{\{}}
\L{\LB{}\Tab{4}{\V{gdk\_draw\_pixmap}(\V{widget}\-\!\>\V{window},}}
\L{\LB{}\Tab{20}{\V{widget}\-\!\>\V{style}\-\!\>\V{fg\_gc}[\V{GTK\_WIDGET\_STATE}_(\V{widget})],}}
\L{\LB{}\Tab{20}{\V{pixmap},}}
\L{\LB{}\Tab{20}{\V{event}\-\!\>\V{area}.\V{x},_\V{event}\-\!\>\V{area}.\V{y},}}
\L{\LB{}\Tab{20}{\V{event}\-\!\>\V{area}.\V{x},_\V{event}\-\!\>\V{area}.\V{y},}}
\L{\LB{}\Tab{20}{\V{event}\-\!\>\V{area}.\V{width},_\V{event}\-\!\>\V{area}.\V{height});}}
\L{\LB{}}
\L{\LB{}\Tab{4}{\K{return}_\V{FALSE};}}
\L{\LB{\}}}
\L{\LB{}}
\L{\LB{\C{}/*_Draw_a_rectangle_on_the_screen_*/\CE{}}}
\L{\LB{\K{static}_\K{void}}}
\index{draw\_brush}\Proc{draw\_brush}\L{\LB{\V{draw\_brush}_(\V{GtkWidget}_*\V{widget},_\V{gdouble}_\V{x},_\V{gdouble}_\V{y})}}
\L{\LB{\{}}
\L{\LB{}\Tab{4}{\V{GdkRectangle}_\V{update\_rect};}}
\L{\LB{}}
\L{\LB{}\Tab{4}{\V{update\_rect}.\V{x}_=_\V{x}_\-_\N{5};}}
\L{\LB{}\Tab{4}{\V{update\_rect}.\V{y}_=_\V{y}_\-_\N{5};}}
\L{\LB{}\Tab{4}{\V{update\_rect}.\V{width}_=_\N{10};}}
\L{\LB{}\Tab{4}{\V{update\_rect}.\V{height}_=_\N{10};}}
\L{\LB{}\Tab{4}{\V{gdk\_draw\_rectangle}_(\V{pixmap},}}
\L{\LB{}\Tab{24}{\V{widget}\-\!\>\V{style}\-\!\>\V{black\_gc},}}
\L{\LB{}\Tab{24}{\V{TRUE},}}
\L{\LB{}\Tab{24}{\V{update\_rect}.\V{x},_\V{update\_rect}.\V{y},}}
\L{\LB{}\Tab{24}{\V{update\_rect}.\V{width},_\V{update\_rect}.\V{height});}}
\L{\LB{}\Tab{4}{\V{gtk\_widget\_draw}_(\V{widget},_\&\V{update\_rect});}}
\L{\LB{\}}}
\L{\LB{}}
\L{\LB{\K{static}_\V{gint}}}
\index{button\_press\_event}\Proc{button\_press\_event}\L{\LB{\V{button\_press\_event}_(\V{GtkWidget}_*\V{widget},_\V{GdkEventButton}_*\V{event})}}
\L{\LB{\{}}
\L{\LB{}\Tab{4}{\K{if}_(\V{event}\-\!\>\V{button}_==_\N{1}_\&\&_\V{pixmap}_!=_\V{NULL})}}
\L{\LB{}\Tab{8}{\V{draw\_brush}_(\V{widget},_\V{event}\-\!\>\V{x},_\V{event}\-\!\>\V{y});}}
\L{\LB{}}
\L{\LB{}\Tab{4}{\K{return}_\V{TRUE};}}
\L{\LB{\}}}
\L{\LB{}}
\L{\LB{\K{static}_\V{gint}}}
\index{motion\_notify\_event}\Proc{motion\_notify\_event}\L{\LB{\V{motion\_notify\_event}_(\V{GtkWidget}_*\V{widget},_\V{GdkEventMotion}_*\V{event})}}
\L{\LB{\{}}
\L{\LB{}\Tab{4}{\K{int}_\V{x},_\V{y};}}
\L{\LB{}\Tab{4}{\V{GdkModifierType}_\V{state};}}
\L{\LB{}}
\L{\LB{}\Tab{4}{\K{if}_(\V{event}\-\!\>\V{is\_hint})}}
\L{\LB{}\Tab{8}{\V{gdk\_window\_get\_pointer}_(\V{event}\-\!\>\V{window},_\&\V{x},_\&\V{y},_\&\V{state});}}
\L{\LB{}\Tab{4}{\K{else}}}
\L{\LB{}\Tab{8}{\{}}
\L{\LB{}\Tab{12}{\V{x}_=_\V{event}\-\!\>\V{x};}}
\L{\LB{}\Tab{12}{\V{y}_=_\V{event}\-\!\>\V{y};}}
\L{\LB{}\Tab{12}{\V{state}_=_\V{event}\-\!\>\V{state};}}
\L{\LB{}\Tab{8}{\}}}
\L{\LB{}\Tab{4}{}}
\L{\LB{}\Tab{4}{\K{if}_(\V{state}_\&_\V{GDK\_BUTTON1\_MASK}_\&\&_\V{pixmap}_!=_\V{NULL})}}
\L{\LB{}\Tab{8}{\V{draw\_brush}_(\V{widget},_\V{x},_\V{y});}}
\L{\LB{}\Tab{2}{}}
\L{\LB{}\Tab{4}{\K{return}_\V{TRUE};}}
\L{\LB{\}}}
\L{\LB{}}
\L{\LB{\K{void}}}
\index{quit}\Proc{quit}\L{\LB{\V{quit}_()}}
\L{\LB{\{}}
\L{\LB{}\Tab{4}{\V{gtk\_exit}_(\N{0});}}
\L{\LB{\}}}
\L{\LB{}}
\L{\LB{\K{int}}}
\index{main}\Proc{main}\L{\LB{\V{main}_(\K{int}_\V{argc},_\K{char}_*\V{argv}[\,])}}
\L{\LB{\{}}
\L{\LB{}\Tab{4}{\V{GtkWidget}_*\V{window};}}
\L{\LB{}\Tab{4}{\V{GtkWidget}_*\V{drawing\_area};}}
\L{\LB{}\Tab{4}{\V{GtkWidget}_*\V{vbox};}}
\L{\LB{}}
\L{\LB{}\Tab{4}{\V{GtkWidget}_*\V{button};}}
\L{\LB{}}
\L{\LB{}\Tab{4}{\V{gtk\_init}_(\&\V{argc},_\&\V{argv});}}
\L{\LB{}}
\L{\LB{}\Tab{4}{\V{window}_=_\V{gtk\_window\_new}_(\V{GTK\_WINDOW\_TOPLEVEL});}}
\L{\LB{}\Tab{4}{\V{gtk\_widget\_set\_name}_(\V{window},_\S{}\3Test_Input\3\SE{});}}
\L{\LB{}}
\L{\LB{}\Tab{4}{\V{vbox}_=_\V{gtk\_vbox\_new}_(\V{FALSE},_\N{0});}}
\L{\LB{}\Tab{4}{\V{gtk\_container\_add}_(\V{GTK\_CONTAINER}_(\V{window}),_\V{vbox});}}
\L{\LB{}\Tab{4}{\V{gtk\_widget\_show}_(\V{vbox});}}
\L{\LB{}}
\L{\LB{}\Tab{4}{\V{gtk\_signal\_connect}_(\V{GTK\_OBJECT}_(\V{window}),_\S{}\3destroy\3\SE{},}}
\L{\LB{}\Tab{24}{\V{GTK\_SIGNAL\_FUNC}_(\V{quit}),_\V{NULL});}}
\L{\LB{}}
\L{\LB{}\Tab{4}{\C{}/*_Create_the_drawing_area_*/\CE{}}}
\L{\LB{}}
\L{\LB{}\Tab{4}{\V{drawing\_area}_=_\V{gtk\_drawing\_area\_new}_();}}
\L{\LB{}\Tab{4}{\V{gtk\_drawing\_area\_size}_(\V{GTK\_DRAWING\_AREA}_(\V{drawing\_area}),_\N{200},_\N{200});}}
\L{\LB{}\Tab{4}{\V{gtk\_box\_pack\_start}_(\V{GTK\_BOX}_(\V{vbox}),_\V{drawing\_area},_\V{TRUE},_\V{TRUE},_\N{0});}}
\L{\LB{}}
\L{\LB{}\Tab{4}{\V{gtk\_widget\_show}_(\V{drawing\_area});}}
\L{\LB{}}
\L{\LB{}\Tab{4}{\C{}/*_Signals_used_to_handle_backing_pixmap_*/\CE{}}}
\L{\LB{}}
\L{\LB{}\Tab{4}{\V{gtk\_signal\_connect}_(\V{GTK\_OBJECT}_(\V{drawing\_area}),_\S{}\3expose\_event\3\SE{},}}
\L{\LB{}\Tab{24}{(\V{GtkSignalFunc})_\V{expose\_event},_\V{NULL});}}
\L{\LB{}\Tab{4}{\V{gtk\_signal\_connect}_(\V{GTK\_OBJECT}(\V{drawing\_area}),\S{}\3configure\_event\3\SE{},}}
\L{\LB{}\Tab{24}{(\V{GtkSignalFunc})_\V{configure\_event},_\V{NULL});}}
\L{\LB{}}
\L{\LB{}\Tab{4}{\C{}/*_Event_signals_*/\CE{}}}
\L{\LB{}}
\L{\LB{}\Tab{4}{\V{gtk\_signal\_connect}_(\V{GTK\_OBJECT}_(\V{drawing\_area}),_\S{}\3motion\_notify\_event\3\SE{},}}
\L{\LB{}\Tab{24}{(\V{GtkSignalFunc})_\V{motion\_notify\_event},_\V{NULL});}}
\L{\LB{}\Tab{4}{\V{gtk\_signal\_connect}_(\V{GTK\_OBJECT}_(\V{drawing\_area}),_\S{}\3button\_press\_event\3\SE{},}}
\L{\LB{}\Tab{24}{(\V{GtkSignalFunc})_\V{button\_press\_event},_\V{NULL});}}
\L{\LB{}}
\L{\LB{}\Tab{4}{\V{gtk\_widget\_set\_events}_(\V{drawing\_area},_\V{GDK\_EXPOSURE\_MASK}}}
\L{\LB{}\Tab{27}{\|_\V{GDK\_LEAVE\_NOTIFY\_MASK}}}
\L{\LB{}\Tab{27}{\|_\V{GDK\_BUTTON\_PRESS\_MASK}}}
\L{\LB{}\Tab{27}{\|_\V{GDK\_POINTER\_MOTION\_MASK}}}
\L{\LB{}\Tab{27}{\|_\V{GDK\_POINTER\_MOTION\_HINT\_MASK});}}
\L{\LB{}}
\L{\LB{}\Tab{4}{\C{}/*_.\,._And_a_quit_button_*/\CE{}}}
\L{\LB{}\Tab{4}{\V{button}_=_\V{gtk\_button\_new\_with\_label}_(\S{}\3Quit\3\SE{});}}
\L{\LB{}\Tab{4}{\V{gtk\_box\_pack\_start}_(\V{GTK\_BOX}_(\V{vbox}),_\V{button},_\V{FALSE},_\V{FALSE},_\N{0});}}
\L{\LB{}}
\L{\LB{}\Tab{4}{\V{gtk\_signal\_connect\_object}_(\V{GTK\_OBJECT}_(\V{button}),_\S{}\3clicked\3\SE{},}}
\L{\LB{}\Tab{31}{\V{GTK\_SIGNAL\_FUNC}_(\V{gtk\_widget\_destroy}),}}
\L{\LB{}\Tab{31}{\V{GTK\_OBJECT}_(\V{window}));}}
\L{\LB{}\Tab{4}{\V{gtk\_widget\_show}_(\V{button});}}
\L{\LB{}}
\L{\LB{}\Tab{4}{\V{gtk\_widget\_show}_(\V{window});}}
\L{\LB{}}
\L{\LB{}\Tab{4}{\V{gtk\_main}_();}}
\L{\LB{}}
\L{\LB{}\Tab{4}{\K{return}_\N{0};}}
\L{\LB{\}}}
\L{\LB{\C{}/*_example-end_*/\CE{}}}
\end{lgrind}
\printindex
\end{document}