cvs: php-gtk /docs/en/classes gtkobject.xml

From: Date: Tue, 17 Apr 2001 14:45:30 +0000
Subject: cvs: php-gtk /docs/en/classes gtkobject.xml
Groups: php.gtk 
Request: Send a blank email to php-gtk+get-1435@lists.php.net to get a copy of this message
sfox Tue Apr 17 07:45:30 2001 EDT Modified files: /php-gtk/docs/en/classes gtkobject.xml Log: GtkObject is now with MF for a technical checkup

Index: php-gtk/docs/en/classes/gtkobject.xml diff -u php-gtk/docs/en/classes/gtkobject.xml:1.8 php-gtk/docs/en/classes/gtkobject.xml:1.9 --- php-gtk/docs/en/classes/gtkobject.xml:1.8 Sun Apr 15 14:22:56 2001 +++ php-gtk/docs/en/classes/gtkobject.xml Tue Apr 17 07:45:29 2001 @@ -1,60 +1,622 @@ <classentry id="gtk.gtkobject"> - <classmeta> <classtitle>GtkObject</classtitle> - <classparent /> - <shortdesc>Base object of GTK hierarchy</shortdesc> + <shortdesc>Base object of GTK hierarchy.</shortdesc> + <desc> + <para> + All other class objects in the GTK hierarchy are derived from GtkObject. + This object is not directly accessible from PHP. + </para> + <para> + All the methods and signals described here are inherited by every class + object within PHP-GTK, except when the class has a more local method or + signal overriding the inheritance. As an example of this phenomenon, the + <literal>popup()</literal> method belonging to GtkWidget is overridden by + the <literal>popup()</literal> method belonging to GtkMenu, and has very + different parameters. + <!-- If anyone's aware of an override for a GtkObject method, that would be + better in here. Currently I know of none. sf. --> + </para> + <para> + There is generally one exception that proves the rule, and so it is in this + case. Every class object provides its own instance of + <literal>get_type</literal>. However, for all practical endeavours, the + effect is the same as if it were an inherited method. Throughout this + manual it has been treated as though it were, for this reason. + </para> + </desc> + </classmeta> + +<methods> +<!--TODO: GtkObject - all methods need checking for technical accuracy, Markus +is aware --> + <method id="gtk.gtkobject.method.get_type"> + <funcsynopsis> + <funcprototype> + <funcdef> + void <function>get_type</function> + </funcdef> + </funcprototype> + </funcsynopsis> + <shortdesc> + Identifies the object. + </shortdesc> + <desc> + <para> + Returns an integer uniquely identifying <literal>$object</literal>. In this way GTK+ is able to determine the type of an object. + <programlisting>$object-&gt;get_type();</programlisting> + </para> + </desc> + </method> + + <method id="gtk.gtkobject.method.flags"> + <funcsynopsis> + <funcprototype> + <funcdef> + void <function>flags</function> + </funcdef> + </funcprototype> + </funcsynopsis> + <shortdesc> + Gets the flags for an object. + </shortdesc> + <desc> + <para> + <programlisting>$object-&gt;flags();</programlisting> + This returns four integers describing the status of <literal>$object</literal>: + </para> + <para> + <simplelist> + <member>GTK_DESTROYED - a return above 0 means the object has not been destroyed</member> + <member>GTK_FLOATING - a reference count above 0 means the object is floating </member> + <member>GTK_CONNECTED - tests whether the object has had signals sent to it</member> + <member>GTK_CONSTRUCTED - tests whether the object's arguments have been prepared</member> + </simplelist> + </para> + </desc> + </method> + + <method id="gtk.gtkobject.method.set_flags"> + <funcsynopsis> + <funcprototype> + <funcdef> + void <function>set_flags</function> + </funcdef> + <paramdef>char <parameter>flag</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <shortdesc> + Sets the flags for an object. + </shortdesc> + <desc> + <para> + Sets the flags for <literal>$object</literal>. + <programlisting>$object-&gt;set_flags(GTK_FLOATING);</programlisting> + <!-- MARKUS - These can be any flags, can't they? Do you have any idea where they might be listed, or whether these too are inherited? sf. --> + </para> + </desc> + </method> + + <method id="gtk.gtkobject.method.unset_flags"> + <funcsynopsis> + <funcprototype> + <funcdef> + void <function>unset_flags</function> + </funcdef> + <paramdef>char <parameter>flag</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <shortdesc> + Unsets the flags for an object. + </shortdesc> + <desc> + <para> + Unsets the flags for <literal>$object</literal>. + <programlisting>$object-&gt;unset_flags(GTK_DESTROYED);</programlisting> + </para> + </desc> + </method> + + + <method id="gtk.gtkobject.method.default_construct"> + <funcsynopsis> + <funcprototype> + <funcdef> + void <function>default_construct</function> + </funcdef> + </funcprototype> + </funcsynopsis> + <shortdesc> + Constructs arguments. + </shortdesc> + <desc> + <para> + This function is called to construct arguments that haven't been + initialized but have the GTK_ARG_CONSTRUCT flag set. It is normally + bypassed by declaring a new instance of an object. + <programlisting>$object-&gt;default_construct();</programlisting> + </para> + </desc> + </method> + + <method id="gtk.gtkobject.method.constructed"> + <funcsynopsis> + <funcprototype> + <funcdef> + void <function>constructed</function> + </funcdef> + </funcprototype> + </funcsynopsis> + <shortdesc> + Marks an object as constructed. + </shortdesc> + <desc> + <para> + Marks $object as constructed, which may be necessary when + default_construct() is inadequate. It is needed in GtkCList because + GtkCList does construction work which cannot be done in an + initialising function. It calls gtk_object_constructed() to indicate that + the job has been done, so that no other constructor will be invoked. + Normally this function is automatically run from + gtk_object_default_construct(). + <programlisting>$object-&gt;constructed();</programlisting> + <!-- MARKUS - I don't believe this will ever be needed as part of + programming within PHP-GTK, I think it's a GTK+ thingy which we get + automatically as part of PHP? but I could be wrong? sf --> + </para> + </desc> + </method> + + <method id="gtk.gtkobject.method.sink"> + <funcsynopsis> + <funcprototype> + <funcdef> + void <function>sink</function> + </funcdef> + </funcprototype> + </funcsynopsis> + <shortdesc> + Decreases the initial reference count. + </shortdesc> + <desc> + <para> + Objects are created with a reference count of one. This can be increased + (to make objects stronger) or decreased (to make them weaker). A widget + which is declared as the child of another widget will automatically be + decremented, passing the parent widget its reference count of one. It is + possible to sink an object several times, as only the initial sink will + cause it to dereference in this way. + <programlisting>$object-&gt;sink();</programlisting> + </para> + </desc> + </method> + + <method id="gtk.gtkobject.method.ref"> + <funcsynopsis> + <funcprototype> + <funcdef> + void <function>ref</function> + </funcdef> + </funcprototype> + </funcsynopsis> + <shortdesc> + Increases the reference count. + </shortdesc> + <desc> + <para> + Increases the reference count of <literal>$object</literal> by one. + <programlisting>$object-&gt;ref();</programlisting> + </para> + </desc> + </method> + + <method id="gtk.gtkobject.method.unref"> + <funcsynopsis> + <funcprototype> + <funcdef> + void <function>unref</function> + </funcdef> + </funcprototype> + </funcsynopsis> + <shortdesc> + Decreases the reference count. + </shortdesc> <desc> - <simpara> - All object classes in the GTK hierarchy are derived from GtkObject. - This object is not directly accessible from PHP. However, the - class methods described here are inherited by all subsequent object classes. - </simpara> - </desc> - </classmeta> - - <methods> - - <method id="gtk.gtkobject.method.get_type"> - <funcsynopsis> - <funcprototype> - <funcdef> - int <function>get_type</function> - </funcdef> - <paramdef>char <parameter>tba</parameter></paramdef> - <paramdef>resource <parameter>tba</parameter></paramdef> - <paramdef>resource <parameter>tba</parameter></paramdef> - <paramdef>resource <parameter>tba</parameter></paramdef> - <paramdef>int <parameter>tba</parameter></paramdef> - </funcprototype> + <para> + Decreases the reference count of <literal>$object</literal> by one. When + the reference count is zero, <literal>$object</literal> will be destroyed. + <programlisting>$object-&gt;unref();</programlisting> + </para> + </desc> + </method> + + <method id="gtk.gtkobject.method.destroy"> + <funcsynopsis> + <funcprototype> + <funcdef> + void <function>destroy</function> + </funcdef> + </funcprototype> </funcsynopsis> <shortdesc> - Get the type of an object. + Destroys an object. </shortdesc> <desc> - <simpara> - Longer definition to go in here inc samples. - </simpara> - </desc> - </method> - - </methods> - - <signals> - - <signal id="gtk.gtkobject.signal.destory"> - <signalname>destroy</signalname> - <firedwhen>fired when an object is destroyed</firedwhen> - <shortdesc>Indicates that an object is being destroyed</shortdesc> - <desc> - <simpara> - This signal is fired when an object is destroyed. See the - signals documentation for information on how to use this - signal. - </simpara> - </desc> - </signal> + <para> + Destroys <literal>$object</literal> by calling its shutdown handler. + <programlisting>$object-&gt;destroy();</programlisting> + </para> + </desc> + </method> + + <method id="gtk.gtkobject.method.set_data"> + <funcsynopsis> + <funcprototype> + <funcdef> + void <function>set_data</function> + </funcdef> + <paramdef>char <parameter>$key</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <shortdesc> + Binds data to an object. + </shortdesc> + <desc> + <para> + Binds any kind of data (not just objects) to associate with <literal>$object</literal>, + using a named key. This can be useful, as the binding is global, i.e. it + is not necessary to declare bound data as global within a function that is + not local to it when using this construct. + <programlisting>$object-&gt;set_data($key, $data);</programlisting> + </para> + </desc> + </method> + + <method id="gtk.gtkobject.method.remove_data"> + <funcsynopsis> + <funcprototype> + <funcdef> + void <function>remove_data</function> + </funcdef> + <paramdef>char <parameter>$key</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <shortdesc> + Removes bound data. + </shortdesc> + <desc> + <para> + Removes data associated with <literal>$key</literal> from <literal>$object</literal> data associations. + <programlisting>$object-&gt;remove_data($key);</programlisting> + </para> + </desc> + </method> + + <method id="gtk.gtkobject.method.get_data"> + <funcsynopsis> + <funcprototype> + <funcdef> + void <function>get_data</function> + </funcdef> + <paramdef>char <parameter>$key</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <shortdesc> + Retrieves bound data from an object. + </shortdesc> + <desc> + <para> + Retrieves bound data associated with <literal>$key</literal> from <literal>$object</literal>. + <programlisting>$object-&gt;get_data($key);</programlisting> + </para> + </desc> + </method> + + <method id="gtk.gtkobject.method.remove_no_notify"> + <funcsynopsis> + <funcprototype> + <funcdef> + void <function>remove_no_notify</function> + </funcdef> + <paramdef>char <parameter>$key</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <shortdesc> + Removes bound data without notifying destroy(). + </shortdesc> + <desc> + <para> + Just like remove_data() except that any destroy handler will be ignored. + <programlisting>$object-&gt;remove_no_notify($key);</programlisting> + </para> + </desc> + </method> + + <!-- MARKUS - In the GTK docs the rest of these come under gtk-signals. NB I + don't understand signals very well, so if you want to rewrite any of these + descs please do so, and I will check the English when this comes back. sf --> + + <method id="gtk.gtkobject.method.signal_emit_stop"> + <funcsynopsis> + <funcprototype> + <funcdef> + void <function>signal_emit_stop</function> + </funcdef> + <paramdef>int <parameter>signal_id</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <shortdesc> + Aborts current signal. + </shortdesc> + <desc> + <para> + Aborts a signal's current emission. + <programlisting>$object-&gt;signal_emit_stop($signal_id)</programlisting> + <!-- total crib from the GTK docs here I'm afraid --> + This method will prevent the default method from running, if the signal was + GTK_RUN_LAST and connected normally (i.e. without the "after" flag). It + will also print a warning if used on a signal which isn't being emitted. + </para> + </desc> + </method> + + <method id="gtk.gtkobject.method.emit_stop_by_name"> + <funcsynopsis> + <funcprototype> + <funcdef> + void <function>emit_stop_by_name</function> + </funcdef> + <paramdef>char <parameter>signal</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <shortdesc> + Aborts current signal using name. + </shortdesc> + <desc> + <para> + Exactly the same as signal_emit_stop(), except that it will find the + signal id for itself :). + <programlisting>$object-&gt;emit_stop_by_name($signal);</programlisting> + </para> + </desc> + </method> + + <method id="gtk.gtkobject.method.connect"> + <funcsynopsis> + <funcprototype> + <funcdef> + void <function>connect</function> + </funcdef> + <paramdef>char <parameter>signal_name</parameter></paramdef> + <paramdef>char <parameter>event_handler</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <shortdesc> + Connects an object to a potential event. + </shortdesc> + <desc> + <para> + Associates a connect signal with an object and an event handler. + <programlisting>$object-&gt;connect(&quot;signal_name&quot;, &quot;function&quot;);</programlisting> + or + <programlisting>$object-&gt;connect(&quot;signal_name&quot;, array($source_object, &quot;function&quot;);</programlisting> + </para> + </desc> + </method> + <!-- Is there a list of standard signal names anywhere, does anyone happen to + know? --> + + <method id="gtk.gtkobject.method.connect_after"> + <funcsynopsis> + <funcprototype> + <funcdef> + void <function>connect_after</function> + </funcdef> + <paramdef>char <parameter>signal_name</parameter></paramdef> + <paramdef>char <parameter>event_handler</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <shortdesc> + Connects following other calls. + </shortdesc> + <desc> + <para> + This signal handler will be called after other calls. + <programlisting>$object-&gt;connect_after(&quot;signal_name&quot;, &quot;function&quot;);</programlisting> + or + <programlisting>$object-&gt;connect_after(&quot;signal_name&quot; array($source_object, &quot;function&quot;);</programlisting> + </para> + </desc> + </method> + + <method id="gtk.gtkobject.method.connect_object"> + <funcsynopsis> + <funcprototype> + <funcdef> + void <function>connect_object</function> + </funcdef> + <paramdef>char <parameter>signal_name</parameter></paramdef> + <paramdef>char <parameter>event_handler</parameter></paramdef> + <paramdef>char <parameter>target_object</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <shortdesc> + Connects for another object. + </shortdesc> + <desc> + <para> + Connects a signal to an event handler on behalf of another object. + This is useful for passing a standard function as a callback. + <programlisting>$object-&gt;(&quot;signal_name&quot;, &quot;function&quot;, $target_object);</programlisting> + </para> + </desc> + </method> + + <method id="gtk.gtkobject.method.connect_object_after"> + <funcsynopsis> + <funcprototype> + <funcdef> + void <function>connect_object_after</function> + </funcdef> + <paramdef>char <parameter>signal_name</parameter></paramdef> + <paramdef>char <parameter>event_handler</parameter></paramdef> + <paramdef>char <parameter>target_object</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <shortdesc> + Connects for another object, following other calls. + </shortdesc> + <desc> + <para> + Exactly the same as <literal>connect_object</literal>, but calling the + handler after other handlers have been called. + <programlisting>$object-&gt;(&quot;signal_name&quot;, &quot;function&quot;, $target_object);</programlisting> + </para> + </desc> + </method> + + <method id="gtk.gtkobject.method.disconnect"> + <funcsynopsis> + <funcprototype> + <funcdef> + void <function>disconnect</function> + </funcdef> + <paramdef>int <parameter>signal_id</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <shortdesc> + Disconnects. + </shortdesc> + <desc> + <para> + Destroys a user-defined handler connection. + <programlisting>$object-&gt;disconnect($signal_id);</programlisting> + </para> + </desc> + </method> + + <method id="gtk.gtkobject.method.signal_handler_block"> + <funcsynopsis> + <funcprototype> + <funcdef> + void <function>signal_handler_block</function> + </funcdef> + <paramdef>int <parameter>signal_id</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <shortdesc> + Blocks a signal. + </shortdesc> + <desc> + <para> + Stops a specified user-defined handler being called. + <programlisting>$object-&gt;signal_handler_block($signal_id);</programlisting> + </para> + </desc> + </method> + + <method id="gtk.gtkobject.method.signal_handler_unblock"> + <funcsynopsis> + <funcprototype> + <funcdef> + void <function>signal_handler_unblock</function> + </funcdef> + <paramdef>int <parameter>signal_id</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <shortdesc> + Unblocks a signal. + </shortdesc> + <desc> + <para> + Undoes a block, by signal id. This will not necessarily clear the signal, + as the unblock needs to be called once for every block which has been + placed on that signal. +<programlisting>$object-&gt;signal_handler_unblock($signal_id);</programlisting> + </para> + </desc> + </method> + + <method id="gtk.gtkobject.method.signal_handler_pending"> + <funcsynopsis> + <funcprototype> + <funcdef> + void <function>signal_handler_pending</function> + </funcdef> + <paramdef>int <parameter>signal_id</parameter></paramdef> + <paramdef>bool <parameter>blocked_ok</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <shortdesc> + Returns connection id. + </shortdesc> + <desc> + <para> + Returns a connection id corresponding to a given signal id and object. + <programlisting>$object-&gt;signal_handler_pending($signal_id, FALSE);</programlisting> + A class implementor may opt not to emit the signal if nothing is attached, saving the cost of building the arguments. + </para> + </desc> + </method> + + <method id="gtk.gtkobject.signal_handler_pending_by_id"> + <funcsynopsis> + <funcprototype> + <funcdef> + void <function>signal_handler_pending_by_id</function> + </funcdef> + <paramdef>int <parameter>signal_id</parameter></paramdef> + <paramdef>bool <parameter>blocked_ok</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <shortdesc> + Tests validity of connection. + </shortdesc> + <desc> + <para> + Returns whether a connection id is valid and also, optionally, whether it is blocked. +<programlisting>$object-&gt;signal_handler_pending_by_id($signal_id);</programlisting> + or + <programlisting>$object-&gt;signal_handler_pending_by_id($signal_id, TRUE);</programlisting> + </para> + </desc> + </method> + + <method id="gtk.gtkobject.method.signal_handlers_destroy"> + <funcsynopsis> + <funcprototype> + <funcdef> + void <function>signal_handlers_destroy</function> + </funcdef> + </funcprototype> + </funcsynopsis> + <shortdesc> + Destroys object's handlers. + </shortdesc> + <desc> + <para> + Destroys all handlers connected to <literal>$object</literal>. (This is normally done automatically when an object is destroyed.) + <programlisting>$object-&gt;destroy();</programlisting> + </para> + </desc> + </method> + +</methods> + +<signals> + <!--TODO: Signals documentation for GtkObject (only one signal here :) --> + <signal id="gtk.gtkobject.signal.destroy"> + <signalname>destroy</signalname> + <firedwhen>when an object is destroyed</firedwhen> + <shortdesc>Indicates that an object is being destroyed</shortdesc> + <desc> + <para> + This signal is fired when an object is destroyed. See signals documentation + for information on how to use this signal. + </para> + </desc> + </signal> - </signals> +</signals> -</classentry> +</classentry> \ No newline at end of file
« previous php.gtk (#1435) next »