Index: MANIFEST =================================================================== RCS file: /cvsroot/gtk2-perl/gtk2-perl-xs/Gtk2-MozEmbed/MANIFEST,v retrieving revision 1.3 diff -d -u -r1.3 MANIFEST --- MANIFEST 16 Aug 2004 17:15:53 -0000 1.3 +++ MANIFEST 29 Mar 2005 10:20:20 -0000 @@ -11,5 +11,7 @@ examples/pumzilla gtkmozembed2perl.h maps +dom.typemap +doctypes t/GtkMozEmbed.t xs/GtkMozEmbed.xs Index: Makefile.PL =================================================================== RCS file: /cvsroot/gtk2-perl/gtk2-perl-xs/Gtk2-MozEmbed/Makefile.PL,v retrieving revision 1.5 diff -d -u -r1.5 Makefile.PL --- Makefile.PL 27 Feb 2005 22:03:49 -0000 1.5 +++ Makefile.PL 29 Mar 2005 10:20:20 -0000 @@ -13,7 +13,7 @@ 'perl-ExtUtils-Depends' => '0.20', 'perl-ExtUtils-PkgConfig' => '1.03', 'perl-Glib' => '1.06', - 'perl-Gtk2' => '1.00', + 'perl-Gtk2' => '1.00', # '1.081' when that's released 'GtkMozEmbed' => '1.7', ); @@ -55,11 +55,15 @@ ); my $mozembed = ExtUtils::Depends->new('Gtk2::MozEmbed', 'Gtk2'); -$mozembed->set_inc($pkgcfg{cflags}); + +# $incdir is for "nsIDOMKeyEvent.h", etc. +my $incdir = `pkg-config --variable=includedir mozilla-gtkmozembed`; +chomp($incdir); +$mozembed->set_inc($pkgcfg{cflags}, "-I$incdir", "-I$incdir/dom"); $mozembed->set_libs($pkgcfg{libs}); $mozembed->add_xs(@xs_files); $mozembed->add_pm('MozEmbed.pm' => '$(INST_LIBDIR)/MozEmbed.pm'); -$mozembed->add_typemaps(map {File::Spec->catfile(cwd(), $_)} 'build/gtkmozembed2perl.typemap'); +$mozembed->add_typemaps(map {File::Spec->catfile(cwd(), $_)} qw{dom.typemap build/gtkmozembed2perl.typemap}); $mozembed->install(qw(gtkmozembed2perl.h build/gtkmozembed2perl-autogen.h)); $mozembed->save_config('build/IFiles.pm'); @@ -67,6 +71,8 @@ my $libdir = `pkg-config --variable=libdir mozilla-gtkmozembed`; chomp($libdir); +our $CC = 'g++'; + WriteMakefile( NAME => 'Gtk2::MozEmbed', VERSION_FROM => 'MozEmbed.pm', @@ -74,6 +80,9 @@ XSPROTOARG => '-noprototypes', MAN3PODS => \%pod_files, LD => "LD_RUN_PATH=$libdir $Config{ld}", + CC => $CC, + LD => '$(CC)', + XSOPT => '-C++', $mozembed->get_makefile_vars, ); Index: gtkmozembed2perl.h =================================================================== RCS file: /cvsroot/gtk2-perl/gtk2-perl-xs/Gtk2-MozEmbed/gtkmozembed2perl.h,v retrieving revision 1.2 diff -d -u -r1.2 gtkmozembed2perl.h --- gtkmozembed2perl.h 27 Aug 2004 21:02:13 -0000 1.2 +++ gtkmozembed2perl.h 29 Mar 2005 10:20:20 -0000 @@ -21,7 +21,17 @@ #ifndef _GTKMOZEMBED2PERL_H_ #define _GTKMOZEMBED2PERL_H_ + +#include "nsIDOMKeyEvent.h" +#include "nsIDOMMouseEvent.h" + +#ifdef __cplusplus +extern "C" { +#endif #include +#ifdef __cplusplus +} +#endif #include #include "gtkmozembed2perl-version.h" @@ -44,6 +54,13 @@ * #endif */ + +SV * newSVnsIDOMKeyEvent (nsIDOMKeyEvent *event); +nsIDOMKeyEvent * SvnsIDOMKeyEvent (SV *event); +SV * newSVnsIDOMMouseEvent (nsIDOMMouseEvent *event); +nsIDOMMouseEvent * SvnsIDOMMouseEvent (SV *event); + + #include "gtkmozembed2perl-autogen.h" #endif /* _GTKMOZEMBED2PERL_H_ */ Index: examples/pumzilla =================================================================== RCS file: /cvsroot/gtk2-perl/gtk2-perl-xs/Gtk2-MozEmbed/examples/pumzilla,v retrieving revision 1.2 diff -d -u -r1.2 pumzilla --- examples/pumzilla 27 Aug 2004 21:02:51 -0000 1.2 +++ examples/pumzilla 29 Mar 2005 10:20:20 -0000 @@ -157,6 +157,50 @@ return $pumzilla -> { _embed }; }); + # dom_key_* signals + foreach my $signal (map {"dom_key_$_"} qw/press down up/) { + $embed->signal_connect($signal => sub { + my ($embed, $event) = @_; + + my %props = (); + foreach my $prop (qw/char_code key_code ctrl_key shift_key alt_key meta_key/) { + my $method = "get_$prop"; + $props{$prop} = $event->$method; + } + + print "$signal\n"; + foreach my $prop (sort keys %props) { + print "\t$prop: '$props{$prop}'\n"; + } + + return 1; + }); + } + + # dom_mouse_* signals + foreach my $signal (map {"dom_mouse_$_"} qw/click down up dbl_click over out/) { + $embed->signal_connect($signal => sub { + my ($embed, $event) = @_; + + my %props = (); + foreach my $prop (qw/screen_x screen_y client_x client_y + ctrl_key shift_key alt_key meta_key button/) + { + next if $prop eq 'button' + and ($signal eq 'dom_mouse_over' or $signal eq 'dom_mouse_out'); + my $method = "get_$prop"; + $props{$prop} = $event->$method; + } + + print "$signal\n"; + foreach my $prop (sort keys %props) { + print "\t$prop: '$props{$prop}'\n"; + } + + return 1; + }); + } + $box -> show_all(); $self -> add($box); Index: xs/GtkMozEmbed.xs =================================================================== RCS file: /cvsroot/gtk2-perl/gtk2-perl-xs/Gtk2-MozEmbed/xs/GtkMozEmbed.xs,v retrieving revision 1.3 diff -d -u -r1.3 GtkMozEmbed.xs --- xs/GtkMozEmbed.xs 11 Mar 2005 17:48:23 -0000 1.3 +++ xs/GtkMozEmbed.xs 29 Mar 2005 10:20:20 -0000 @@ -15,11 +15,17 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Header: /cvsroot/gtk2-perl/gtk2-perl-xs/Gtk2-MozEmbed/xs/GtkMozEmbed.xs,v 1.3 2005/03/11 17:48:23 kaffeetisch Exp $ + * $Header: /cvsroot/gtk2-perl/gtk2-perl-xs/Gtk2-MozEmbed/xs/GtkMozEmbed.xs,v 1.2 2004/08/27 21:02:51 kaffeetisch Exp $ */ #include "gtkmozembed2perl.h" +#ifdef __cplusplus +extern "C" { +#endif #include "gperl_marshal.h" +#ifdef __cplusplus +} +#endif /* ------------------------------------------------------------------------- */ @@ -129,6 +135,129 @@ /* ------------------------------------------------------------------------- */ +/* conversion functions for dom_* signals */ + +SV * +newSVnsIDOMKeyEvent (nsIDOMKeyEvent *event) +{ + SV *sv = newSV (0); + return sv_setref_pv (sv, "Gtk2::MozEmbed::KeyEvent", event); +} + +nsIDOMKeyEvent * +SvnsIDOMKeyEvent (SV *event) +{ + return INT2PTR (nsIDOMKeyEvent *, SvIV (SvRV (event))); +} + +SV * +newSVnsIDOMMouseEvent (nsIDOMMouseEvent *event) +{ + SV *sv = newSV (0); + return sv_setref_pv (sv, "Gtk2::MozEmbed::MouseEvent", event); +} + +nsIDOMMouseEvent * +SvnsIDOMMouseEvent (SV *event) +{ + return INT2PTR (nsIDOMMouseEvent *, SvIV (SvRV (event))); +} + +/* the following two can probably be combined + if we can find the signal name */ + +/* gint (* dom_key_press) (GtkMozEmbed *embed, gpointer dom_event); */ + +static void +gtk2perl_moz_embed_dom_key_marshal (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data) +{ + dGPERL_CLOSURE_MARSHAL_ARGS; + + GPERL_CLOSURE_MARSHAL_INIT (closure, marshal_data); + + ENTER; + SAVETMPS; + + PUSHMARK (SP); + + GPERL_CLOSURE_MARSHAL_PUSH_INSTANCE (param_values); + + /* param_values + 1 is the `gpointer dom_event' */ + XPUSHs (sv_2mortal (newSVnsIDOMKeyEvent ((nsIDOMKeyEvent *) + g_value_get_pointer (param_values + 1)))); + + + GPERL_CLOSURE_MARSHAL_PUSH_DATA; + + PUTBACK; + + GPERL_CLOSURE_MARSHAL_CALL (G_SCALAR); + + SPAGAIN; + + if (count != 1) + croak ("signal handlers for `dom_key_*' are supposed to " + "return an integer"); + + gperl_value_from_sv (return_value, POPs); + + PUTBACK; + + FREETMPS; + LEAVE; +} + +static void +gtk2perl_moz_embed_dom_mouse_marshal (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data) +{ + dGPERL_CLOSURE_MARSHAL_ARGS; + + GPERL_CLOSURE_MARSHAL_INIT (closure, marshal_data); + + ENTER; + SAVETMPS; + + PUSHMARK (SP); + + GPERL_CLOSURE_MARSHAL_PUSH_INSTANCE (param_values); + + /* param_values + 1 is the `gpointer dom_event' */ + XPUSHs (sv_2mortal (newSVnsIDOMMouseEvent ((nsIDOMMouseEvent *) + g_value_get_pointer (param_values + 1)))); + + + GPERL_CLOSURE_MARSHAL_PUSH_DATA; + + PUTBACK; + + GPERL_CLOSURE_MARSHAL_CALL (G_SCALAR); + + SPAGAIN; + + if (count != 1) + croak ("signal handlers for `dom_mouse_*' are supposed to " + "return an integer"); + + gperl_value_from_sv (return_value, POPs); + + PUTBACK; + + FREETMPS; + LEAVE; +} + +/* ------------------------------------------------------------------------- */ + MODULE = Gtk2::MozEmbed PACKAGE = Gtk2::MozEmbed PREFIX = gtk_moz_embed_ BOOT: @@ -140,6 +269,33 @@ /* gperl_signal_set_marshaller_for (GTK_TYPE_MOZ_EMBED_SINGLE, "new_window_orphan", gtk2perl_moz_embed_new_window_marshal); */ + gperl_signal_set_marshaller_for (GTK_TYPE_MOZ_EMBED, + "dom_key_down", + gtk2perl_moz_embed_dom_key_marshal); + gperl_signal_set_marshaller_for (GTK_TYPE_MOZ_EMBED, + "dom_key_press", + gtk2perl_moz_embed_dom_key_marshal); + gperl_signal_set_marshaller_for (GTK_TYPE_MOZ_EMBED, + "dom_key_up", + gtk2perl_moz_embed_dom_key_marshal); + gperl_signal_set_marshaller_for (GTK_TYPE_MOZ_EMBED, + "dom_mouse_down", + gtk2perl_moz_embed_dom_mouse_marshal); + gperl_signal_set_marshaller_for (GTK_TYPE_MOZ_EMBED, + "dom_mouse_up", + gtk2perl_moz_embed_dom_mouse_marshal); + gperl_signal_set_marshaller_for (GTK_TYPE_MOZ_EMBED, + "dom_mouse_click", + gtk2perl_moz_embed_dom_mouse_marshal); + gperl_signal_set_marshaller_for (GTK_TYPE_MOZ_EMBED, + "dom_mouse_dbl_click", + gtk2perl_moz_embed_dom_mouse_marshal); + gperl_signal_set_marshaller_for (GTK_TYPE_MOZ_EMBED, + "dom_mouse_over", + gtk2perl_moz_embed_dom_mouse_marshal); + gperl_signal_set_marshaller_for (GTK_TYPE_MOZ_EMBED, + "dom_mouse_out", + gtk2perl_moz_embed_dom_mouse_marshal); =for object Gtk2::MozEmbed::main @@ -304,7 +460,8 @@ =for apidoc This function allows you to append data to an already opened stream in the -widget. You need to pass in the data that you want to append to the document. +widget. You need to pass in the data that you want to append to the document +and its length. =cut ## void gtk_moz_embed_append_data (GtkMozEmbed *embed, const char *data, guint32 len) @@ -404,6 +561,10 @@ GtkMozEmbedChromeFlags gtk_moz_embed_get_chrome_mask (embed) GtkMozEmbed *embed + CODE: + RETVAL = (GtkMozEmbedChromeFlags) gtk_moz_embed_get_chrome_mask (embed); + OUTPUT: + RETVAL # --------------------------------------------------------------------------- # @@ -494,6 +655,68 @@ interrupt the loading of a new document. By returning I you are saying "don't load this document." +=item integer B (Gtk2::MozEmbed, Gtk2::MozEmbed::KeyEvent) + +This signal is emitted when a key is pressed down. See the DOM Level 3 +specification for more details. + +=item integer B (Gtk2::MozEmbed, Gtk2::MozEmbed::KeyEvent) + +This signal is emitted when a key is released. See the DOM Level 3 +specification for more details. + +=item integer B (Gtk2::MozEmbed, Gtk2::MozEmbed::KeyEvent) + +This signal is presumably emitted when a key is pressed and released, +i.e. i.e. a combination of L and +L. (Note however that it seems to also +get emitted repeatedly if you hold the key down.) + +=item integer B (Gtk2::MozEmbed, Gtk2::MozEmbed::MouseEvent) + +This signal is emitted when "a pointing device button is pressed over an +element. In the case of nested elements, this event type is always targeted +at the most deeply nested element." See the DOM Level 3 specification for +more details. + +=item integer B (Gtk2::MozEmbed, Gtk2::MozEmbed::MouseEvent) + +This signal is emitted when "a pointing device button is released over an +element. In the case of nested elements, this event type is always targeted +at the most deeply nested element. See the DOM Level 3 specification for +more details. + +=item integer B (Gtk2::MozEmbed, Gtk2::MozEmbed::MouseEvent) + +This signal is emitted when "a pointing device button is clicked over +an element. The definition of a click depends on the environment +configuration; i.e. may depend on the screen location or the delay +between the press and release of the pointing device button. In any case, +the target node must be the same between the mousedown, mouseup, and click." +In other words, it's basically L +followed quickly by L. See the DOM Level 3 +specification for more details. + +=item integer B (Gtk2::MozEmbed, Gtk2::MozEmbed::MouseEvent) + +This signal is emitted when a mouse button is double clicked on an element. +(The only thing I found in the DOM Level 3 specification was an example +showing that two click events occur for a double click.) + +=item integer B (Gtk2::MozEmbed, Gtk2::MozEmbed::MouseEvent) + +This signal is emitted when "a pointing device is moved onto an element. +In the case of nested elements, this event type is always targeted at +the most deeply nested element." See the DOM Level 3 specification for +more details. + +=item integer B (Gtk2::MozEmbed, Gtk2::MozEmbed::MouseEvent) + +This signal is emitted when "a pointing device is moved away from an +element. In the case of nested elements, this event type is always +targeted at the most deeply nested element." See the DOM Level 3 +specification for more details. + =back =cut @@ -507,3 +730,305 @@ # gtk_moz_embed_single_get (class) # C_ARGS: # /* void */ + +# --------------------------------------------------------------------------- # + +MODULE = Gtk2::MozEmbed PACKAGE = Gtk2::MozEmbed::KeyEvent PREFIX = gtk_moz_embed_ + +=for object Gtk2::MozEmbed::KeyEvent + +The second argument of the dom_key_* signal handlers will be a +Gtk2::MozEmbed::KeyEvent object, which is a wrapper around an instance +of Mozilla's nsIDOMKeyEvent interface. + +Differences from the Mozilla interface: method names in StudlyCaps have been +changed to underscore_style, and instead of passing values by pointer +the value is returned. + +=cut + +=for see_also FusrEincludeEmozillaEnsIDOMKeyEvent.h> +=cut + +=for see_also sections 1.7.4 and Appendix A of the DOM level 3 specification +=cut + +=for see_also FembeddingEbrowserEgtkEtestsETestGtkEmbed.cpp> +=cut + +=for apidoc Gtk2::MozEmbed::KeyEvent::get_char_code + +=signature $char_code = $event->get_char_code + +This function gets the character code, which is the Unicode number +representing that character (e.g. 'a' is 97). For example, you could +pass this number to the `chr' function in Perl. + +=cut + +=for apidoc Gtk2::MozEmbed::KeyEvent::get_key_code + +=signature $key_code = $event->get_key_code + +This function gets the key code for "special" keys, such as the function +keys (e.g., F3), caps lock, right arrow, etc. For a complete list, +refer to the DOM_VK_* enums in dom/nsIDOMKeyEvent.h; these constants +are not wrapped by Gtk2::MozEmbed::KeyEvent. + +=cut + +guint32 +gtk_moz_embed_get_char_code (event) + nsIDOMKeyEvent * event; + ALIAS: + Gtk2::MozEmbed::KeyEvent::get_key_code = 1 + PREINIT: + PRUint32 code; + CODE: + switch (ix) { + case 0: event->GetCharCode(&code); break; + case 1: event->GetKeyCode(&code); break; + default: code = 0; + } + RETVAL = (guint32)code; + OUTPUT: + RETVAL + +=for apidoc Gtk2::MozEmbed::KeyEvent::get_ctrl_key + +=signature $bool = $event->get_ctrl_code + +This function returns true if the Ctrl key was held down +when the key event occured. + +=cut + +=for apidoc Gtk2::MozEmbed::KeyEvent::get_shift_key + +=signature $bool = $event->get_shift_key + +This function returns true if the Shift key was held down +when the key event occured. + +=cut + +=for apidoc Gtk2::MozEmbed::KeyEvent::get_alt_key + +=signature $bool = $event->get_alt_key + +This function returns true if the Alt key was held down +when the key event occured. (Note: I found this to not +be strictly true.) + +=cut + +=for apidoc Gtk2::MozEmbed::KeyEvent::get_meta_key + +=signature $bool = $event->get_meta_key + +This function returns true if the Meta key was held down +when the key event occured. + +=cut + +gboolean +gtk_moz_embed_get_ctrl_key (event) + nsIDOMKeyEvent * event; + ALIAS: + Gtk2::MozEmbed::KeyEvent::get_shift_key = 1 + Gtk2::MozEmbed::KeyEvent::get_alt_key = 2 + Gtk2::MozEmbed::KeyEvent::get_meta_key = 3 + PREINIT: + PRBool key; + CODE: + switch (ix) { + case 0: event->GetCtrlKey(&key); break; + case 1: event->GetShiftKey(&key); break; + case 2: event->GetAltKey(&key); break; + case 3: event->GetMetaKey(&key); break; + default: key = 0; + } + RETVAL = (gboolean)key; + OUTPUT: + RETVAL + +## InitKeyEvent(const nsAString & typeArg, PRBool canBubbleArg, PRBool cancelableArg, nsIDOMAbstractView *viewArg, PRBool ctrlKeyArg, PRBool altKeyArg, PRBool shiftKeyArg, PRBool metaKeyArg, PRUint32 keyCodeArg, PRUint32 charCodeArg) + +# --------------------------------------------------------------------------- # + +MODULE = Gtk2::MozEmbed PACKAGE = Gtk2::MozEmbed::MouseEvent PREFIX = gtk_moz_embed_ + +=for object Gtk2::MozEmbed::MouseEvent + +The second argument of the dom_mouse_* signal handlers will be a +Gtk2::MozEmbed::MouseEvent object, which is a wrapper around an instance +of Mozilla's nsIDOMMouseEvent interface. + +Differences from the Mozilla interface: method names in StudlyCaps have been +changed to underscore_style, and instead of passing values by pointer +the value is returned. + +=cut + +=for see_also FusrEincludeEmozillaEnsIDOMMouseEvent.h> +=cut + +=for see_also section 1.6.2 of the DOM level 2 specification +=cut + +=for see_also FembeddingEbrowserEgtkEtestsETestGtkEmbed.cpp> +=cut + +=for apidoc Gtk2::MozEmbed::MouseEvent::get_screen_x + +=signature $x = $event->get_screen_x + +This function gets the X coordinate where the mouse was clicked +on the screen, i.e. your desktop. X = 0 is at the left and increases +to the right. + +=cut + +=for apidoc Gtk2::MozEmbed::MouseEvent::get_screen_y + +=signature $y = $event->get_screen_y + +This function gets the Y coordinate where the mouse was clicked +on the screen, i.e. your desktop. Y = 0 is at the top and increases +downward. + +=cut + +=for apidoc Gtk2::MozEmbed::MouseEvent::get_client_x + +=signature $x = $event->get_client_x + +This function gets the X coordinate where the mouse was clicked on the +client, i.e. the Gtk2::MozEmbed window. X = 0 is at the left and +increases to the right. + +Note: this number might be negative on L +events when the mouse leaves the Gtk2::MozEmbed widget but hasn't left the +application window. + +=cut + +=for apidoc Gtk2::MozEmbed::MouseEvent::get_client_y + +=signature $y = $event->get_client_y + +This function gets the Y coordinate where the mouse was clicked on the +client, i.e. the Gtk2::MozEmbed window. Y = 0 is at the top and increases +downward. + +Note: this number might be negative on L +events when the mouse leaves the Gtk2::MozEmbed widget but hasn't left the +application window. + +=cut + +gint32 +gtk_moz_embed_get_screen_x (event) + nsIDOMMouseEvent * event; + ALIAS: + Gtk2::MozEmbed::MouseEvent::get_screen_y = 1 + Gtk2::MozEmbed::MouseEvent::get_client_x = 2 + Gtk2::MozEmbed::MouseEvent::get_client_y = 3 + PREINIT: + PRInt32 pos; + CODE: + switch (ix) { + case 0: event->GetScreenX(&pos); break; + case 1: event->GetScreenY(&pos); break; + case 2: event->GetClientX(&pos); break; + case 3: event->GetClientY(&pos); break; + default: pos = 0; + } + RETVAL = (gint32)pos; + OUTPUT: + RETVAL + +=for apidoc Gtk2::MozEmbed::MouseEvent::get_ctrl_key + +=signature $bool = $event->get_ctrl_key + +This function returns true if the Ctrl key was held down +when the mouse event occured. + +=cut + +=for apidoc Gtk2::MozEmbed::MouseEvent::get_shift_key + +=signature $bool = $event->get_shift_key + +This function returns true if the Shift key was held down +when the mouse event occured. + +=cut + +=for apidoc Gtk2::MozEmbed::MouseEvent::get_alt_key + +=signature $bool = $event->get_alt_key + +This function returns true if the Alt key was held down +when the mouse event occured. (Note: I found this to not +be strictly true.) + +=cut + +=for apidoc Gtk2::MozEmbed::MouseEvent::get_meta_key + +=signature $bool = $event->get_meta_key + +This function returns true if the Meta key was held down +when the mouse event occured. + +=cut + +gboolean +gtk_moz_embed_get_ctrl_key (event) + nsIDOMMouseEvent * event; + ALIAS: + Gtk2::MozEmbed::MouseEvent::get_shift_key = 1 + Gtk2::MozEmbed::MouseEvent::get_alt_key = 2 + Gtk2::MozEmbed::MouseEvent::get_meta_key = 3 + PREINIT: + PRBool key; + CODE: + switch (ix) { + case 0: event->GetCtrlKey(&key); break; + case 1: event->GetShiftKey(&key); break; + case 2: event->GetAltKey(&key); break; + case 3: event->GetMetaKey(&key); break; + default: key = 0; + } + RETVAL = (gboolean)key; + OUTPUT: + RETVAL + +=for apidoc Gtk2::MozEmbed::MouseEvent::get_button + +=signature $button = $event->get_button + +This function gets a number representing which mouse button was pressed. +With three-button mice: left button = 0, middle button = 1, and +right button = 2. (With two-button mice, there is no middle button, +and with one-button mice there is only a left button.) + +Note: this is only valid for L events. + +=cut + +guint16 +gtk_moz_embed_get_button (event) + nsIDOMMouseEvent * event; + PREINIT: + PRUint16 button; + CODE: + event->GetButton(&button); + RETVAL = (guint16)button; + OUTPUT: + RETVAL + +## GetRelatedTarget(nsIDOMEventTarget * *aRelatedTarget) +## InitMouseEvent(const nsAString & typeArg, PRBool canBubbleArg, PRBool cancelableArg, nsIDOMAbstractView *viewArg, PRInt32 detailArg, PRInt32 screenXArg, PRInt32 screenYArg, PRInt32 clientXArg, PRInt32 clientYArg, PRBool ctrlKeyArg, PRBool altKeyArg, PRBool shiftKeyArg, PRBool metaKeyArg, PRUint16 buttonArg, nsIDOMEventTarget *relatedTargetArg) --- /dev/null 2005-02-24 13:57:46.000000000 +0100 +++ doctypes 2005-03-29 12:44:23.867656320 +0200 @@ -0,0 +1,2 @@ +nsIDOMKeyEvent Gtk2::MozEmbed::KeyEvent +nsIDOMMouseEvent Gtk2::MozEmbed::MouseEvent --- /dev/null 2005-02-24 13:57:46.000000000 +0100 +++ dom.typemap 2005-03-29 12:44:23.880654344 +0200 @@ -0,0 +1,4 @@ +TYPEMAP + +nsIDOMKeyEvent * T_GPERL_GENERIC_WRAPPER +nsIDOMMouseEvent * T_GPERL_GENERIC_WRAPPER