cvs: php-gtk-doc /en language-defs.ent /en/tutorials hellow.xml /en/userguide/chapters installunix.xml installwin32.xml signals.xml widgets.xml
| From: | Steph | Date: | Sun, 03 Aug 2003 17:29:46 +0000 |
| Subject: | cvs: php-gtk-doc /en language-defs.ent /en/tutorials hellow.xml /en/userguide/chapters installunix.xml installwin32.xml signals.xml widgets.xml | ||
| Groups: | php.gtk.doc | ||
| Request: | Send a blank email to php-gtk-doc+get-814@lists.php.net to get a copy of this message | ||
sfox Sun Aug 3 13:29:46 2003 EDT
Modified files:
/php-gtk-doc/en language-defs.ent
/php-gtk-doc/en/tutorials hellow.xml
/php-gtk-doc/en/userguide/chapters installunix.xml installwin32.xml
signals.xml widgets.xml
Log:
Tidying and CDATA
Index: php-gtk-doc/en/language-defs.ent diff -u php-gtk-doc/en/language-defs.ent:1.4 php-gtk-doc/en/language-defs.ent:1.5 --- php-gtk-doc/en/language-defs.ent:1.4 Wed Jun 18 13:20:28 2003 +++ php-gtk-doc/en/language-defs.ent Sun Aug 3 13:29:45 2003 @@ -22,10 +22,14 @@ <!ENTITY GdkClassesDesc "<para>The Classes Provided by the GDK Library</para>"> <!ENTITY GtkEnums "GTK Enums"> -<!ENTITY GtkEnumsDesc ""> +<!ENTITY GtkEnumsDesc "Enumerated values can be any one of the values listed. + Flags can be a combination of any of the values listed. Both enums and flags have a + numeric value and a key which is human-readable."> <!ENTITY GdkEnums "GDK Enums"> -<!ENTITY GdkEnumsDesc ""> +<!ENTITY GdkEnumsDesc "Enumerated values can be any one of the values listed. + Flags can be a combination of any of the values listed. Both enums and flags have a + numeric value and a key which is human-readable."> <!ENTITY LibGladeClasses "Glade Classes"> <!ENTITY LibGladeClassesDesc "<para>The Glade Class</para>"> Index: php-gtk-doc/en/tutorials/hellow.xml diff -u php-gtk-doc/en/tutorials/hellow.xml:1.11 php-gtk-doc/en/tutorials/hellow.xml:1.12 --- php-gtk-doc/en/tutorials/hellow.xml:1.11 Tue Jun 17 17:27:57 2003 +++ php-gtk-doc/en/tutorials/hellow.xml Sun Aug 3 13:29:45 2003 @@ -41,27 +41,27 @@ function shutdown() { - print("Shutting down...\n"); + print("Shutting down...\n"); gtk::main_quit(); } function hello() { global $window; - print "Hello World!\n"; - $window->destroy(); + print "Hello World!\n"; + $window->destroy(); } -$window = &new GtkWindow(); -$window->connect('destroy', 'shutdown'); -$window->connect('delete-event', 'delete_event'); -$window->set_border_width(10); +$window = &new GtkWindow(); +$window->connect('destroy', 'shutdown'); +$window->connect('delete-event', 'delete_event'); +$window->set_border_width(10); -$button = &new GtkButton('Hello World!'); -$button->connect('clicked', 'hello'); -$window->add($button); +$button = &new GtkButton('Hello World!'); +$button->connect('clicked', 'hello'); +$window->add($button); -$window->show_all(); +$window->show_all(); gtk::main(); @@ -141,7 +141,7 @@ function shutdown() { - print("Shutting down...\n"); + print("Shutting down...\n"); gtk::main_quit(); } @@ -164,8 +164,8 @@ function hello() { global $window; - print "Hello World!\n"; - $window->destroy(); + print "Hello World!\n"; + $window->destroy(); } ?> @@ -194,10 +194,10 @@ <![CDATA[ <?php -$window = &new GtkWindow(); -$window->connect('destroy', 'shutdown'); -$window->connect('delete-event', 'delete_event'); -$window->set_border_width(10); +$window = &new GtkWindow(); +$window->connect('destroy', 'shutdown'); +$window->connect('delete-event', 'delete_event'); +$window->set_border_width(10); ?> ]]> @@ -222,11 +222,11 @@ <![CDATA[ <?php -$button = &new GtkButton('Hello World!'); -$button->connect('clicked', 'hello'); -$window->add($button); +$button = &new GtkButton('Hello World!'); +$button->connect('clicked', 'hello'); +$window->add($button); -$window->show_all(); +$window->show_all(); ?> ]]> Index: php-gtk-doc/en/userguide/chapters/installunix.xml diff -u php-gtk-doc/en/userguide/chapters/installunix.xml:1.1 php-gtk-doc/en/userguide/chapters/installunix.xml:1.2 --- php-gtk-doc/en/userguide/chapters/installunix.xml:1.1 Thu May 1 13:45:33 2003 +++ php-gtk-doc/en/userguide/chapters/installunix.xml Sun Aug 3 13:29:46 2003 @@ -68,7 +68,7 @@ <simpara> Finally, run <command>make</command> to compile the extension. Some source files are generated from .defs files by the code generator. If - you see messages like <literal>"Could not write..."</literal>, + you see messages like <literal>"Could not write..."</literal>, it means that the listed GTK+ objects or features are not yet supported. If the compilation is successful, run <command>make install</command> to install the extension into your default PHP extension directory (usually @@ -105,7 +105,7 @@ <literal>gen_gtk.c:1: parse error before '<'</literal> is caused by an error occurring in the generator. Usually this error is resolved by adding the line - <literal>ini_set("memory_limit", "32M");</literal> + <literal>ini_set("memory_limit", "32M");</literal> to the first line of <filename>generator/generator.php</filename>. You will need to remove all the <filename>gen_*</filename> files from all directories after changing this. Index: php-gtk-doc/en/userguide/chapters/installwin32.xml diff -u php-gtk-doc/en/userguide/chapters/installwin32.xml:1.1 php-gtk-doc/en/userguide/chapters/installwin32.xml:1.2 --- php-gtk-doc/en/userguide/chapters/installwin32.xml:1.1 Thu May 1 13:45:33 2003 +++ php-gtk-doc/en/userguide/chapters/installwin32.xml Sun Aug 3 13:29:46 2003 @@ -20,24 +20,24 @@ <itemizedlist> <listitem> <para> - <filename>\php4</filename> -> PHP dev and PHP-GTK + <filename>\php4</filename> -> PHP dev and PHP-GTK &version.phpgtk; binary files </para> </listitem> <listitem> <simpara> - <filename>\winnt</filename> -> the default php.ini file + <filename>\winnt</filename> -> the default php.ini file </simpara> </listitem> <listitem> <simpara> - <filename>\winnt\system32</filename> -> GTK+ binaries used by the + <filename>\winnt\system32</filename> -> GTK+ binaries used by the extension </simpara> </listitem> <listitem> <simpara> - <filename>\test</filename> -> a few samples to demonstrate + <filename>\test</filename> -> a few samples to demonstrate PHP-GTK usage </simpara> </listitem> Index: php-gtk-doc/en/userguide/chapters/signals.xml diff -u php-gtk-doc/en/userguide/chapters/signals.xml:1.16 php-gtk-doc/en/userguide/chapters/signals.xml:1.17 --- php-gtk-doc/en/userguide/chapters/signals.xml:1.16 Wed Jun 18 13:13:29 2003 +++ php-gtk-doc/en/userguide/chapters/signals.xml Sun Aug 3 13:29:46 2003 @@ -107,29 +107,29 @@ function shutdown() { - print("Shutting down...\n"); + print("Shutting down...\n"); gtk::main_quit(); } function you_clicked($button) { - $window = &new GtkWindow(); - $label = &new GtkLabel("You clicked the button"); - $window->add($label); - $window->connect("destroy","shutdown"); - $window->show_all(); + $window = &new GtkWindow(); + $label = &new GtkLabel("You clicked the button"); + $window->add($label); + $window->connect("destroy","shutdown"); + $window->show_all(); return false; } -$window = &new GtkWindow(); -$window->connect("destroy", "shutdown"); -$window->set_border_width(10); - -$button = &new GtkButton("Click Me!!"); -$button->connect("clicked", "you_clicked"); -$window->add($button); +$window = &new GtkWindow(); +$window->connect("destroy", "shutdown"); +$window->set_border_width(10); + +$button = &new GtkButton("Click Me!!"); +$button->connect("clicked", "you_clicked"); +$window->add($button); -$window->show_all(); +$window->show_all(); gtk::main(); @@ -170,24 +170,24 @@ function first($button) { - print "First function has been called\n"; + print "First function has been called\n"; } function second($button) { - print "Second function has been called\n"; + print "Second function has been called\n"; } -$window = &new GtkWindow(); -$window->connect_object("destroy", array("gtk", -"main_quit")); - -$button = &new GtkButton("Click Me!!"); -$button->connect("clicked","first"); -$button->connect("clicked","second"); -$window->add($button); +$window = &new GtkWindow(); +$window->connect_object("destroy", array("gtk", +"main_quit")); + +$button = &new GtkButton("Click Me!!"); +$button->connect("clicked","first"); +$button->connect("clicked","second"); +$window->add($button); -$window->show_all(); +$window->show_all(); gtk::main(); @@ -245,17 +245,17 @@ function button_clicked($button, $window) { - $window->destroy(); + $window->destroy(); gtk::main_quit(); } -$window = &new GtkWindow(); +$window = &new GtkWindow(); -$button = &new GtkButton("exit"); -$button->connect("clicked","button_clicked", $window); +$button = &new GtkButton("exit"); +$button->connect("clicked","button_clicked", $window); -$window->add($button); -$window->show_all(); +$window->add($button); +$window->show_all(); gtk::main(); @@ -296,29 +296,29 @@ function button_clicked($button, $window) { - $window->set_title("titled"); + $window->set_title("titled"); } -$window1 = &new GtkWindow(); -$window1->connect_object("destroy", array("gtk", -"main_quit")); -$window2 = &new GtkWindow(); -$window2->connect_object("destroy", array("gtk", -"main_quit")); +$window1 = &new GtkWindow(); +$window1->connect_object("destroy", array("gtk", +"main_quit")); +$window2 = &new GtkWindow(); +$window2->connect_object("destroy", array("gtk", +"main_quit")); -$button1 = &new GtkButton("click me"); -$button2 = &new GtkButton("or me"); +$button1 = &new GtkButton("click me"); +$button2 = &new GtkButton("or me"); -$button1->connect("clicked", "button_clicked", +$button1->connect("clicked", "button_clicked", $window1); -$button2->connect("clicked", "button_clicked", +$button2->connect("clicked", "button_clicked", $window2); -$window1->add($button1); -$window2->add($button2); +$window1->add($button1); +$window2->add($button2); -$window1->show_all(); -$window2->show_all(); +$window1->show_all(); +$window2->show_all(); gtk::main(); @@ -347,10 +347,10 @@ <![CDATA[ <?php -$window = &new GtkWindow(); -$window->connect_object("destroy", array("gtk", -"main_quit")); -$window->show(); +$window = &new GtkWindow(); +$window->connect_object("destroy", array("gtk", +"main_quit")); +$window->show(); gtk::main(); @@ -382,12 +382,12 @@ function destroy_window($window) { - $window->destroy(); + $window->destroy(); gtk::main_quit(); } -$exit_button->connect_object("clicked", -"destroy_window", $window); +$exit_button->connect_object("clicked", +"destroy_window", $window); ?> ]]> @@ -395,7 +395,7 @@ </example> </para> <para> - The connect_after* methods allow callbacks to be "run after" + The connect_after* methods allow callbacks to be "run after" the default signal handler for that signal. This can be useful in some situations; for example, where you want to destroy only one of several windows in a given circumstance. However, connect_after* methods @@ -415,20 +415,20 @@ function quit_routine($window) { - print("Shutting down...\n"); + print("Shutting down...\n"); gtk::main_quit(); } -$window1 = &new GtkWindow(); -$window1->set_title("Quit the main loop"); -$window1->connect("destroy", "quit_routine"); - -$window2 = &new GtkWindow(); -$window2->set_title("Destroy this window"); -$window2->connect_after("destroy", "quit_routine"); +$window1 = &new GtkWindow(); +$window1->set_title("Quit the main loop"); +$window1->connect("destroy", "quit_routine"); + +$window2 = &new GtkWindow(); +$window2->set_title("Destroy this window"); +$window2->connect_after("destroy", "quit_routine"); -$window1->show(); -$window2->show(); +$window1->show(); +$window2->show(); gtk::main(); @@ -509,55 +509,55 @@ <![CDATA[ <?php -dl("php_gtk." . (strstr(PHP_OS, "WIN") ? "dll" : -"so")) || -die("Can't load php_gtk module!\n"); +dl("php_gtk." . (strstr(PHP_OS, "WIN") ? "dll" : +"so")) || +die("Can't load php_gtk module!\n"); function show_event_type($button, $event, $text) { - $event_type = $event->type; + $event_type = $event->type; $insert = $text->get_length(); - $text->freeze(); + $text->freeze(); switch($event_type) { case 2: - $text->insert_text("GDK_EXPOSE\n", $insert); + $text->insert_text("GDK_EXPOSE\n", $insert); break; case 3: - $text->insert_text("GDK_MOTION_NOTIFY\n", $insert); + $text->insert_text("GDK_MOTION_NOTIFY\n", $insert); break; case 4: - $text->insert_text("GDK_BUTTON_PRESS\n", $insert); + $text->insert_text("GDK_BUTTON_PRESS\n", $insert); break; case 5: - $text->insert_text("GDK_2BUTTON_PRESS\n", $insert); - $button->hide(); + $text->insert_text("GDK_2BUTTON_PRESS\n", $insert); + $button->hide(); break; case 7: - $text->insert_text("GDK_BUTTON_RELEASE\n", $insert); + $text->insert_text("GDK_BUTTON_RELEASE\n", $insert); break; case 8: - $text->insert_text("GDK_KEY_PRESS\n", $insert); + $text->insert_text("GDK_KEY_PRESS\n", $insert); break; case 9: - $text->insert_text("GDK_KEY_RELEASE\n", $insert); + $text->insert_text("GDK_KEY_RELEASE\n", $insert); break; case 10: - $text->insert_text("GDK_ENTER_NOTIFY\n", $insert); + $text->insert_text("GDK_ENTER_NOTIFY\n", $insert); break; case 11: - $text->insert_text("GDK_LEAVE_NOTIFY\n", $insert); + $text->insert_text("GDK_LEAVE_NOTIFY\n", $insert); break; case 12: - $text->insert_text("GDK_FOCUS_CHANGE\n", $insert); + $text->insert_text("GDK_FOCUS_CHANGE\n", $insert); break; case 14: - $text->insert_text("GDK_MAP\n", $insert); + $text->insert_text("GDK_MAP\n", $insert); break; case 15: - $text->insert_text("GDK_UNMAP\n", $insert); - $button->destroy(); + $text->insert_text("GDK_UNMAP\n", $insert); + $button->destroy(); $text->insert_text( -"\n* GDK EVENTS AND GTK SIGNALS - background stream vs foreground +"\n* GDK EVENTS AND GTK SIGNALS - background stream vs foreground messaging * \n * Most GdkEventTypes have counterpart GTK signals, known as 'event' @@ -574,34 +574,34 @@ \$button->connect('pressed', 'whatever'); has no relationship to the GDK_BUTTON_PRESS event it generates, which refers to mouse-button activity and not to the GtkButton 'pressed' signal. * -\n", 0); +\n", 0); break; } - $text->thaw(); + $text->thaw(); return false; } -$window = &new GtkWindow(); -$window->set_position(GTK_WIN_POS_CENTER); -$window->set_default_size((gdk::screen_width()/1.5), +$window = &new GtkWindow(); +$window->set_position(GTK_WIN_POS_CENTER); +$window->set_default_size((gdk::screen_width()/1.5), (gdk::screen_height()-20)); -$window->connect_object("destroy", array("gtk", -"main_quit")); -$window->realize(); - -$box = &new GtkVBox(false, 5); -$window->add($box); -$scrlwin = &new GtkScrolledWindow(); -$box->pack_start($scrlwin, true, true, 0); -$text = &new GtkText(); -$scrlwin->add($text); - -$button = &new GtkButton("Double-click here for information.."); -$button->add_events(GDK_ALL_EVENTS_MASK); -$button->connect("event", "show_event_type", $text); -$box->pack_end($button, false, false, 5); +$window->connect_object("destroy", array("gtk", +"main_quit")); +$window->realize(); + +$box = &new GtkVBox(false, 5); +$window->add($box); +$scrlwin = &new GtkScrolledWindow(); +$box->pack_start($scrlwin, true, true, 0); +$text = &new GtkText(); +$scrlwin->add($text); + +$button = &new GtkButton("Double-click here for information.."); +$button->add_events(GDK_ALL_EVENTS_MASK); +$button->connect("event", "show_event_type", $text); +$box->pack_end($button, false, false, 5); -$window->show_all(); +$window->show_all(); gtk::main(); Index: php-gtk-doc/en/userguide/chapters/widgets.xml diff -u php-gtk-doc/en/userguide/chapters/widgets.xml:1.10 php-gtk-doc/en/userguide/chapters/widgets.xml:1.11 --- php-gtk-doc/en/userguide/chapters/widgets.xml:1.10 Tue Jun 17 17:27:57 2003 +++ php-gtk-doc/en/userguide/chapters/widgets.xml Sun Aug 3 13:29:46 2003 @@ -39,10 +39,10 @@ This is the step of setting up callback functions for use. An example of this might be <literal> - $widget->connect("event", "my_focus_func"); + $widget->connect("event", "my_focus_func"); </literal>, - where "event" is a predefined state such as - <signalname>clicked</signalname> and "my_focus_func" is the + where "event" is a predefined state such as + <signalname>clicked</signalname> and "my_focus_func" is the called subroutine. </simpara> </listitem>
Index: php-gtk-doc/en/language-defs.ent diff -u php-gtk-doc/en/language-defs.ent:1.4 php-gtk-doc/en/language-defs.ent:1.5 --- php-gtk-doc/en/language-defs.ent:1.4 Wed Jun 18 13:20:28 2003 +++ php-gtk-doc/en/language-defs.ent Sun Aug 3 13:29:45 2003 @@ -22,10 +22,14 @@ <!ENTITY GdkClassesDesc "<para>The Classes Provided by the GDK Library</para>"> <!ENTITY GtkEnums "GTK Enums"> -<!ENTITY GtkEnumsDesc ""> +<!ENTITY GtkEnumsDesc "Enumerated values can be any one of the values listed. + Flags can be a combination of any of the values listed. Both enums and flags have a + numeric value and a key which is human-readable."> <!ENTITY GdkEnums "GDK Enums"> -<!ENTITY GdkEnumsDesc ""> +<!ENTITY GdkEnumsDesc "Enumerated values can be any one of the values listed. + Flags can be a combination of any of the values listed. Both enums and flags have a + numeric value and a key which is human-readable."> <!ENTITY LibGladeClasses "Glade Classes"> <!ENTITY LibGladeClassesDesc "<para>The Glade Class</para>"> Index: php-gtk-doc/en/tutorials/hellow.xml diff -u php-gtk-doc/en/tutorials/hellow.xml:1.11 php-gtk-doc/en/tutorials/hellow.xml:1.12 --- php-gtk-doc/en/tutorials/hellow.xml:1.11 Tue Jun 17 17:27:57 2003 +++ php-gtk-doc/en/tutorials/hellow.xml Sun Aug 3 13:29:45 2003 @@ -41,27 +41,27 @@ function shutdown() { - print("Shutting down...\n"); + print("Shutting down...\n"); gtk::main_quit(); } function hello() { global $window; - print "Hello World!\n"; - $window->destroy(); + print "Hello World!\n"; + $window->destroy(); } -$window = &new GtkWindow(); -$window->connect('destroy', 'shutdown'); -$window->connect('delete-event', 'delete_event'); -$window->set_border_width(10); +$window = &new GtkWindow(); +$window->connect('destroy', 'shutdown'); +$window->connect('delete-event', 'delete_event'); +$window->set_border_width(10); -$button = &new GtkButton('Hello World!'); -$button->connect('clicked', 'hello'); -$window->add($button); +$button = &new GtkButton('Hello World!'); +$button->connect('clicked', 'hello'); +$window->add($button); -$window->show_all(); +$window->show_all(); gtk::main(); @@ -141,7 +141,7 @@ function shutdown() { - print("Shutting down...\n"); + print("Shutting down...\n"); gtk::main_quit(); } @@ -164,8 +164,8 @@ function hello() { global $window; - print "Hello World!\n"; - $window->destroy(); + print "Hello World!\n"; + $window->destroy(); } ?> @@ -194,10 +194,10 @@ <![CDATA[ <?php -$window = &new GtkWindow(); -$window->connect('destroy', 'shutdown'); -$window->connect('delete-event', 'delete_event'); -$window->set_border_width(10); +$window = &new GtkWindow(); +$window->connect('destroy', 'shutdown'); +$window->connect('delete-event', 'delete_event'); +$window->set_border_width(10); ?> ]]> @@ -222,11 +222,11 @@ <![CDATA[ <?php -$button = &new GtkButton('Hello World!'); -$button->connect('clicked', 'hello'); -$window->add($button); +$button = &new GtkButton('Hello World!'); +$button->connect('clicked', 'hello'); +$window->add($button); -$window->show_all(); +$window->show_all(); ?> ]]> Index: php-gtk-doc/en/userguide/chapters/installunix.xml diff -u php-gtk-doc/en/userguide/chapters/installunix.xml:1.1 php-gtk-doc/en/userguide/chapters/installunix.xml:1.2 --- php-gtk-doc/en/userguide/chapters/installunix.xml:1.1 Thu May 1 13:45:33 2003 +++ php-gtk-doc/en/userguide/chapters/installunix.xml Sun Aug 3 13:29:46 2003 @@ -68,7 +68,7 @@ <simpara> Finally, run <command>make</command> to compile the extension. Some source files are generated from .defs files by the code generator. If - you see messages like <literal>"Could not write..."</literal>, + you see messages like <literal>"Could not write..."</literal>, it means that the listed GTK+ objects or features are not yet supported. If the compilation is successful, run <command>make install</command> to install the extension into your default PHP extension directory (usually @@ -105,7 +105,7 @@ <literal>gen_gtk.c:1: parse error before '<'</literal> is caused by an error occurring in the generator. Usually this error is resolved by adding the line - <literal>ini_set("memory_limit", "32M");</literal> + <literal>ini_set("memory_limit", "32M");</literal> to the first line of <filename>generator/generator.php</filename>. You will need to remove all the <filename>gen_*</filename> files from all directories after changing this. Index: php-gtk-doc/en/userguide/chapters/installwin32.xml diff -u php-gtk-doc/en/userguide/chapters/installwin32.xml:1.1 php-gtk-doc/en/userguide/chapters/installwin32.xml:1.2 --- php-gtk-doc/en/userguide/chapters/installwin32.xml:1.1 Thu May 1 13:45:33 2003 +++ php-gtk-doc/en/userguide/chapters/installwin32.xml Sun Aug 3 13:29:46 2003 @@ -20,24 +20,24 @@ <itemizedlist> <listitem> <para> - <filename>\php4</filename> -> PHP dev and PHP-GTK + <filename>\php4</filename> -> PHP dev and PHP-GTK &version.phpgtk; binary files </para> </listitem> <listitem> <simpara> - <filename>\winnt</filename> -> the default php.ini file + <filename>\winnt</filename> -> the default php.ini file </simpara> </listitem> <listitem> <simpara> - <filename>\winnt\system32</filename> -> GTK+ binaries used by the + <filename>\winnt\system32</filename> -> GTK+ binaries used by the extension </simpara> </listitem> <listitem> <simpara> - <filename>\test</filename> -> a few samples to demonstrate + <filename>\test</filename> -> a few samples to demonstrate PHP-GTK usage </simpara> </listitem> Index: php-gtk-doc/en/userguide/chapters/signals.xml diff -u php-gtk-doc/en/userguide/chapters/signals.xml:1.16 php-gtk-doc/en/userguide/chapters/signals.xml:1.17 --- php-gtk-doc/en/userguide/chapters/signals.xml:1.16 Wed Jun 18 13:13:29 2003 +++ php-gtk-doc/en/userguide/chapters/signals.xml Sun Aug 3 13:29:46 2003 @@ -107,29 +107,29 @@ function shutdown() { - print("Shutting down...\n"); + print("Shutting down...\n"); gtk::main_quit(); } function you_clicked($button) { - $window = &new GtkWindow(); - $label = &new GtkLabel("You clicked the button"); - $window->add($label); - $window->connect("destroy","shutdown"); - $window->show_all(); + $window = &new GtkWindow(); + $label = &new GtkLabel("You clicked the button"); + $window->add($label); + $window->connect("destroy","shutdown"); + $window->show_all(); return false; } -$window = &new GtkWindow(); -$window->connect("destroy", "shutdown"); -$window->set_border_width(10); - -$button = &new GtkButton("Click Me!!"); -$button->connect("clicked", "you_clicked"); -$window->add($button); +$window = &new GtkWindow(); +$window->connect("destroy", "shutdown"); +$window->set_border_width(10); + +$button = &new GtkButton("Click Me!!"); +$button->connect("clicked", "you_clicked"); +$window->add($button); -$window->show_all(); +$window->show_all(); gtk::main(); @@ -170,24 +170,24 @@ function first($button) { - print "First function has been called\n"; + print "First function has been called\n"; } function second($button) { - print "Second function has been called\n"; + print "Second function has been called\n"; } -$window = &new GtkWindow(); -$window->connect_object("destroy", array("gtk", -"main_quit")); - -$button = &new GtkButton("Click Me!!"); -$button->connect("clicked","first"); -$button->connect("clicked","second"); -$window->add($button); +$window = &new GtkWindow(); +$window->connect_object("destroy", array("gtk", +"main_quit")); + +$button = &new GtkButton("Click Me!!"); +$button->connect("clicked","first"); +$button->connect("clicked","second"); +$window->add($button); -$window->show_all(); +$window->show_all(); gtk::main(); @@ -245,17 +245,17 @@ function button_clicked($button, $window) { - $window->destroy(); + $window->destroy(); gtk::main_quit(); } -$window = &new GtkWindow(); +$window = &new GtkWindow(); -$button = &new GtkButton("exit"); -$button->connect("clicked","button_clicked", $window); +$button = &new GtkButton("exit"); +$button->connect("clicked","button_clicked", $window); -$window->add($button); -$window->show_all(); +$window->add($button); +$window->show_all(); gtk::main(); @@ -296,29 +296,29 @@ function button_clicked($button, $window) { - $window->set_title("titled"); + $window->set_title("titled"); } -$window1 = &new GtkWindow(); -$window1->connect_object("destroy", array("gtk", -"main_quit")); -$window2 = &new GtkWindow(); -$window2->connect_object("destroy", array("gtk", -"main_quit")); +$window1 = &new GtkWindow(); +$window1->connect_object("destroy", array("gtk", +"main_quit")); +$window2 = &new GtkWindow(); +$window2->connect_object("destroy", array("gtk", +"main_quit")); -$button1 = &new GtkButton("click me"); -$button2 = &new GtkButton("or me"); +$button1 = &new GtkButton("click me"); +$button2 = &new GtkButton("or me"); -$button1->connect("clicked", "button_clicked", +$button1->connect("clicked", "button_clicked", $window1); -$button2->connect("clicked", "button_clicked", +$button2->connect("clicked", "button_clicked", $window2); -$window1->add($button1); -$window2->add($button2); +$window1->add($button1); +$window2->add($button2); -$window1->show_all(); -$window2->show_all(); +$window1->show_all(); +$window2->show_all(); gtk::main(); @@ -347,10 +347,10 @@ <![CDATA[ <?php -$window = &new GtkWindow(); -$window->connect_object("destroy", array("gtk", -"main_quit")); -$window->show(); +$window = &new GtkWindow(); +$window->connect_object("destroy", array("gtk", +"main_quit")); +$window->show(); gtk::main(); @@ -382,12 +382,12 @@ function destroy_window($window) { - $window->destroy(); + $window->destroy(); gtk::main_quit(); } -$exit_button->connect_object("clicked", -"destroy_window", $window); +$exit_button->connect_object("clicked", +"destroy_window", $window); ?> ]]> @@ -395,7 +395,7 @@ </example> </para> <para> - The connect_after* methods allow callbacks to be "run after" + The connect_after* methods allow callbacks to be "run after" the default signal handler for that signal. This can be useful in some situations; for example, where you want to destroy only one of several windows in a given circumstance. However, connect_after* methods @@ -415,20 +415,20 @@ function quit_routine($window) { - print("Shutting down...\n"); + print("Shutting down...\n"); gtk::main_quit(); } -$window1 = &new GtkWindow(); -$window1->set_title("Quit the main loop"); -$window1->connect("destroy", "quit_routine"); - -$window2 = &new GtkWindow(); -$window2->set_title("Destroy this window"); -$window2->connect_after("destroy", "quit_routine"); +$window1 = &new GtkWindow(); +$window1->set_title("Quit the main loop"); +$window1->connect("destroy", "quit_routine"); + +$window2 = &new GtkWindow(); +$window2->set_title("Destroy this window"); +$window2->connect_after("destroy", "quit_routine"); -$window1->show(); -$window2->show(); +$window1->show(); +$window2->show(); gtk::main(); @@ -509,55 +509,55 @@ <![CDATA[ <?php -dl("php_gtk." . (strstr(PHP_OS, "WIN") ? "dll" : -"so")) || -die("Can't load php_gtk module!\n"); +dl("php_gtk." . (strstr(PHP_OS, "WIN") ? "dll" : +"so")) || +die("Can't load php_gtk module!\n"); function show_event_type($button, $event, $text) { - $event_type = $event->type; + $event_type = $event->type; $insert = $text->get_length(); - $text->freeze(); + $text->freeze(); switch($event_type) { case 2: - $text->insert_text("GDK_EXPOSE\n", $insert); + $text->insert_text("GDK_EXPOSE\n", $insert); break; case 3: - $text->insert_text("GDK_MOTION_NOTIFY\n", $insert); + $text->insert_text("GDK_MOTION_NOTIFY\n", $insert); break; case 4: - $text->insert_text("GDK_BUTTON_PRESS\n", $insert); + $text->insert_text("GDK_BUTTON_PRESS\n", $insert); break; case 5: - $text->insert_text("GDK_2BUTTON_PRESS\n", $insert); - $button->hide(); + $text->insert_text("GDK_2BUTTON_PRESS\n", $insert); + $button->hide(); break; case 7: - $text->insert_text("GDK_BUTTON_RELEASE\n", $insert); + $text->insert_text("GDK_BUTTON_RELEASE\n", $insert); break; case 8: - $text->insert_text("GDK_KEY_PRESS\n", $insert); + $text->insert_text("GDK_KEY_PRESS\n", $insert); break; case 9: - $text->insert_text("GDK_KEY_RELEASE\n", $insert); + $text->insert_text("GDK_KEY_RELEASE\n", $insert); break; case 10: - $text->insert_text("GDK_ENTER_NOTIFY\n", $insert); + $text->insert_text("GDK_ENTER_NOTIFY\n", $insert); break; case 11: - $text->insert_text("GDK_LEAVE_NOTIFY\n", $insert); + $text->insert_text("GDK_LEAVE_NOTIFY\n", $insert); break; case 12: - $text->insert_text("GDK_FOCUS_CHANGE\n", $insert); + $text->insert_text("GDK_FOCUS_CHANGE\n", $insert); break; case 14: - $text->insert_text("GDK_MAP\n", $insert); + $text->insert_text("GDK_MAP\n", $insert); break; case 15: - $text->insert_text("GDK_UNMAP\n", $insert); - $button->destroy(); + $text->insert_text("GDK_UNMAP\n", $insert); + $button->destroy(); $text->insert_text( -"\n* GDK EVENTS AND GTK SIGNALS - background stream vs foreground +"\n* GDK EVENTS AND GTK SIGNALS - background stream vs foreground messaging * \n * Most GdkEventTypes have counterpart GTK signals, known as 'event' @@ -574,34 +574,34 @@ \$button->connect('pressed', 'whatever'); has no relationship to the GDK_BUTTON_PRESS event it generates, which refers to mouse-button activity and not to the GtkButton 'pressed' signal. * -\n", 0); +\n", 0); break; } - $text->thaw(); + $text->thaw(); return false; } -$window = &new GtkWindow(); -$window->set_position(GTK_WIN_POS_CENTER); -$window->set_default_size((gdk::screen_width()/1.5), +$window = &new GtkWindow(); +$window->set_position(GTK_WIN_POS_CENTER); +$window->set_default_size((gdk::screen_width()/1.5), (gdk::screen_height()-20)); -$window->connect_object("destroy", array("gtk", -"main_quit")); -$window->realize(); - -$box = &new GtkVBox(false, 5); -$window->add($box); -$scrlwin = &new GtkScrolledWindow(); -$box->pack_start($scrlwin, true, true, 0); -$text = &new GtkText(); -$scrlwin->add($text); - -$button = &new GtkButton("Double-click here for information.."); -$button->add_events(GDK_ALL_EVENTS_MASK); -$button->connect("event", "show_event_type", $text); -$box->pack_end($button, false, false, 5); +$window->connect_object("destroy", array("gtk", +"main_quit")); +$window->realize(); + +$box = &new GtkVBox(false, 5); +$window->add($box); +$scrlwin = &new GtkScrolledWindow(); +$box->pack_start($scrlwin, true, true, 0); +$text = &new GtkText(); +$scrlwin->add($text); + +$button = &new GtkButton("Double-click here for information.."); +$button->add_events(GDK_ALL_EVENTS_MASK); +$button->connect("event", "show_event_type", $text); +$box->pack_end($button, false, false, 5); -$window->show_all(); +$window->show_all(); gtk::main(); Index: php-gtk-doc/en/userguide/chapters/widgets.xml diff -u php-gtk-doc/en/userguide/chapters/widgets.xml:1.10 php-gtk-doc/en/userguide/chapters/widgets.xml:1.11 --- php-gtk-doc/en/userguide/chapters/widgets.xml:1.10 Tue Jun 17 17:27:57 2003 +++ php-gtk-doc/en/userguide/chapters/widgets.xml Sun Aug 3 13:29:46 2003 @@ -39,10 +39,10 @@ This is the step of setting up callback functions for use. An example of this might be <literal> - $widget->connect("event", "my_focus_func"); + $widget->connect("event", "my_focus_func"); </literal>, - where "event" is a predefined state such as - <signalname>clicked</signalname> and "my_focus_func" is the + where "event" is a predefined state such as + <signalname>clicked</signalname> and "my_focus_func" is the called subroutine. </simpara> </listitem>