Gtk2-1.2498/000755 001750 000024 00000000000 12651227144 013527 5ustar00bdmanningstaff000000 000000 Gtk2-1.2498/AUTHORS000644 001750 000024 00000004133 11664366546 014615 0ustar00bdmanningstaff000000 000000 The Gtk2-Perl Team - contact us at gtk-perl-list@gnome.org ========================================================== muppet scott at asofyet dot org Ross McFarland rwmcfa1 at neces dot com Torsten Schoenfeld kaffeetisch at web dot de Marc Lehmann pcg at goof dot com Goran Thyni goran at kirra dot net Joern Reder joern at zyn dot de Chas Owens alas at wilma dot widomaker dot com Guillaume Cottenceau gc at mandrakesoft dot com Kevin Ryde user42 zip com au Emmanuel Rodriguez emmanuel rodriguez gmail com Chris Sincock csincock gmail com Quentin Sculo squentin free fr Contributors - the people who sent us patches ============================================= René Seindal rene at seindal dot dk Tom Hargreaves hex at freezone dot co dot uk Thierry Vignaud tvignaud at mandrakesoft dot com James Curbo hannibal at adtrw dot org Dr. Michael Langner langner at fiz-chemie dot de Anuradha Ratnaweera Aratnaweera at virtusa dot com Bjarne Steinsbø bosteins at broadpark dot no Roderich Schupp Roderich dot Schupp at partner dot bmw dot de Nathan Kurz nate at verse dot com Cory Omand Cory.Omand at sun dot com Jason Stirling jasons at postoffice dot utas dot edu dot au Albert Chin china at thewrittenword dot com Zach Bean zb at forty2 dot com Aristotle Pagaltzis pagaltzis at gmx dot de LoneFox lonefox at welho dot com Marc 'HE' Brockschmidt marc at marcbrockschmidt dot de Daniel Kasak dkasak at nusconsulting dot com dot au Grant McLean grant at mclean dot net dot nz Philipp Rumpf prumpf at gmail dot com several important bits of gtk2-perl were heavily inspired by pygtk, gtk-perl, and a good read-through of the gtk+ source code, so credit goes to those guys as well -- thanks! Copyright (C) 2003-2006 by the gtk2-perl team. gtk2-perl is covered by the LGPL -- see the file LICENSE for details. Gtk2-1.2498/ChangeLog.pre-git000644 001750 000024 00001114562 11705716775 016675 0ustar00bdmanningstaff000000 000000 === ChangeLog discontinued === With the move to git, we stop maintaining a separate ChangeLog and rely on proper commit messages instead. Web view of changes: . 2009-03-24 Torsten Schoenfeld * Gtk2.exports: Don't try to export newSVPangoRectangle and SvPangoRectangle; it's now done by Pango. Patch by Martin Schlemmer. (GNOME #576373) 2009-03-24 Torsten Schoenfeld * gtk2perl-private.h * xs/GdkPango.xs: Don't declare gtk2perl_pango_attribute_register_custom_type; it's now properly exported by Pango. Move the PangoAttribute related macros from the private header directly into GdkPango.xs, the only place where they are used. 2009-03-24 Torsten Schoenfeld * t/GtkStyle.t: Correct a skip count. Reported by Ryan Niebur. 2009-03-17 Torsten Schoenfeld * Gtk2.pm * Makefile.PL * NEWS * README: Stable release 1.220. 2009-03-17 Torsten Schoenfeld * t/GtkStyle.t * xs/GtkStyle.xs: Adapt to the rename of gtk_style_get_property to gtk_style_get_style_property. Make Gtk2::Style::get_style_property an alias for Gtk2::Style::get. 2009-03-17 Torsten Schoenfeld * t/GtkCellView.t * t/GtkEntry.t * t/GtkIMContext.t * t/GtkImageMenuItem.t * t/GtkOrientable.t * t/GtkPrintSettings.t * t/GtkStatusIcon.t * t/GtkStyle.t * xs/GtkCellView.xs * xs/GtkEntry.xs * xs/GtkIMMulticontext.xs * xs/GtkImageMenuItem.xs * xs/GtkPrintOperation.xs * xs/GtkPrintSettings.xs * xs/GtkSelection.xs * xs/GtkStatusIcon.xs * xs/GtkStyle.xs: Change all versions checks to refer to stable releases only. 2009-03-08 Torsten Schoenfeld * Gtk2.pm * Makefile * NEWS * README: Unstable release 1.212. 2009-03-08 Torsten Schoenfeld * t/GtkHBox.t: Test that widgets packed into a box are completely freed upon removal even if they previously appeared as a callback argument. This is a test for a recent memory leak fix in Glib. * t/GtkTreeModelIface.t: The leak fix mentioned above causes this test to correctly run FINALIZE_INSTANCE now, so adjust the test plan. 2009-03-08 Torsten Schoenfeld * t/GtkTreeModelFilter.t * xs/GtkTreeModelFilter.xs: Take ownership of objects returned by gtk_tree_model_filter_new to avoid leaking them. Patch by Kevin Ryde. 2009-03-08 Torsten Schoenfeld * t/GtkStyle.t * xs/GtkStyle.xs: Remove the get_property() alias for Gtk2::Style::get() so that calling get_property() on a Gtk2::Style resolves to Glib::Object::get_property(). 2009-03-01 Torsten Schoenfeld * xs/GtkAccelGroup.xs: Remove two FIXME comments which turned out to be incorrect. Patch by Kevin Ryde. 2009-02-22 Torsten Schoenfeld * t/GdkKeys.t: Skip most tests if we can't find a key entry to test against. 2009-02-22 Torsten Schoenfeld * t/00.Gtk2.t: Don't fail if there is no valid DISPLAY. 2009-02-22 Torsten Schoenfeld * pm/TestHelper.pm * pm/Helper.pm * Gtk2.pm: Fix more POD errors. 2009-02-22 Torsten Schoenfeld * xs/Gtk2.xs * xs/GtkTreeModel.xs * xs/GtkWidget.xs * xs/GtkWindow.xs: Fix POD errors reported by podchecker. 2009-02-21 Torsten Schoenfeld * t/GtkStyle.t * xs/GtkStyle.xs: Wrap the gtk_style_get() family of methods as Gtk2::Style::get(), and make Gtk2::Style::get_property() an alias for get(). Patch by Emmanuel Rodriguez. 2009-02-13 Torsten Schoenfeld * Gtk2.pm * NEWS * README: Unstable release 1.211. 2009-02-13 Torsten Schoenfeld * Makefile.PL: Require Glib 1.212 for the precompiled headers stuff. Print the stability warning. 2009-02-13 Torsten Schoenfeld * gtk2perl.h: Remove the definitions for the custom pango GTypes. They now come from pango-perl.h. 2009-02-13 Torsten Schoenfeld * xs/GtkIconView.xs: Fix stack handling bugs in Gtk2::IconView::get_item_at_pos(), get_dest_item_at_pos(), and get_tooltip_context(). Patch by Kevin Ryde. 2009-02-13 Torsten Schoenfeld * xs/GtkBindings.xs (gtk2perl_binding_set_get_type): To make the doc generator happy, register our custom GtkBindingSet GType under the name "GtkBindingSet". 2009-02-11 Torsten Schoenfeld * constants-2.0 * gtk2perl.h * Gtk2.pm * MANIFEST * maps-2.0 * xs_files-2.0 * t/GtkBindings.t * xs/GtkBindings.xs: Wrap the GtkBindings stuff. Patch by Kevin Ryde. 2009-02-06 Torsten Schoenfeld * MANIFEST * maps-2.16 * xs_files-2.16 * t/GtkOrientable.t * xs/GtkOrientable.xs: Wrap the new GtkOrientable interface. No support for implementing it in Perl subclasses yet. Patch by Emmanuel Rodriguez. 2009-02-06 Torsten Schoenfeld * t/GtkEntry.t: Test Gtk2::Entry->get_icon_storage_type. 2009-02-06 Torsten Schoenfeld * t/GtkEntry.t * xs/GtkEntry.xs: Track the recent upstream function renaming: gtk_entry_get_pixbuf → gtk_entry_get_icon_pixbuf, gtk_entry_get_stock → gtk_entry_get_icon_stock, and gtk_entry_get_storage_type → gtk_entry_get_icon_storage_type. 2009-02-06 Torsten Schoenfeld * xs/GdkX11.xs: Call the atom arg for Gtk2::Gdk::Atom->to_xatom_for_display "atom" for clarity in the generated POD. Patch by Kevin Ryde. 2009-02-06 Torsten Schoenfeld * t/GtkRecentChooser.t * t/GtkRecentManager.t: Use Gtk2->main_iteration instead of Gtk2::TestHelper's run_main to spin the main loop. This avoids hangs on some machines. Patch by Jeffrey Ratcliffe. 2009-02-06 Torsten Schoenfeld * t/GtkIconTheme.t: Skip tests that rely on the presence of a stock icon if that icon isn't present. 2009-02-06 Torsten Schoenfeld * t/pango-compat.t: Don't use Gtk2::Pango::Cairo::FontMap in the compatibility checks as it isn't available in all pango versions and I don't want to fiddle with version checks. 2009-02-06 Torsten Schoenfeld * t/GdkEvent.t: Fix a skip count. 2009-02-06 Torsten Schoenfeld * t/GtkAction.t: Use an activatable widget for testing the proxy stuff. Recent gtk+ versions enforce this. 2009-02-06 Torsten Schoenfeld * t/GdkPixbufLoader.t: Don't use an auto-detecting pixbuf loader since that's broken for PPM images in at least gtk+ >= 2.14.3 (see GNOME #570780). 2009-01-20 Torsten Schoenfeld * t/GdkX11.t * xs/GdkX11.xs: Wrap gdk_x11_atom_to_xatom and gdk_x11_atom_to_xatom_for_display. Patch by chris. (GNOME #566884) 2009-01-20 Torsten Schoenfeld * t/GtkCellRenderer.t * xs/GtkCellRenderer.xs: In gtk2perl_cell_renderer_start_editing, make sure we return an object with a floating reference as is expected of a start_editing vfunc. In the xsub for gtk_cell_renderer_start_editing and in the fallback START_EDITING xsub, make sure we sink any floating reference on the created cell editable in order to comply with the usual rule of not passing floating references on to Perl code. Patch by Kevin Ryde. 2009-01-20 Torsten Schoenfeld * xs/GtkBuildable.xs: Declare all private functions as 'static' so that they aren't exported. 2009-01-19 Torsten Schoenfeld * xs/GtkSelection.xs: Fix the definition of the accessor macros for older gtk+. Patch by Kevin Ryde. 2009-01-18 Torsten Schoenfeld * xs/GtkSelection.xs: Use gtk_selection_data_get_selection when available. Also introduce convenience defines for the other GtkSelectionData accessors. Patch by Emmanuel Rodriguez and muppet. 2009-01-18 Torsten Schoenfeld * t/GtkPrintSettings.t * xs/GtkPrintSettings.xs: Wrap new API. Patch by Emmanuel Rodriguez. 2009-01-18 Torsten Schoenfeld * t/GtkPrintOperation.t * xs/GtkPrintOperation.xs: Wrap new API. Patch by Emmanuel Rodriguez. 2009-01-18 Torsten Schoenfeld * Makefile.PL: Use Glib::MakeHelper to create a 'precompiled-headers' target that precompiles gtk2perl.h. This speeds up the compilation of Gtk2 by 36% on my machine. 2009-01-13 Torsten Schoenfeld * AUTHORS * t/GtkStatusIcon.t * xs/GtkStatusIcon.xs: Wrap new GtkStatusIcon API. Patch by Chris Sincock. 2009-01-13 Torsten Schoenfeld * t/GtkIMContext.t * xs/GtkIMMulticontext.xs: Wrap gtk_im_multicontext_get_context_id. Patch by Emmanuel Rodriguez. 2009-01-13 Torsten Schoenfeld * t/GtkImageMenuItem.t * xs/GtkImageMenuItem.xs: Wrap new GtkImageMenuItem API. Patch by Emmanuel Rodriguez. 2009-01-13 Torsten Schoenfeld * t/GtkCellView.t * xs/GtkCellView.xs: Allow undef for the model in Gtk2::CellView::set_model. 2009-01-13 Torsten Schoenfeld * t/GtkCellView.t * xs/GtkCellView.xs: Wrap gtk_cell_view_get_model. Patch by Emmanuel Rodriguez. 2009-01-13 Torsten Schoenfeld * AUTHORS * MANIFEST * maps-2.16 (added) * t/GtkEntry.t * xs/GtkEntry.xs: Wrap the new GtkEntry API. Patch by Emmanuel Rodriguez. 2009-01-13 Torsten Schoenfeld * Gtk2.pm: In the Gtk2::Pango compatibility code, avoid warnings about names that are used only once by checking for definedness before creating aliases. 2009-01-01 Torsten Schoenfeld * xs/Gtk2.xs * xs/GtkWindow.xs: Use Gtk2::EVENT_STOP and EVENT_PROPAGATE in the synopsis for Gtk2::Window and in the docs for Gtk2::key_snooper_install. Patch by Kevin Ryde. 2008-12-30 Torsten Schoenfeld * xs/GtkTreeModel.xs: Document the signature of the callback used by Gtk2::TreeModel::foreach. Patch by Kevin Ryde. 2008-12-16 Torsten Schoenfeld * t/GtkEntryCompletion.t * xs/GtkEntryCompletion.xs: In Gtk2::EntryCompletion::set_model, allow undef for the model parameter. (#562682) 2008-12-16 Torsten Schoenfeld * xs/GtkEntryCompletion.xs: Fix a leak in Gtk2::EntryCompletion::new. (#562682) 2008-11-22 Torsten Schoenfeld * t/00.Gtk2.t * xs/Gtk2.xs: Wrap gtk_get_option_group. 2008-11-16 Torsten Schoenfeld * Gtk2.pm: * NEWS: * README: Unstable release 1.210. 2008-11-16 Torsten Schoenfeld * Makefile.PL: Unconditionally use META_MERGE. Tell the CPAN indexer to ignore the directories "tools" and "xs". 2008-11-16 Torsten Schoenfeld * Gtk2.pm: Link to Pango. 2008-11-16 Torsten Schoenfeld * Makefile.PL * README: Update Pango requirement to 1.210. 2008-11-15 Torsten Schoenfeld Use the standalone Pango module. * CodeGen.pm: Add handlers for 'Alias' variants of most types. * maps_pango-1.0 * maps_pango-1.4 * maps_pango-1.6 * maps_pango-1.8 * maps_pango-1.10 * maps_pango-1.16 * maps_pango-1.18: Use the above to register Gtk2::Pango::* type aliases. * gtk2perl.h: Include pango-perl.h * Gtk2.pm: Use Pango. Set up package aliases under Gtk2::Pango:: for the things that now live under Pango::. * xs/Gtk2.xs: Remove unneeded pango stuff. Make the doc generator create stub Gtk2::Pango::* POD pages that explain the situation and link to the relevant Pango::* docs. * MANIFEST * t/pango-compat.t (added): Add some tests that try to ensure backwards compatibility in ways not tested by the existing t/Pango*.t tests. * doctypes * Makefile.PL: Remove unneeded pango stuff. * MANIFEST * pango.typemap (deleted) * xs/PangoAttributes.xs (deleted) * xs/PangoCairo.xs (deleted) * xs/PangoContext.xs (deleted) * xs/PangoFontMap.xs (deleted) * xs/PangoFontset.xs (deleted) * xs/PangoFont.xs (deleted) * xs/PangoGravity.xs (deleted) * xs/PangoLayout.xs (deleted) * xs/PangoMatrix.xs (deleted) * xs/PangoRenderer.xs (deleted) * xs/PangoScript.xs (deleted) * xs/PangoTabs.xs (deleted) * xs/PangoTypes.xs (deleted) * xs_files_pango-1.0 (deleted) * xs_files_pango-1.6 (deleted) * xs_files_pango-1.10 (deleted) * xs_files_pango-1.16 (deleted): Remove now unneeded files. 2008-11-15 Torsten Schoenfeld * t/GtkSocket-GtkPlug.t: Correct skip count for the case of finding no "blib" directory. 2008-11-01 Torsten Schoenfeld * Gtk2.pm * xs/GtkWidget.xs: Add constants Gtk2::EVENT_STOP and EVENT_PROPAGATE for use in event handlers. Patch by Kevin Ryde. 2008-11-01 Torsten Schoenfeld * t/GtkCellRenderer.t * xs/GtkCellRenderer.xs: Fix the stack handling in Gtk2::CellRenderer::get_size(). Patch by Kevin Ryde. 2008-11-01 Torsten Schoenfeld * xs/GtkCellRenderer.xs: Hush compiler warning. 2008-11-01 Torsten Schoenfeld * xs/GtkBuildable.xs: Mention in the POD that chaining up to the parent does not work yet for custom Gtk2::Buildable implementations. Patch by Kevin Ryde. 2008-10-26 Torsten Schoenfeld * Gtk2.pm * NEWS * README: Stable release 1.202. 2008-10-26 Torsten Schoenfeld * t/GtkTreeView.t * xs/GtkTreeView.xs: Handle undef for callbacks correctly in Gtk2::TreeView::set_column_drag_function() and set_row_separator_func(). 2008-10-26 Torsten Schoenfeld * t/version-checks.t: Don't use the -init flag as this breaks the test when run without DISPLAY. 2008-10-26 Torsten Schoenfeld * t/GtkTreeView.t: For most callback tests, make sure we handle the case gracefully where they are not called at all. 2008-10-19 Torsten Schoenfeld * Gtk2.pm * NEWS * README: Stable release 1.201. 2008-10-19 Torsten Schoenfeld * Makefile.PL: ExtUtils::MakeMaker 6.46 removed support for EXTRA_META in favor of the new META_MERGE and META_ADD. Adapt. 2008-10-19 Torsten Schoenfeld * t/GdkProperty.t: Fix some test failures reported to occur on sun4-solaris. 2008-10-19 Torsten Schoenfeld * t/GtkEditable.t * t/GtkSpinButton.t: Don't use adjustments with a non-zero page size for spin buttons to hush the warnings gtk+ recently started issuing. * t/01.GtkWindow.t * t/02.GtkContainer.t * t/GdkScreen.t * t/GdkWindow.t * t/GtkAccelGroup.t * t/GtkBuilder.t * t/GtkCalendar.t * t/GtkClipboard.t * t/GtkEntry.t * t/GtkFontSelection.t * t/GtkIconTheme.t * t/GtkLinkButton.t * t/GtkMenu.t * t/GtkMenuItem.t * t/GtkMessageDialog.t * t/GtkPageSetup.t * t/GtkPrintSettings.t * t/GtkScaleButton.t * t/GtkShow.t * t/GtkSocket-GtkPlug.t * t/GtkStatusIcon.t * t/GtkToolItem.t * t/GtkToolShell.t * t/GtkTooltip.t * t/GtkWidget.t * t/PangoLayout.t * xs/GdkEvent.xs * xs/GdkScreen.xs * xs/GdkWindow.xs * xs/GtkAccelGroup.xs * xs/GtkBuilder.xs * xs/GtkCalendar.xs * xs/GtkClipboard.xs * xs/GtkColorSelectionDialog.xs * xs/GtkContainer.xs * xs/GtkDialog.xs * xs/GtkEntry.xs * xs/GtkFontSelection.xs * xs/GtkHandleBox.xs * xs/GtkIconTheme.xs * xs/GtkLayout.xs * xs/GtkLinkButton.xs * xs/GtkMenu.xs * xs/GtkMenuItem.xs * xs/GtkMessageDialog.xs * xs/GtkPageSetup.xs * xs/GtkPlug.xs * xs/GtkPrintSettings.xs * xs/GtkScaleButton.xs * xs/GtkSelection.xs * xs/GtkSocket.xs * xs/GtkStatusIcon.xs * xs/GtkToolItem.xs * xs/GtkTooltip.xs * xs/GtkWidget.xs * xs/GtkWindow.xs: Refer to stable versions of gtk+ and pango in version checks. 2008-10-18 Torsten Schoenfeld * xs/GtkTreeDnd.xs: Document that Gtk2::SelectionData::get_row_drag_data works only on selection data objects with target type GTK_TREE_MODEL_ROW. Patch by Kevin Ryde. * MANIFEST * t/GtkTreeDnd.t: Tests for Gtk2::TreeDragSource::drag_data_get by Kevin Ryde. * t/GtkStatusIcon.t * xs/GtkStatusIcon.xs * xs/GtkTreeDnd.xs * xs/GtkTreeView.xs * xs/GtkTreeViewColumn.xs: Fix stack handling bugs in Gtk2::StatusIcon::position_menu, Gtk2::TreeDragSource::drag_data_get, Gtk2::TreeView::get_tooltip_context, and Gtk2::TreeViewColumn::cell_get_size. Patch by Kevin Ryde. * xs/GdkGC.xs * xs/GtkGC.xs: Document the hash structure used to represent GdkGCValues. Patch by Kevin Ryde. * xs/GtkObject.xs (gtk2perl_new_gtkobject): Make the debugging code cope with NULL objects. * t/GtkAction.t * xs/GtkAction.xs: Don't sink the widgets returned by gtk_action_get_proxies. This fixes the problems with using Gtk2::Action::get_proxies in the "connect-proxy" signal. Patch by Kevin Ryde. * api.pod (Memory Handling): Explain the lifespan issues associated with Glib::Boxed. Patch by Kevin Ryde. * xs/GtkWidget.xs: Mention that the objects returned by requisition() and allocation() are only valid as long as the widget lives (unless they are copied). 2008-10-05 Torsten Schoenfeld * xs/GdkRgb.xs (SvImageDataPointer): Add a return statement even if it cannot be reached, to hush compiler warnings. * t/version-checks.t: Use -init instead of -threads-init in the version check tests to avoid issues on systems with a glib without thread support. * t/GtkTreeView.t: Skip the set_search_equal_func() test when gtk+ < 2.10 since the test uses and needs set_search_entry(). Fix the skip count for the set_search_position_func() test. * t/00.Gtk2.t: Print version information to aid in debugging test failure reports. 2008-09-20 Torsten Schoenfeld * Gtk2.pm * Makefile.PL * NEWS * README: Stable release 1.200. 2008-09-20 Torsten Schoenfeld * api.pod: Improve the explanation of callbacks and user data. Patch by Kevin Ryde. 2008-09-16 Torsten Schoenfeld * t/GtkTreeModelIface.t * xs/GtkTreeSortable.xs: Fix a stack handling bug in Gtk2::TreeSortable::get_sort_column_id. * t/GtkCellLayoutIface.t * xs/GtkCellLayout.xs: Fix a stack handling bug in Gtk2::CellLayout::get_cells. * t/GtkTreeModelIface.t * xs/GtkTreeModel.xs: Fix yet another stack handling bug in Gtk2::TreeModel::get. Patch by Kevin Ryde. 2008-09-07 Torsten Schoenfeld * Gtk2.pm * NEWS * README: Unstable release 1.193. 2008-09-07 Torsten Schoenfeld * t/GtkTreeModelIface.t * xs/GtkTreeModel.xs: The 2008-08-31 change broke the explicit-columns case of Gtk2::TreeModel::get. Fix it. Test it. * t/GtkLinkButton.t: Test that URI hooks can disconnect themselves and modify the user data. Patch by Kevin Ryde. * t/GtkIconView.t: Fix test failure on older gtk+. 2008-09-06 Torsten Schoenfeld Fix some test failures related to floating point number comparisons. * pm/TestHelper.pm: Add delta_ok() for comparing floating point numbers. * t/GdkInput.t * t/GtkProgressBar.t * t/GtkRange.t * t/GtkSpinButton.t * t/PangoMatrix.t: Use delta_ok(). * t/GtkSimpleList.t: Simply don't use floating point numbers here. 2008-09-06 Torsten Schoenfeld * t/GdkPixbuf.t: If saving a pixbuf in 'jpeg' format is not supported, try 'png'. Patch by Flavio Poletti. (RT #37135) * t/version-checks.t: Don't use the '-init' import switch since it might abort the test. Use '-threads-init' instead, and properly quote it. * xs/GtkTreeDnd.xs: Use gdk_atom_intern instead of gdk_atom_intern_static_string; the latter is only available in gtk+ >= 2.10. 2008-08-31 Torsten Schoenfeld * Gtk2.pm * NEWS * README: Unstable release 1.192. 2008-08-31 Torsten Schoenfeld * t/GtkLinkButton.t * xs/GtkLinkButton.xs: Wrap gtk_link_button_set_visited and gtk_link_button_get_visited. * t/GtkTreeModelIface.t * xs/GtkTreeModel.xs: Fix the stack handling in the xsub for gtk_tree_model_get. We need to call SPAGAIN before and PUTBACK after code that modifies the local stack pointer (PUSHs and XPUSHs for example). Patch by Kevin Ryde. * t/GtkWidget.t * xs/GtkWidget.xs: Make Gtk2::Widget::hide_on_delete ignore excess arguments so that it is actually usable. Patch by Kevin Ryde. * xs/GtkSelection.xs: gtk_selection_data_get_data was split up into gtk_selection_data_get_data and gtk_selection_data_get_length. Update the wrappers accordingly. 2008-08-23 Torsten Schoenfeld * xs/PangoLayout.xs: Fix a leak in the wrapper of pango_layout_line_get_x_ranges. Patch by Kevin Ryde. * t/GtkFileChooser.t * t/GtkTreeView-Dnd.t: Improve the wording of the skip_all messages. * xs/GtkTreeDnd.xs: Change the wrapper for gtk_tree_drag_source_drag_data_get so it also accepts a selection data object that is to be filled in, instead of always just returning a new one. Patch by Kevin Ryde. * t/GtkTreeView.t: Use separately created tree views for certain parts of the test. Properly test set_search_equal_func and set_search_position_func. Make the tests for the coordinate converters and for the tooltip stuff more robust. * xs/GtkWindow.xs: Use Gtk2::Widget::hide_on_delete in the POD. Patch by Kevin Ryde. 2008-08-18 Torsten Schoenfeld * Gtk2.pm * NEWS * README: Unstable release 1.191. 2008-08-18 Torsten Schoenfeld * xs/GtkColorSelectionDialog.xs: gtk_color_selection_dialog_get_color_selection is broken currently, so make its use depend on gtk+ >= 2.13.7 (i.e. the next version). (See GNOME bug #548346) * t/GtkTreeModelIface.t * xs/GtkTreeModel.xs: Provide Gtk2::TreeIter::set for custom model implementations to set the contents of an iter. Patch by Kevin Ryde. 2008-08-17 Torsten Schoenfeld * t/GtkItemFactory.t: Fix test failures. * t/GtkWidget.t * xs/GtkWidget.xs: Wrap gtk_widget_hide_on_delete. * xs/GtkWindow.xs: Fix small error in the description POD section. Patch by Kevin Ryde. * t/GtkScaleButton.t * xs/GtkScaleButton.xs: Wrap gtk_scale_button_set_orientation and gtk_scale_button_get_orientation. * t/GtkSocket-GtkPlug.t * xs/GtkPlug.xs: Fix the gtk_plug_new_for_display wrapper so it is callable as Gtk2::Plug->new_for_display(display, socket_id). For backwards compatibility, also allow Gtk2::Plug::new_for_display(display, socket_id). * t/GtkSocket-GtkPlug.t * xs/GtkPlug.xs: Wrap gtk_plug_get_embedded and gtk_plug_get_socket_window. * t/GtkMessageDialog.t * xs/GtkMessageDialog.xs: Wrap gtk_message_dialog_get_image. * t/GtkMenuItem.t * xs/GtkMenuItem.xs: Wrap gtk_menu_item_get_accel_path. * t/GtkMenu.t * xs/GtkMenu.xs: Wrap gtk_menu_get_accel_path and gtk_menu_get_monitor. * xs/GtkHandleBox.xs: Use gtk_handle_box_get_child_detached if available. * t/GtkEntry.t * xs/GtkEntry.xs: Wrap gtk_entry_set_overwrite_mode, gtk_entry_get_overwrite_mode, and gtk_entry_get_text_length. * t/GtkColorSelectionDialog.t * xs/GtkColorSelectionDialog.xs: Wrap gtk_color_selection_dialog_get_color_selection; deprecate Gtk2::ColorSelectionDialog->colorsel. * t/GtkCalendar.t * xs/GtkCalendar.xs: Wrap gtk_calendar_get_detail_width_chars, gtk_calendar_set_detail_width_chars, gtk_calendar_get_detail_height_rows and gtk_calendar_set_detail_height_rows. 2008-08-16 Torsten Schoenfeld * xs/GdkPixmap.xs * xs/GtkGC.xs * xs/PangoCairo.xs: Add hierarchy sections to the unregistered custom subclasses Gtk2::Gdk::Bitmap, Gtk2::GC, and Gtk2::Pango::Cairo::Context. * t/GdkWindow.t * xs/GdkWindow.xs: Wrap gdk_window_redirect_to_drawable and gdk_window_remove_redirection. * t/GdkScreen.t * xs/GdkScreen.xs: Wrap gdk_screen_get_monitor_height_mm, gdk_screen_get_monitor_width_mm, and gdk_screen_get_monitor_plug_name. * t/GtkClipboard.t * xs/GtkSelection.xs: Use gtk_selection_data_get_target, gtk_selection_data_get_data_type, gtk_selection_data_get_format, gtk_selection_data_get_data, and gtk_selection_data_get_display if available to implement the accessors Gtk2::SelectionData->get_[thing]. Deprecate Gtk2::SelectionData->[thing]. * MANIFEST * xs_files-2.14 * t/GtkShow.t * xs/GtkShow.xs: Wrap gtk_show_uri. * t/01.GtkWindow.t * xs/GtkWindow.xs: Wrap gtk_window_get_default_widget and gtk_window_group_list_windows. * t/GtkWidget.t * xs/GtkWidget.xs: Wrap gtk_widget_get_snapshot. * MANIFEST * maps-2.14 * xs_files-2.14 * t/GtkToolShell.t * xs/GtkToolShell.xs: Wrap GtkToolShell. * t/GtkToolItem.t * xs/GtkToolItem.xs: Wrap gtk_tool_item_toolbar_reconfigured. * t/GtkTooltip.t * xs/GtkTooltip.xs: Wrap gtk_tooltip_set_icon_from_icon_name. * t/GtkStatusIcon.t * xs/GtkStatusIcon.xs: Wrap gtk_status_icon_get_x11_window_id. 2008-08-15 Torsten Schoenfeld * t/GtkSocket-GtkPlug.t * xs/GtkSocket.xs: Wrap gtk_socket_get_plug_window. * t/GtkScaleButton.t * xs/GtkScaleButton.xs: Wrap gtk_scale_button_get_popup, gtk_scale_button_get_plus_button, and gtk_scale_button_get_minus_button. * t/GtkPrintSettings.t * xs/GtkPrintSettings.xs: Wrap gtk_print_settings_load_file and gtk_print_settings_load_key_file. * t/GtkPageSetup.t * xs/GtkPageSetup.xs: Wrap gtk_page_setup_load_file and gtk_page_setup_load_key_file. * t/GtkIconTheme.t * xs/GtkIconTheme.xs: Wrap gtk_icon_info_new_for_pixbuf. * t/GtkLayout.t * xs/GtkLayout.xs: Use gtk_layout_get_bin_window if available to implement Gtk2::Layout->get_bin_window. Deprecate Gtk2::Layout->bin_window. 2008-08-13 Torsten Schoenfeld * t/GtkFontSelection.t * xs/GtkFontSelection.xs: Wrap gtk_font_selection_get_face, gtk_font_selection_get_face_list, gtk_font_selection_get_family, gtk_font_selection_get_family_list, gtk_font_selection_get_preview_entry, gtk_font_selection_get_size, gtk_font_selection_get_size_entry, and gtk_font_selection_get_size_list. Use gtk_font_selection_dialog_get_ok_button, gtk_font_selection_dialog_get_apply_button, and gtk_font_selection_dialog_get_cancel_button if available to implement Gtk2::FontSelectionDialog->get_ok_button, get_apply_button, and get_cancel_button. Deprecate Gtk2::FontSelectionDialog->ok_button, apply_button, and cancel_button. * t/GtkDialog.t * xs/GtkDialog.xs: Use gtk_dialog_get_content_area and gtk_dialog_get_action_area if available to implement Gtk2::Dialog->get_content_area and Gtk2::Dialog->get_action_area, and fallback to direct struct access otherwise. Deprecate Gtk2::Dialog->vbox and Gtk2::Dialog->action_area. 2008-08-11 Torsten Schoenfeld * t/02.GtkContainer.t * xs/GtkContainer.xs: Wrap gtk_container_get_focus_child. Allow undef for the focus child argument to gtk_container_set_focus_child. * t/GtkClipboard.t * xs/GtkClipboard.xs: Wrap gtk_clipboard_request_uris, gtk_clipboard_wait_for_uris, and gtk_clipboard_wait_is_uris_available. Also fix the rich text tests. * t/GtkCalendar.t * xs/GtkCalendar.xs: Wrap gtk_calendar_set_detail_func. 2008-08-08 Torsten Schoenfeld * xs/GdkCairo.xs * xs/GdkProperty.xs * xs/GtkBuilder.xs * xs/GtkSelection.xs: Fix some POD glitches. 2008-08-07 Torsten Schoenfeld * t/GtkBuilder.t: Merge the UI definitions and, more importantly, make it work correctly with newer gtk+. * t/GtkBuilder.t * xs/GtkBuilder.xs: Wrap gtk_builder_add_objects_from_file and gtk_builder_add_objects_from_string. 2008-08-05 Torsten Schoenfeld * t/GtkAccelGroup.t * xs/GtkAccelGroup.xs: Wrap gtk_accel_group_get_is_locked and gtk_accel_group_get_modifier_mask. 2008-08-03 Torsten Schoenfeld * xs/GtkTreeModel.xs (gtk2perl_tree_model_rows_reordered_marshal) * t/GtkTreeModelIface.t: Fix marshaling of the rows-reordered signal for custom Perl tree models. Patch by Kevin Ryde. * xs/GtkAboutDialog.xs: Don't define macros inside a MODULE section. Older xsubpp can't handle that. * xs/GtkMenu.xs (gtk2perl_menu_position_func): The push_in return value is a boolean, not an integer. Marshal it accordingly. * xs/GtkDialog.xs: Add documentation about closing dialogs, and mention that class closures for the response signal receive unconverted response ids. Patch by Kevin Ryde. * xs/GtkWindow.xs: Add a couple of words about the delete-event signal and its relation to window destruction and hidden windows. Patch by Kevin Ryde. * xs/GtkTreeModel.xs: Document that class closures in Perl subclasses for the rows-reordered signal receive an incorrect reorder array parameter, unlike normal signal handlers. Patch by Kevin Ryde. 2008-07-13 Torsten Schoenfeld * xs/GtkCellRenderer.xs * t/GtkCellRendererIface-Chaining.t: In the fallback xsubs for the GtkCellRenderer interface vfuncs, use a more robust approach for chaining up to the parent. Idea by Kevin Ryde. 2008-07-13 Torsten Schoenfeld * xs/GtkWidget.xs: Document some aspects of Gtk2::Widget::activate and set_scroll_adjustments that are relevant to Perl subclasses. Patch by Kevin Ryde. 2008-06-22 Torsten Schoenfeld * Gtk2.pm * Makefile.PL * MANIFEST * NEWS * README: Unstable release 1.190. 2008-06-22 Torsten Schoenfeld * xs/GtkGC.xs: Refer to release 1.200 (instead of 1.180) in the compatibility paragraph about Gtk2::GC->release. 2008-06-22 Torsten Schoenfeld * t/GtkClipboard.t: Fix test failure that's presumably due to get_func being run more often than expected. Also use Gtk2::TestHelper's run_main to replace equivalent Glib::Timeout constructs. 2008-06-22 Torsten Schoenfeld * CodeGen.pm (generate_constants_wrappers): Also allow more than one tab as a separator between constant name and converter. 2008-06-22 Torsten Schoenfeld * CodeGen.pm: Add Gtk2::CodeGen->generate_constants_wrappers which creates XSUBs for C constants. * Makefile.PL: Use Gtk2::CodeGen->generate_constants_wrappers to wrap constants specified in files named constants-x.y. * Gtk2.pm * t/version-checks.t: Use Exporter to handle version checking and exporting. Test. * constants-2.0 * Gtk2.pm * t/00.Gtk2.t: Export GTK_PRIORITY_RESIZE, GDK_PRIORITY_EVENTS, and GDK_PRIORITY_REDRAW. * constants-2.0 * Gtk2.pm * t/00.Gtk2.t: Export GDK_CURRENT_TIME. 2008-06-21 Torsten Schoenfeld * t/GtkIconView.t: Fix test failures by not running certain unreliable tests. Also avoid running unnecessary main loops. 2008-06-01 Torsten Schoenfeld * xs/GtkWidget.xs: Document why signal_chain_from_overridden doesn't quite work when used in a size-request handler. Patch by Kevin Ryde. * xs/GtkGC.xs * t/GtkGC.t: Automatically handle releasing of GCs returned by Gtk2::GC->get. Patch by muppet, idea and initial implementation by Kevin Ryde. * xs/GdkEvent.xs (gtk2perl_gdk_event_set_state) (gtk2perl_gdk_event_set_time): Handle the new GDK_DAMAGE type. * t/GdkEvent.t: Provide Gtk2::Gdk::Event::GrabBroken::implicit and grab_window accessors. Patch by Kevin Ryde. * xs/GtkAdjustment.xs: Improve the documentation for the accessors. Patch by Kevin Ryde. 2008-05-31 Torsten Schoenfeld * t/GtkRecentChooser.t * t/GtkRecentManager.t: Fix test failures due to the asynchronous nature of the manager's add_item(). 2008-05-23 Torsten Schoenfeld * t/GtkTreeModelFilter.t * xs/GtkTreeModelFilter.xs: Fix the marshalling of modify callbacks. Technically, this is an API change since an input argument turned into a return value. The previous version was not usable, however, so nothing should be affected by this. If this change does break your code, please let us know. Patch by Kevin Ryde. 2008-05-22 Torsten Schoenfeld * Gtk2.pm * t/GdkProperty.t * xs/GdkProperty.xs: Overload '!=' for GdkAtoms. Patch by Kevin Ryde. 2008-05-20 Torsten Schoenfeld * xs/GdkWindow.xs: Add documentation for Gtk2::Gdk::Window::new. Patch by Kevin Ryde. * t/GdkWindow.t * xs/GdkWindow.xs (SvGdkWindowAttrReal): Use sv_2bool instead of SvUV to convert override_redirect values. * t/GtkTreeModelIface.t * xs/GtkTreeModel.xs (gtk2perl_tree_model_iter_has_child): Accept all the usual boolean values for the return value of ITER_HAS_CHILD. * t/PangoLayout.t: Fix test failure on newer pango versions. 2008-05-04 Torsten Schoenfeld * xs/GtkTreeView.xs: Describe the return values of get_visible_range and get_tooltip_context. Patch by Kevin Ryde. * xs/GtkTreeModel.xs: In the POD section about tree iterators, add a paragraph explaining how data put into iterators needs to be kept alive by the model. Patch by Kevin Ryde. 2008-04-20 Torsten Schoenfeld * t/GdkDisplay.t * xs/GdkDisplay.xs: Allow undef for the display name parameter of Gtk2::Gdk::Display::open. Patch by Kevin Ryde. 2008-03-30 Torsten Schoenfeld * Gtk2.pm * NEWS * README: Stable release 1.182. 2008-03-30 Torsten Schoenfeld * xs/GtkScaleButton.xs: NULL-terminate the icon list passed to gtk_scale_button_new and gtk_scale_button_set_icons. * xs/GtkBuildable.xs (gtk2perl_buildable_custom_tag_start): Don't declare variables after expressions. * Makefile.PL: Depend on ExtUtils::Depends 0.300 and thereby void the need for the find_extra_libs stuff. * Gtk2/t/Gdk.t * Gtk2/t/GdkDisplay.t * Gtk2/t/GdkInput.t * Gtk2/t/GdkProperty.t * Gtk2/t/GdkSelection.t * Gtk2/t/GdkWindow.t * Gtk2/t/GtkFontSelection.t * Gtk2/t/GtkIconTheme.t * Gtk2/t/GtkIconView.t * Gtk2/t/GtkSocket-GtkPlug.t * Gtk2/t/GtkStatusIcon.t * Gtk2/t/GtkTreeView.t * Gtk2/t/PangoCairo.t: Fix test failures, mostly on MSWin32 and cygwin. 2008-03-22 Torsten Schoenfeld * Makefile.PL: Trap exceptions thrown by EU::PkgConfig->find. When one occurs, exit with status 0 to indicate to CPAN testers that their system isn't supported. 2008-03-15 Torsten Schoenfeld * Gtk2.pm * NEWS * README: Stable release 1.181. 2008-03-14 Torsten Schoenfeld * t/GtkBuildableIface.t: Fix test failure on gtk+ < 2.12. * Makefile.PL: Remove the no_index specification from EXTRA_META because the YAML implementations currently in use don't seem to support this syntax yet. 2008-03-10 Torsten Schoenfeld * Gtk2.pm * Makefile.PL * NEWS * README * copyright.pod: Stable release 1.180. 2008-03-10 Torsten Schoenfeld * t/GtkBuildable.t * t/GtkBuilder.t * t/GtkRecentAction.t * t/GtkScaleButton.t * t/GtkTooltip.t * t/GtkVolumeButton.t * t/PangoLayout.t * t/PangoRenderer.t * xs/GtkAboutDialog.xs * xs/GtkBuildable.xs * xs/PangoLayout.xs * xs/PangoRenderer.xs: Make version checks refer to stable releases. 2008-02-24 Torsten Schoenfeld * t/GtkTreeView.t: Fix remaining test failures. (Patch by Marc 'HE' Brockschmidt) 2008-02-12 Torsten Schoenfeld * Gtk2.pm * Makefile.PL * NEWS * README: Unstable release 1.173. 2008-02-11 Torsten Schoenfeld * t/GdkProperty.t * t/GdkVisual.t * t/GtkClipboard.t * t/GtkTreeView.t: Fix test failures. 2008-02-09 Torsten Schoenfeld * t/PangoLayout.t * xs/PangoLayout.xs: Wrap pango_layout_set_height and pango_layout_get_height. * xs/PangoTypes.xs (Gtk2::Pango::extents_to_pixel): Change the names of the arguments from "ink_rect, logical_rect" to "inclusive, nearest" as suggested by upstream. 2008-01-19 Torsten Schoenfeld * t/PangoLayout.t * xs/PangoLayout.xs: Wrap pango_layout_iter_get_layout and make use of pango_layout_iter_copy if available. * t/PangoRenderer.t * xs/PangoRenderer.xs: Wrap pango_renderer_get_layout and pango_renderer_get_layout_line. * t/GtkTreeView.t: Hopefully fix some test failures involving a wrong number of tests run by having every callback with tests run only once. 2008-01-14 muppetman * xs/GdkPixbuf.xs * t/GdkPixbuf.t: Add a NULL terminator to keep GdkPixbuf from crashing on incomplete xpm data. Add unit tests. Patch from Kevin Ryde. 2008-01-12 muppetman * xs/GdkRegion.xs * t/GdkRegion.t: Return copy of stack rectangle instead of just a pointer, to avoid garbage values from get_clipbox(). Patch from Kevin Ryde. * xs/GtkStatusIcon.xs * t/GtkStatusIcon.t: Fix similar stack copy bug. 2008-01-11 muppetman * xs/GtkCellLayout.xs: Fix usage message bug reported by Kevin Ryde. 2008-01-09 Torsten Schoenfeld * Gtk2.pm * Makefile.PL * NEWS * README: Unstable release 1.172. 2008-01-09 Torsten Schoenfeld * t/GdkVisual.t * t/GdkX11.t * t/GtkPaned.t: Fix some reported test failures by either being less conservative in what we expect or by simply testing less of gtk+ itself. 2008-01-09 muppetman * MANIFEST * t/GtkBuildableIface.t * xs/GtkBuildable.xs: Allow perl code to implement GtkBuildableIface. Lots of documentation. Hide docs for the normal GtkBuildable methods, as they are really only useful for GtkBuilder to call. Add a new unit test for the iface stuff. This change requires the deferral of class instantiation in Glib::Type::register_object() if you are going to implement the interface on a class derived from a class that already implements that interface (e.g., if you want to implement Buildable on a Widget). * t/GdkCairo.t: Improve skip message on GdkCairo.t; don't claim Cairo is missing when the problem is actually an empty DISPLAY. 2008-01-08 Torsten Schoenfeld * xs/PangoLayout.xs: Work around what appears to be a bug in ExtUtils::ParseXS' xsubpp (used by default in perl 5.10.0) for the pango_layout_line_x_to_index xsub: manually handle output arguments, i.e. dont't rely on OUTLIST. This should fix the "Modification of a read-only value attempted" issue. * Gtk2.pm * Makefile.PL: Require Cairo if gtk+ >= 2.8 or pango >= 1.10. Previously, we just checked for gtk+ >= 2.8. A new pango usually implies a new gtk+, but that's not necessarily the case. So check both independently and require Cairo if either is new enough. 2008-01-07 muppetman * examples/simplelist.pl: Add a button to toggle reorderable columns. * t/GdkDrawable.t: Wait until the drawable is onscreen before attempting to draw to it. This fixes test failures related to sync issues with some X servers. * t/GtkTreeView.t: Avoid an assertion failure in gtk+ by making sure there's a node visible when testing get_visible_range(). * xs/GtkContainer.xs * t/02.GtkContainer.t: Bind, test, and document gtk_container_forall(). * xs/GtkAssistant.xs * t/GtkAssistant.t: Bind and test accessors for the cancel, forward, back, apply, close, and last buttons that live only as public members of struct _GtkAssistant. To avoid confusing API with accessors that look like actions, these accessors take the form $assistant->get_foo_button(). * xs/GtkCellLayout.xs * t/GtkCellLayout.t: Allow and test passing undef to clear the cell layout's cell data func. * xs/GtkCellLayout.xs * t/GtkCellLayout.t: Honor the semantics of set_attributes() and clear all previous attributes. Also allow passing an empty key/val pair list. * xs/GtkCellLayout.xs * t/GtkCellLayoutIface.t * Gtk2.pm * MANIFEST: Allow perl code to implement GtkCellLayoutIface. Includes a major doc update for Gtk2::CellLayout. 2008-01-07 Torsten Schoenfeld * CodeGen.pm * gtk2perl.h * xs/GdkEvent.xs * xs/GdkGC.xs * xs/GdkKeys.xs * xs/GdkPixbuf.xs * xs/GdkRegion.xs * xs/GdkRgb.xs * xs/GdkTypes.xs * xs/GdkWindow.xs * xs/GtkActionGroup.xs * xs/GtkCellRenderer.xs * xs/GtkEntry.xs * xs/GtkFileFilter.xs * xs/GtkIconTheme.xs * xs/GtkItemFactory.xs * xs/GtkLinkButton.xs * xs/GtkMenu.xs * xs/GtkMessageDialog.xs * xs/GtkNotebook.xs * xs/GtkRadioAction.xs * xs/GtkRadioButton.xs * xs/GtkRadioMenuItem.xs * xs/GtkRadioToolButton.xs * xs/GtkRc.xs * xs/GtkRecentFilter.xs * xs/GtkRecentManager.xs * xs/GtkSelection.xs * xs/GtkStock.xs * xs/GtkTextBufferRichText.xs * xs/GtkToolbar.xs * xs/GtkTooltips.xs * xs/GtkTreeModel.xs * xs/GtkTreeModelFilter.xs * xs/GtkTreeSelection.xs * xs/GtkTreeSortable.xs * xs/GtkTreeView.xs * xs/GtkWindow.xs * xs/PangoAttributes.xs * xs/PangoCairo.xs * xs/PangoLayout.xs: gperl_sv_defined was renamed to gperl_sv_is_defined -- adjust callers. * xs/GdkGC.xs * xs/GdkKeys.xs * xs/GdkRegion.xs * xs/GdkRgb.xs * xs/GdkTypes.xs * xs/GdkWindow.xs * xs/GtkActionGroup.xs * xs/GtkEntry.xs * xs/GtkFileFilter.xs * xs/GtkIconTheme.xs * xs/GtkItemFactory.xs * xs/GtkRadioAction.xs * xs/GtkRadioButton.xs * xs/GtkRadioMenuItem.xs * xs/GtkRadioToolButton.xs * xs/GtkRecentFilter.xs * xs/GtkRecentManager.xs * xs/GtkSelection.xs * xs/GtkStock.xs * xs/GtkTreeModel.xs * xs/GtkTreeModelFilter.xs * xs/PangoAttributes.xs * xs/PangoLayout.xs: Use the new macros gperl_sv_is_array_ref and gperl_sv_is_hash_ref. 2008-01-01 muppetman * xs/GtkWidget.xs: Doc fixes; the docs on gtk_widget_get_size_request() actually belonged on gtk_widget_size_request(). Swap that and add docs for get_size_request() and get_child_requisition(), copied from gtk+. Also fix the signature for get_size_request(), as suggested by Kevin Ryde. * xs/GdkPixbuf.xs: Fix the signature docs for get_file_info(), suggested by Kevin Ryde. Also add a brief description of the function. 2007-12-30 Torsten Schoenfeld * xs/PangoCairo.xs (gtk2perl_pango_cairo_shape_renderer_func): Put dGPERL_CALLBACK_MARSHAL_SP at the end of the list of declarations to avoid a compilation failure on Win32. 2007-12-16 Torsten Schoenfeld * Gtk2.pm * Makefile.PL * NEWS * README: Unstable release 1.171. 2007-12-16 Torsten Schoenfeld * xs/GdkDisplay.xs * xs/GdkWindow.xs * xs/GtkBox.xs * xs/GtkIconView.xs * xs/GtkImage.xs * xs/GtkNotebook.xs * xs/GtkScrolledWindow.xs * xs/PangoTabs.xs: Fix memory leaks that were due to the use of OUTLIST for types which have typemaps that create a new SV rather than overwrite an existing one -- i.e. nearly all non-standard types and even some standard types like bool. The following functions' xsubs were affected: gdk_display_get_pointer, gdk_window_get_decorations, gdk_window_get_internal_paint_info, gtk_box_query_child_packing, gtk_icon_view_get_drag_dest_item, gtk_image_get_pixmap, gtk_image_get_image, gtk_image_get_icon_set, gtk_image_get_icon_name, gtk_notebook_query_tab_label_packing, gtk_scrolled_window_get_policy, pango_tab_array_get_tab. (Fixes bug #498334, reported by Quentin Sculo) * CodeGen.pm * gtk2perl.h * xs/GdkEvent.xs * xs/GdkGC.xs * xs/GdkKeys.xs * xs/GdkPixbuf.xs * xs/GdkRegion.xs * xs/GdkRgb.xs * xs/GdkTypes.xs * xs/GdkWindow.xs * xs/GtkActionGroup.xs * xs/GtkCellRenderer.xs * xs/GtkEntry.xs * xs/GtkFileFilter.xs * xs/GtkIconTheme.xs * xs/GtkItemFactory.xs * xs/GtkLinkButton.xs * xs/GtkMenu.xs * xs/GtkMessageDialog.xs * xs/GtkNotebook.xs * xs/GtkRadioAction.xs * xs/GtkRadioButton.xs * xs/GtkRadioMenuItem.xs * xs/GtkRadioToolButton.xs * xs/GtkRc.xs * xs/GtkRecentFilter.xs * xs/GtkRecentManager.xs * xs/GtkSelection.xs * xs/GtkStock.xs * xs/GtkTextBufferRichText.xs * xs/GtkToolbar.xs * xs/GtkTooltips.xs * xs/GtkTreeModel.xs * xs/GtkTreeModelFilter.xs * xs/GtkTreeSelection.xs * xs/GtkTreeSortable.xs * xs/GtkTreeView.xs * xs/GtkWindow.xs * xs/PangoAttributes.xs * xs/PangoCairo.xs * xs/PangoLayout.xs: Use gperl_sv_defined instead of SvOK to check for definedness. 2007-12-09 Torsten Schoenfeld * xs/Gtk2.xs: gtk_check_version's return value recently acquired a const, so add some casting to hush compiler warnings. * xs/GdkColor.xs: Make Gtk2::Gdk::Color::new take an optional pixel value. (Patch from Kevin Ryde) 2007-12-08 Torsten Schoenfeld * xs/GtkDialog.xs: Correct the response id mentioned in the docs on delete-event. (Patch from Kevin Ryde) * AUTHORS: Add Kevin. 2007-11-18 Torsten Schoenfeld * tools/genkeysyms.pl: Mention Gtk2::Gdk->keyval_from_name in the DESCRIPTION section of Gtk2::Gdk::Keysyms, as suggested by Kevin Ryde. * xs/GtkTreeModel.xs (POD section DESCRIPTION): Include additional information provided by Dave Howorth about the lifetime of iterators. 2007-04-15 muppetman * xs/GtkIMContext.xs * xs/GtkIMContextSimple.xs * xs/GtkIMMulticontext.xs * t/GtkIMContext.t * MANIFEST * xs_files-2.0: Bindings for GtkIMContext, GtkIMContextSimple, and GtkIMMulticontext, with tests. gtk_im_context_simple_add_table is not bound; it's unclear as to whether it's actually useful, and i don't have a way to test it. 2007-10-30 Torsten Schoenfeld * Gtk2.pm (Gtk2::Builder::_do_connect): Don't use the qw// operator to qoute a flag value as it seems to cause parse failures on some perls. 2007-10-29 Torsten Schoenfeld * Gtk2.pm * Makefile.PL * NEWS * README: Unstable release 1.170. 2007-10-22 Torsten Schoenfeld * xs/GtkMessageDialog.xs (SYNOPSIS): Add a show_all() call to the non-modal dialog example. (Spotted by Dave Howorth) 2007-10-21 Torsten Schoenfeld * t/GtkIconTheme.t (list_contexts test): Fix test failure. 2007-10-16 Emmanuele Bassi * tools/genkeysyms.pl: Fix the SYNOPSIS example (from Debian bug #422223). 2007-10-14 Torsten Schoenfeld * Makefile.PL: Use BEGIN { require 5.008; } instead of use 5.008; so automatic CPAN testers know which perl version we need. 2007-10-08 Torsten Schoenfeld * t/GtkPaned.t: Use SKIP instead of TODO for the unreliable resize verification tests. TODOs that pass look like failures. 2007-10-07 Torsten Schoenfeld * t/GdkDnd.t: Handle get_selection() returning undef. * Makefile.PL: Tell EU::MM to put correct configure_requires and no_index information into the generated META.yml file. 2007-10-03 Torsten Schoenfeld * xs/PangoLayout.xs: Fix leak in Gtk2::Pango::Layout::get_iter. (Reported by Quentin Sculo in #482795) 2007-09-24 kaffeetisch * Makefile.PL: Prettify build output by summarizing what is done instead of printing executed command lines. * tools/genkeysyms.pl * tools/podifyenums.pl: Don't put timestamps into generated files so they don't get installed every single time even though there are no real changes. 2007-09-16 kaffeetisch * Gtk2.pm * Makefile.PL * NEWS * README: Stable release 1.160. 2007-09-16 kaffeetisch * t/GtkIconView.t: Fix a test failure. 2007-09-15 kaffeetisch * t/01.GtkWindow.t * t/Gdk.t * t/GdkColor.t * t/GdkDisplay.t * t/GdkEvent.t * t/GdkKeys.t * t/GdkPango.t * t/GdkPixbuf.t * t/GdkWindow.t * t/GdkX11.t * t/GtkAboutDialog.t * t/GtkAction.t * t/GtkCellLayout.t * t/GtkEntry.t * t/GtkEntryCompletion.t * t/GtkIconTheme.t * t/GtkIconView.t * t/GtkMenuItem.t * t/GtkMenuToolButton.t * t/GtkPageSetup.t * t/GtkPaperSize.t * t/GtkPrintSettings.t * t/GtkRange.t * t/GtkStatusIcon.t * t/GtkTextBuffer.t * t/GtkTextMark.t * t/GtkToolItem.t * t/GtkTreeView.t * t/GtkWidget.t * t/PangoCairo.t * t/PangoFont.t * t/PangoLayout.t * xs/Gdk.xs * xs/GdkDisplay.xs * xs/GdkEvent.xs * xs/GdkKeys.xs * xs/GdkPango.xs * xs/GdkWindow.xs * xs/GdkX11.xs * xs/GtkAboutDialog.xs * xs/GtkAction.xs * xs/GtkCellLayout.xs * xs/GtkEntry.xs * xs/GtkEntryCompletion.xs * xs/GtkIconTheme.xs * xs/GtkMenuToolButton.xs * xs/GtkPageSetup.xs * xs/GtkPaperSize.xs * xs/GtkPrintSettings.xs * xs/GtkRange.xs * xs/GtkStatusIcon.xs * xs/GtkTextBuffer.xs * xs/GtkTextMark.xs * xs/GtkToolItem.xs * xs/GtkTreeView.xs * xs/GtkTreeViewColumn.xs * xs/GtkWidget.xs * xs/GtkWindow.xs * xs/PangoCairo.xs * xs/PangoFont.xs * xs/PangoLayout.xs: Change version checks to refer to gtk+ 2.12 instead of 2.11. Thanks, perl -pi. 2007-09-09 kaffeetisch * t/GtkStatusIcon.t * xs/GtkStatusIcon.xs: Make the x, y arguments to Gtk2::StatusIcon::position_menu optional. Patch by muppet. * t/GdkWindow.t: Fix a reported test failure in the get_decorations() checks. 2007-08-13 kaffeetisch * xs/GdkEvent.xs * xs/GdkPixbuf.xs * xs/GtkTreeModel.xs: Alter some type names in the POD so that Glib::GenPod recognizes them. 2007-08-01 kaffeetisch * Gtk2.pm * NEWS * README: Unstable release 1.155. 2007-08-01 kaffeetisch * MANIFEST: Add forgotten maps_pango-1.18. Its absence caused compilation errors. (Reported by Thierry Vignaud) * t/Gdk.t: Fix incorrect skip count. * t/GtkTooltips.t: Fix test failure due to change of semantics in gtk+. 2007-07-29 kaffeetisch * Gtk2.pm * NEWS * README: Unstable release 1.154. 2007-07-29 kaffeetisch * Makefile.PL: Don't print how many XS files were loaded from which XS file list. 2007-07-22 kaffeetisch * t/GdkColor.t * xs/GdkColor.xs: Wrap gdk_color_to_string. * t/GdkDisplay.t * xs/GdkDisplay.xs: Wrap gdk_display_supports_composite. * t/GdkPixbuf.t * xs/GdkPixbuf.xs: Wrap gdk_pixbuf_apply_embedded_orientation. * t/GdkWindow.t * xs/GdkWindow.xs: Wrap gdk_window_set_composited. * t/GtkIconView.t * xs/GtkIconView.xs: Wrap gtk_icon_view_set_tooltip_item, gtk_icon_view_set_tooltip_cell, gtk_icon_view_get_tooltip_context, gtk_icon_view_set_tooltip_column, and gtk_icon_view_get_tooltip_column. * t/GtkTooltip.t * xs/GtkTooltip.xs: Wrap gtk_tooltip_set_tip_area. * t/GtkTreeView.t * xs/GtkTreeView.xs: Wrap gtk_tree_view_set_tooltip_row, gtk_tree_view_set_tooltip_cell, gtk_tree_view_get_tooltip_context, gtk_tree_view_set_tooltip_column, and gtk_tree_view_get_tooltip_column. * t/PangoAttributes.t * xs/PangoAttributes.xs: Bless the array used to represent PangoColor so it becomes possible to call methods on it. Introduce some stack fiddling so you can use Gtk2::Pango::Color::to_string as a method and a class function. * xs/PangoMatrix.xs: Since pango uses GSlice starting with 1.12, use g_slice_new0 instead of g_new0 in Gtk2::Pango::Matrix::new when appropriate to avoid memory corruption. (#458458, reported by Quentin Sculo) 2007-07-22 kaffeetisch * xs/PangoFont.xs: Don't prevent registering subclasses of PangoFont so that instances get their hierarchy set up correctly, especially wrt. interfaces. * maps_pango-1.18 * t/PangoCairo.t * xs/PangoCairo.xs: Wrap pango_cairo_font_get_scaled_font. 2007-07-12 kaffeetisch * t/GtkIconView.t * xs/GtkIconView.xs: Wrap gtk_icon_view_convert_widget_to_bin_window_coords. * t/GtkMenuToolButton.t * xs/GtkMenuToolButton.xs: Wrap gtk_menu_tool_button_set_arrow_tooltip_text and gtk_menu_tool_button_set_arrow_tooltip_markup. * t/GtkToolItem.t * xs/GtkToolItem.xs: Wrap gtk_tool_item_set_tooltip_text and gtk_tool_item_set_tooltip_markup. * t/GtkWidget.t * xs/GtkWidget.xs: Wrap gtk_widget_set_has_tooltip and gtk_widget_get_has_tooltip. 2007-07-10 kaffeetisch * t/GdkWindow.t * t/GtkIconTheme.t * t/GtkRecentManager.t: Fix test failures. 2007-07-08 kaffeetisch * Gtk2.pm * Makefile.PL * NEWS * README: Unstable release 1.153. 2007-07-08 kaffeetisch * xs/GtkBuilder.xs: Document the $builder->connect_signals ($user_data, $object) way of connecting signals. (Reported by Grant McLean.) Also correct a grammar mistake. * xs/GtkCellRenderer.xs: Mortalize all SVs we put on the stack. In the past, we had to be careful not to cause destruction of pre-existing C objects, but that's not necessary anymore. * xs/GtkEditable.xs (gtk2perl_editable_insert_text_marshal): Add a comment about why mortalizing isn't necessary here. 2007-07-07 kaffeetisch * t/GdkKeys.t * xs/GdkKeys.xs: Wrap gdk_keymap_have_bidi_layouts. * t/GtkTreeView.t * xs/GtkTreeView.xs: Wrap gtk_tree_view_is_rubber_banding_active. * xs/PangoCairo.xs * xs/PangoFontMap.xs: Don't set the no-warnings-for-unregistered-subclasses flag for PangoFontMap so that subclasses are registered and get their ancestry set up correctly (especially with respect to interfaces). This enables us to stop jumping through hoops to handle pango_cairo_font_map_new and pango_cairo_font_map_get_default. * t/PangoCairo.t * xs/PangoCairo.xs: Wrap pango_cairo_font_map_new_for_font_type and pango_cairo_font_map_get_font_type. * t/PangoFont.t * xs/PangoFont.xs: Wrap pango_font_face_is_synthesized. * xs/GtkRadioAction.xs * xs/GtkRadioButton.xs * xs/GtkRadioMenuItem.xs: Plug leaks in the get_group() methods: Mark new SVs as mortal when we put them on the stack. * t/Gdk.t * xs/Gdk.xs: Wrap gdk_notify_startup_complete_with_id. * t/GdkWindow.t * xs/GdkWindow.xs: Wrap gdk_window_set_startup_id. * t/GdkX11.t * xs/GdkX11.xs: Wrap gdk_x11_display_get_startup_notification_id. 2007-07-05 kaffeetisch * xs/GdkPixbuf.xs: Really plug the leaks in Gtk2::Gdk::Pixbuf::render_pixmap_and_mask() and render_pixmap_and_mask_for_colormap(). 2007-07-02 kaffeetisch * Gtk2.pm * t/GtkBuilder.t * xs/GtkBuilder.xs: Make Gtk2::Builder::connect_signals default to the calling package (instead of main) if none was specified. 2007-06-27 muppetman * xs/GdkPixbuf.xs: Plug reference leaks on the pixmap and bitmap returned from Gtk2::Gdk::Pixbuf::render_pixmap_and_mask() and render_pixmap_and_mask_for_colormap(). Also add a couple of FIXMEs. 2007-06-27 muppetman * xs/GtkAboutDialog.xs: Hide the AboutDialog on any reponse. See http://svn.gnome.org/viewcvs/gtk%2B?revision=14919&view=revision which changed the behavior of the dialog in gtk+ between 2.8 and 2.10. 2007-06-25 kaffeetisch * t/GtkIconView.t * xs/GtkIconView.xs: Supply default values for scroll_to_path. Suggested by Jeffrey Ratcliffe. * exampels/cellrenderer_popup.pl: Slightly modified patch from Grant McLean makes sure the popup works properly when using simple clicks instead of click-and-hold. 2007-06-24 kaffeetisch * Gtk2.pm, MANIFEST, Makefile.PL, NEWS, README: Unstable release 1.152. 2007-06-23 kaffeetisch * t/GtkMenuItem.t * xs/GtkMenuItem.xs: gtk_menu_item_set_submenu now accepts NULL for submenu. Adjust the wrapper accordingly. * t/GtkTextBuffer.t * xs/GtkTextBuffer.xs: Wrap gtk_text_buffer_add_mark. * t/GtkTextMark.t * xs/GtkTextMark.xs: Wrap gtk_text_mark_new. * t/GtkTreeView.t * xs/GtkTreeViewColumn.xs * xs/GtkTreeView.xs: Wrap gtk_tree_view_column_get_tree_view, gtk_tree_view_convert_widget_to_tree_coords, gtk_tree_view_convert_tree_to_widget_coords, gtk_tree_view_convert_widget_to_bin_window_coords, gtk_tree_view_convert_bin_window_to_widget_coords, gtk_tree_view_convert_tree_to_bin_window_coords, and gtk_tree_view_convert_bin_window_to_tree_coords. 2007-06-22 kaffeetisch * t/GtkIconTheme.t: Remove unreliable result check for get_example_icon_name. * t/GtkListStore.t * t/GtkTreeStore.t * xs/GtkTreeStore.xs: Make sure Gtk2::ListStore's and Gtk2::TreeStore's move_before() and move_after() accept undef for the position parameter. Reported by Dave Howorth. 2007-06-18 kaffeetisch * Gtk2.pm * maps-2.12 * xs_files-2.12 * t/GtkBuildable.t * t/GtkBuilder.t * xs/GtkBuildable.xs * xs/GtkBuilder.xs: Add support for GtkBuilder. 2007-06-17 kaffeetisch * t/PangoAttributes.t * t/PangoContext.t * t/PangoFont.t * t/PangoGravity.t * t/PangoLayout.t * t/PangoMatrix.t * t/PangoTypes.t * xs/PangoAttributes.xs * xs/PangoContext.xs * xs/PangoFont.xs * xs/PangoLayout.xs * xs/PangoMatrix.xs * xs/PangoTypes.xs: Refer to stable releases in version checks. * t/PangoCairo.t * xs/PangoCairo.xs: Wrap pango_cairo_context_set_shape_renderer. * t/GtkActionGroup.t * t/GtkPrintOperation.t: Fix test failures and assertions. * t/GtkAboutDialog.t * xs/GtkAboutDialog.xs: Respond to the recent deprecation of gtk_about_dialog_[sg]et_name and the removal of the "name" property: Make [sg]et_program_name the canonical method names for all gtk+ versions; warn if the old names are used. For new gtk+ versions, map the "name" property to "program-name" and issue a warning. For old gtk+ versions, map "program-name" to "name". In short: always use program-name in Perl code. 2007-06-16 kaffeetisch * maps-2.12 * xs_files-2.12 * t/GtkScaleButton.t * t/GtkVolumeButton.t * xs/GtkScaleButton.xs * xs/GtkVolumeButton.xs: Add support for GtkScaleButton and GtkVolumeButton. * maps-2.12 * xs_files-2.12 * t/GtkRecentAction.t * xs/GtkRecentAction.xs: Add support for GtkRecentAction. * t/GdkPixbufLoader.t: Use more adapted size values to test load-time scaling in order to avoid test failures due to rounding. * t/GtkPageSetup.t * xs/GtkPageSetup.xs: Wrap gtk_page_setup_new_from_file, gtk_page_setup_to_file, gtk_page_setup_new_from_key_file, and gtk_page_setup_to_key_file. * t/GtkPaperSize.t * xs/GtkPaperSize.xs: Wrap gtk_paper_size_new_from_key_file, gtk_paper_size_to_key_file, and gtk_paper_size_get_paper_sizes. * t/GtkPrintSettings.t * xs/GtkPrintSettings.xs: Wrap gtk_print_settings_new_from_file, gtk_print_settings_to_file, gtk_print_settings_new_from_key_file, and gtk_print_settings_to_key_file. Also fix the test fail to actually run any tests. * t/GtkTooltip.t * xs/GtkTooltip.xs: Wrap gtk_tooltip_set_text. * t/GtkWidget.t * xs/GtkWidget.xs: Wrap gtk_widget_set_tooltip_text, gtk_widget_get_tooltip_text, gtk_widget_set_tooltip_markup, gtk_widget_get_tooltip_markup, and gtk_widget_modify_cursor. * t/GtkIconTheme.t * xs/GtkIconTheme.xs: Wrap gtk_icon_theme_list_contexts and gtk_icon_theme_choose_icon. 2007-06-12 kaffeetisch * t/PangoLayout.t * xs/PangoLayout.xs: Add support for the new PangoLogAttr property is_expandable_space. * t/GtkAction.t * xs/GtkAction.xs: Wrap gtk_action_create_menu. * t/GtkEntry.t * xs/GtkEntry.xs: Wrap gtk_entry_set_cursor_hadjustment and gtk_entry_get_cursor_hadjustment. * t/GtkEntryCompletion.t * xs/GtkEntryCompletion.xs: Wrap gtk_entry_completion_set_inline_selection, gtk_entry_completion_get_inline_selection, and gtk_entry_completion_get_completion_prefix. * t/01.GtkWindow.t * xs/GtkWindow.xs: Wrap gtk_window_set_startup_id, gtk_window_set_opacity, and gtk_window_get_opacity. 2007-04-04 Emmanuele Bassi * xs/GtkAboutDialog.xs: Add a note about the order of the webmail and email properties and the url and email hook functions. (#425006) 2007-03-25 kaffeetisch * maps-2.12 * xs_files-2.12 * t/GtkTooltip.t * xs/GtkTooltip.xs: Wrap the new GtkTooltip API. 2007-03-17 kaffeetisch * t/GdkEvent.t * xs/GdkEvent.xs: Wrap gdk_event_request_motions. * t/GtkWidget.t * xs/GtkWidget.xs: Wrap gtk_widget_set_tooltip_window, gtk_widget_get_tooltip_window, and gtk_widget_trigger_tooltip_query. 2007-03-17 kaffeetisch * t/GtkAccelLabel.t * t/GtkBox.t * t/GtkButtonBox.t * t/GtkCheckButton.t * t/GtkCheckMenuItem.t * t/GtkListStore.t * t/GtkRadioMenuItem.t * t/GtkTable.t * t/GtkTextTag.t * t/GtkTreeSelection.t: Remove the -noinit option for tests which now need an initialized gtk+. 2007-03-17 kaffeetisch * xs/GtkTextBufferRichText.xs: Patch from Mario Fischer fixes a compilation problem that occurs when using MS' compiler. 2007-03-11 kaffeetisch * t/GtkEditable.t * xs/GtkEditbale.xs: Patch from Roderich Schupp fixes string encoding problems in the insert-text signal marshaller. 2007-02-25 kaffeetisch * Makefile.PL * xs_files-2.0 * xs_files-2.8 * xs_files_pango-1.0 * xs_files_pango-1.6 * xs_files_pango-1.10: Split pango's xs file list out into separate files. * maps_pango-1.16 * xs_files_pango-1.16 * t/PangoAttributes.t * xs/PangoAttributes.xs * t/PangoContext.t * xs/PangoContext.xs * t/PangoGravity.t * xs/PangoGravity.xs: Add support for the new gravity API: PangoGravityHint, PangoAttrGravity, PangoAttrGravityHint, pango_context_set_gravity_hint, pango_context_get_gravity_hint, PANGO_GRAVITY_IS_VERTICAL (wrapped as Gtk2::Pango::Gravity::is_vertical), pango_gravity_to_rotation, pango_gravity_get_for_matrix, pango_gravity_get_for_script. * t/PangoAttributes.t * xs/PangoAttributes.xs: Wrap pango_color_to_string. * t/PangoTypes.t * xs/PangoTypes.xs * t/PangoMatrix.t * xs/PangoMatrix.xs: Follow upstream and split out the matrix stuff into separate files. 2007-02-24 kaffeetisch * Gtk2.pm, t/GtkTreeModelSort.t, xs/GtkTreeModelSort.xs: Make sure calling get() on a Gtk2::TreeModelSort resolves to Gtk2::TreeModel::get if appropriate, and, to keep backwards compatibility, to Glib::Object::get otherwise. 2007-02-24 kaffeetisch * xs/PangoTypes.xs: Move a comment out of the ALIAS section to avoid confusing the docs generator. 2007-02-21 kaffeetisch * t/GtkTreeModelSort.t: Test that the iter and path converters do the right thing. 2007-02-21 muppetman * xs/GtkTreeModelSort.xs: fix copy and paste error that made gtk_tree_model_sort_convert_child_iter_to_iter() unusable. Reported by Adrian Priscak. 2007-01-08 kaffeetisch * Gtk2.pm, MANIFEST, Makefile.PL, NEWS, README, copyright.pod: Unstable release 1.151. 2007-01-08 kaffeetisch * t/GtkIconView.t, xs/GtkIconView.xs: Fix the path handling in Gtk2::IconView::get_selected_items. Previously, the returned paths were pointing to dead memory and any attempt to use them caused havoc. 2007-01-07 kaffeetisch * t/GtkCellLayout.t, xs/GtkCellLayout.xs: Wrap gtk_cell_layout_get_cells. * xs/PangoLayout.xs: Handle NULL and undef in newSVPangoRectangle and SvPangoRectangle. * t/PangoLayout.t, xs/PangoLayout.xs: Wrap pango_layout_get_line_readonly, pango_layout_get_lines_readonly, and pango_layout_iter_get_line_readonly. * t/PangoTypes.t, xs/PangoTypes.xs: Wrap pango_units_from_double, pango_units_to_double, pango_extents_to_pixels, pango_extents_to_pixels, pango_matrix_transform_distance, pango_matrix_transform_point, pango_matrix_transform_rectangle, and pango_matrix_transform_pixel_rectangle. 2007-01-06 Emmanuele Bassi * xs/GtkRecentManager.xs: Add more documentation for the Gtk2::RecentManager::add_item and Gtk2::RecentManager::add_full methods; define the needed keys for the hashref to be passed to the add_full method. 2007-01-06 Emmanuele Bassi * xs/GtkCombo.xs: * xs/GtkFileSelection.xs: * xs/GtkItemFactory.xs: * xs/GtkOptionMenu.xs: Add deprecation warnings. 2006-12-30 kaffeetisch * GtkTreeSortable.xs: Don't segfault in the GET_SORT_COLUMN_ID marshaller if any of the output parameter pointers is NULL. Patch by muppet. 2006-12-04 kaffeetisch * Gtk2.pm, Makefile.PL, NEWS, README: Unstable release 1.150. 2006-11-26 kaffeetisch * NEWS: Merge from stable-1-14. * t/GtkRange.t, xs/GtkRange.xs: Bind and test gtk_range_set_show_fill_level, gtk_range_get_show_fill_level, gtk_range_set_restrict_to_fill_level, gtk_range_get_restrict_to_fill_level, gtk_range_set_fill_level, and gtk_range_get_fill_level. * t/GtkStatusIcon.t, xs/GtkStatusIcon.xs: Bind and test gtk_status_icon_set_screen and gtk_status_icon_get_screen. * t/GtkWidget.t, xs/GtkWidget.xs: Bind and test gtk_widget_keynav_failed and gtk_widget_error_bell. 2006-11-19 kaffeetisch * t/GdkVisual.t, t/GtkIconView.t, t/GtkRecentChooser.t, t/GtkRecentManager.t: Fix test failures. 2006-11-19 kaffeetisch * doctypes: List GdkPixbufFormat as "hash reference". * t/PangoCairo.t, xs/PangoCairo.xs: Also allow using method calling semantics for pango_cairo_context_*. * xs/GdkCairo.xs: Remove redundant #if's. * xs/PangoCairo.xs: Add a DESCRIPTION section and __function__ POD tags to emphasize that and why the pango_cairo_* stuff is bound as functions. * gtk2perl.h, maps_pango-1.0, t/GdkDrawable.t, t/PangoCairo.t, t/PangoLayout.t, t/PangoRenderer.t, xs/GdkDrawable.xs, xs/PangoCairo.xs, xs/PangoLayout.xs, xs/PangoRenderer.xs: Add support for PangoLayoutLine. 2006-11-09 kaffeetisch * t/PangoContext.t, xs/PangoContext.xs: Wrap pango_context_set_base_gravity, pango_context_get_base_gravity, and pango_context_get_gravity. * t/PangoFont.t, xs/PangoFont.xs: Wrap pango_font_description_set_gravity and pango_font_description_get_gravity. 2006-11-08 kaffeetisch * t/GtkEntry.t, xs/GtkEntry.xs: Allow passing undef to set_completion. 2006-11-05 kaffeetisch * t/GdkPango.t, xs/GdkPango.xs: Add support for GdkPangoAttrEmbossColor. * t/GdkWindow.t, xs/GdkWindow.xs: Bind gdk_window_beep. * t/GtkTreeView.t, xs/GtkTreeView.xs: Bind gtk_tree_view_set_show_expanders, gtk_tree_view_get_show_expanders, gtk_tree_view_set_level_indentation, and gtk_tree_view_get_level_indentation. 2006-11-04 kaffeetisch * AUTHORS, t/GtkLayout.t, xs/GtkLayout.xs: Add an accessor for GtkLayout's bin_window struct member. Original patch by Philipp Rumpf. 2006-10-17 kaffeetisch Add support for pango attributes. * Gtk2.exports, xs/PangoLayout.xs: Make SvPangoRectangle public since it's now needed. * t/PangoRenderer.t, xs/PangoAttributes.xs, xs/PangoRenderer.xs: Implement a custom boxed wrapper for PangoColor that represents a color as an r,g,b tuple. Use it to wrap pango_renderer_[sg]et_color. * gtk2perl-private.h: Export gtk2perl_pango_attribute_register_custom_type, implement GTK2PERL_PANGO_ATTR_REGISTER_CUSTOM_TYPE and GTK2PERL_PANGO_ATTR_STORE_INDICES. * gtk2perl.h, maps_pango-1.0: Make our custom types for PangoAttribute and PangoAttrIterator known. * t/PangoAttributes.t, xs/PangoAttributes.xs: Implement and test all the attribute contructors, accessors, and support infrastructure. * t/GdkPango.t, xs/GdkPango.xs: Wrap and test gdk_pango_attr_stipple_new and gdk_pango_attr_embossed_new. * examples/attributes.pl: Demonstrate some of the attribute stuff. 2006-10-17 kaffeetisch * MANIFEST, ppport.h: Remove ppport.h, it's unused. 2006-10-03 kaffeetisch * pm/SimpleList.pm: Don't use =cut ... =cut comment blocks. They're invalid POD. * xs/GtkSelection.xs, xs/PangoTypes.xs: Don't clobber the Gtk2 and Gtk2::Pango man pages with POD. 2006-09-13 kaffeetisch * Makefile.PL (find_extra_libs): Also look for Cairo.lib to make linking work on win32. 2006-09-10 kaffeetisch * t/02.GtkContainer.t, t/GtkBin.t: Remove the noinit flag, since these tests apparently need an initialized gtk+ now. * t/GdkDnd.t: Turn the get_selection() TODO block into a SKIP block that gets skipped on Darwin. * t/GtkFileChooser.t: Update; mainly remove a few TODO blocks that aren't needed anymore. Still skip by default though. * t/GtkSocket-GtkPlug.t: Skip the whole test if there's no blib directory. 2006-09-04 kaffeetisch * Gtk2.pm, Makefile.PL, NEWS, README: Stable release 1.140. 2006-08-29 kaffeetisch * README: Add a bug reports section. 2006-08-27 kaffeetisch * t/GtkRc.t, xs/GtkRc.xs: Allow passing undef to Gtk2::RcStyle::name, bg_pixmap_name, and font_desc. (#352707) 2006-08-26 kaffeetisch * Makefile.PL: Add Cairo to the pre-requisite hash if appropriate so that EU::MM generates a correct META.yml. 2006-08-20 kaffeetisch * Gtk2.pm, Makefile.PL, NEWS, README: Unstable release 1.133. 2006-08-20 kaffeetisch * Makefile.PL, README: Require Cairo 0.92 (still only if gtk+ >= 2.8). * Gtk2.pm, README: Capitalize "perl" where it refers to the language. 2006-08-07 kaffeetisch * Gtk2.pm, Makefile.PL, NEWS, README: Unstable release 1.132. 2006-08-07 kaffeetisch * gtk2perl.h, t/GdkCairo.t, t/GdkDisplay.t, t/GdkPixmap.t, t/GdkScreen.t, t/GdkWindow.t, t/GtkAction.t, t/GtkAssistant.t, t/GtkButton.t, t/GtkCellRendererAccel.t, t/GtkCellRendererSpin.t, t/GtkClipboard.t, t/GtkComboBox.t, t/GtkDnd.t, t/GtkEntry.t, t/GtkFileChooserButton.t, t/GtkLabel.t, t/GtkLinkButton.t, t/GtkMessageDialog.t, t/GtkNotebook.t, t/GtkPageSetup.t, t/GtkPaperSize.t, t/GtkPrintContext.t, t/GtkPrintOperation.t, t/GtkPrintOperationPreview.t, t/GtkPrintSettings.t, t/GtkRadioAction.t, t/GtkRange.t, t/GtkScrolledWindow.t, t/GtkSelection.t, t/GtkSizeGroup.t, t/GtkStatusIcon.t, t/GtkStyle.t, t/GtkTextBuffer.t, t/GtkTextBufferRichText.t, t/GtkTreeStore.t, t/GtkTreeView.t, t/GtkWidget.t, t/PangoCairo.t, t/PangoFont.t, xs/GdkCairo.xs, xs/GdkDisplay.xs, xs/GdkPixmap.xs, xs/GdkScreen.xs, xs/GdkWindow.xs, xs/GtkAction.xs, xs/GtkClipboard.xs, xs/GtkComboBox.xs, xs/GtkDnd.xs, xs/GtkEntry.xs, xs/GtkFileChooserButton.xs, xs/GtkMessageDialog.xs, xs/GtkNotebook.xs, xs/GtkRadioAction.xs, xs/GtkRange.xs, xs/GtkScrolledWindow.xs, xs/GtkSelection.xs, xs/GtkSizeGroup.xs, xs/GtkStatusIcon.xs, xs/GtkStyle.xs, xs/GtkTextBuffer.xs, xs/GtkTreeModelFilter.xs, xs/GtkTreeStore.xs, xs/GtkTreeView.xs, xs/GtkWidget.xs, xs/GtkWindow.xs, xs/PangoCairo.xs, xs/PangoFont.xs: Change version checks to refer to stable releases only. * t/01.GtkWindow.t, t/GdkPixbuf.t: Make a few tests a bit more robust. * t/GdkDnd.t: Test Gtk2::Gdk::DragContext::status with an empty action argument. * t/GtkTreeView-Dnd.t: Fix typo. * xs/GtkAccelLabel.xs: Update TODO comment. * xs/GtkColorSelection.xs: Add TODO comment about gtk_color_selection_set_change_palette_with_screen_hook. * xs/GtkCurve.xs: Remove an invalid TODO comment. 2006-07-27 kaffeetisch * AUTHORS, pm/TestHelper.pm: Patch from Grant McLean makes sure that strict and warnings are actually forced upon users. * t/GtkAction.t, t/GtkEntryCompletion.t, t/GtkListStore.t, t/GtkRadioAction.t: Fix the issues the patch uncovered. 2006-07-14 kaffeetisch * Gtk2.pm, MANIFEST, Makefile.PL, NEWS, README: Unstable release 1.131. 2006-07-13 kaffeetisch * t/GtkRecentChooser.t: Don't try to test gtk_recent_chooser_[sg]et_show_numbers; they're not wrapped. * t/PangoFont.t, xs/PangoFont.xs: Bind and test pango_font_get_font_map. 2006-07-11 Emmanuele Bassi Many fixes and test suite additions from kaffee. * gtk2perl-private.h: Add private functions: gtk2perl_sv_to_strv() gtk2perl_sv_from_strv() for converting a scalar to and from a string vector. * xs/GtkRecentFilter.xs: * xs/GtkRecentManager.xs: ... and use them. * xs/GtkRecentChooser.xs: * xs/GtkRecentManager.xs: Use newSVGtkRecentInfo_own instead of manually unreffing the recent info object. * xs/GtkRecentChooserDialog.xs: Use the right property name inside the constructor. * maps-2.10: GtkRecentFilterFlags is - quite obviously - a GFlags type. * t/GtkRecentChooser.t: * t/GtkRecentChooserDialog.t: * t/GtkRecentChooserMenu.t: * t/GtkRecentChooserWidget.t: * t/GtkRecentFilter.t: Test suite for the GtkRecent widgets. * t/GtkRecentManager.t: Add more tests. 2006-07-07 kaffeetisch * t/GtkAccelGroup.t: Fix the fix by only demanding that Gtk2::Accelerator::get_label return something defined. Emmanuele's commit caused failures here. * t/GtkItemFactory.t, t/GtkMenu.t: Make more robust. * t/GtkStatusIcon.t: Use the default icon theme object to actually have a chance of running the new_from_file test. 2006-07-05 Emmanuele Bassi * t/GtkRecentManager.t: Even more tests for Gtk2::RecentManager and Gtk2::RecentInfo; use a custom test file for storing the list used by the recent manager in order not to taint the user's recent files list. 2006-07-05 Emmanuele Bassi * t/GtkRecentManager.t: Add more tests for Gtk2::RecentInfo API. 2006-07-05 Emmanuele Bassi A t/GtkRecentManager.t * t/GtkAccelGroup.t: Fix the name of the symbolic constant of KP_Enter, and make the test not fail. * t/GtkRecentManager.t: Initial test suite for Gtk2::RecentManager and Gtk2::RecentInfo. * copyright.pod: Update copyright. * xs/GtkRecentManager.xs: Add a PACKAGE for Gtk2::RecentInfo; add missing aliased methods; fix apidoc; use EXTEND when the size of the returned array is known. 2006-07-04 Emmanuele Bassi * MANIFEST: Add new xs/GtkRecent*.xs files. * xs/GtkRecentChooser.xs: Miscellaneous fixes from kaffee. (gtk_recent_chooser_set_sort_func): Imply undef as default data for the sorting function. (gtk_recent_chooser_get_uris): EXTEND the stack with the right size of elements and return an empty array in case there are no URIs. * xs/GtkRecentManager.xs: Miscellaneous fixes from kaffee. (gtk_recent_info_get_application_info): Return an empty array on error. * xs/GtkIconTheme.xs: * xs/GtkRecentManager.xs: Do not leak the returned pixbufs. 2006/07/03 kaffeetisch * t/GtkDnd.t: Make more robust. 2006-07-02 Emmanuele Bassi * maps-2.10: Include GTK_TYPE_RECENT_FILTER_FLAGS to the list of known types. * xs/GtkRecentFilter.xs: Add string fields to the GtkRecentFilterInfo converter. * xs/GtkRecentManager.xs: Implement the Gtk2::RecentInfo boxed type and its API. 2006-07-02 Emmanuele Bassi * xs/GtkRecentFilter.xs: Initial implementation of the Gtk2::RecentFilter object. 2006-07-02 Emmanuele Bassi A xs/GtkRecentChooser.xs A xs/GtkRecentChooserDialog.xs A xs/GtkRecentChooserMenu.xs A xs/GtkRecentChooserWidget.xs A xs/GtkRecentFilter.xs A xs/GtkRecentManager.xs * maps-2.10: * xs_files-2.10: * xs/GtkRecent*.xs: Add initial support for GtkRecent; wrap methods for these objects: Gtk2::RecentChooser Gtk2::RecentChooserDialog Gtk2::RecentChooserMenu Gtk2::RecentChooserWidget Gtk2::RecentManager 2006/07/02 kaffeetisch * t/GtkAssistant.t, t/GtkLinkButton.t, t/GtkRadioAction.t, t/GtkTextBufferRichText.t: Skip some tests if gtk+ < 2.10. * t/GtkClipboard.t: Correct skip count. 2006/06/25 kaffeetisch * t/GtkSizeGroup.t: Don't assume that Gtk2::SizeGroup::add_widget takes a reference on the widget. Fixes a test failure. * t/GtkLabel.t, xs/GtkLabel.xs: Bind and test gtk_label_set_line_wrap_mode and gtk_label_get_line_wrap_mode. 2006/06/24 kaffeetisch * t/GtkTextBuffer.t: Test the copy-target-list and paste-target-list properties. * gtk2perl.h, xs/GtkSelection.xs: Fix the GtkTargetList wrappers again to be fully backwards-compatible *and* use the boxed type if available. This involves using a custom wrap function that always assumes ownership of the boxed object, just like the old wrapper does. Code that uses the GtkTargetList typemaps should continue to work without changes. 2006/06/20 kaffeetisch * MANIFEST, maps-2.10, xs_files-2.10, t/GtkPageSetup.t, t/GtkPaperSize.t, t/GtkPrintContext.t, t/GtkPrintOperation.t, t/GtkPrintOperationPreview.t, t/GtkPrintSettings.t, xs/GtkPageSetup.xs, xs/GtkPaperSize.xs, xs/GtkPrintContext.xs, xs/GtkPrintOperation.xs, xs/GtkPrintOperationPreview.xs, xs/GtkPrintSettings.xs: Add support for the new printing API: GtkPageSetup, GtkPaperSize, GtkPrintContext, GtkPrintOperation, GtkPrintOperationPreview, GtkPrintSettings. 2006/06/19 kaffeetisch * Makefile.PL, xs_files-2.8: If gtk+ 2.8 or newer is used, require (the Perl module) Cairo 0.04. 2006/06/18 kaffeetisch * t/GtkTreeModelFilter.t, xs/GtkTreeModelFilter.xs: gtk_tree_model_filter_convert_child_iter_to_iter now has a bool return value, and gtk_tree_model_filter_convert_child_path_to_path and gtk_tree_model_filter_convert_path_to_child_path can now return NULL. Alter the wrappers accordingly. * t/PangoCairo.t, xs/PangoCairo.xs: Bind and test pango_cairo_show_error_underline, pango_cairo_error_underline_path. * t/PangoFont.t, xs/PangoFont.xs: Bind and test pango_font_describe_with_absolute_size. Also plug some leaks. 2006/06/16 kaffeetisch * t/GtkNotebook.t, xs/GtkNotebook.xs: Use an API improvement in gtk+ 2.9.2. * map-2.10, t/GtkTreeView.t, xs/GtkTreeView.xs: Bind and test gtk_tree_view_set_rubber_banding, gtk_tree_view_get_rubber_banding, gtk_tree_view_get_grid_lines, gtk_tree_view_set_grid_lines, gtk_tree_view_get_enable_tree_lines, gtk_tree_view_set_enable_tree_lines. 2006/06/05 kaffeetisch * t/GtkButton.t, xs/GtkButton.xs: Wrap gtk_button_set_image_position and gtk_button_get_image_position. * t/GtkMessageDialog.t, xs/GtkMessageDialog.xs: Wrap gtk_message_dialog_set_image. * t/GtkStatusIcon.t, xs/GtkStatusIcon.xs: Wrap gtk_status_icon_get_geometry. 2006/05/25 muppetman * t/GtkWidget.t, xs/GtkWidget.xs: Allow undef for the modify_foo methods. #342891 2006/05/20 kaffeetisch Another successful gtk2-perl tag team coup: * t/GtkHButtonBox.t, t/GtkVButtonBox.t: Test [gs]et_layout_default, [gs]et_spacing_default. * xs/GdkEvent.xs: Remove an unneeded call to gperl_set_isa. * t/GtkAction.t, xs/GtkAction.xs: Bind and test gtk_widget_get_action. * MANIFEST, maps-2.10, xs_files-2.10, t/GtkCellRendererSpin.t, xs/GtkCellRendererSpin.xs: Add support for GtkCellRendererSpin. * t/GtkClipboard.t, xs/GtkClipboard.xs: Bind and test gtk_clipboard_request_rich_text, gtk_clipboard_wait_for_rich_text, gtk_clipboard_wait_is_rich_text_available. * t/GtkComboBox.t, xs/GtkComboBox.xs: Bind and test gtk_combo_box_set_title, gtk_combo_box_get_title. * t/GtkDnd.t, xs/GtkDnd.xs: Bind and test gtk_drag_dest_set_track_motion, gtk_drag_dest_get_track_motion. * t/GtkEntry.t, xs/GtkEntry.xs: Bind and test gtk_entry_set_inner_border, gtk_entry_get_inner_border and the new boxed wrapper for GtkBorder they made necessary. * t/GtkFileChooserButton.t, xs/GtkFileChooserButton.xs: Bind and test gtk_file_chooser_button_set_focus_on_click, gtk_file_chooser_button_get_focus_on_click. * t/GtkNotebook.t, xs/GtkNotebook.xs: Bind and test gtk_notebook_set_window_creation_hook, gtk_notebook_set_group_id, gtk_notebook_get_group_id, gtk_notebook_set_tab_reorderable, gtk_notebook_get_tab_reorderable, gtk_notebook_set_tab_detachable, gtk_notebook_get_tab_detachable. * t/GtkRadioAction.t, xs/GtkRadioAction.xs: Bind and test gtk_radio_action_set_current_value. * maps-2.10, t/GtkRange.t, xs/GtkRange.xs: Bind and test gtk_range_get_lower_stepper_sensitivity, gtk_range_set_lower_stepper_sensitivity, gtk_range_get_upper_stepper_sensitivity, gtk_range_set_upper_stepper_sensitivity. * t/GtkScrolledWindow.t, xs/GtkScrolledWindow.xs: Bind and test gtk_scrolled_window_unset_placement. * gtk2perl.h, maps-2.10, xs/GtkSelection.xs: If available, use the boxed wrapper for GtkTargetList. * t/GtkSelection.t, t/GtkClipboard.t, xs/GtkSelection.xs: Bind and test gtk_target_list_add_rich_text_targets, gtk_targets_include_text, gtk_targets_include_uri, gtk_targets_include_rich_text, gtk_targets_include_image, gtk_selection_data_targets_include_rich_text, gtk_selection_data_targets_include_uri. * t/GtkSizeGroup.t, xs/GtkSizeGroup.xs: Bind and test gtk_size_group_get_widgets. * t/GtkStatusIcon.t, xs/GtkStatusIcon.xs: Bind and test gtk_status_icon_position_menu. * t/GtkStyle.t, xs/GtkStyle.xs: Bind and test gtk_style_lookup_color. * t/GtkTextBuffer.t, xs/GtkTextBuffer.xs: Bind and test gtk_text_buffer_get_has_selection, gtk_text_buffer_get_copy_target_list, gtk_text_buffer_get_paste_target_list. * t/GtkTreeStore.t, xs/GtkTreeStore.xs: Bind and test gtk_tree_store_insert_with_values. * t/GtkTreeView.t, xs/GtkTreeView.xs: Bind and test gtk_tree_view_get_headers_clickable, gtk_tree_view_set_search_entry, gtk_tree_view_get_search_entry, gtk_tree_view_set_search_position_func. * t/GtkWidget.t, xs/GtkWidget.xs: Bind and test gtk_widget_input_shape_combine_mask. * t/01.GtkWindow.t, xs/GtkWindow.xs: Bind and test gtk_window_set_deletable, gtk_window_get_deletable, gtk_window_get_group. 2006/05/15 kaffeetisch * Gtk2.pm, Makefile.PL, NEWS, README: Unstable release 1.130. 2006/05/14 kaffeetisch * t/00.Gtk2.t: Fix test failure caused by the warning about a missing theme engine. Reported by Sergei Steshenko in #341688. 2006/05/13 kaffeetisch The gtk2-perl tag team strikes again. * MANIFEST, xs_files-2.10, t/GtkTextBufferRichText.t, xs/GtkTextBufferRichText.xs: Add support for GtkTextBufferRichText. * t/GdkCairo.t, t/GdkScreen.t, xs/GdkCairo.xs: Bind and test gdk_cairo_set_source_pixmap, gdk_screen_get_font_options, and gdk_screen_set_font_options. * t/GdkDisplay.t, xs/GdkDisplay.xs: Bind and test gdk_display_supports_shapes and gdk_display_supports_input_shapes. * t/GdkPixmap.t, xs/GdkPixmap.xs: Bind and test gdk_pixmap_foreign_new_for_screen. * t/GdkScreen.t, xs/GdkScreen.xs: Bind and test gdk_screen_set_resolution, gdk_screen_get_resolution, gdk_screen_get_active_window, gdk_screen_get_window_stack, and gdk_screen_is_composited. * t/GdkWindow.t, xs/GdkWindow.xs: Bind and test gdk_window_get_type_hint, gdk_window_input_shape_combine_mask, gdk_window_input_shape_combine_region, gdk_window_set_child_input_shapes, and gdk_window_merge_child_input_shapes. * t/GdkCairo.t, t/PangoCairo.t: Make the check for Cairo's presence more robust. * t/GdkCursor.t: Fail gracefully if the "watch" cursor can't be found. * Makefile.PL: Bump up the (optionally) required Cairo version to 0.03 for recent typemap improvements. Only compile gdk's and pango's cairo glue if gtk+ >= 2.8.x. 2006/04/28 kaffeetisch * MANIFEST, maps-2.10, xs_files-2.10, t/GtkCellRendererAccel.t, xs/GtkCellRendererAccel.xs: Patch from muppet adds support for GtkCellRendererAccel. 2006/04/25 kaffeetisch * MANIFEST, maps-2.10, xs_files-2.10, examples/linkbutton.pl, t/GtkLinkButton.t, xs/GtkLinkButton.xs: Patch from muppet adds support for GtkLinkButton. 2006/04/23 kaffeetisch * MANIFEST, maps-2.10, xs_files-2.10, examples/assistant.pl, t/GtkAssistant.t, xs/GtkAssistant.xs: Patch from muppet adds support for GtkAssistant. 2006/04/23 kaffeetisch * t/GtkCellLayout.t, t/GtkExpander.t, t/GtkMenuItem.t, t/GtkRadioButton.t, t/GtkRadioToolButton.t, t/GtkScrolledWindow.t, t/GtkToggleButton.t: Remove the noinit flag from some tests that now apparently need an initialized gtk+. 2006/04/23 kaffeetisch * MANIFEST, maps-2.10, xs_files-2.10, t/GtkStatusIcon.t, xs/GtkStatusIcon.xs: The gtk2-perl tag team, muppet and me, adds support for GtkStatusIcon. 2006/04/08 kaffeetisch * Gtk2.pm, NEWS, README: Stable release 1.121. 2006/03/38 muppetman * t/Gdk.t: Don't call Gtk2::Gdk::Threads::init on a non-threading perl. 2006/03/12 kaffeetisch * Gtk2.pm, Makefile.PL, NEWS, README: Stable release 1.120. 2006/02/13 kaffeetisch * Gtk2.pm, Makefile.PL, NEWS, README: Unstable release 1.116. 2006/02/05 04:26 pcg * xs/GdkRegion.xs: Fix access after free() in get_rectangles. 2006/02/02 muppetman * xs/GtkWidget.xs: Silly logic error in _INSTALL_OVERRIDES caused confusing but harmless warnings about set-scroll-adjustments signals. Need to test the instance type of the signal separately from the correctness of the signature. 2006/01/30 kaffeetisch * Makefile.PL: Check for gtk+ >= 2.8.0 before adding GdkCairo.xs and PangoCairo.xs to the build. * Gtk2.pm, Makefile.PL, NEWS, README: Unstable release 1.115. 2006/01/29 muppetman * MANIFEST, t/set-scroll-adjustments-signal.t, xs/GtkWidget.xs: In perl-derived Gtk2::Widgets, recognize signals named "set-scroll-adjustments" as special, and set their signal ids into GtkWidgetClass::set_scroll_adjustments_signal. This makes it possible to implement natively-scrollable widgets in perl. This approach assumes the name name of the signal instead of following the completely generic approach taken by gtk+. The idea is to hide some of the hackishness of the rather clunky, pre-GInterface scheme from perl developers. 2006/01/24 kaffeetisch * maps-2.0, maps-2.4: Register GtkCellEditable, GtkTreeModel, GtkTreeSortable and GtkFileChooser as GInterfaces since that's what they are. * xs/GtkTreeModelSort.xs: Make the xsubs for gtk_tree_model_sort_new_with_model and gtk_tree_model_sort_new return GtkTreeModelSorts instead of GtkTreeModels. The latter is an interface and therefore abstract. * t/GtkCellView.t: Remove redundant isa_ok test. 2006/01/22 muppetman * xs/GtkWidget.xs: Allow undef for the adjustment parameters of gtk_widget_set_scroll_adjustments(). 2006/01/18 kaffeetisch * t/GtkCellView.t, t/GtkComboBox.t, t/GtkComboBoxEntry.t, t/GtkEntry.t, t/GtkEntryCompletion.t, t/GtkFileChooserButton.t, t/GtkFileChooserDialog.t, t/GtkFileChooserWidget.t, t/GtkIconView.t, t/GtkListStore.t, t/GtkSpinButton.t, t/GtkTreeModelFilter.t, t/GtkTreeModelSort.t, t/GtkTreeStore.t, t/GtkTreeView.t: Use ginterfaces_ok on objects that implement interfaces. * gtk2perl.h, xs/.cvsignore: Remove atk stuff. * t/GtkProgressBar.t, xs/GtkProgressBar.xs: Remove now unneeded call to gperl_set_isa. To be on the safe side, test that Gtk2::ProgressBar inherits from Gtk2::Widget. 2006/01/16 kaffeetisch * Gtk2.pm, Makefile.PL, NEWS, README: Unstable release 1.114. 2006/01/16 kaffeetisch * MANIFEST, maps-2.0, xs_files-2.0, t/AtkAction.t, t/AtkComponent.t, t/AtkImage.t, t/AtkImplementor.t, t/AtkObject.t, t/AtkSelection.t, xs/AtkAction.xs, xs/AtkComponent.xs, xs/AtkDocument.xs, xs/AtkEditableText.xs, xs/AtkHyperlink.xs, xs/AtkHypertext.xs, xs/AtkImage.xs, xs/AtkImplementor.xs, xs/AtkObject.xs, xs/AtkSelection.xs, xs/AtkStreamableContent.xs, xs/AtkTable.xs, xs/AtkText.xs, xs/AtkValue.xs: Remove the atk support again. It was virtually untested and most probably unusable. We can't have that kind of code in an API-stable release. If you did use the atk stuff, let us know. * xs/GtkObject.xs: Remove the GInitiallyUnowned hack again. Glib 1.114 fixes the underlying problem. 2006/01/16 kaffeetisch * t/GdkScreen.t: Use skip() instead of two ok(1)'s. * t/GtkBin.t: Add a test for the "child" accessor. * t/GtkFileChooser.t: Redo slightly to make more robust, but still mark as "skip_all" since it's still too fragile. * t/GtkRc.t: Use isa() instead of ref() to test for inheritance. 2006/01/14 muppetman * xs/GdkPixbuf.xs, t/GdkPixbuf.t: Bind and test gdk_pixbuf_save_to_buffer. 2006/01/01 kaffeetisch * Gtk2.pm, Makefile.PL, NEWS, README: Unstable release 1.113. 2006/01/01 kaffeetisch * t/GtkFileChooser.t: Don't use the same shortcut path twice. * xs/GtkObject.xs: Manually force Gtk2::Object to be a descendant of Glib::Object to work around the GInitiallyUnowned issue. 2005/12/18 muppetman * xs/GtkTreeModelSort.xs, t/GtkTreeModelSort.t: add new() as an alias for new_with_model(). Previously, new() fell back to Glib::Object::new(), which would allow creation of invalid objects, resulting in several very hard-to-debug bug reports. The change is a little convoluted because we still allow the valid syntax of Glib::Object::new for compatibility. Tests included. * MANIFEST, examples/table_packing.pl: add new example. 2005/12/12 kaffeetisch * Gtk2.pm, Makefile.PL, NEWS, README: Unstable release 1.112. 2005/12/12 kaffeetisch * t/PangoFont.t: Fix a potential test issue. 2005/11/14 kaffeetisch * Gtk2.pm, Makefile.PL, NEWS, README: Unstable release 1.111. 2005/11/14 kaffeetisch * t/GtkComboBoxEntry.t: Skip the @ISA test for Gtk2::CellEditable on anything older than 2.8.0. * xs/GtkHyperlink.xs: Only compile support for atk_hyperlink_is_inline if it's available. * xs/GdkCairo.xs, xs/PangoCairo.xs: Hush warnings about unused variables. 2005/11/13 muppetman * pm/TestHelper.pm: Add ginterfaces_ok(), a helper for testing interface implementation on GObjects. * xs/GdkEvent.xs: Don't croak() when trying to marshal unknown event types to perl. You can get an unknown event type when running with a newer gtk+ than that for which the bindings were compiled; since this marshaling typically occurs during the process of invoking a signal handler (e.g. event or event-after), a croak() here can result in C stack corruption and eventually a crash. Instead, warn() about it, and limp along with the generic Gtk2::Gdk::Event type. Also, alias Gtk2::Gdk::Event::GrabBroken::DESTROY to prevent leaks. * xs/GdkEvent.xs, t/GdkEvent.t: Allow undef to gdk_event_get_time. Documentation updates. 2005/11/12 kaffeetisch * t/01.GtkWindow.t, t/GtkCellRenderer.t, t/GtkFileChooser.t, t/GtkIconView.t, t/GtkListStore.t, t/GtkNotebook.t, t/GtkSimpleList.t, t/GtkTreeView.t: Add the "sub" keyword to all blocks in run_main invocations to make older perl's happy. * xs/AtkHyperlink.xs: Only compile support for atk_hyperlink_is_selected_link if it's available. * xs/GdkColor.xs (gdk_color_new): Change the type of the arguments to guint16 to hush signedness warnings. 2005/11/01 rwmcfa1 * t/GdkCairo.t: don't do Gtk -init, with no display (RPM build or otherwise) will break. remove -init added Gtk2->init_check to ok to go check 2005/10/18 kaffeetisch * Gtk2.pm, MANIFEST, Makefile.PL, NEWS, README: Unstable release 1.110. 2005/10/18 kaffeetisch * xs/GtkClipboard.xs, xs/GtkToolbar.xs: Fix a signedness and a no-comma-after-last-enum-value warning. 2005/10/15 kaffeetisch * t/GdkX11.t, xs/GdkX11.xs: Patch from Marc Lehmann adds gdk_x11_screen_supports_net_wm_hint and gdk_net_wm_supports. Also bind gdk_x11_get_server_time, gdk_x11_grab_server, gdk_x11_ungrab_server, gdk_x11_get_default_screen, gdk_x11_register_standard_event_type, gdk_x11_window_move_to_current_desktop, gdk_x11_screen_get_screen_number, gdk_x11_screen_get_window_manager_name and gdk_x11_screen_supports_net_wm_hint while we're at it. 2005/10/13 muppetman * MANIFEST: update with missing entries. * pm/SimpleList.pm, pm/SimpleMenu.pm: add deprecation notices. * xs/GdkPixbufSimpleAnim.xs, t/GdkPixbufSimpleAnim.t, xs_files-2.8, maps-2.8, MANIFEST: Bind and test GdkPixbufSimpleAnim. 2005/10/10 kaffeetisch Patch from Marc Lehmann: * t/GdkGC.t, xs/GdkGC.xs: Allow undef for the argument of Gtk2::Gdk::GC::set_clip_mask, set_clip_rectangle, and set_clip_region. * xs/GdkPixbuf.xs: Don't leak the return value of gdk_pixbuf_composite_color_simple. 2005/10/05 kaffeetisch Merge from stable-1-10: * NEWS: Add the 1.101 release notes. * t/01.GtkWindow.t, t/GdkEvent.t, t/GdkWindow.t, t/GtkAccelGroupt.t, t/GtkAccelMap.t, t/GtkStock.t, t/GtkTreeModelIface.t, t/GtkWidget.t: Change the flags tests yet again. Make them explicit this time by using is_deeply() and \@{}, '>=' or 'eq' so it hopefully works with any version of Test::More. * t/GtkFileChooser.t: Patch from Scott Lanning fixes a test problem. 2005/09/30 kaffeetisch * t/GtkFileChooser.t: Add yet another TODO for a new failure that surfaced recently. Wrap some stuff from gtk+ 2.8 that we missed: * t/GtkAboutDialog.t, xs/GtkAboutDialog.xs: Bind and test gtk_about_dialog_get_wrap_license, gtk_about_dialog_set_wrap_license. * t/GtkDnd.t, xs/GtkDnd.xs: Bind and test gtk_drag_set_icon_name. 2005/09/30 kaffeetisch Make gdk's and pango's cairo glue available if the Perl module Cairo is installed: * Gtk2.pm, Makefile.PL: Optionally depend on Cairo. * maps_pango-1.10: Add PANGO_TYPE_CAIRO_FONT_MAP. * t/GdkCairo.t, xs/GdkCairo.xs: Bind and test gdk_cairo_create, gdk_cairo_set_source_color, gdk_cairo_set_source_pixbuf, gdk_cairo_rectangle, gdk_cairo_region. * t/PangoCairo.t, xs/PangoCairo.xs: Bind and test pango_cairo_font_map_new, pango_cairo_font_map_set_resolution, pango_cairo_font_map_get_resolution, pango_cairo_font_map_create_context, pango_cairo_update_context, pango_cairo_create_layout, pango_cairo_update_layout, pango_cairo_show_glyph_string, pango_cairo_show_layout, pango_cairo_glyph_string_path, pango_cairo_layout_path, pango_cairo_context_set_font_options, pango_cairo_context_get_font_options, pango_cairo_context_set_resolution, pango_cairo_context_get_resolution. * examples/cairo-rendering.pl: Add a small cairo example. 2005/09/30 kaffeetisch Wrap a big chunk of the atk API: * gtk2perl.h: Include atk.h and atk-enum-types.h. * Makefile.PL, maps-2.0, xs_files-2.0: Add some necessary infrastructure stuff. * t/AtkAction.t, t/AtkComponent.t, t/AtkImage.t, t/AtkImplementor.t, t/AtkObject.t, t/AtkSelection.t, xs/AtkAction.xs, xs/AtkComponent.xs, xs/AtkDocument.xs, xs/AtkEditableText.xs, xs/AtkHyperlink.xs, xs/AtkHypertext.xs, xs/AtkImage.xs, xs/AtkImplementor.xs, xs/AtkObject.xs, xs/AtkSelection.xs, xs/AtkStreamableContent.xs, xs/AtkTable.xs, xs/AtkText.xs, xs/AtkValue.xs: Initial wrappers and (mostly non-functional) tests. 2005/09/30 kaffeetisch * xs/GtkCellView.xs, xs/GtkComboBox.xs, xs/GtkComboBoxEntry.xs, xs/GtkEntryCompletion.xs, xs/GtkListStore.xs, xs/GtkSpinButton.xs, xs/GtkTreeModelFilter.xs, xs/GtkTreeModelSort.xs, xs/GtkTreeStore.xs, xs/GtkTreeViewColumn.xs: Take advantage of Glib's new automatic interface registration code and remove all unneeded gperl_set_isa calls. * t/GtkComboBox.t, t/GtkEntry.t, t/GtkEntryCompletion.t, t/GtkIconView.t, t/GtkListStore.t, t/GtkTreeModelFilter.t, t/GtkTreeModelSort.t, t/GtkTreeStore.t, t/GtkTreeView.t: Add missing isa_ok tests that check if all implemented interfaces show up in the ancestry. 2005/09/18 kaffeetisch * t/GtkComboBox.t, xs/GtkComboBox.xs: Only add Gtk2::CellEditable to @Gtk2::ComboBox::ISA if we're on gtk+ >= 2.6. * Gtk2/t/GtkHScale.t, Gtk2/t/GtkMenuToolButton.t, Gtk2/t/GtkRange.t, t/GtkVScale.t: Remove noinit => 1 to fix test failures. * t/GtkFileChooser.t: Turn the one skip_all into various TODOs. * Gtk2/t/01.GtkWindow.t, Gtk2/t/GdkCursor.t, Gtk2/t/GdkDisplay.t, Gtk2/t/GdkEvent.t, Gtk2/t/GdkScreen.t, Gtk2/t/GdkWindow.t, Gtk2/t/GdkX11.t, Gtk2/t/GtkDialog.t, Gtk2/t/GtkDnd.t, Gtk2/t/GtkEntryCompletion.t, t/GtkFileChooser.t, Gtk2/t/GtkIconView.t, Gtk2/t/GtkImage.t, Gtk2/t/GtkMenuBar.t, Gtk2/t/GtkMenuShell.t, Gtk2/t/GtkScrolledWindow.t, Gtk2/t/GtkSizeGroup.t, Gtk2/t/GtkStock.t, Gtk2/t/GtkTextIter.t, Gtk2/t/GtkToolButton.t, Gtk2/t/GtkTreeModel.t, Gtk2/t/GtkTreeView.t, Gtk2/xs/GdkCursor.xs, Gtk2/xs/GdkDisplay.xs, Gtk2/xs/GdkEvent.xs, Gtk2/xs/GdkScreen.xs, Gtk2/xs/GdkWindow.xs, Gtk2/xs/GdkX11.xs, Gtk2/xs/GtkDialog.xs, Gtk2/xs/GtkDnd.xs, Gtk2/xs/GtkEntryCompletion.xs, Gtk2/xs/GtkFileChooser.xs, Gtk2/xs/GtkIconView.xs, Gtk2/xs/GtkImage.xs, Gtk2/xs/GtkMenuBar.xs, Gtk2/xs/GtkMenuShell.xs, Gtk2/xs/GtkScrolledWindow.xs, Gtk2/xs/GtkSizeGroup.xs, Gtk2/xs/GtkStock.xs, Gtk2/xs/GtkTextIter.xs, Gtk2/xs/GtkToolButton.xs, Gtk2/xs/GtkTreeModel.xs, Gtk2/xs/GtkTreeView.xs, Gtk2/xs/GtkTreeViewColumn.xs, Gtk2/xs/GtkWindow.xs: Make all version checks refer to stable releases. 2005/09/06 muppetman * examples/cellrenderer_date.pl, AUTHORS: Modified patch from Daniel Kasak (dkasak at nusconsulting dot com dot au) ensures that the calendar popup never appears offscreen. * examples/cellrenderer_date.pl: Further modify the example to use size_request() instead of showing the window offscreen to get the allocation and then moving it onscreen. 2005/09/05 kaffeetisch * MANIFEST, META.yml: Remove META.yml. * doctypes: Add GdkPixbuf_noinc. * t/PangoRenderer.t: Remove draw_trapezoid test. * Gtk2.pm, Makefile.PL, README, NEWS: Stable release 1.100. 2005/07/31 muppetman * t/GtkTreeModel.t, t/GtkTreeView.t, xs/GtkFileChooser.xs, xs/GtkTreeModel.xs, xs/GtkTreeView.xs, xs/GtkTreeViewColumn.xs, AUTHORS: Patch from HE fixes up some bad version checks. Features added in gtk+ 2.7.3 were incorrectly marked as 2.7.0, breaking testing with 2.7.[0-2]. * xs/GtkSelection.xs: fix some pointer signedness warnings. 2005/07/27 kaffeetisch * Gtk2.pm, META.yml, Makefile.PL, NEWS, README: Unstable release 1.093. 2005/07/27 kaffeetisch * t/GdkPixbuf.t: Make get_image() more tolerant. * t/GtkAction.t: Correct skip message. * t/GtkIconTheme.t: Update copyright. * t/GtkIconView.t: Make the position test less fragile. * t/PangoRenderer.t: Wrap draw_trapezoid() inside a SKIP block till it gets fixed. 2005/07/26 muppetman * CodeGen.pm: Gtk2::CodeGen is now just a wrapper for Glib::CodeGen. 2005/07/21 muppetman * xs/GtkDialog.xs, AUTHORS: Patch from lonefox at welho dot com changes Gtk2::Dialog::set_alternative_button_order() to accept string constants as well as numeric response ids. * t/GtkDialog.t: Test response strings as well as numbers. 2005/07/19 kaffeetisch * pm/TestHelper.pm: Correct NAME section to read Gtk2::TestHelper instead of Gtk2::Test::Helper. * t/GtkFileChooser.t, xs/GtkFileChooser.xs: Bind gtk_file_chooser_[sg]et_do_overwrite_confirmation. * t/GtkTreeModel.t, xs/GtkTreeModel.xs: Bind and test gtk_tree_row_reference_get_model. * t/GtkTreeView.t, xs/GtkTreeView.xs: Bind and test gtk_tree_view_get_visible_range. * t/GtkTreeView.t, xs/GtkTreeViewColumn.xs: Bind and test gtk_tree_view_column_queue_resize. 2005/07/12 kaffeetisch * t/GdkPixbuf.t, t/GdkPixbufLoader.t: Expand two skip sections to include newer versions to account for some test failures. * Gtk2.pm, MANIFEST, META.yml, Makefile.PL, NEWS, README: Unstable release 1.092. 2005/07/12 kaffeetisch * t/GdkPixbuf.t, xs/GdkPixbuf.xs: Add Gtk2::Gdk::PixbufAnimation tests. Quell warnings about unregistered subclasses of GdkPixbufAnimationIter. * t/GdkPixbufLoader.t: New test from muppet. * Gtk2.exports, gtk2perl.h, xs/GdkPixbuf.xs, xs/GdkPixbufLoader.xs: Fix Gtk2::Gdk::PixbufLoader::new_with_type and new_with_mime_type so they can be called correctly. Bind gdk_pixbuf_loader_get_format and make the GdkPixbufFormat converters public. Patch from muppet. * xs/GtkTreeDnd.xs: Add support for GtkTreeDragSource and GtkTreeDragDest interfaces. Patch from muppet. * xs/PangoLayout.xs, xs/PangoScript.xs: Use crashers for the GBoxedCopyFunc of PangoLayoutIter and PangoScriptIter instead of the incorrect g_boxed_copy. 2005/07/10 kaffeetisch * gtk2perl-private.h, MANIFEST, xs/GtkComboBox.xs, xs/GtkActionGroup.xs: Add a private header for non-static, non-public stuff to get rid of the 'extern' declarations. * maps-2.8, MANIFEST: Add GtkPackDirection and GtkIconViewDropPosition support. * t/Gdk.t, t/GdkGC.t, t/GdkInput.t, t/GtkIconTheme.t, t/GtkLabel.t: Fix a few test suite issues. Add some tests. * t/GdkCursor.t, xs/GdkCursor.xs: Bind gdk_cursor_new_from_name, gdk_cursor_get_image. * t/GdkDisplay.t, xs/GdkDisplay.xs: Bind gdk_display_warp_pointer. * t/GdkEvent.t, xs/GdkEvent.xs: Add support for the grab-broken event. * t/GdkScreen.t, xs/GdkScreen.xs: Bind gdk_screen_get_rgba_colormap, gdk_screen_get_rgba_visual. * t/GdkWindow.t, xs/GdkWindow.xs: Bind gdk_window_set_urgency_hint, gdk_window_move_region. * t/GdkX11.t, xs/GdkX11.xs: Bind gdk_x11_display_set_cursor_theme, gdk_x11_display_get_user_time. * t/GtkDialog.t, xs/GtkDialog.xs: Bind gtk_dialog_get_response_for_widget. * t/GtkDnd.t, xs/GtkDnd.xs: Bind gtk_drag_source_set_icon_name. * t/GtkEntryCompletion.t, xs/GtkEntryCompletion.xs: Bind gtk_entry_completion_set_popup_set_width, gtk_entry_completion_get_popup_set_width, gtk_entry_completion_set_popup_single_match, gtk_entry_completion_get_popup_single_match. * t/GtkIconView.t, xs/GtkIconView.xs: Bind gtk_icon_view_get_cursor, gtk_icon_view_get_item_at_pos, gtk_icon_view_get_visible_range, gtk_icon_view_enable_model_drag_source, gtk_icon_view_enable_model_drag_dest, gtk_icon_view_unset_model_drag_source, gtk_icon_view_unset_model_drag_dest, gtk_icon_view_set_reorderable, gtk_icon_view_get_reorderable, gtk_icon_view_set_drag_dest_item, gtk_icon_view_get_drag_dest_item, gtk_icon_view_get_dest_item_at_pos, gtk_icon_view_create_drag_icon. * t/GtkImage.t, xs/GtkImage.xs: Bind gtk_image_clear. * t/GtkMenuBar.t, xs/GtkMenuBar.xs: Bind gtk_menu_bar_get_child_pack_direction, gtk_menu_bar_set_child_pack_direction, gtk_menu_bar_get_pack_direction, gtk_menu_bar_set_pack_direction. * t/GtkMenuShell.t, xs/GtkMenuShell.xs: Bind gtk_menu_shell_get_take_focus, gtk_menu_shell_set_take_focus. * t/GtkScrolledWindow.t, xs/GtkScrolledWindow.xs: Bind gtk_scrolled_window_get_hscrollbar, gtk_scrolled_window_get_vscrollbar. * t/GtkSizeGroup.t, xs/GtkSizeGroup.xs: Bind gtk_size_group_set_ignore_hidden, gtk_size_group_get_ignore_hidden. * t/GtkStock.t, xs/GtkStock.xs: Bind gtk_stock_set_translate_func. * t/GtkTextIter.t, xs/GtkTextIter.xs: Bind gtk_text_iter_forward_visible_line, gtk_text_iter_backward_visible_line, gtk_text_iter_forward_visible_lines, gtk_text_iter_backward_visible_lines. * t/GtkToolButton.t, xs/GtkToolButton.xs: Bind gtk_tool_button_set_icon_name, gtk_tool_button_get_icon_name. * t/01.GtkWindow.t, xs/GtkWindow.xs: Bind gtk_window_set_urgency_hint, gtk_window_get_urgency_hint, gtk_window_present_with_time. 2005/06/28 kaffeetisch * Gtk2.pm, t/GtkTreeModelIface.t, xs/GtkTreeSortable.xs: Make it possible for custom tree models to implement the GtkTreeSortable interface. Also add a FIXME comment about an incorrectly bound method. 2005/06/22 kaffeetisch * t/GtkAccelGroup.t, t/GtkAccelMap.t, t/GtkStock.t: Use is() instead of is_deeply() to test flags values since the latter was changed to always use the string version of overloaded objects in recent versions of Test::More, whereas the former seems to work correctly. Tested with Test::More 0.45 and 0.60. 2005/06/21 kaffeetisch * t/GtkWidget.t, xs/GtkWidget.xs: Turn Gtk2::Widget::window into a mutator. 2005/06/20 kaffeetisch * xs/GtkPaned.xs: Fix the child aliases to have unique ids to hush warnings from newer ExtUtils::ParseXS versions. 2005/06/20 kaffeetisch * t/GtkTreeView.t: Make sure we only enter the row separator callback once to make this test more robust. * xs/GdkPixbuf.xs: Escape ">" in the POD for gdk_pixbuf_format_set_disabled. 2005/06/16 muppetman * pm/SimpleList.pm: Don't trap the model in closures and signal handler data. This makes it possible to change the SimpleList's model without breaking editable renderers. This isn't a complete solution, but is cleaner even by itself. 2005/06/07 muppetman * xs/GnomeAboutDialog.xs: Actually store the instances created by Gtk2::show_about_dialog(), so that they can be reused. * xs/GtkComboBox.xs, xs/GtkComboBoxEntry.xs, xs/GtkDialog.xs, xs/GtkList.xs, xs/GtkListItem.xs, xs/GtkMessageDialog.xs: Add or beef up a few synopsis and description sections. 2005/06/06 kaffeetisch * Gtk2.pm, META.yml, Makefile.PL, NEWS, README: Unstable release 1.091. 2005/06/03 kaffeetisch * t/GtkFileChooserButton.t: Use "open" instead of "save" for the dialog since the button doesn't support "save". 2005/04/25 kaffeetisch * Gtk2.pm, Makefile.PL, META.yml, NEWS, README: Unstable release 1.090. 2005/04/25 kaffeetisch * CodeGen.pm: Add const typemaps for object types. * t/GtkFileChooser.t: Skip this test completely as it's failing. * t/GtkAccelMap.t, t/GtkAccelGroup.t, t/GtkStock.t: Remove some TODO block since the relevant Test::More bug has been fixed. * gdk.typemap, maps-2.6, t/GdkPixbuf.t, xs/GdkPixbuf.xs: Bind and test gdk_pixbuf_new_from_file_at_scale, gdk_pixbuf_rotate_simple, gdk_pixbuf_flip, gdk_pixbuf_get_file_info, the new GdkPixbufFormat members and gdk_pixbuf_format_set_disabled. * t/GtkDnd.t, xs/GtkDnd.xs, xs/GtkNotebook.xs: Merge from stable-1-08: Update copyright disclaimers. * xs/GtkRadioAction.xs, xs/GtkToggleAction.xs: Add synopsis sections that show and explain our custom constructors for these types. 2005/04/17 kaffeetisch * Gtk2.pm, META.yml, Makefile.PL, NEWS, README: Merge from stable-1-08. 2005/04/08 rmcfarla * xs/GtkNotebook.xs: added pod comments to functions that now return integers saying this is new as of Gtk2-Perl 1.080. 2005/04/07 kaffeetisch * xs/GdkDrawable.xs: Update a FIXME comment. * t/GtkAccelMap.t, xs/GtkAccelMap.xs: Bind and test gtk_accel_map_get, gtk_accel_map_lock_path, gtk_accel_map_unlock_path. * t/GtkAction.t, xs/GtkAction.xs: Bind and test gtk_action_get_accel_path. * t/GtkIconView.t, xs/GtkIconView.xs: Bind and test gtk_icon_view_set_columns, gtk_icon_view_get_columns, gtk_icon_view_set_item_width, gtk_icon_view_get_item_width, gtk_icon_view_set_spacing, gtk_icon_view_get_spacing, gtk_icon_view_set_row_spacing, gtk_icon_view_get_row_spacing, gtk_icon_view_set_column_spacing, gtk_icon_view_get_column_spacing, gtk_icon_view_set_margin, gtk_icon_view_get_margin. Also add a copyright disclaimer to GtkIconView.xs. * t/GtkPaned.t, xs/GtkPaned.xs: Add and test get_child1 and get_child2 aliases to the existing child1 and child2 accessors. 2005/04/04 muppetman * xs/GtkStyle.xs, t/GtkStyle.t: turn Gtk2::Style::bg_pixmap into a mutator. * xs/GtkDnd.xs, t/GtkDnd.t: allow undef for the mask parameter to gtk_drag_set_icon_pixmap(), with tests. 2005/04/02 muppetman A examples/draw_text.pl M MANIFEST Add a new example. 2005/04/02 kaffeetisch * MANIFEST, maps-2.4, maps-2.6, maps_pango-1.8, xs_files-2.0, xs_files-2.6, gtk-demo/main.pl, gtk-demo/rotated_text.pl, t/GdkPango.t, t/PangoRenderer.t, xs/GdkPango.xs, xs/PangoRenderer.xs: Add initial bindings and tests for PangoRenderer and GtkPango. Also add muppet's rotated text example. 2005/03/25 kaffeetisch * CodeGen.pm: Make the GEnum and GFlags converters cast their return values to the correct type to fix compilation when using a C++ compiler. 2005/03/07 kaffeetisch * Gtk2.pm, META.yml, Makefile.PL, NEWS, README: Stable release 1.080. 2005/03/07 kaffeetisch * t/GtkFileChooser.t: Temporarily mark a failing test as TODO. 2005/02/28 kaffeetisch * Gtk2.pm, META.yml, Makefile.PL, NEWS, README: Unstable release 1.074. 2005/02/28 kaffeetisch * t/GdkPixmap.t: Fix skip count for gtk+ versions older than 2.2. 2005/02/26 muppetman * xs/GtkNotebook.xs, t/GtkNotebook.t: The multiple definitions of some functions (in #if branches) confused the doc generation tools into creating multiple entries. Folded the #if into the individual xsubs. To make life easier for the caller, simply implement for ourselves the missing return values on older gtk+s. Tests included. * xs/GdkPixmap.xs, t/GdkPixmap.t: gdk_pixmap_create_from_xpm() returns NULL if the file is not found; catch this and return undef instead of crashing. With a test. Also allow undef and improve docs for a few parameters. 2005/02/26 kaffeetisch * t/GtkAccelGroup.t, t/GtkAccelMap.t, t/GtkStock.t: Mark tests as TODO that currently fail due to what appears to be a bug in Test::More. * t/PangoLayout.t: Test pango_layout_[sg]et_attributes. 2005/02/19 20:13 (+0100) pcg * xs/GdkProperty.xs: document data instead of length as result value. * xs/GtkNotebook.xs: insert functions return gint from 2.4 onwards. 2005/02/18 15:53 (+0100) kaffeetisch * xs/GtkMessageDialog.xs, xs/GtkObject.xs, xs/GtkWidget.xs: Don't include ppport.h, it's not necessary. 2005/02/16 23:30 (-0400) muppetman * pm/SimpleList.pm: Catch undef iters gotten from requests for non-existent entries. * gtk2perl.h, xs/GtkPlug.xs, xs/GtkSocket.xs: invert the sense of the tests around GtkPlug and GtkSocket; only include them on X11, since that's the only platform on which they are supported. 2005/02/10 22:30 (+0100) kaffeetisch * t/GtkBox.t, t/GtkNotebook.t: Use TRUE and FALSE instead of 1 and 0 or undef where appropriate. 2005/02/08 01:15 (-0400) muppetman * Gtk2.pm, NEWS, README, copyright.pod: unstable release 1.073 * Makefile.PL: require Glib 1.073 * MANIFEST: updated 2005/02/08 01:05 (-0400) muppetman * t/GtkComboBox.t: Fix gtk+ assertions by setting the combobox up properly. 2005/02/08 00:15 (-0400) muppetman * xs/GdkPixbuf.xs, t/GdkPixbuf.t: bind and test gdk_pixbuf_get_option * t/GtkAboutDialog.t, xs/GtkAboutDialog.xs: implement and test gtk_show_about_dialog * xs/GtkCellRenderer.xs, t/GtkCellRenderer.t: bind and test gtk_cell_renderer_stop_editing * xs/GtkIconView.xs, t/GtkIconView.t: bind and test gtk_icon_view_selected_foreach 2005/02/08 00:10 (-0400) muppetman * t/GtkComboBox.t: fix skip count. 2005/02/08 00:05 (-0400) muppetman M MANIFEST M xs_files-2.0 A t/PangoAttributes.t A xs/PangoAttributes.xs: Bind and test pango_parse_markup(). 2005/01/29 21:10 (-0400) muppetman * xs/GtkIconView.xs: remove out-of-date commentary * t/GdkEvent.t, t/GtkAccelGroup.t, t/GtkButton.t, t/GtkCellView.t, t/GtkComboBox.t, t/GtkEntry.t, t/GtkEntryCompletion.t, t/GtkFileChooser.t, t/GtkFileFilter.t, t/GtkIconTheme.t, t/GtkIconView.t, t/GtkImage.t, t/GtkTreeView.t, xs/GdkEvent.xs, xs/GtkAccelGroup.xs, xs/GtkButton.xs, xs/GtkComboBox.xs, xs/GtkEntry.xs, xs/GtkEntryCompletion.xs, xs/GtkFileChooser.xs, xs/GtkFileFilter.xs, xs/GtkIconTheme.xs, xs/GtkImage.xs, xs/GtkTreeView.xs: fix version tests to use stable 2.6.0 2005/01/29 01:40 (-0400) muppetman * xs/GtkAboutDialog.xs, t/GtkAboutDialog.t: extend the test suite to test the GStrv properties. use SvGChar, not SvPV_nolen, to make sure we get unicode text. 2005/01/19 07:52 (-0400) rwmcfa1 * t/GtkCellView.t, t/GtkComboBox.t, t/GtkComboBoxEntry.t, t/GtkSpinButton.t, t/GtkTreeModelSort.t, xs/GtkCellView.xs, xs/GtkComboBox.xs, xs/GtkComboBoxEntry.xs, xs/GtkFileChooserWidget.xs, xs/GtkSpinButton.xs, xs/GtkTreeModelFilter.xs, xs/GtkTreeModelSort.xs: added missing interfaces to isa's and test for them 2005/01/16 23:13 (-0400) muppetman * xs/GtkTreeModelFilter.xs, t/GtkTreeModelFilter.t: Make sure that $modelfilter->get resolves to Gtk2::TreeModel::get. (Committed the wrong changeset last night.) 2005/01/16 02:34 (-0400) muppetman * xs/GtkTreeModelFilter.xs, t/GtkTreeModelFilter.t: Set up @ISA to reflect the fact that GtkTreeModelFilter implements the GtkTreeModel and GtkTreeDragSource interfaces. Add isa_ok() tests to verify. * t/GtkTreeView.t: Change column type to hush gtk+ assertions. 2005/01/10 09:00 (-0400) muppetman * MANIFEST: add files that should've been there for 1.072. rel-1-07-2 retagged here. 2005/01/10 01:19 (-0400) muppetman * Gtk2.pm, META.yml, NEWS, README: Unstable release 1.072. * xs/GtkDialog.xs: Document Gtk2::alternative_dialog_button_order in Gtk2::main, to avoid creating a Gtk2.pod that conflicts with Gtk2.pm. * t/GtkLabel.t, t/GtkTextView.t: Correct skip counts. 2005/01/08 22:45 (-0400) muppetman * xs/GtkLabel.xs, t/GtkLabel.t: Bind and test gtk_label_[gs]et_single_line_mode gtk_label_[gs]et_max_width_chars * xs/GtkListStore.xs, t/GtkListStore.t: Bind and test gtk_list_store_insert_with_values * xs/GtkTextView.xs, t/GtkTextView.t: Bind and test gtk_text_view_get_iter_at_position * xs/GtkToolItem.xs, t/GtkToolItem.t: Bind and test gtk_tool_item_rebuild_menu 2005/01/08 22:30 (-0400) muppetman * xs/GtkActionGroup.xs, t/GtkActionGroup.t: enable and test translation of action groups. 2005/01/07 22:27 (+0200) kaffeetisch * examples/cellrenderer_date.pl, examples/cellrenderer_spinbutton.pl, examples/customrenderer.pl: Change package names to use custom prefixes, to avoid putting stuff in the Gtk2 namespace. * t/PangoFont.t, xs/PangoFont.xs: Bind and test pango_font_description_set_absolute_size and pango_font_description_get_size_is_absolute. * t/PangoLayout.t, xs/PangoLayout.xs: Bind and test pango_layout_get_font_description. 2005/01/05 23:24 (-0400) muppetman * pm/TestHelper.pm, t/00.Gtk2.t, t/01.GtkWindow.t, t/GtkCellRenderer.t, t/GtkFileChooser.t, t/GtkIconView.t, t/GtkListStore.t, t/GtkNotebook.t, t/GtkSimpleList.t, t/GtkTreeSelection.t, t/GtkTreeView.t: add, document, and use TestHelper functions run_main, ok_idle, and is_idle. 2005/01/05 23:16 (-0400) muppetman * xs/GtkItemFactory.xs: an important part of one of kaffee's last patchsets didn't make it in -- make gtk2perl_translate_func() and gtk2perl_translate_func_create() no longer static, so they can be used from GtkActionGroup.xs. 2005/01/02 17:44 (+0100) kaffeetisch * t/GdkRgb.t, xs/GdkRgb.xs: Bind and test gdk_rgb_colormap_ditherable. * t/GtkActionGroup.t, xs/GtkActionGroup.xs: Bind and test gtk_action_group_set_translation_domain, gtk_action_group_set_translate_func, and gtk_action_group_translate_string. * t/GtkDialog.t, xs/GtkDialog.xs: Bind and test gtk_alternative_dialog_button_order. * t/GtkClipboard.t, t/GtkSelection.t, xs/GtkClipboard.xs, xs/GtkSelection.xs: Bind and test gtk_clipboard_set_image, gtk_clipboard_wait_for_image, gtk_clipboard_wait_is_image_available, gtk_clipboard_request_image, gtk_clipboard_set_can_store, gtk_clipboard_store, gtk_clipboard_wait_is_target_available, gtk_target_list_add_text_targets, gtk_target_list_add_image_targets, gtk_target_list_add_uri_targets, gtk_selection_data_set_pixbuf, gtk_selection_data_get_pixbuf, gtk_selection_data_set_uris, gtk_selection_data_get_uris, and gtk_selection_data_targets_include_image. Modify the received funcs to free the callback directly after it was invoked. Add a FIXME comment and a test for the completely misbound gtk_selection_clear. * t/GtkFileChooser.t: Use idle callbacks to fix the test failures that occured after caching was implemented. * t/GtkMenu.t, xs/GtkMenu.xs: Bind and test gtk_menu_get_for_attach_widget. 2005/01/02 16:35 (+0100) kaffeetisch * CodeGen.pm: Add a _noinc_ornull variant to the typemaps for GObject's. * t/GdkDisplay.t, xs/GdkDisplay.xs: Bind and test gdk_display_supports_selection_notification, gdk_display_request_selection_notification, gdk_display_supports_clipboard_persistence, and gdk_display_store_clipboard. * t/GdkDnd.t, xs/GdkDnd.xs: Bind and test gdk_drag_drop_succeeded. * xs/GdkDrawable.xs: Add a comment about gdk_draw_trapezoids and why we don't bind it. * t/GdkWindow.t, xs/GdkWindow.xs: Bind and test gdk_window_enable_synchronized_configure, gdk_window_configure_finished, and gdk_window_set_focus_on_map. * t/GdkX11.t, xs/GdkX11.xs: Bind and test gdk_x11_window_set_user_time. * t/GtkAboutDialog.t, xs/GtkAboutDialog.xs: Add and test _ornull's where appropriate. * t/GtkAction.t, xs/GtkAction.xs: Bind and test gtk_action_set_sensitive and gtk_action_set_visible. * xs/GtkCellView.xs: Remove the now unused init_property_value(). * t/GtkDnd.t, xs/GtkDnd.xs: Bind and test gtk_drag_dest_add_text_targets, gtk_drag_dest_add_image_targets, gtk_drag_dest_add_uri_targets, gtk_drag_source_add_text_targets, gtk_drag_source_add_image_targets, and gtk_drag_source_add_uri_targets. * t/GtkLabel.t, xs/GtkLabel.xs: Bind and test gtk_label_set_angle and gtk_label_get_angle. * t/GtkMessageDialog.t, xs/GtkMessageDialog.xs: Bind and test gtk_message_dialog_format_secondary_text and gtk_message_dialog_format_secondary_markup. * t/GtkProgressBar.t, xs/GtkProgressBar.xs: Bind and test gtk_progress_bar_set_ellipsize and gtk_progress_bar_get_ellipsize. * t/GtkTextBuffer.t, xs/GtkTextBuffer.xs: Bind and test gtk_text_buffer_backspace. * t/01.GtkWindow.t, xs/GtkWindow.xs: Bind and test gtk_window_set_focus_on_map, gtk_window_get_focus_on_map, gtk_window_set_icon_name, gtk_window_get_icon_name, and gtk_window_set_default_icon_name. * maps-2.6, xs_files-2.6, t/GtkCellRendererCombo.t, t/GtkCellRendererProgress.t, t/GtkFileChooserButton.t, t/GtkMenuToolButton.t, xs/GtkCellRendererCombo.xs, xs/GtkCellRendererProgress.xs, xs/GtkFileChooserButton.xs, xs/GtkMenuToolButton.xs: Bind and test GtkCellRendererCombo, GtkCellRendererProgress, GtkFileChooserButton, and GtkMenuToolButton. 2004/12/16 15:27 (-0400) rwmcfa1 * t/GtkCellView.t, xs/GtkCellView.xs: set_cell_data, set_value, and set_values functions removed and/or made static (not public any more) so we shouldn't bind and thus test them. * t/GtkIconTheme.t: corrected skip count in lookup_icon. don't test get_icon_sizes return if it returns an empty list. 2004/12/04 21:44 (-0400) muppetman * examples/histogramplot.h: Add key navigation to the plot widget. 2004/11/29 21:43 (+0100) kaffeetisch * Makefile.PL: Correct the unstable warning message to say 1.06x instead of 1.04x. * Gtk2.pm, META.yml, NEWS, README: Unstable release 1.071. 2004/11/29 21:01 (+0100) kaffeetisch * xs/GtkAboutDialog.xs: Various const-ness fixes. * t/GtkAccelGroup.t, xs/GtkAccelGroup.xs: Bind and test gtk_accelerator_get_label. * t/GtkButton.t, xs/GtkButton.xs: Bind and test gtk_button_set_image, gtk_button_get_image. * t/GtkDialog.t, xs/GtkDialog.xs: Bind and test gtk_dialog_set_alternative_button_order. * t/GtkEntry.t, xs/GtkEntry.xs: Bind and test gtk_entry_layout_index_to_text_index, gtk_entry_text_index_to_layout_index. * t/GtkFileChooser.t, xs/GtkFileChooser.xs: Bind and test gtk_file_chooser_set_show_hidden, gtk_file_chooser_get_show_hidden. * t/GtkFileFilter.t, xs/GtkFileFilter.xs: Bind and test gtk_file_filter_add_pixbuf_formats. * t/GtkImage.t, xs/GtkImage.xs: Bind and test gtk_image_new_from_icon_name, gtk_image_set_from_icon_name, gtk_image_get_icon_name, gtk_image_set_pixel_size, gtk_image_get_pixel_size. 2004/11/01 21:38 (+0100) kaffeetisch * Makefile.PL: Depend on Glib 1.070. * MANIFEST: Add maps_pango-1.4. * Gtk2.pm, META.yml, Makefile.PL, NEWS, README: Unstable release 1.070. 2004/10/25 20:26 (+0200) kaffeetisch * maps_pango-1.5, maps_pango-1.6: Rename the maps file. * t/Gdk.t: Account for the new grab result "not-viewable". * t/GtkIconView.t: Add a "FIXME: 2.6" comment. * t/GtkListStore.t: Reenable this test since the bug that caused the issues has been fixed. * t/GtkAboutDialog.t, xs/GtkAboutDialog.xs: Bind and test gtk_about_dialog_get_logo_icon_name, gtk_about_dialog_set_logo_icon_name, gtk_about_dialog_set_email_hook, gtk_about_dialog_set_url_hook. Add some parameter descriptions. * t/GtkCellView.t, xs/GtkCellView.xs: Bind and test gtk_cell_view_set_value, gtk_cell_view_set_values, gtk_cell_view_get_size_of_row. * xs/GtkClipboard.xs: Don't use the _noinc typemaps with gtk_clipboard_get and gtk_clipboard_get_for_display since we don't actually own the returned clipboards. * t/GtkEntryCompletion.t, xs/GtkEntryCompletion.xs: Bind and test gtk_entry_completion_get_text_column, gtk_entry_completion_insert_prefix, gtk_entry_completion_set_inline_completion, gtk_entry_completion_get_inline_completion, gtk_entry_completion_set_popup_completion, gtk_entry_completion_get_popup_completion. * t/GtkIconTheme.t, xs/GtkIconTheme.xs: Bind and test gtk_icon_theme_get_icon_sizes. Move the search path modifying tests to the end to make this test finally work. * t/GtkLabel.t, xs/GtkLabel.xs: Bind and test gtk_label_set_ellipsize, gtk_label_get_ellipsize, gtk_label_set_width_chars, gtk_label_get_width_chars. * t/GtkComboBox.t, xs/GtkComboBox.xs, xs/GtkTreeView.xs: Bind and test gtk_combo_box_popup, gtk_combo_box_popdown, gtk_combo_box_get_wrap_width, gtk_combo_box_get_row_span_column, gtk_combo_box_get_column_span_column, gtk_combo_box_set_row_separator_func. * gtk2perl.h, maps_pango-1.0, maps_pango_1.4, t/PangoTypes.t, t/PangoScrip.t, xs/PangoTypes.xs, xs/PangoScript.xs: Protect pango_find_base_dir and all of PangoScript with 1.4.0 version guards. 2004/10/24 11:55 (-0400) rwmcfa1 * MANIFEST, MANIFEST.SKIP: updates * perl-Gtk2.spec.in: new scheme that addresses x86_64 problems found by Carl Nygard 2004/10/24 12:00 (-0400) muppetman * xs/GtkTreeView.xs, t/GtkTreeView.t: bind and test gtk_tree_view_[gs]et_fixed_height_mode, gtk_tree_view_[gs]et_hover_selection, gtk_tree_view_[gs]et_hover_expand, gtk_tree_view_set_row_separator_func. the getter for row separator func is not bound, and i don't think we can do it reasonably. 2004/10/24 11:56 (-0400) muppetman * xs/GtkComboBox.xs, t/GtkComboBox.t: bind and test gtk_combo_box_get_active_text, gtk_combo_box_get_add_tearoffs, gtk_combo_box_set_add_tearoffs, gtk_combo_box_get_focus_on_click, gtk_combo_box_set_focus_on_click. in order to test get_active_text, there needs to be data in the model; adding data to the model makes set_column_span_column hang the test, so i've disabled that. 2004/10/24 11:48 (-0400) muppetman * t/PangoFontMap.t: correct skip count 2004/10/24 10:52 (-0400) rwmcfa1 * t/GtkComboBox.t: gtk+ changed behavior, when something is selected that isn't in the list (user entered). test modified accordingly. can't select that which isn't there either. 2004/10/20 19:37 (+0200) kaffeetisch * xs_files-2.0, maps_pango-1.0, gtk2perl.h, t/PangoFontMap.t, t/PangoScript.t, xs/PangoFontMap.xs, xs/PangoScript: Bind and test PangoFontMap and PangoScript. * t/PangoFont.t, xs/PangoFont.xs: Bind and test pango_font_metrics_get_underline_position, pango_font_metrics_get_underline_thickness, pango_font_metrics_get_strikethrough_position, pango_font_metrics_get_strikethrough_thickness. * t/PangoTypes.t, xs/PangoTypes.xs: Bind and test pango_find_base_dir. 2004/10/17 12:30 (+0200) kaffeetisch * doctypes: Add descriptions for GdkKeymap_orclass, PangoRectangle, PangoGlyph. * maps-2.6, t/GdkEvent.t, xs/GdkEvent.xs: Add support for owner-change events. * t/GtkAboutDialog.t: Don't use noinit. * TODO: Remove the entry about an import option for gdk_threads_init since it's been added already. Also remove the entry about owner-change events. 2004/10/14 20:16 (-0400) rwmcfa1 * xs/GtkAboutDialog.xs: don't really need the extra ref the docs lead me to think we did on get_logo. 2004/10/14 18:44 (-0400) rwmcfa1 merge from: unstable-2-5-x-branch * maps-2.6, xs_files-2.6, t/GtkAboutDialog.t, t/GtkCellView.t, t/GtkIconView.t, xs/GtkAboutDialog.xs, xs/GtkCellView.xs, xs/GtkIconView.xs: initial import new stuff in 2.5.x * TODO: added a todo 2004/10/14 15:20 (-0400) muppetman * Makefile.PL: use PREREQ_PM in both WriteMakefile calls, so META.yml gets created properly. 2004/10/08 23:20 (-0400) muppetman * xs/GtkRadioButton.xs: correct documentation of the signature of Gtk2::RadioButton::get_group; flesh out the rest of the docs for this widget. 2004/09/27 09:35 (-0400) muppetman * README, NEWS, Gtk2.pm: stable release 1.061 2004/09/25 17:07 (+0200) kaffeetisch * xs/GtkTreeModel.xs: Remove the unused PUSH_INSTANCE macro. Replace a strange unicode character in the POD with its ASCII representation. Fix a small copy-n-paste bug in the POD. 2004/09/21 20:06 (-0400) muppetman Fix issues related to utf-8 and locales. Thanks to ender for pointing these out in irc. * t/GtkButton.t: in some locales the decimal is ",", not "."; this can cause problems because '0.7' != '0,7', etc. To avoid such problems, don't use hardcoded strings for comparison of floats. * xs/GtkStock.xs: use newSVGChar() instead of newSVpv() for gchar* strings. * tools/podifystockitems.pl: set STDOUT's binmode properly for writing utf8 characters, to avoid "Wide character in print" warnings. 2004/09/19 23:35 (+0200) kaffeetisch * CodeGen.pm, Makefile.PL: Use capitals at the start of everything that is printed, to unify Makefile.PL output. * maps-2.0: Comment out the GtkIdentifier entry -- it's never been used and caused a warning. * xs/GdkEvent.xs (gdk_event_unwrap): Use gperl_format_variable_for_output when croaking. * xs/GdkPixbuf.xs, xs/GdkPixbufLoader.xs, xs/GdkProperty.xs, xs/GdkRgb.xs, xs/GdkSelection.xs: Add some casts to avoid compiler warnings and to be on the safe side. * xs/GtkClipboard.xs: Remove unneeded semicolons from the DEFINE_QUARK calls. * xs/GtkTreeModel.xs (to_arrayref): Use IV instead of UV. Fixes for win32 build issues discovered by Arnold Putz: * Gtk2.exports: Remove SvPangoRectangle since it has been commented out. * xs/GdkKeys.xs: Remove the semicolon from the end of a macro definition. 2004/09/13 23:01 (+0200) kaffeetisch * t/GtkTextView.t, t/PangoContext.t, t/PangoLayout.t, t/PangoTabs.t, t/PangoTypes.t, xs/PangoContext.xs, xs/PangoLayout.xs, xs/PangoTypes.xs: Make all version checks refer to stable releases. * Makefile.PL: Remove the "unstable" warning. Depend on Glib 1.060. * Gtk2.pm, NEWS, README: Stable release 1.060. 2004/09/07 18:00 (-0400) rwmcfa1 * api.pod: Glib::IOChannel -> Glib::IO. spotted by Aristotle Pagaltzis 2004/09/04 19:51 (-0400) muppetman * xs/GtkTreeViewColumn.xs: document cell data funcs. 2004/09/04 12:39 (-0400) muppetman * xs/GtkCellRendererSpinButton.xs: fix a refcounting bug that made it impossible to write a START_EDITING vfunc in perl without either crashing or leaking the CellEditable it returns. * examples/cellrenderer_spinbutton.pl: take advantage of the above fix to plug the CellEditable leak in the custom cell renderer. 2004/09/01 21:14 (-0400) muppetman * xs/GtkItemFactory.xs: fix bug in handling of the callback data sv in gtk2perl_item_factory_create_item_helper() that allowed callback user data to disappear or point to the wrong value by the time the callback was invoked. * t/GtkItemFactory.t: beef up the unit test to verify that complex callback data gets the proper lifetime. 2004/08/29 14:27 (-0400) muppetman * README, NEWS, Gtk2.pm: unstable development release 1.055 2004/08/29 14:23 (-0400) muppetman * Makefile.PL: require Glib 1.055 2004/08/29 15:01 (+0200) kaffeetisch * gtk2perl.h, xs/PangoTypes.xs: Remove our custom GType for PangoMatrix; as of version 1.5.1, pango ships with its own. 2004/08/28 01:19 (+0200) kaffeetisch * t/GtkTextIter.t: Fix an error introduced in the last commit. Found by Ross. 2004/08/25 22:21 (+0200) kaffeetisch * t/GtkTextIter.t: Make the [sg]et_visible_line_index and [sg]et_visible_line_offset tests work with newer gtk+ releases by checking the runtime version. 2004/08/15 18:47 (-0400) muppetman * README, NEWS, Gtk2.pm: unstable development release 1.054 2004/08/14 23:26 (-0400) muppetman * t/GtkToolbar.t: strict and warnings don't carry across file boundaries, so TestHelper doesn't bring them in. add warnings and strict and discover that i missed some barewords. bad muppet, no biscuit. * xs/GtkToolbar.xs: allow NULL for text in a couple of places. torsten had sent me a patch that did this, so i'll give him credit. 2004/08/14 23:26 (-0400) muppetman * t/GtkToolbar.t: rewrite test as a brute-force complete API exerciser * xs/GtkToolbar.xs: enhance docs for toolbar functions so they actually describe the parameters. allow undef for the toolitem param to set_drop_highlight_item. 2004/08/01 21:10 (-0400) muppetman * README, NEWS, Gtk2.pm: unstable development release 1.053 * Makefile.PL, README: require Glib 1.053 2004/08/01 18:12 (+0200) kaffeetisch * Makefile.PL: select_files_by_version and read_source_list_file were moved to Glib::MakeHelper -- adjust the function calls accordingly. * t/00.Gtk2.t, xs/Gtk2.xs: Bind and test gtk_parse_args. * maps_pango-1.5, t/PangoLayout.t, xs/PangoLayout.xs: Bind and test pango_layout_[sg]et_ellipsize. 2004/07/31 22:43 (-0400) muppetman * xs/GtkTreeModel.xs, t/GtkTreeModelIface.t: add Gtk2::TreeIter::to_arrayref() and Gtk2::TreeIter::new_from_arrayref(), which allow custom model implementations to manipulate iters outside of the vfuncs. documentation included. thanks to Zach Bean for real-world testing of the new methods, and for nearly rewriting the testcase to support and verify them. * examples/customlist.pl: patch from Zach (slightly modified by muppet) adds set() and get_iter_from_name() methods to the custom list implementation, showing off the use of Gtk2::TreeIter::new_from_arrayref() and to_arrayref(). * AUTHORS: add Zach 2004/07/18 23:45 (-0400) muppetman * README, NEWS, Gtk2.pm: unstable development release 1.052 * Makefile.PL, README: require Glib 1.052 2004/07/17 18:19 (+0200) kaffeetisch * xs/GtkTreeView.xs: In the POD for get_path_at_pos, escape all < and >'s that should actually show up. 2004/07/17 08:24 (-0400) muppetman (i really wish i was still asleep) * xs/GdkProperty.xs: use STRLEN instead of int for the values that will be passed to SvPV(). remove unnecessary calls to sv_len(). * xs/GtkContainer.xs: hush compiler warning that RETVAL could be used uninitialized. indeed it's possible, but not at all likely. 2004/07/12 20:46 (+0200) kaffeetisch * CodeGen.pm: Use explicit casts to gpointer in newSV$classname, newSV$classname\_own, and newSV$classname\_copy, in order to allow the const modifier on boxed types. Also add newSV$classname\_ornull and the corresponding typemap. * xs/GtkCellRenderer.xs: Remove two macros that are now automatically generated. * xs/GtkTreeView.xs: Add some bits from the C API documentation to the POD of get_path_at_pos. (#145109) * t/PangoContext.t * xs/PangoContext.xs: Bind get_font_map. Make [sg]et_matrix accept undef. * xs/PangoFont.xs: Don't warn about unregistered subclasses of PangoFontMap. 2004/07/09 22:52 (-0400) muppetman * examples/cellrenderer_popup.pl: add a toggle to show off both the boxes and no-boxes styles; use named constants instead of magic numbers. * examples/cellrenderer_spinbutton.pl: some tweaks to the renderer; center vertically in the cell; handle focus-out gracefully (thanks to jens wilke for both); draw the editor widget only as large as necessary; use named constants for TRUE and FALSE instead of magic numbers. * xs/GtkTreeModel.xs: fix some buggy code in the synopsis 2004/07/07 22:23 (-0400) muppetman * examples/cellrenderer-popup.pl: fix a bug in the menu-positioning code, which wasn't taking the treeview's visible region offsets into account, resulting in oddly-placed popups when used with a scrolled textview. so, use a scroller in this example to make sure it works. thanks to jens wilke for the bug report. 2004/07/07 21:08 (+0200) kaffeetisch A t/PangoTypes.t A xs/PangoTypes.xs * MANIFEST * gtk2perl.h * xs_files-2.0: Bind and test stuff from pango-types.h, including PangoMatrix. * MANIFEST * Makefile.PL * maps-2.0 * maps_pango-1.0 * maps_pango-1.5: Use separate maps files for pango. * t/PangoContext.t * xs/PangoContext.xs: Bind and test [gs]et_matrix. 2004/06/28 01:08 (-0400) muppetman * Gtk2.pm, README, NEWS: unstable development release 1.051 * gtk2perl.h: protect custom GTypes with #ifndefs, to avoid redefining symbols that are provided upstream in different versions. 2004/06/22 20:19 (-0400) rwmcfa1 * examples/thread_usage.pl: now that we can truely support threads there might as well an example of how to use the ability. this one replaces the old how to work around the fact that threads aren't supported which is no longer relavant. 2004/06/14 19:32 (+0200) kaffeetisch * xs/GtkFileFilter.xs: Fix erroneous initialization. 2004/06/13 11:36 (-0400) muppetman * xs/GdkKeys.xs: adapt docs for get_entries_for_keyval() from the C api reference. 2004/06/04 13:52 (-0400) rwmcfa1 * Gtk2.pm: added a -threads-init option to import, added doc on -init and -threads-init. * TODO: removed an outdated todo (example programs, they already can be) and removed the above addressed TODO. 2004/06/08 21:39 (-0400) muppetman * TODO: updated. 2004/06/04 13:52 (-0400) muppetman * AUTHORS, xs/GdkEvent.xs, xs/GdkWindow.xs, xs/Gtk2.xs, xs/GtkAccelMap.xs, xs/GtkCellLayout.xs, xs/GtkCellRenderer.xs, xs/GtkClipboard.xs, xs/GtkContainer.xs, xs/GtkEntryCompletion.xs, xs/GtkFileFilter.xs, xs/GtkItemFactory.xs, xs/GtkMenu.xs, xs/GtkTextTagTable.xs, xs/GtkTreeModel.xs, xs/GtkTreeModelFilter.xs, xs/GtkTreeSelection.xs, xs/GtkTreeSortable.xs, xs/GtkTreeView.xs, xs/GtkTreeViewColumn.xs, xs/PangoFontset.xs: patch from Albert Chin removes non-static initializers so that we are compatible with C89 (which doesn't allow them). the patch converted C++ comments to C, but most were on dead code, so i removed them instead. 2004/06/02 20:10 (-0400) muppetman Unstable release 1.050 * NEWS: updated. 2004/06/01 22:00 (-0400) muppetman * gtk-demo/appwindow.pl, gtk-demo/images.pl, gtk-demo/main.pl, gtk-demo/pixbufs.pl, gtk-demo/textview.pl: remove dead code 2004/05/31 23:13 (+0200) kaffeetisch * examples/simple_menu.t: Add a delete_event handler. * t/GdkVisual.t: Skip the get_best_with_depth test on 2.2.x. 2004/05/28 22:36 pcg * xs/GdkColor.xs: scaling by 257 is better than scaling by 8. 2004/05/21 02:28 (+0200) pcg * xs/GtkTextBuffer.xs: Allow creation of anonymous marks. 2004/05/15 20:58 (+0200) kaffeetisch * t/GdkEvent.t: Be a bit more tolerant to pass on older gtk+'s. * t/GdkProperty.t: Fix skip count. * t/GtkFontSelection.t: Convert font name to lowercase before testing. * t/PangoLayout.t: Shuffle some tests around. * xs/GdkInput.xs * xs/GdkVisual.xs: Mark 'ax' unused. * xs/GdkPixmap.xs: Add version guards to lookup_for_display and foreign_new_for_display. * xs/GdkVisual.xs: Add version guards to get_screen. 2004/05/11 19:38 (+0200) kaffeetisch * Gtk2.exports: Update to reflect recent changes. * Makefile.PL: Check for the correct versions of EU::Depends and EU::PkgConfig. * gtk2perl.h: Remove duplicate declarations of newSVGtkTargetEntry and SvGtkTargetEntry. * t/GdkKeys.t: Use a version check for the translate_keyboard_state test instead of always skipping it. 2004/04/25 13:10 (+0200) kaffeetisch * t/GdkDisplay.t: Add a reference to the relevant bug to the FIXME comment on close(). * t/GtkDnd.t: Check that $context is defined before using it. * gtk2perl.h * xs/PangoLayout.xs: Make SvPangoRectangle accept an array reference as well ... and comment it out and remove it from the header. It's not used at the moment. 2004/04/20 15:41 (+0200) kaffeetisch This commit marks some functions static that were previously not static, but not in the header either. It was a mistake that they were not static, so it needs to be fixed. This fix has the potential to break ABI compatability, though. So if you see any breakage that might be related to this change, please speak up and we'll revert it. * xs/GdkWindow.xs: Comment out newSVGdkWindowAttr and SvGdkWindowAttr since they're currently unused. Make SvGdkWindowAttrReal static. * xs/GtkIconFactory.xs: Make newSVGtkIconSize and SvGtkIconSize static. * xs/GtkStock.xs: Rename stock_item_to_hv to newSVGtkStockItem, make it return a reference to a hash, fix the indention and make it static. Make SvGtkStockItem static. * xs/PangoLayout.xs: Make newSVPangoLogAttr static. 2004/04/19 20:30 (+0200) kaffeetisch * Makefile.PL: Require Glib 1.050. * gtk2perl.h * xs/GdkGC.xs: Rename read_gcvalues_from_sv to SvGdkGCValues and export it for GtkGC. A t/GtkGC.t A xs/GtkGC.xs * xs_files-2.0 * MANIFEST: Implement and test GtkGC. * gdk.typemap * maps-2.0 * t/GdkKeys.t * xs/GdkKeys.xs: Reimplement and test the ability to call all GdkKeymap methods as class static methods to use the default keymap. * t/GdkProperty.t * xs/GdkProperty.xs: Implement and test Gtk2::Gdk::text_property_to_text_list, text_property_to_utf8_list, string_to_compound_text, utf8_to_compound_text, text_property_to_text_list_for_display, text_property_to_utf8_list_for_display, string_to_compound_text_for_display, utf8_to_compound_text_for_display, and utf8_to_string_target. A t/GdkRgb.t * MANIFEST * xs/GdkRgb.xs: Implement and test Gtk2::Gdk::draw_indexed_image. A pango.typemap * Makefile.pl * MANIFEST: Add and install a new typemaps file for Pango. * t/PangoFont.t * xs/PangoFont.xs: Implement and test get_glyph_extents. * gtk2perl.h * t/PangoLayout.t * xs/PangoLayout.xs: Implement custom PangoRectangle typemaps. Implement and test Gtk2::Pango::Layout::index_to_pos, get_cursor_pos, get_extents, and get_pixel_extents. * gtk2perl.h * maps-2.0 * t/PangoLayout.t * xs/PangoLayout.xs: Register a custom GBoxed type for PangoLayoutIter. Implement and test Gtk2::Pango::Layout::get_iter, Gtk2::Pango::LayoutIter::get_index, at_last_line, next_char, next_cluster, next_run, next_line, get_char_extents, get_cluster_extents, get_run_extents, get_line_extents, get_layout_extents, get_line_yrange, and get_baseline. A t/PangoFontset.t A xs/PangoFontset.xs * xs_files-2.0 * MANIFEST * xs/PangoContext: Implement and test PangoFontset. 2004/04/19 20:13 (+0200) kaffeetisch * xs/Gdk.xs: Remove a needless MODULE line. Yet another merge from the stable-1-04 branch: * AUTHORS: Add Cory Omand and Jason Stirling. * Makefile.PL: Document that the library finding hack does not work on Cygwin. * NEWS: Add entries for the stable releases. * CodeGen.pm * pm/SimpleList.pm * pm/SimpleMenu.pm: Update bits of the documentation, fix the examples. * pm/TestHelper.pm: Document at_least_version and skip_all. * t/GdkEvent.t * t/GtkCellLayout.t * t/GtkComboBox.t: Hush test warnings. * xs/GdkEvent.xs * xs/GtkTextBuffer.xs: Use explicit version guards to avoid including new functions when compiling against development releases. 2004/04/09 08:17 (-0400) muppetman merge a bunch more bugfixes from stable. * gtk-demo/appwindow.pl: clean up warnings. * gtk-demo/sizegroup.pl, gtk-demo/textview.pl: patch from Thierry Vignaud lets gtk-demo work again by removing muppet's stupid syntax errors. * pm/SimpleList.pm, t/GtkSimpleList.t: ross made SimpleList's tied operations return the correct values. * xs/Gdk.xs, xs/GdkColor.xs, xs/GdkGC.xs, xs/GdkScreen.xs, xs/GdkWindow.xs, xs/Gtk2.xs: extended a patch from Cory Omand that uses explicit stable version checks to avoid problems when building against unstable gtk+. * xs/GtkHandleBox.xs: doc fixes. 2004/04/07 19:21 (+0200) kaffeetisch A t/GdkVisual.t A xs/GdkVisual.xs * xs_files-2.0 * MANIFEST: Bind and test GdkVisual. 2004/04/06 18:59 (+0200) kaffeetisch Merge from the stable-1-04 branch: * t/GtkTreeView.t * xs/GtkTreeView.xs: Allow undef for the path and column arguments of get_cell_area and get_background_area. 2004/04/05 09:50 (-0400) muppetman * xs/GtkTreeStore.xs: patch from Thierry Vignaud corrects indentation on an xsub to appease validators. 2004/04/04 19:36 (+0200) kaffeetisch * xs/PangoFont.xs: Remove an unused variable to hush a compiler warning. Merge from the stable-1-04 branch: * t/Gdk.t: Don't fail the keyboard_grab test if there already is an active keyboard grab. * t/PangoTabs.t: Test new and new_with_positions instead of two times new. * xs/GtkStyle.xs: Use a =for object directive to put Gtk2::draw_insertion_cursor into the Gtk2::Style man page (instead of overwriting Gtk2). 2004/04/04 01:09 (-0500) muppetman * t/PangoContext.t, t/PangoFont.t, xs/PangoContext.xs, xs/PangoFont.xs: bind and test Gtk2::Pango::Context::list_families, Gtk2::Pango::FontFamily::get_name, Gtk2::Pango::FontFamily::is_monospace, Gtk2::Pango::FontFamily::list_faces, Gtk2::Pango::FontFace::describe, Gtk2::Pango::FontFace::get_face_name, and Gtk2::Pango::FontFace::list_sizes. 2004/04/03 22:27 (+0200) kaffeetisch * t/01.GtkWindow.t: Fix the TODO by allowing both, TRUE and FALSE, as the return value of is_active and has_toplevel_focus. 2004/04/03 21:30 (+0200) kaffeetisch A t/GdkInput.t A xs/GdkInput.xs * MANIFEST: Bind and test GdkInput. * t/Gdk.t * xs/Gdk.xs: Bind and test init, init_check, and parse_args. * t/GdkEvent.t * xs/GdkEvent.xs: Add and test the ability to change the device with Gtk2::Gdk::Event::Motion::device, Gtk2::Gdk::Event::Button::device, Gtk2::Gdk::Event::Scroll::device, and Gtk2::Gdk::Event::Proximity::device. * gdk.typemap * maps-2.0: Use a custom typemap for Gtk2::Gdk::Keymap so you can use Gtk2::Gdk::Keymap->method instead of $keymap->method to get the default keymap. * t/GdkKeys.t * xs/GdkKeys.xs: Bind and test Gtk2::Gdk::Keymap::get_entries_for_keyval and ::get_entries_for_keycode. A t/GdkPixmap.t * MANIFEST * xs/GdkPixmap.xs: Bind and test lookup, lookup_for_display, foreign_new, and foreign_new_for_display. * t/GtkTreeSelection.t * xs/GtkTreeSelection.xs: Bind and test get_user_data. 2004/03/28 18:01 (-0500) rwmcfa1 * pm/SimpleList.pm, examples/simplelist.pl: get_data_from_path -> get_row_data_from_path. 2004/03/27 16:03 (-0500) muppetman * AUTHORS: add nathan. 2004/03/27 13:12 (-0500) rwmcfa1 * pm/SimpleList.pm: applied a (slightly modified) path from Nathan Kurz that provides easy access to the data of a row when given a path. some general doc clean-up/fixes while i was in there. * examples/simplelist.pl: exemplify ^ 2004/03/25 21:45 (-0500) muppetman * NEWS: merged from stable, so we'll have it in future versions. * README, xs/GdkRgb.xs, xs/GdkTypes.xs, xs/Gtk2.xs, xs/GtkSelection.xs, xs/GtkTreeSelection.xs: various fixes merged from stable 2004/03/25 21:24 (-0500) muppetman * examples/cellrenderer_popup.pl: update version check now that 1.040 is out. * examples/combo_box.pl, examples/file_chooser.pl: use the correct version check API. 2004/03/24 01:35 (+0100) kaffeetisch * t/GtkFileChooser.t: Set select_multiple to FALSE again to make the preview stuff work. * t/GtkListStore.t: Change the values passed to reorder() to something that works for all gtk+ versions. 2004/03/21 14:01 (-0500) muppetman * xs/GtkMenu.xs: un-hide gtk2perl_menu_pos_func, which is indeed a public symbol. 2004/03/20 22:52 (-0500) muppetman A examples/dialog.pl M MANIFEST add dialog examples from stable 2004/03/20 22:48 (-0500) muppetman * gtk-demo/main.pl, t/GdkCursor.t, t/GdkDrawable.t, t/GdkPixbuf.t, t/GtkAccelGroup.t, t/GtkAlignment.t, t/GtkButton.t, t/GtkButtonBox.t, t/GtkCellRenderer.t, t/GtkCheckMenuItem.t, t/GtkClipboard.t, t/GtkDnd.t, t/GtkEntry.t, t/GtkIconFactory.t, t/GtkMenu.t, t/GtkRadioMenuItem.t, t/GtkScale.t, t/GtkStyle.t, t/GtkTextBuffer.t, t/GtkTextIter.t, t/GtkTextView.t, t/GtkToolbar.t, xs/GtkTreeViewColumn.xs: bump version checks * t/GdkEvent.t, t/GdkGC.t, t/GdkProperty.t, xs/GdkEvent.xs, xs/GdkProperty.xs, xs/GtkDialog.xs, gtk-demo/changedisplay.pl, xs/GdkWindow.xs, xs/GtkObject.xs, examples/item_factory_demo.pl: clean up and bugfixes merged from stable 2004/03/20 20:47 (-0500) muppetman More merging from the stable-1-04 branch. * gtk-demo/sizegroup.pl, gtk-demo/textview.pl: bump 2.3 version requirements to 2.4 * xs/GdkEvent.xs, xs/GtkAccelGroup.xs, xs/GtkAccelMap.xs, xs/GtkItemFactory.xs, xs/GtkMenu.xs, xs/GtkTreeView.xs: remove private functions from the ABI 2004/03/16 22:55 (-0500) muppetman Big merge from the stable-1-04 branch. * gtk2perl.h, maps-2.0, examples/combo_box.pl, examples/file_chooser.pl, pm/TestHelper.pm, t/00.Gtk2.t, t/01.GtkWindow.t, t/GdkDisplay.t, t/GtkAction.t, t/GtkActionGroup.t, t/GtkCellLayout.t, t/GtkColorButton.t, t/GtkComboBox.t, t/GtkComboBoxEntry.t, t/GtkEntryCompletion.t, t/GtkEventBox.t, t/GtkExpander.t, t/GtkFileChooser.t, t/GtkFileChooserDialog.t, t/GtkFileChooserWidget.t, t/GtkFileFilter.t, t/GtkFontButton.t, t/GtkIconTheme.t, t/GtkListStore.t, t/GtkMenuShell.t, t/GtkMessageDialog.t, t/GtkRadioAction.t, t/GtkRadioToolButton.t, t/GtkRc.t, t/GtkSeparatorToolItem.t, t/GtkToggleAction.t, t/GtkToggleToolButton.t, t/GtkToolButton.t, t/GtkToolItem.t, t/GtkTreeModelFilter.t, t/GtkTreeView.t, t/GtkUIManager.t, t/GtkWidget.t, xs/GdkCursor.xs, xs/GdkDisplay.xs, xs/GdkDrawable.xs, xs/GdkPixbuf.xs, xs/GdkPixbufLoader.xs, xs/GtkAlignment.xs, xs/GtkButton.xs, xs/GtkButtonBox.xs, xs/GtkCalendar.xs, xs/GtkCellRenderer.xs, xs/GtkCheckMenuItem.xs, xs/GtkClipboard.xs, xs/GtkComboBoxEntry.xs, xs/GtkDnd.xs, xs/GtkEntry.xs, xs/GtkEventBox.xs, xs/GtkFileChooserDialog.xs, xs/GtkFileChooserWidget.xs, xs/GtkIconFactory.xs, xs/GtkMenu.xs, xs/GtkMenuShell.xs, xs/GtkMessageDialog.xs, xs/GtkRadioMenuItem.xs, xs/GtkRc.xs, xs/GtkScale.xs, xs/GtkStyle.xs, xs/GtkTextBuffer.xs, xs/GtkTextIter.xs, xs/GtkTextView.xs, xs/GtkToolbar.xs, xs/GtkTreeViewColumn.xs, xs/GtkWidget.xs, xs/GtkWindow.xs: bump all 2.3.x version guards to 2.4.0, and pretend that 2.3.x never existed. * xs/Gtk2.xs: add and document Gtk2::GET_VERSION_INFO; change Gtk2::Pango::get_version_info to Gtk2::Pango::GET_VERSION_INFO. put version docs in Foo::version. * examples/color_list.pl: explain why this test should use the runtime version check * examples/item_factory.pl: show the usage of accel_groups (based on the simplemenu code) and comment things a bit. (ross) 2004/03/16 22:40 (-0500) muppetman D maps-2.3 A maps-2.4 D xs_files-2.3 A xs_files-2.4 M MANIFEST rename the files related to 2.3 2004/03/16 21:17 (-0500) rwmcfa1 * t/GtkFileChooser.t: get the filename off the the end of uri so that set/get_current_folder_uri will succeed. apparently something has changed in gtk+ HEAD. 2004/03/15 20:23 (-0500) rwmcfa1 * t/00.Gtk2.t: bad kaffee, added some tests, but apparently didn't up the skip count, as muppet says, no biscut. 2004/03/14 21:11 (+0100) kaffeetisch * t/00.Gtk2.t: Test Gtk2::Widget::propagate_event, make the tests for main_iteration, main_iteration_do and events_pending more robust. * t/GtkMenu.t: Prevent random failures by making sure we only execute the positioning callback once. 2004/03/14 04:00 (-0500) muppetman * examples/adding_stock_icons.pl, examples/customrenderer.pl, examples/file_chooser.pl, examples/histogramplot.pl, examples/insert-text-test.pl, examples/testdnd.pl: improve commentary, so these make better examples. * examples/calendar.pl: remove cruft; use dialog's response rather than old-school manip of buttons. * examples/combo_box.pl: do something more interesting with the do-it-yourself cell renderer example. 2004/03/12 23:11 (-0500) muppetman * Gtk2.exports: fix missing symbols in the exports so we can link on win32 * xs/GdkEvent.xs, xs/GdkProperty.xs, xs/GdkRgb.xs, xs/PangoLayout.xs: little warning fixes; signedness, returning from all paths or at least putting a note that the code is not reached, explicit casts, etc. 2004/03/12 16:00 (-0500) muppetman * Gtk2.pm, Makefile.PL, README: 1.04 will be released from the stable-1-04 branch; bump HEAD's version to 1.050. 2004/03/12 01:08 (-0500) muppetman * t/GdkDnd.t: get_selection() seems to fail when using Apple's X server, but not any others. making it a TODO test. * t/GtkTreeStore.t, t/GtkListStore.t: correct skip counts * t/GtkProgressBar.t: use ok() for boolean tests, because false is sometimes '' and sometimes undef. 2004/03/11 23:20 (-0500) muppetman * README: give shout-outs to the examples and gtk-demo. 2004/03/12 03:09 (+0100) kaffeetisch * Gtk2.pm: Don't indent the abstract. D examples/colorselectiontest.pl * MANIFEST * TODO: Remove the entries about the color selection test (and get rid of the now needless example) and GdkRegion. * t/GtkProgressBar.t * xs/GtkProgressBar.xs: Allow and test undef for for the text parameter of [sg]et_text. 2004/03/09 00:06 (+0100) kaffeetisch * t/GtkListStore.t * t/GtkTreeStore.t: Test-drive both reorder functions a bit more. * xs/GdkEvent.xs: Apidoc fix: s/Gtk2::Gdk::main_do_event/Gtk2::main_do_event/. * xs/GtkTextView.xs: Use const for two GtkTreeIter's -- the typemap is now able to handle it. * xs/GdkWindow.xs * xs/GtkArrow.xs * xs/GtkCellRenderer.xs * xs/GtkRc.xs * xs/GtkTreeStore.xs * xs/GtkWindow.xs: Remove various outdated TODO and FIXME comments. 2004/03/07 22:01 (-0500) rwmcfa1 * xs/GdkPixbuf.xs, xs/GdkPixbufLoader.xs, xs/GtkFileChooser.xs, xs/GtkIconTheme.xs, xs/GtkUIManager.xs, xs/GtkWindow.xs: use __gerror__ for apidoc where needed. 2004/03/06 18:25 (-0500) muppetman * xs/GtkFileChooser.xs, t/GtkFileChooser.t: track upstream API changes. 2004/03/05 16:13 (+0100) kaffeetisch * t/GdkEvent.t: Make sure the test doesn't fail when unexpected mouse events occur. 2004/03/04 02:42 (+0100) kaffeetisch * t/GtkCellEditable.t: Test-drive the custom cell editable stuff. 2004/03/03 15:58 (-0500) muppetman A examples/color_snooper.pl A t/GdkPixbuf.t M MANIFEST new files. * xs/GdkEvent.xs: hush compiler warnings * xs/GdkPixbuf.xs: un-break Gtk2::Gdk::Pixbuf::get_pixels by providing the actual string length to newSVpv 2004/03/03 00:04 (-0500) muppetman * Gtk2.pm, README, NEWS: beta release 1.038 * Makefile.PL: require Glib 1.038 * t/GtkFileChooser.t, t/GtkListStore.t: disable some tests that broke with gtk+ 2.3.5 2004/03/02 23:35 (-0500) muppetman * t/GdkEvent.t, xs/GdkEvent.xs: implement and test setters for event.state and event.time * xs/Gtk2.xs, t/GdkEvent.t: bind and test Gtk2::main_do_event 2004/03/03 05:32 (+0100) kaffeetisch * xs/GtkCellEditable.xs: Make implementing the GtkCellEditable vfuncs optional by checking if they exist before calling them. 2004/03/03 00:35 (+0100) kaffeetisch * t/GtkFileChooser.t: Change the TODOs to SKIPs -- the bugs have been fixed in 2.3.5. * t/GtkDnd.t * xs/GtkDnd.xs: Bind and test drag_source_[sg]et_target_list. * t/GtkFileChooserDialog.t: Only test new_with_backend on versions that have it. * xs/GtkFileChooserDialog.xs: Add version guards around the file-system-backend property. * t/GtkFileChooserWidget.t * xs/GtkFileChooserWidget.xs: Bind and test new_with_backend. * t/01.GtkWindow.t * xs/GtkWindow.xs: Bind and test propagate_key_event. * t/PangoLayout.t * xs/PangoLayout.xs: Bind and test [sg]et_auto_dir. 2004/03/01 13:57 (-0500) rwmcfa1 * examples/file_chooser.pl: updated uri's to non-muppet specific directories so that example won't fail. it's uses $ENV{HOME} and /tmp/ 2004/03/01 19:55 (+0100) kaffeetisch * t/GtkEntry.t * xs/GtkEntry.xs: Bind and test [sg]et_alignment. * t/01.GtkWindow.t * xs/GtkWindow.xs: Bind and test activate_key. 2004/03/01 02:24 (-0500) muppetman * xs/GdkPixmap.xs: bad signature in pod * xs/GtkCellRenderer.xs: hide deprecated warnings unless env var GTK2PERL_DEBUG is set and true. 2004/03/01 02:05 (-0500) muppetman * t/GdkDnd.t: make the test not fail when the destination window doesn't exist. * t/GdkEvent.t: some settings don't exist if you're not running gnome, e.g., remote to non-gnome desktop; don't fail if the setting isn't there. * xs/GdkDnd.xs: if find_window returns no destination window, the protocol is garbage; don't try to convert it to a protocol enum value. this is half of the fix for the bizarre test problem were seeing in t/GdkDnd.t 2004/03/01 04:51 (+0100) kaffeetisch * t/GtkFileChooser.t: Rearrange some function calls to avoid warnings. Expect that set_current_name doesn't care about the existance of the file and adjust the test accordingly. 2004/03/01 03:50 (+0100) kaffeetisch A t/GtkTreeModelIface.t: New test for the custom tree model stuff. * t/GdkEvent.t: Use the same window in multiple places. Test Gtk2::Gdk::setting_get. Skip the Gtk2::Gdk::Event::Selection::requestor test on Win32. * t/GdkEvent.t * xs/GdkEvent.xs: Bind and test handler_set. * t/GtkMenuItem.t * xs/GtkMenuItem.xs: Use a custom marshaller for the toggle_size_request signal since it uses a pointer to an integer as a means to return a value from a signal handler. Bind and test toggle_size_request and toggle_size_allocate. * t/GtkTreeModel.t * xs/GtkTreeModel.xs: Bind and test ref_node and unref_node. 2004/03/01 01:54 (+0100) kaffeetisch * t/GtkFileChooser.t * xs/GtkFileChooser.xs: Bind and test [sg]et_use_preview_label. 2004/02/29 05:09 (-0500) muppetman * t/GtkWidget.t: skip style_get on 2.0.x; we can't implement style_get without gtk_widget_class_find_style_property, which wasn't added until 2.2.0. * t/GtkIconFactory.t: skip Gtk2::IconSize::lookup_for_settings on 2.0.x. * t/GtkRc.t: Gtk2::Rc::reparse_all_for_settings seems to return something different values on different machines/versions/etc. just verify that we don't crash, don't check the value. 2004/02/29 04:37 (-0500) muppetman * Makefile.PL, xs_files-2.0: only build xs/GdkX11.xs when linking\ against the x11 gtk target. * api.pod: updated * gtk-demo/editable_cells.pl, tools/podifyenums.pl, xs/GdkScreen.xs, xs/GtkActionGroup.xs, xs/GtkContainer.xs, xs/GtkTreeModel.xs, xs/GtkTreeSelection.xs: remove outdated FIXME * t/01.GtkWindow.t: implement a test for set_default * t/GdkCursor.t: test new_from_pixmap * t/GdkDnd.t: re-enable GdkDnd.t in hopes that its brokenness will get it fixed * xs/Gdk.xs: use runtime version check rather than compile-time check to get around leak bug * xs/GtkComboBoxEntry.xs, xs/GtkRadioMenuItem.xs, xs/GtkRc.xs, xs/GtkStyle.xs, xs/GtkTreeViewColumn.xs: use C comment rather than xs comment to keep from confusing xsubpp * xs/GtkListStore.xs, xs/GtkObject.xs, xs/GtkTreeStore.xs: remove unreachable code and strings that will never be used. gperl_value_from_sv either succeeds or croaks, so there's no sense in testing its return value. the return value never changed, to retain ABI compatibility. 2004/02/29 00:11 (-0500) muppetman * xs/GtkWidget.xs: fix the pod for (push|pop)_composite_child 2004/02/29 01:39 (+0100) kaffeetisch * t/GtkRc.t: Don't assume the return value of get_style_by_paths is undef -- also allow a Gtk2::Style object. 2004/02/28 18:18 (+0100) kaffeetisch * t/GtkIconFactory.t: Test lookup_for_settings. * t/GtkRc.t: Test get_style_by_paths and reparse_all_for_settings. * t/GtkWidget.t: Test shape_combine_mask and queue_resize_no_redraw. * t/GtkComboBoxEntry.t * xs/GtkComboBoxEntry.xs: Bind and test new_text. * t/GtkFileChooser.t * xs/GtkFileChooser.xs: Remove [sg]et_folder_mode. * t/GtkRc.t * xs/GtkRc.xs: Add a class argument to gtk_rc_get_style_by_paths, test it. Bind and test gtk_rc_reset_styles. * t/GtkStyle.t * xs/GtkStyle.xs: Bind and test Gtk2::draw_insertion_cursor. * t/GtkTreeView.t * xs/GtkTreeViewColumn.xs: Bind and test cell_set_cell_data and cell_get_size. * t/GtkWidget.t * xs/GtkWidget.xs: Initialize value and flag in the flags xsub. Bind and test list_mnemonic_labels, add_mnemonic_label, and remove_mnemonic_label. 2004/02/28 17:43 (+0100) kaffeetisch * t/Gdk.t: Handle the case of an already grabbed pointer gracefully. * t/GdkWindow.t: Test shape_combine_mask and set_back_pixmap. Re-enable the get_decorations test, in less strict fashion. * t/GtkTextIter.t: Finally test the last missing methods: get_toggled_tags, get_child_anchor, has_tag, get_tags, get_pixbuf, and get_attributes. * t/PangoLayout.t: Fix the skip: Pango 1.3.3 has been released. 2004/02/27 15:20 (-0500) muppetman * t/GtkWidget.t, xs/GtkWidget.xs: large patch from Torsten adds several things that are of importance when deriving containers in Perl. - removed Gtk2::Allocation, use use Gtk2::Gdk::Rectangle - new bindings for Gtk2::Widget::requisition Gtk2::Widget::size_allocate Gtk2::Widget::saved_state Gtk2::Widget::can_activate_accel (new in 2.4) Gtk2::Widget::region_intersect Gtk2::Widget::child_focus - don't segfault when a style property is not found. 2004/02/27 11:55 (-0500) muppetman * pm/SimpleList.pm: updated see-alsos and other pod, bump version. 2004/02/27 02:19 (-0500) muppetman * README, Gtk2.pm, NEWS: unstable release 1.037 * t/GtkFileChooser.t: skip some tests until the file chooser is no longer broken in HEAD 2004/02/27 01:12 (-0500) muppetman * ChangeLog, t/00.Gtk2.t, t/01.GtkWindow.t, t/Gdk.t, t/GdkColor.t, t/GdkCursor.t, t/GdkDisplay.t, t/GdkDnd.t, t/GdkDrawable.t, t/GdkEvent.t, t/GdkGC.t, t/GdkKeys.t, t/GdkSelection.t, t/GdkWindow.t, t/GdkX11.t, t/GtkAccelGroup.t, t/GtkAlignment.t, t/GtkButton.t, t/GtkButtonBox.t, t/GtkCellRenderer.t, t/GtkCheckMenuItem.t, t/GtkClipboard.t, t/GtkComboBox.t, t/GtkEntry.t, t/GtkEventBox.t, t/GtkIconFactory.t, t/GtkIconTheme.t, t/GtkInvisible.t, t/GtkListStore.t, t/GtkMenu.t, t/GtkMenuShell.t, t/GtkMessageDialog.t, t/GtkPaned.t, t/GtkRadioMenuItem.t, t/GtkScale.t, t/GtkSelection.t, t/GtkStyle.t, t/GtkTextBuffer.t, t/GtkTextIter.t, t/GtkTextView.t, t/GtkToolbar.t, t/GtkTreeModel.t, t/GtkTreeModelSort.t, t/GtkTreeSelection.t, t/GtkTreeStore.t, t/GtkTreeView-Dnd.t, t/GtkTreeView.t: use Gtk2->CHECK_VERSION instead of check_version and get_version_info. * examples/combo_box.pl, examples/file_chooser.pl, gtk-demo/hypertext.pl, gtk-demo/main.pl: ditto. * xs/Gtk2.xs: commentary 2004/02/26 23:00 (-0500) muppetman * README: update the sandbox instructions. * t/GtkMenu.t: have the position func return a location farther away from the corner of the screen, to keep the test from creating gtk+ warnings on stderr about allocating a widget with negative size. * xs/GtkTooltips.xs: use a weakref instead of object data to trigger the unref of the tooltips object; this keeps from polluting the widget's object data. (Thanks to yosh for the idea.) * xs/Gtk2.xs, t/PangoLayout.t, t/PangoTabs.t: correct the semantics of the boot-time version check; it was backwards, warning when the runtime version was newer instead of older. add pod for the version stuff, now in the Gtk2::version manpage. change Gtk2::Pango::check_version to Gtk2::Pango::CHECK_VERSION, to stick with the versioning scheme decision: http://lists.gnome.org/archives/gtk-perl-list/2004-February/msg00085.html * xs/GtkMenu.xs: commentary * xs/GtkScale.xs: move comment to keep older versions of ExtUtils::ParseXS from ignoring the #if * xs/GtkWidget.xs: code to hush uninitialized value warning was setting the wrong var. 2004/02/26 23:29 (+0100) kaffeetisch * xs/GtkCellEditable.xs (CALL): Don't call SPAGAIN since we're not accessing the stack again. 2004/02/16 18:21 (+0100) kaffeetisch * t/GtkIconTheme.t: Skip some tests if we can't find an icon. * xs/PangoFont.xs * xs/PangoLayout.xs: Use "default" instead of "defualt" in the switch statement. 2004/02/25 19:38 (-0500) rwmcfa1 * xs/Gdk.xs, xs/GdkDnd.xs, xs/GdkEvent.xs, xs/GdkProperty.xs, xs/GdkRgb.xs, xs/GdkSelection.xs, xs/GdkTypes.xs, xs/Gtk2.xs, xs/GtkAdjustment.xs, xs/GtkCalendar.xs, xs/GtkCellRenderer.xs, xs/GtkColorSelectionDialog.xs, xs/GtkCombo.xs, xs/GtkDialog.xs, xs/GtkFileChooser.xs, xs/GtkFileSelection.xs, xs/GtkFontSelection.xs, xs/GtkPaned.xs, xs/GtkRc.xs, xs/GtkSelection.xs, xs/GtkStyle.xs, xs/GtkToolbar.xs, xs/GtkWidget.xs, xs/PangoFont.xs, xs/PangoLayout.xs: improved switch error handling, better way of quiting un-init'd values and don't wast str's on hard to reach cases, just assert not reached. 2004/02/25 19:38 (-0500) rwmcfa1 * xs/GdkColor.xs xs/GdkEvent.xs xs/GtkAccelGroup.xs xs/GtkAccelMap.xs xs/GtkCellRenderer.xs xs/GtkDialog.xs xs/GtkSelection.xs xs/GtkTreeModel.xs: =pod position= -> =for position some pod parsers don't like text after =pod. 2004/02/25 15:45 (-0500) rwmcfa1 * xs/GdkColor.xs, xs/GdkEvent.xs, xs/GtkAccelGroup.xs, xs/GtkAccelMap.xs, xs/GtkCellRenderer.xs, xs/GtkDialog.xs, xs/GtkSelection.xs, xs/GtkStock.xs, xs/GtkTreeModel.xs: apidoc pod positioning updates 2004/02/23 15:16 (-0500) rwmcfa1 * t/00.Gtk2.t: versions could be 0, which would fail before, check for defined. 2004/02/23 14:38 (-0500) muppetman * CodeGen.pm: add to parse_maps the ability to generate error domain registrations. * maps-2.0, maps-2.3, xs/GdkPixbuf.xs, xs/GtkFileChooser.xs, xs/GtkIconTheme.xs: use the new code in Gtk2::CodeGen::parse_maps to register error domains automatically from the maps files, rather than by hand. 2004/02/22 15:35 (-0500) rwmcfa1 * xs/Gtk2.xs: added gtk_(major|minor|micro)_version and GTK_(MAJOR|MINOR|MICRO)_VERSION and finally CHECK_VERSION. thus the correct method for handling version numbers begins. more doc on howto do version checking and using this stuff where appliciable to come. * t/00.Gtk2.t: test out new stuff ^. 2004/02/22 20:56 (+0100) kaffeetisch * t/GtkFileChooserDialog.t * xs/GtkFileChooserDialog.xs: Bind and test new_with_backend. * t/GtkAction.t * t/GtkActionGroup.t * t/GtkColorButton.t * t/GtkComboBox.t * t/GtkComboBoxEntry.t * t/GtkEntryCompletion.t * t/GtkExpander.t * t/GtkFileChooser.t * t/GtkFileChooserDialog.t * t/GtkFileChooserWidget.t * t/GtkFileFilter.t * t/GtkFontButton.t * t/GtkRadioAction.t * t/GtkSeparatorToolItem.t * t/GtkToggleAction.t * t/GtkToggleToolButton.t * t/GtkToolButton.t * t/GtkToolItem.t * t/GtkTreeView-Dnd.t * xs/GtkAction.xs * xs/GtkActionGroup.xs * xs/GtkCellLayout.xs * xs/GtkColorButton.xs * xs/GtkComboBox.xs * xs/GtkComboBoxEntry.xs * xs/GtkEntryCompletion.xs * xs/GtkExpander.xs * xs/GtkFileChooser.xs * xs/GtkFileChooserDialog.xs * xs/GtkFileChooserWidget.xs * xs/GtkFileFilter.xs * xs/GtkFontButton.xs * xs/GtkRadioAction.xs * xs/GtkRadioToolButton.xs * xs/GtkSeparatorToolItem.xs * xs/GtkToggleAction.xs * xs/GtkToggleToolButton.xs * xs/GtkToolButton.xs * xs/GtkToolItem.xs * xs/GtkUIManager.xs: Add a license hint. 2004/02/21 18:03 (-0500) muppetman * t/GtkToolbar.t: correct skip count 2004/02/21 16:18 (+0100) kaffeetisch * t/GtkRadioMenuItem.t * xs/GtkRadioMenuItem.xs: Bind and test new_from_widget, new_with_mnemonic_from_widget, and new_with_label_from_widget. 2004/02/20 22:32 (+0100) kaffeetisch * t/GtkIconTheme.t: Test lookup_icon, load_icon, add_builtin_icon and Gtk2::IconInfo::get_base_size, ::get_filename, ::set_raw_coordinates. * t/GtkButton.t * t/GtkImageMenuItem.t * t/GtkMessageDialog.t: Don't use noinit. Recent changes seem to require an initialized gtk+. * t/GtkToolbar.t: Test the new 2.4 stuff: get_drop_index, insert, get_item_index, get_n_items, get_nth_item, get_relief_style, [sg]et_show_arrow, and set_drop_highlight_item. Fixes for stuff found by Marc Brockschmidt: * t/GdkWindow.t: Only test if get_origin returned the correct number of values, but not if they are what we expect. * t/GtkFileSelection.t: Only test if button_area is a Gtk2::Widget since certain file selector modifications seem to use different kinds of widgets for it. * t/GtkSimpleList.t: Don't test for quoted "0.1"'s because this fails with locales that use different decimal delimiters. 2004/02/20 01:38 (-0500) muppetman * Gtk2.pm, README, Makefile.PL, NEWS: unstable release 1.036 2004/02/19 13:47 (+0100) kaffeetisch * t/GdkDisplay.t: Only test if get_name's return value is defined. 2004/02/19 12:53 (+0100) kaffeetisch * gtk2perl.h: Alter GTK2PERL_STACK_ITEMS_TO_TARGET_ENTRY_ARRAY to return NULL if there are no arguments to use. * t/GtkSelection.t: Call Gtk2::TargetList::new without arguments to test for regressions of the above change. 2004/02/19 01:50 (-0500) muppetman * xs/GdkPixbuf.xs, xs/GtkFileChooser.xs, xs/GtkIconTheme.xs: register error domains. 2004/02/18 15:20 (-0500) rwmcfa1 * xs/PangoTabs.xs: apidoc fix, new needed fully qualified name 2004/02/17 21:14 (+0100) kaffeetisch * Makefile.PL: Use COPYRIGHT_FROM instead of COPYRIGHT. * t/Gdk.t * xs/Gdk.xs: Bind and test Gtk2::Gdk::Event::send_client_message, ::send_clientmessage_toall, and ::send_client_message_for_display. * t/GdkEvent.t * xs/GdkEvent.xs: Implement and test Gtk2::Gdk::Event::Client::message_type and ::data. Document ::data_format. * Gtk2.pm * t/GdkProperty.t * xs/GdkProperty.xs: Use Gtk2::Gdk::CHARS, ::USHORTS, and ::ULONGS instead of the magic numbers 8, 16, and 32. 2004/02/14 21:54 (+0100) kaffeetisch * t/GtkCellRenderer.t * xs/GtkCellRenderer.xs: Bind and test editing_canceled. * xs/GtkClipboard.xs: Provide a default for the user_data arguments of request_contents and request_text. * t/GtkScale.t * xs/GtkScale.t: Bind and test get_layout and get_layout_offsets. 2004/02/14 00:29 (+0100) kaffeetisch * t/GtkComboBox.t: Use a proper skip. The bug's fixed in cvs now. * t/GtkIconTheme.t: Change the TODO into a SKIP. The bug's been fixed in cvs. Test list_icons. * t/GtkItemFactory.t: Skip two tests if a certain function returned undef. Very rarely caused test failures for me. * t/PangoTabs.t: Change the skip_all into a normal skip. The bug is fixed in cvs and will hopefully be in the next release. 2004/02/12 19:00 (-0500) muppetman * Gtk2.pm, Makefile.PL, README, NEWS: unstable release 1.035 2004/02/12 19:08 (+0100) kaffeetisch * t/GtkFileChooser.t * t/GtkIconTheme.t: Mark some tests as TODOs. They are broken because of what seems to be gtk+ bugs. 2004/02/11 20:25 (+0100) kaffeetisch * examples/cellrenderer_date.pl: Adjust the positioning code to work correctly with scrolled tree views. * t/GtkUIManager.t: Test insert_action_group, get_action_groups, remove_action_group, get_accel_group, add_ui_from_string, add_ui_from_string, add_ui, remove_ui, ensure_update, get_ui, get_widget, get_toplevels, and get_action. 2004/02/11 00:37 (+0100) kaffeetisch * t/GtkComboBox.t: Test new, new_with_model, set_wrap_width, set_row_span_column, set_column_span_column, and [sg]et_active. * t/GtkFileChooser.t: Test add_shortcut_folder(_uri)?, list_shortcut_folders(_uris)?, and remove_shortcut_folder(_uri)?. * t/GtkRadioToolButton.t: Implement. * t/GtkAction.t * xs/GtkAction.xs: Add and test (is|get)_sensitive and (is|get)_visible. * t/GtkActionGroup.t * xs/GtkActionGroup.xs: Add and test [sg]et_sensitive, [sg]et_visible, and add_action_with_accel. * xs/GnomeIconTheme.xs: Allow undef for the context argument of list_icons. 2004/02/10 01:45 (-0500) muppetman A copyright.pod A doctypes M MANIFEST add copyright.pod and doctypes * Makefile.PL: require ExtUtils::Depends 0.2; use Glib::MakeHelper->postamble_docs_full(); use and install doctypes, to add mappings for unregistered types. * README: update the ExtUtils::Depends and ExtUtils::PkgConfig requirements. * t/GtkCellRenderer.t: 'focused' was not a valid CellRendererState value until 2.2.0 * xs/Gtk2.xs, xs/GtkTreeModel.xs, xs/GtkTreeStore.xs: pod updates 2004/02/09 01:32 (+0100) kaffeetisch * t/GtkTreeModelSort.t * xs/GtkTreeModelSort.xs: Bind and test clear_cache. * t/GtkTreeStore.t * xs/GtkTreeStore.xs: Alias set_value to set. Test it. 2004/02/08 22:28 (+0100) kaffeetisch * MANIFEST A t/GtkCellRendererPixbuf.t A t/GtkCellRendererText.t A t/GtkCellRendererToggle.t: New tests. * t/GtkCellRenderer.t: Test get_size, render, activate, start_editing, and [sg]et_fixed_size. 2004/02/09 01:24 (-0500) muppetman * xs/GtkSelection.xs: make the parsing code for the array and hash forms of Gtk2::TargetEntry agree on the value types. add pod for the format of a Gtk2::TargetEntry. 2004/02/08 21:45 (-0500) muppetman * Gtk2.pm, README, NEWS: unstable release 1.034 * Makefile.PL, README: require Glib 1.034 * t/GtkListStore.t, t/GtkTreeStore.t: update skips and such for gtk+ 2.0.x 2004/02/07 02:22 (-0500) muppetman * xs/GtkCellEditable.xs: allow perl implementations of GtkCellEditable * xs/GtkTreeModel.xs: allow perl implementations of GtkTreeModel. big thanks to Bjarne Steinsbo for helping iron out the memory management wrinkles for GtkTreeIter. doc on writing tree models is incomplete but started; i'd prefer if that doc section came *after* the normal method listing, but Glib::GenPod doesn't support that sort of thing at the moment. * examples/customlist.pl, examples/customrenderer.pl, MANIFEST: new examples, implementing interfaces 2004/02/06 22:25 (+0100) kaffeetisch * MANIFEST A t/GtkCellEditable.t A t/GtkEditable.t A t/GtkTreeModelSort.t A t/GtkTreeSortable.t: New tests. * t/GtkTreeModelFilter.t * t/GtkCellLayout.t: Implement. A t/GtkTreeModel.t * MANIFEST * t/GtkListStore.t * t/GtkTreeStore.t: Rearrange the tree model tests quite a bit to better suit the XS layout. * xs/GtkCellEditable.xs: Provide a default for the event argument of start_editing. * xs/GtkEditable.xs: Remove the string length argument from insert_text but keep it compatible with the old version. * xs/GtkObject.xs: Don't include "../gtk2perl.h" and "../ppport.h" but "gtk2perl.h" and "ppport.h". * xs/GtkTreeModelFilter.xs: Provide a default for the root argument of new and for the func argument of set_modify_func. Fix an allocation bug. Implement convert_child_iter_to_iter and convert_iter_to_child_iter. * xs/GtkTreeModelSort.xs: Add a class argument to new_with_model. * xs/GtkComboBox.xs * xs/GtkEntryCompletion.xs * xs/GtkTreeViewColumn.xs: Add Gtk2::CellLayout to the ancestry. 2004/02/06 00:39 (-0500) muppetman A examples/cellrenderer_progress.pl M MANIFEST add new cellrenderer example, ported from the TreeView tutorial. * xs/GtkCellRenderer.xs: big honkin' doc updates. flesh out docs for the process of deriving a new renderer, hide the methods that are called behind the scenes, and swizzle the order of things so that the meaningful methods are listed first. * xs/Gtk2.xs: better message? 2004/02/05 22:54 (+0100) kaffeetisch * t/GdkWindow.t: Test Gtk2::Gdk::Rectangle::new, x, y, width, height and values. * t/GtkFileChooser.t: Make strict-safe. 2004/02/05 22:46 (+0100) kaffeetisch * gtk2perl.h * Makefile.PL: Depend on ExtUtils::PkgConfig 1.03 for the new write_version_macros. Use it to create version macros for pango in gtk2perl-versions.h. * xs/Gtk2.xs: Implement xsub accessors to the above macros. * xs/PangoLayout.xs * t/PangoLayout.t: Use the new macros to protect backspace_deletes_character. 2004/02/04 19:09 (-0500) rwmcfa1 * t/00.Gtk2.t: skip count was incorrect, failed with no DISPLAY 2004/02/05 02:40 (-0500) muppetman A t/GtkFileChooser.t M MANIFEST add a nearly-complete test of Gtk2::FileChooser. some tests need to be fleshed out. 2004/02/04 23:11 (-0500) muppetman * pm/SimpleList.pm, xs/GdkDnd.xs: minor commentary updates. * pm/SimpleMenu.pm: commentary updates; ross wrote SimpleMenu himself (unless i'm mistaken), but the doc appears to have been copied from SimpleList. 2004/02/04 19:09 (-0500) rwmcfa1 * xs/Gtk2.xs: implemented linked version checking in BOOT section 2004/02/04 20:24 (+0100) kaffeetisch * t/00.Gtk2.t * xs/Gtk2.xs: Use and test Glib's new GPerlArgv. 2004/02/04 19:20 (+0100) kaffeetisch * t/GtkCellRenderer.t: Make strict-safe. Use different counters for the compatability and the new stuff. * xs/GtkCellRenderer.xs: Hush a compiler warning. 2004/02/04 02:13 (-0500) muppetman * xs/GtkCellRenderer.xs: re-vamp vfunc support for be more natural and perlish. use inheritable ALL_CAPS_METHODS instead of the freakish and highly non-standard system used in the past. the update is rather ugly, because we still support the old way for backwards-compatibility. requires new code just added to Glib which calls _INSTALL_OVERRIDES as part of Glib::Type::register_object. * examples/cellrenderer_popup.pl, examples/cellrenderer_spinbutton.pl, t/GtkCellRenderer.t: updated for new cellrenderer techniques * examples/cellrenderer_date.pl: updated for new cellrenderer techniques; also copied in some of torsten's experimental date renderer code from odot. 2004/02/04 02:16 (+0100) kaffeetisch * t/PangoLayout.t: Skip the call to set_font_description with undef until another bug in pango has been fixed. * t/PangoTabs.t: Skip the whole test for now until the bug in pango has been fixed. 2004/02/03 23:20 (+0100) kaffeetisch * t/02.GtkContainer.t * t/Gdk.t * t/GdkCursor.t * t/GdkDisplay.t * t/GdkDisplayManager.t * t/GdkDnd.t * t/GdkGC.t * t/GdkKeys.t * t/GdkProperty.t * t/GdkRegion.t * t/GdkScreen.t * t/GdkSelection.t * t/GdkWindow.t * t/GdkX11.t * t/GtkAccelGroup.t * t/GtkAccelLabel.t * t/GtkAccelMap.t * t/GtkAdjustment.t * t/GtkAlignment.t * t/GtkArrow.t * t/GtkAspectFrame.t * t/GtkBin.t * t/GtkBox.t * t/GtkButtonBox.t * t/GtkCheckButton.t * t/GtkCheckMenuItem.t * t/GtkClipboard.t * t/GtkColorButton.t * t/GtkColorSelection.t * t/GtkColorSelectionDialog.t * t/GtkDnd.t * t/GtkDrawingArea.t * t/GtkEntry.t * t/GtkEventBox.t * t/GtkExpander.t * t/GtkFileSelection.t * t/GtkFixed.t * t/GtkFontButton.t * t/GtkFontSelection.t * t/GtkFrame.t * t/GtkHBox.t * t/GtkHButtonBox.t * t/GtkHPaned.t * t/GtkHRuler.t * t/GtkHScale.t * t/GtkHScrollbar.t * t/GtkHSeparator.t * t/GtkIconFactory.t * t/GtkImageMenuItem.t * t/GtkInputDialog.t * t/GtkInvisible.t * t/GtkLayout.t * t/GtkListStore.t * t/GtkMenuBar.t * t/GtkMenuItem.t * t/GtkMenuShell.t * t/GtkMessageDialog.t * t/GtkMisc.t * t/GtkObject.t * t/GtkOptionMenu.t * t/GtkPaned.t * t/GtkRadioMenuItem.t * t/GtkRange.t * t/GtkRc.t * t/GtkRuler.t * t/GtkScale.t * t/GtkScrolledWindow.t * t/GtkSelection.t * t/GtkSeparatorMenuItem.t * t/GtkSizeGroup.t * t/GtkSpinButton.t * t/GtkStock.t * t/GtkStyle.t * t/GtkTable.t * t/GtkTearoffMenuItem.t * t/GtkTextBuffer.t * t/GtkTextChildAnchor.t * t/GtkTextMark.t * t/GtkTextTag.t * t/GtkTextTagTable.t * t/GtkToggleButton.t * t/GtkTreeSelection.t * t/GtkTreeStore.t * t/GtkTreeView.t * t/GtkVBox.t * t/GtkVButtonBox.t * t/GtkVPaned.t * t/GtkVRuler.t * t/GtkVScale.t * t/GtkVScrollbar.t * t/GtkVSeparator.t * t/GtkViewport.t * t/GtkWidget.t * t/PangoContext.t * t/PangoFont.t * t/PangoTabs.t: Add a Header tag to all tests that don't have one already. Sigh. Somebody remind me about adding those in the first place next time. * xs/GdkProperty.xs * xs/GtkClipboard.xs: Apidoc updates. 2004/02/02 22:37 (-0500) rwmcfa1 * xs/GtkTreeView.xs: gtk_tree_view_create_row_drag_icon was missing, now implemented. * t/GtkTreeView-Dnd.t: initial import, awaiting simulating a dnd 2004/02/02 19:39 (-0500) rwmcfa1 * examples/simple_menu.pl, pm/SimpleMenu.pm: examples/doc on how to use new per-entry callback_data. 2004/02/02 19:22 (-0500) rwmcfa1 * pm/SimpleMenu.pm, t/GtkSimpleMenu.t: added the ability to do per entry user_data. tested that desired user data is passed to callbacks in all cases. 2004/02/02 18:06 (-0500) rwmcfa1 * pm/TestHelper.pm: added the ablity to skip_all, pretty much just a pass through to Test::More, but a nice feature to have anyway. 2004/02/03 00:21 (+0100) kaffeetisch * xs/PangoLayout.xs: Change the PangoLogAttr to use UVs instead of IVs. Add backspace_deletes_character. A t/PangoLayout.t * MANIFEST: New test. 2004/02/02 23:34 (+0100) kaffeetisch * t/GdkDrawable.t: Change the TODO into another block that gets skipped if copy_to_image returns undef. * t/GtkComboBox.t: Always skip the failing tests because it's gtk+'s fault. Needs to be changed once it's fixed. 2004/02/02 22:30 (+0100) kaffeetisch * t/GtkTextIter.t: Test begins_tag, ends_tag, toggles_tag, forward_to_tag_toggle, backward_to_tag_toggle and all the stuff introduced in 2.4. * t/GtkTextView.t: Test scroll_to_mark, scroll_mark_onscreen, move_mark_onscreen. 2004/02/01 01:12 (+0100) kaffeetisch * t/GtkTextView.t: Test [sg]et_overwrite and [sg]et_accepts_tab. 2004/01/31 23:59 (+0100) kaffeetisch A t/GdkX11.t A t/PangoContext.t A t/PangoFont.t A t/PangoTabs.t * MANIFEST: New tests. 2004/01/31 16:19 (+0100) kaffeetisch * t/GtkFileChooserDialog.t * t/GtkFileChooserWidget.t: Initialize gtk+. * xs/PangoContext: Don't warn about unregistered subclasses of Gtk2::Pango::Fontset. * xs/PangoFont.xs: Don't warn about unregistered subclasses. Implement get_family. Make better_match also accept undef for old_match. Move Gtk2::PangoFont::get_metrics and implement ::describe. 2004/01/30 22:49 (-0500) muppetman A examples/filesel_multisel.pl A examples/multisel.pl M MANIFEST some examples i had lying around. 2004/01/30 08:06 (-0500) rwmcfa1 * t/Gdk.t: wholey crap, s missing from the work test, DISPLAY was unset so i didn't know it. 2004/01/29 20:07 (-0500) rwmcfa1 * Glib.pm, README: unstable release 1.033 * NEWS: updated * t/Gdk.t: init failure fixed, see below 1.032 isn't going public, was a test failure with no DISPLAY in Gtk2 2004/01/29 19:10 (-0500) rwmcfa1 * Gtk2.pm, README: unstable release 1.032 * NEWS: updated 2004/01/29 18:30 (-0500) rwmcfa1 * t/01.GtkWindow.t, t/GdkDrawable.t, t/GdkWindow.t, t/GtkPaned.t: temporary stop-gap fixes for test failures against HEAD, remotely running windowmaker, that's a mouth full. 2004/01/28 15:42 (-0500) rwmcfa1 * xs/GtkCalendar.xs, xs/GtkRenderer.xs, xs/GtkTextChildAnchor.xs, xs/GtkTextView.xs: apidoc updates 2004/01/28 00:27 (+0100) kaffeetisch A t/GdkSelection.t * MANIFEST: New test. * t/Gdk.t: Test Gtk2::Gdk::Threads::init, enter and leave. 2004/01/27 23:10 (+0100) kaffeetisch A t/GdkCursor.t A t/GdkKeys.t * MANIFEST: New tests. * t/GdkEvent.t: Test get_time, get_state, [sg]et_screen, axis and get_axis, coords and get_coords, put, get, peek, [sg]et_show_events, and Gtk2::Gdk::events_pending. * t/GtkTextIter.t: Test get_marks. * xs/GdkCursor.xs: Implement an accessor for cursor->type. Take ownership of the cursor returned by new_for_display. Add a class argument to new_from_pixbuf. * xs/GdkEvent.xs: Bind gdk_events_pending as Gtk2::Gdk::events_pending instead of Gtk2::Gdk::Event::gdk_events_pending. Bind gdk_event_get_graphics_expose as Gtk2::Gdk::Event::get_graphics_expose. Provide get_axis in addition to axis. state returns a guint, no gint. * xs/GdkKeys.xs: Change the PREFIX from gtk_keymap_ to gk_keymap_. Don't warn about unregistered subclasses. 2004/01/26 21:35 (+0100) kaffeetisch * t/GdkWindow.t: Use a parent window for calls that seem to require one. 2004/01/25 23:47 (-0500) muppetman * t/GdkGC.t: skip GdkScreen-related stuff on 2.0.x 2004/01/25 19:53 (-0500) muppetman * xs/Gtk2.xs: revert the removal of shadow, and add some commentary explaining why it is important. it allows us to keep from leaking strings removed from argv by gtk_init(). 2004/01/25 19:43 (-0500) rwmcfa1 * t/GdkDisplay.t: use DISPLAY env var instead of assuming :0.0 will work * t/GtkComboBoxEntry.t: use ord to get rid of some errors trying to take a to a power. 2004/01/25 23:37 (+0100) kaffeetisch * t/GdkDrawable.t: Skip the draw_image test if get_image returned undef. * examples/simplelist.pl * pm/SimpleList.pm * t/GtkSimpleList.t: Implement, document, test and demonstrate a 'markup' column type that can be used to put pango markup into cells. * xs/Gtk2.xs: Remove all references to the apparently unused 'shadow' variable in the gtk_init xsub. 2004/01/25 10:51 (-0500) rwmcfa1 * xs/GdkEvent.xs: moved ->x/y out of base class (they didn't belong there anyway and into the specific events that have them. which allowed them to be implemented as set/get accessors. the doc for event was messed up as well, all of the stuff was put on the event object when many of the methods were only available on certian even types. this does now cause several event pod to be created, but that's much cleaner and clearer. added custom pod to each of the event types saying they're parent is base event. also added a list of event types to the parent event's pod. * t/GdkEvent.t: test all of the new set/get x/y accessors on the appropriate event types. 2004/01/25 13:13 (+0100) kaffeetisch * MANIFEST A t/GdkDrawable.t A t/GdkGC.t A t/GdkScreen.t: New tests. * xs/GdkDrawable.xs: Implement get_clip_region, get_visible_region and draw_point. * xs/GdkGC.xs: Fix various typos. Initialize the mask in read_gcvalues_from_sv. Implement set_values and get_colormap. Remove a g_printerr. 2004/01/25 04:10 (-0500) muppetman * Gtk2.pm, README, NEWS: unstable release 1.031 * Makefile.PL, README: update Glib requirement to 1.031. 2004/01/25 01:50 (-0500) muppetman * examples/buttonbox.pl, examples/calendar.pl, examples/color_list.pl, examples/histogramplot.pl, examples/layout.pl, examples/rulers.pl, examples/scribble.pl, examples/socket.pl, examples/thread_usage.pl, gtk-demo/appwindow.pl, gtk-demo/button_box.pl, gtk-demo/changedisplay.pl, gtk-demo/colorsel.pl, gtk-demo/dialog.pl, gtk-demo/drawingarea.pl, gtk-demo/editable_cells.pl, gtk-demo/entry_completion.pl, gtk-demo/hypertext.pl, gtk-demo/images.pl, gtk-demo/item_factory.pl, gtk-demo/list_store.pl, gtk-demo/main.pl, gtk-demo/menus.pl, gtk-demo/panes.pl, gtk-demo/pixbufs.pl, gtk-demo/sizegroup.pl, gtk-demo/stock_browser.pl, gtk-demo/textview.pl, gtk-demo/tree_store.pl, gtk-demo/ui_manager.pl: use the TRUE and FALSE constants exported by Glib 2004/01/25 00:58 (-0500) muppetman A NEWS add a file to summarize changes A t/GtkAction.t A t/GtkComboBoxEntry.t A t/GtkFileFilter.t new tests M MANIFEST updated * pm/Pango.pm: add L<> to links in SEE ALSO. * t/GtkButton.t: sprintf the values returned by get_alignment to avoid precision mismatch problems * t/GtkIconTheme.t: implement some tests * t/GtkItemFactory.t: don't forget to return a string from the translation func * xs/GtkItemFactory.xs: keep the value returned from the perl callback alive long enough to be used by the caller. 2004/01/24 21:44 (-0500) rwmcfa1 * Makefile.PL: removed runtime_reqs stuff, replaced by the pkg-config trick * perl-Gtk2.spec.in: use pkg-config for Requires version 2004/01/22 15:28 (-0500) muppetman A NEWS M MANIFEST add a NEWS file that summarizes the ChangeLog in digestible terms. * t/GtkStyle.t: versions of gtk+ prior to 2.2.0 handled only 'south-east', which isn't so bad, except that they actually called g_assert_not_reached() in the branch of code that you reach by passing other values. so, eh, never pass anything but south-east to old gtk+. * t/GtkTextChildAnchor.t: letting an anchor die without having inserted it into a buffer causes very bad things to happen. dispose of it nicely. 2004/01/22 15:28 (-0500) muppetman * t/Gdk.t: don't forget the skip count. 2004/01/22 02:15 (-0500) muppetman * xs/GtkFileChooser.xs, xs/GtkIconFactory.xs, xs/GtkTreeView.xs, xs/PangoFont.xs: plugging more memory leaks * xs/GtkRc.xs: invalid free bug was triggered by letting g_free() try to free perl's garbage collected memory. GtkRc wants to g_free() the bg_pixmap_name and name in its destructor, so we must g_strdup them. don't forget to free the old values. 2004/01/22 00:46 (-0500) muppetman * xs/GtkAccelGroup.xs, xs/GtkTextChildAnchor.xs, xs/GtkTreeModel.xs: stop memory leaks 2004/01/21 17:16 (-0500) muppetman * xs/Gdk.xs: before 2.2.0, gdk_get_display() returned a static string. don't free it if we're on old gtk+. 2004/01/21 00:32 (-0500) muppetman * xs/GdkColor.xs: use initializers to keep valgrind happy. * t/GdkColor.t: if we're testing that pixel is nonzero after alloc_colors, test that it's zero before * xs/GdkTypes.xs: always initialize the geometry hints * xs/GdkWindow.xs: always initialize the attribute mask, regardless of code path 2004/01/20 21:42 (-0500) muppetman * xs/GtkSelection.xs: free the value returned from gtk_selection_data_get_text(). also make sure Perl treats is as utf8. 2004/01/20 21:00 (-0500) muppetman * gtk2perl.h, xs/GtkClipboard.xs, xs/GtkSelection.xs: use gperl_alloc_temp() instead of g_new0() in GTK2PERL_STACK_ITEMS_TO_TARGET_ENTRY_ARRAY(), and adjust the code to suit. 2004/01/21 00:45 (+0100) kaffeetisch * t/Gdk.t: Use show_now instead of show to make sure the window's actually shown. 2004/01/20 23:20 (+0100) kaffeetisch * t/GtkMessageDialog.t: Fix skip count. * xs/Gdk.xs: Make sm_client_id default to NULL in set_sm_client_id. * xs/GtkStyle.xs: Don't _copy the values in the color accessors. Bind GTK_STYLE_ATTACHED as Gtk2::Style::attached. Fix Gtk2::Style::attach. 2004/01/20 22:58 (+0100) kaffeetisch A t/Gdk.t A t/GdkDisplay.t A t/GdkDisplayManager.t A t/GtkStyle.t * MANIFEST: New tests. 2004/01/20 21:33 (+0100) kaffeetisch * t/01.GtkWindow.t * t/GtkMessageDialog.t * t/GtkTreeView.t: Tests for 2.4 stuff. * xs/GtkRc.xs: Add a FIXME comment about the weird sporadic segfaults I'm seeing. 2004/01/20 12:29 (-0500) muppetman * xs/GdkKeys.xs: change PREFIX to fix gdk_keyval_* functions. they are now Gtk2::Gdk->keyval_*, like in gtk-perl. 2004/01/19 21:55 (-0500) muppetman * t/GtkEntryCompletion.t: flesh this out a bit * xs/GtkActionGroup.xs: remove debugging print * xs/GtkComboBoxEntry.xs: apidoc 2004/01/19 20:55 (-0500) rwmcfa1 * xs/GdkColor.xs: fixed mem leak, argcolors, in alloc_colors. * xs/GdkWindow.xs: fixed mem leak, RETVAL, in get_frame_extents. * xs/GtkAccelMap.xs: fixed mem leaks, callback needed destroying after the foreach's were through, in map_foreach and map_foreach_unfiltered. 2004/01/19 20:52 (-0500) muppetman A t/GtkActionGroup.t A t/GtkCellLayout.t A t/GtkEntryCompletion.t A t/GtkFileChooserDialog.t A t/GtkFileChooserWidget.t A t/GtkIconTheme.t A t/GtkRadioAction.t A t/GtkRadioToolButton.t A t/GtkSeparatorToolItem.t A t/GtkToggleAction.t A t/GtkToggleToolButton.t A t/GtkToolButton.t A t/GtkToolItem.t A t/GtkTreeModelFilter.t A t/GtkUIManager.t M MANIFEST new tests * xs/GtkActionGroup.xs: avoid core dumps 2004/01/19 15:40 (-0500) muppetman * Makefile.PL: refactor some of the code that handles picking up files by version. use only the maps files that contain stuff for the gtk+ version against which we're compiling for enums.pod. 2004/01/19 15:40 (-0500) muppetman * xs/GtkIconTheme.xs, xs/GtkToggleToolButton.xs: add missing class parameter * xs/GtkRadioAction.xs: was checking for the wrong kind of object * xs/GtkTreeModelFilter.xs: allow NULL for new's root 2004/01/18 13:17 (-0500) rwmcfa1 * xs/GtkWidget.xs: valgrind found a mem leak, fix by muppet. 2004/01/18 02:30 (+0100) kaffeetisch * t/GtkEntry.t: Test [sg]et_completion. * t/GtkEventBox.t: Test [sg]et_above_child and [sg]et_visible_window. * t/GtkMenu.t: Test attach and set_monitor. * t/GtkTextBuffer.t: Test select_range. 2004/01/17 16:26 (+0100) kaffeetisch * t/GdkEvent.t: Only declare $event once to avoid warnings. * t/GtkButton.t: Put a TODO block around get_alignment - it has precision issues. * t/GtkCalendar.t: Test [sg]et_display_options. * t/GtkClipboard.t: Test request_targets. * xs/GtkDnd.t * t/GtkDnd.t: Implement and test both syntaxes: Gtk2::Drag->begin($button, ...) and $button->drag_begin(...). * xs/GtkIconFactory.xs: * t/GtkIconFactory.t: Implement and test [sg]et_icon_name. * t/GtkAccelGroup.t * t/GtkAlignment.t * t/GtkButton.t * t/GtkButtonBox.t * t/GtkCheckMenuItem.t * t/GtkMenuShell.t: Test for 2.3.0 instead of 2.4.0 until we have a stable release of gtk+. * t/01.GtkWindow.t * t/GtkPaned.t: Don't declare TRUE and FALSE, Gtk2::TestHelper does that now. * t/02.GtkContainer.t * t/GtkDnd.t * t/GtkTextTag.t * t/GtkTreeView.t: Remove the Gtk2::Gdk::Event::new skips. * t/GtkTreeView.t: Use true values to test functions that return/take a boolean. Only test stuff inside the cell_data_func once. * xs/GtkClipboard.xs: Use void for the return value of wait_for_targets - it uses PPCODE. Check targets for NULL instead of n_targets. * xs/GtkCalendar.xs * xs/GtkComboBox.xs: Mark ix as unused. * xs/GtkFileChooser.xs: Initialize ret to hush a compiler warning. * MANIFEST A t/GdkProperty.t * xs/GdkProperty.xs: Fix and test property_get and property_change. Also test the other bound methods. 2004/01/17 04:10 (-0500) muppetman A t/GtkComboBox.t M MANIFEST new test. doesn't seem to work right. 2004/01/17 03:46 (-0500) muppetman * Makefile.PL: maps is gone, use all of the maps-* files for podifyenums. * tools/podifyenums.pl: eat \$ARGV[0] and then process all files on command line (with <>) * examples/combo_box.pl, examples/color_list.pl, examples/file_chooser.pl: refuse to run when linked against a gtk+ that's too old * examples/testdnd.pl: nobody told this example that the target flags are no longer integers * gtk-demo/hypertext.pl: bad logic kept hyperlinks from actually working * t/GtkTextBuffer.t: appropriate skips for 2.0.x * xs/GdkEvent.xs: provide our own implementation of gdk_event_new() on 2.0.x 2004/01/17 02:35 (-0500) muppetman * t/GtkExpander.t: doesn't need init. * t/GtkColorButton.t, GtkFontButton.t: copy and paste bugs 2004/01/17 02:00 (-0500) muppetman The Giant Merge of the 2.3.x branch into HEAD. D maps A maps-2.0 A maps-2.2 A maps-2.3 Split the maps file into revision-specific pieces. This lets us track things a little more clearly. A xs_files-2.3 A examples/combo_box.pl A examples/file_chooser.pl A gtk-demo/hypertext.pl A gtk-demo/entry_completion.pl A gtk-demo/ui_manager.pl A t/GtkExpander.t A t/GtkColorButton.t A t/GtkFontButton.t A xs/GtkAction.xs A xs/GtkActionGroup.xs A xs/GtkCellLayout.xs A xs/GtkColorButton.xs A xs/GtkComboBox.xs A xs/GtkComboBoxEntry.xs A xs/GtkEntryCompletion.xs A xs/GtkExpander.xs A xs/GtkFileChooser.xs A xs/GtkFileChooserDialog.xs A xs/GtkFileChooserWidget.xs A xs/GtkFileFilter.xs A xs/GtkFontButton.xs A xs/GtkIconTheme.xs A xs/GtkRadioAction.xs A xs/GtkRadioToolButton.xs A xs/GtkSeparatorToolItem.xs A xs/GtkToggleAction.xs A xs/GtkToggleToolButton.xs A xs/GtkToolButton.xs A xs/GtkToolItem.xs A xs/GtkTreeModelFilter.xs A xs/GtkUIManager.xs new files for stuff that's new in 2.4, with three new tests. * MANIFEST: updated for file churn. alphabetized. * CodeGen.pm: version 0.02 can merge maps from multiple files, with full backward compatability. * Makefile.PL: add xs_files for 2.3 if available. merge maps from various files by what's available. NOTE: the 2.3 stuff will need to be changed to 2.4 when 2.4 is released. * gtk-demo/main.pl, gtk-demo/sizegroup.pl, gtk-demo/textview.pl: cleanup, and updates for new things available in 2.4 * pm/TestHelper.pm: encourage the use of the TRUE/FALSE constants in tests * xs/GtkAccelGroup.xs: the closure unref thing bugs me, add FIXMEs * xs/GtkLabel.xs: allow NULL where appropriate * xs/GdkCursor.xs, xs/GdkDisplay.xs, xs/GdkDrawable.xs, xs/GdkPixbuf.xs, xs/GdkPixbufLoader.xs, xs/GdkWindow.xs, xs/GtkAlignment.xs, xs/GtkButton.xs, xs/GtkButtonBox.xs, xs/GtkCalendar.xs, xs/GtkCheckMenuItem.xs, xs/GtkClipboard.xs, xs/GtkEntry.xs, xs/GtkEventBox.xs, xs/GtkMenu.xs, xs/GtkMenuShell.xs, xs/GtkMessageDialog.xs, xs/GtkTextBuffer.xs, xs/GtkTextIter.xs, xs/GtkTextView.xs, xs/GtkToolbar.xs, xs/GtkTreeViewColumn.xs, xs/GtkWidget.xs, xs/GtkWindow.xs: add new functions that appeared in 2.3.x. the CHECK_VERSION conditionals are marked with FIXMEs to remind us to change them to 2.4.0 when gtk+-2.4.0 is finally released. 2004/01/17 00:46 (+0100) kaffeetisch A t/GtkTextBuffer.t A t/GtkTextMark.t A t/GtkTextTag.t A t/GtkTextTagTable.t * MANIFEST: Initial import. 2004/01/16 18:35 (-0500) rwmcfa1 * xs/GdkEvents.xs: implemented setters for most everything and getter's for most everything that didn't have them. rest are TODO/FIXME'd. * t/GdkEvent.t: initial import, test all of the above implementations, pretty thorough. 2004/01/16 11:14 (-0500) rwmcfa1 * Makefile.PL: use the new BLIB_DONE var as a dep of the things that need to know that blib has the .so's. (see Glib commit at same time) fixes problems with -j make options. 2004/01/16 02:00 (-0500) muppetman release 1.030 (unstable) 2004/01/16 01:54 (-0500) muppetman * t/GdkDnd.t: this test fails rather insistently on my system; disabling it with loud FIXMEs so we can make a release. 2004/01/16 00:53 (-0500) muppetman * AUTHORS, TODO: updated * Makefile.PL, README: update requirements to Glib-1.030 and emphasize that this is an unstable series. 2004/01/15 14:37 (-0500) muppetman * t/GtkTextView.t: allow negative numbers when testing returns from buffer_to_window_ccords. * xs/GtkIconFactory.xs: remove return values from call signature of lookup_for_settings * xs/GtkImage.xs: allow null filename to new_from_file and set_from_file, as documented in C API ref * xs/GtkTreeView.xs: use XS comments to hide commented-out function from ParseXSDoc (supress "missing" warnings) * xs/GtkList.xs, xs/GtkRc.xs, xs/GtkWidget.xs, xs/GtkWindow.xs: give types to faked args to hush warnings from podify 2004/01/15 18:55 (+0100) kaffeetisch A t/GdkDnd.t A t/GtkObject.t A t/GtkTextView.t * MANIFEST: Initial import. A t/GtkTextChildAnchor.t A xs/GtkTextChildAnchor.xs * MANIFEST * xs_files-2.0: Initial implementation and test. * xs/GtkTextView.xs: Fix get_line_at_y, use _own for the return value of get_tabs and get_default_attributes. * xs/GdkDnd.xs: Use appropriate PREFIX for gdk_drop_reply and gdk_drop_finish. 2004/01/14 21:29 (-0500) muppetman * xs/GdkPixbuf.xs: we don't care about unregistered subclasses of GdkPixbufAnimation. 2004/01/14 20:44 (-0500) rwmcfa1 * t/GtkImage.t: nearly complete testing now, needs test for from_image funcs. found problem that needs resolving with PixbufAnimation, see warnings printed here, at this point. 2004/01/14 17:53 (-0500) muppetman test fixes on RH8.0 / gtk+-2.0.6 * t/GtkPaned.t: use show_now to ensure the window is on screen, rather than unreliable timeout hacks. * t/GtkTreeView.t: fix inverted logic on version guard for set_cursor_on_cell. 2004/01/14 12:06 (-0500) rwmcfa1 * xs/GtkImage.xs: fixed bug in gtk_image_stock_get xsub found when writing test below. 2004/01/14 10:24 (-0500) rwmcfa1 * t/GtkImage.t: initial import, very very incomplete 2004/01/14 09:16 (-0500) rwmcfa1 * t/GtkCurve.t: initial import, pretty much complete. 2004/01/14 08:07 (-0500) rwmcfa1 * t/GtkTreeView.xs: apparently need to skip the tests needed events unless we're on newer than 2.2.x 2004/01/13 23:17 (-0500) muppetman * gtk-demo/textview.pl: use the PANGO_* constants from Gtk2::Pango instead of the rather obtuse Gtk2::Pango->* constants. 2004/01/13 23:14 (-0500) muppetman * gtk2perl.h: add newSVGdkBitmap_ornull. 2004/01/13 23:03 (-0500) rwmcfa1 * xs/GtkTextIter.xs: _ornull's added to tag params for tag_toggle funcs found by Dan Lyke 2004/01/13 20:30 (-0500) rwmcfa1 * t/GtkTreeView.xs: added tests for set_cursor_on_cell, scroll_to_point, get_path_at_pos, tree_to_widget_coords, and widget_to_tree_coords. 2004/01/12 23:45 (+0100) kaffeetisch * t/GtkDnd.t: Skip a few things if Gtk2::Gdk::Event::new isn't available. 2004/01/12 09:49 (-0500) rwmcfa1 * pm/TestHelper.pm: if we're not 2.2.0 or greated don't allow init to be skipped. earlier rel's have to for some pagno thing. * t/GtkClipboard.t: the clipboard didn't exist for sure until 2.2.0 2004/01/11 23:59 (+0100) kaffeetisch * MANIFEST A t/GtkDnd.t: New test. * t/GtkTextIter.t: Test everything. * t/GdkRegion.t * t/GdkWindow.t * t/GtkAccelGroup.t * t/GtkAccelLabel.t * t/GtkAccelMap.t * t/GtkAdjustment.t * t/GtkAlignment.t * t/GtkArrow.t * t/GtkAspectFrame.t * t/GtkBin.t * t/GtkBox.t * t/GtkButtonBox.t * t/GtkCheckButton.t * t/GtkCheckMenuItem.t * t/GtkColorSelection.t * t/GtkColorSelectionDialog.t * t/GtkDrawingArea.t * t/GtkEntry.t * t/GtkEventBox.t * t/GtkFileSelection.t * t/GtkFixed.t * t/GtkFontSelection.t * t/GtkFrame.t * t/GtkHBox.t * t/GtkHButtonBox.t * t/GtkHPaned.t * t/GtkHRuler.t * t/GtkHScale.t * t/GtkHScrollbar.t * t/GtkHSeparator.t * t/GtkIconFactory.t * t/GtkImageMenuItem.t * t/GtkInputDialog.t * t/GtkInvisible.t * t/GtkLayout.t * t/GtkMenuBar.t * t/GtkMenuItem.t * t/GtkMenuShell.t * t/GtkMessageDialog.t * t/GtkMisc.t * t/GtkOptionMenu.t * t/GtkRadioMenuItem.t * t/GtkRange.t * t/GtkRc.t * t/GtkRuler.t * t/GtkScale.t * t/GtkScrolledWindow.t * t/GtkSelection.t * t/GtkSeparatorMenuItem.t * t/GtkSizeGroup.t * t/GtkSpinButton.t * t/GtkStock.t * t/GtkTable.t * t/GtkTearoffMenuItem.t * t/GtkToggleButton.t * t/GtkTreeStore.t * t/GtkTreeView.t * t/GtkVBox.t * t/GtkVButtonBox.t * t/GtkVPaned.t * t/GtkVRuler.t * t/GtkVScale.t * t/GtkVScrollbar.t * t/GtkVSeparator.t * t/GtkViewport.t: Remove needless 'use Gtk2;'s. 2004/01/11 11:44 (-0500) rwmcfa1 * exmples/thread_usage.pl: initial import, example of the 'correct' way to use threads and Gtk2. 2004/01/11 00:56 (-0500) muppetman * examples/color_list.pl: commentary and clean-up, and a little sprucing. add the attribute to all renderers in all columns of the view, rather than depending on the location of the hidden column. 2004/01/10 15:28 (-0500) muppetman * xs/GdkTypes.xs: explicit zero initialization for GdkGeometries * xs/GdkPixbuf.xs, xs/Gtk2.xs, xs/GtkEditable.xs: portability fixes for x86_64 systems. mostly things like using GUINT_TO_POINTER instead of plain casts, using STRLEN instead of int, etc. 2004/01/10 12:44 (-0500) rwmcfa1 * t/02.GtkContainer.t, t/GdkRegion.t, t/GtkAccelLabel.t, t/GtkAdjustment.t, t/GtkAlignment.t, t/GtkArrow.t, t/GtkAspectFrame.t, t/GtkBin.t, t/GtkBox.t, t/GtkButton.t, t/GtkButtonBox.t, t/GtkCalendar.t, t/GtkCheckButton.t, t/GtkCheckMenuItem.t, t/GtkDrawingArea.t, t/GtkEventBox.t, t/GtkFixed.t, t/GtkFrame.t, t/GtkHBox.t, t/GtkHButtonBox.t, t/GtkHPaned.t, t/GtkHRuler.t, t/GtkHScale.t, t/GtkHScrollbar.t, t/GtkHSeparator.t, t/GtkHandleBox.t, t/GtkImageMenuItem.t, t/GtkLayout.t, t/GtkMenuBar.t, t/GtkMenuItem.t, t/GtkMessageDialog.t, t/GtkMisc.t, t/GtkProgressBar.t, t/GtkRadioButton.t, t/GtkRadioMenuItem.t, t/GtkRange.t, t/GtkRuler.t, t/GtkScale.t, t/GtkScrolledWindow.t, t/GtkSeparatorMenuItem.t, t/GtkSizeGroup.t, t/GtkStatusBar.t, t/GtkStock.t, t/GtkTable.t, t/GtkTearoffMenuItem.t, t/GtkTextIter.t, t/GtkToggleButton.t, t/GtkTreeSelection.t, t/GtkVBox.t, t/GtkVButtonBox.t, t/GtkVPaned.t, t/GtkVRuler.t, t/GtkVScale.t, t/GtkVScrollbar.t, t/GtkVSeparator.t, t/GtkViewport.t: used noinit => 1 with TestHelper b/c these seem to be able to go about there business without init. and yes i know this is a huge commit log, but it's useful to be able to see which tests i did this to at a glance. 2004/01/10 12:26 (-0500) muppetman * t/GdkWindow.t: one more fix -- GdkScreen didn't exist on 2.0.x * maps: commentary. 2004/01/10 17:04 (+0100) kaffeetisch * t/GdkWindow.t * xs/GdkWindow.t: Don't initialize mask to 0, but *mask. The mask creation should work correctly now. 2004/01/10 04:09 (-0500) muppetman * t/01.GtkWindow.t: correct the skip count for 2.0.x * t/GtkListStore.t: on RH8 with gtk+-2.0.6, i get a crash from pango xft when attempting to create the TreeView, complaining that there's no display. later versions don't seem to require this; so, skip the remaining tests on 2.0.6 if gtk_init_check fails. 2004/01/10 07:15 (+0100) kaffeetisch * t/GtkItemFactory.t: Only test if the return value of get_widget_by_action is a Gtk2::Widget. * t/GdkWindow.t: Move the get_position call around a bit to make it pass. Don't be too strict with get_toplevel. 2004/01/10 05:35 (+0100) kaffeetisch Merge from the test-suite-branch. * t/00.Gtk2.t: Test disable_setlocale, set_locale, get_default_language, main_iteration_do, key_snooper_install, key_snooper_remove, and quit_add_destroy. * t/01.GtkWindow.t: Test add_accel_group, remove_accel_group and Gtk2::WindowGroup::new, ::add_window, and ::remove_window. * MANIFEST R t/01.GtkWidget.t R t/02.GtkButton.t A t/02.GtkContainer.t R t/03.GtkGammaCurve.t R t/04.GtkSocket-GtkPlug.t R t/05.GtkListStore-etc.t R t/06.GtkLabel.t R t/07.GtkBoxes.t R t/08.GtkCombo.t R t/09.GtkRadioButton.t R t/10.GtkProgressBar.t R t/11.GtkStatusBar.t R t/12.GtkDialog.t R t/13.GtkTooltips.t R t/14.GtkToolbar.t R t/15.GtkHandleBox.t R t/16.GtkMenu-etc.t R t/17.GtkItemFactory.t R t/18.GtkNotebook.t R t/19.GtkSimpleList.t R t/20.GdkColor.t R t/21.GtkContainer.t R t/22.GtkListStore.t R t/23.GtkTreeStore.t R t/24.GtkTreeView.t R t/25.GtkTreeSelection.t R t/26.GtkSimpleMenu.t R t/27.GtkClipboard.t R t/30.GtkCellRenderer.t A t/GdkColor.t A t/GdkRegion.t A t/GdkWindow.t A t/GtkAccelGroup.t A t/GtkAccelLabel.t A t/GtkAccelMap.t A t/GtkAdjustment.t A t/GtkAlignment.t A t/GtkArrow.t A t/GtkAspectFrame.t A t/GtkBin.t A t/GtkBox.t A t/GtkButton.t A t/GtkButtonBox.t A t/GtkCalendar.t A t/GtkCellRenderer.t A t/GtkCheckButton.t A t/GtkCheckMenuItem.t A t/GtkClipboard.t A t/GtkColorSelection.t A t/GtkColorSelectionDialog.t A t/GtkCombo.t A t/GtkDialog.t A t/GtkDrawingArea.t A t/GtkEntry.t A t/GtkEventBox.t A t/GtkFileSelection.t A t/GtkFixed.t A t/GtkFontSelection.t A t/GtkFrame.t A t/GtkGammaCurve.t A t/GtkHBox.t A t/GtkHButtonBox.t A t/GtkHPaned.t A t/GtkHRuler.t A t/GtkHScale.t A t/GtkHScrollbar.t A t/GtkHSeparator.t A t/GtkHandleBox.t A t/GtkIconFactory.t A t/GtkImageMenuItem.t A t/GtkInputDialog.t A t/GtkInvisible.t A t/GtkItemFactory.t A t/GtkLabel.t A t/GtkLayout.t A t/GtkListStore.t A t/GtkMenu.t A t/GtkMenuBar.t A t/GtkMenuItem.t A t/GtkMenuShell.t A t/GtkMessageDialog.t A t/GtkMisc.t A t/GtkNotebook.t A t/GtkOptionMenu.t A t/GtkPaned.t A t/GtkProgressBar.t A t/GtkRadioButton.t A t/GtkRadioMenuItem.t A t/GtkRange.t A t/GtkRc.t A t/GtkRuler.t A t/GtkScale.t A t/GtkScrolledWindow.t A t/GtkSelection.t A t/GtkSeparatorMenuItem.t A t/GtkSimpleList.t A t/GtkSimpleMenu.t A t/GtkSizeGroup.t A t/GtkSocket-GtkPlug.t A t/GtkSpinButton.t A t/GtkStatusBar.t A t/GtkStock.t A t/GtkTable.t A t/GtkTearoffMenuItem.t A t/GtkTextIter.t A t/GtkToggleButton.t A t/GtkToolbar.t A t/GtkTooltips.t A t/GtkTreeSelection.t A t/GtkTreeStore.t A t/GtkTreeView.t A t/GtkVBox.t A t/GtkVButtonBox.t A t/GtkVPaned.t A t/GtkVRuler.t A t/GtkVScale.t A t/GtkVScrollbar.t A t/GtkVSeparator.t A t/GtkViewport.t A t/GtkWidget.t R t/accel-group-map.t R t/calendar.t R t/file-selection.t R t/paned.t R t/text-iter-searches.t R t/trivial-widgets.t: Rename, split, extend and/or create tests. The new policy and long running goal is to have a .t for every .xs. 2004/01/10 05:17 (+0100) kaffeetisch * xs/GtkMenu.xs * xs/GtkRadioButton.xs * xs/GtkRadioMenuItem.xs * xs/GtkToolbar.xs: Instead of checking for != &PL_sv_undef, use SvOK. * xs/GtkWidget.xs: Adjust the apidoc of style_get to make it clear that property values are returned. * xs/Gdk.xs * xs/GdkDnd.xs * xs/GdkEvent.xs * xs/GdkProperty.xs * xs/GdkRgb.xs * xs/GdkSelection.xs * xs/GdkTypes.xs * xs/GtkButton.xs * xs/GtkCalendar.xs * xs/GtkCellRenderer.xs * xs/GtkCheckButton.xs * xs/GtkCheckMenuItem.xs * xs/GtkCombo.xs * xs/GtkDialog.xs * xs/GtkFontSelection.xs * xs/GtkImageMenuItem.xs * xs/GtkListStore.xs * xs/GtkMenuItem.xs * xs/GtkPaned.xs * xs/GtkRadioMenuItem.xs * xs/GtkStyle.xs * xs/GtkTextBuffer.xs * xs/GtkToggleButton.xs * xs/GtkTreeStore.xs * xs/GtkWidget.xs * xs/PangoFont.xs * xs/PangoLayout.xs * xs/PangoTabs.xs: Rearrange ALIAS handling so that no unneeded xsubs are generated. 2004/01/10 02:54 (+0100) kaffeetisch * xs/Gtk2.xs: Implement get_default_language, main_iteration_do and, Gtk2::Widget::propagate_event. 2004/01/09 14:33 (-0500) rwmcfa1 * AUTHORS, Gtk2.pm, README: mailing list addr correction 2004/01/09 06:19 (+0100) kaffeetisch * xs/GtkAccelGroup.xs: Don't unref the closure in connect_by_path. Make Gtk2::Accelerator::get_default_mod_mask return a GdkModifierType. Add a class argument to Gtk2::Accelerator::valid. * xs/GtkSelection.xs: The flags member of GtkTargetEntry's is a GtkTargetFlags not an UV. Move Gtk2::Selection::remove_all to the proper namespace. * xs/GtkWindow.xs: Move the window group methods into the proper namespace. 2004/01/08 18:55 (-0500) rwmcfa1 * xs/GdkWindow.xs: fixed bug found in test branch where attribute_mask was filled with random garbage, should of been initialized in SvGdkWindowAttrReal. 2004/01/08 18:55 (-0500) rwmcfa1 * pm/TestHelper.pm: added at_least_version paramter, very useful. * t/27.GtkClipboard.t: use ^, to skip unless clipboard will be around. * xs/Gtk2.xs: apidoc fix, version_info should of been get_version_info. 2004/01/09 00:47 (+0100) kaffeetisch * xs/GdkColor.xs: Add a class argument to Gtk2::Gdk::Colormap::new and implement ::get_visual and ::get_screen. * xs/GdkWindow.xs: Hush a compiler warning. * xs/GtkIconFactory.xs: Bind remove_default. Provide a default value for the detail argument of set_render_icon. * Gtk2.pm * xs/GtkItemFactory.xs: Implement create_item and create_items in XS. Implement delete_entry, delete_entries, popup_data, popup_data_from_widget, and set_translate_func. * xs/GtkRc.xs: Implement get_default_files. Fix set_default_files. Add a class argument to get_style and reparse_all_for_settings. Remove add_widget_name_style, add_widget_class_style, and add_class_style since they're deprecated. Comment out find_module_in_path. Rearrange member handling of Gtk2::RcStyle's. Turn [gs]et_font_desc into font_desc. * xs/GtkTooltips.xs: In data_get, check for NULL before converting struct members to SVs. Slightly modify apidoc. 2004/01/07 16:01 (-0500) muppetman * xs/GdkTypes.xs: xsubpp doesn't like aliases with the same ix. use different numbers and switch fall-through instead. 2004/01/05 21:55 (-0500) rwmcfa1 * examples/color_list.pl: initial import, an example of how to colorize rows of a simple list (in as simple a way as possible). also shows another use of custom col types for SimpleList. 2004/01/05 21:55 (-0500) muppetman * xs/GtkRc.xs: gperl_object_type_from_package takes a string, not a scalar. 2004/01/05 11:41 (-0500) rwmcfa1 * xs/GdkWindow.xs: merged get_children and peek_children into one function that always uses peek children since we're copying the list anyway. also fixes decent bug where list was being freed from peek_children which would of likely caused big problems. * xs/GdkRegion.xs, xs/GdkWindow.xs, xs/GtkCellRenderer.xs, xs/GtkContainer.xs, xs/GtkTreeModel.xs, xs/GtkWidget.xs, xs/GtkWindow.xs: doc updates. some just made =for xxx, some fixed bad doc. just added new doc. complete according to doc_helper.pl at this point. 2004/01/04 21:41 (-0500) rwmcfa1 * t/accel-group-map.t: test out newly implemented xsubs * xs/GtkAccelMap.xs: implemented some missing xsubs, foreach's and lookup_entry * xs/GtkRc.xs: implemented gtk_rc_get_style_by_paths 2004/01/04 19:11 (-0500) rwmcfa1 * pm/SimpleList.pm, pm/SimpleMenu.pm: quit using base and just add the parent type to @ISA by hand. this will prevent some problems with co-existing (really old) inline versions of Gtk2-Perl. 2004/01/04 11:49 (-0500) rwmcfa1 * xs/GdkWindow.xs: for some reason get_pointer was having issues with certian versions of perl/xsubpp. it seemed to be related to the both having a return value and having OUTLIST's. this implements it as a PPCODE section doing the same thing. 2004/01/04 02:50 (+0100) kaffeetisch * t/10.GtkProgressBar.t: Test get_orientation, get_fraction, [sg]et_text, and [sg]et_pulse_step. * t/14.GtkToolbar.t: Test get_orientation, unset_style, get_style, and get_tooltips. * xs/GtkInvisible.xs: Add a class parameter to new_for_screen. 2004/01/02 02:13 (+0100) kaffeetisch * t/16.GtkMenu-etc.t: Test [sg]et_accel_group, set_accel_path, [sg]et_title, [sg]et_tearoff_state, reposition, attach_to_widget, get_attach_widget, detach, set_screen, [sg]et_active, and popdown. * t/paned.t: Test add1, add2, and [sg]et_position. * xs/GtkLayout.xs: Provide defaults for the hadjustment and vadjustment arguments to new. * xs/GtkMenu.xs: Implement attach_to_widget. * xs/GtkMenuShell.xs: Implement select_first. 2003/12/31 20:47 (+0100) kaffeetisch * t/21.GtkContainer.t * xs/GtkContainer.xs: Implement and test add_with_properties, child_get, and child_set. 2003/12/31 02:16 (-0500) muppetman * xs/GdkPixbuf.xs, xs/GdkWindow.xs, xs/Gtk2.xs, xs/GtkStock.xs, xs/GtkWindow.xs: mark ax unused in functions which don't touch the input stack, to hush compiler warnings * xs/GtkMessageDialog.xs: add commentary describing a known warning. 2003/12/30 12:47 (-0500) muppetman * xs/GtkMessageDialog.xs: fix broken utf8 handling. also now properly allows undef for the format specifier. 2003/12/30 11:49 (-0500) rwmcfa1 * CodeGen.pm, pm/Helper.pm, pm/Pango.pm: version numbers added 2003/12/30 04:03 (+0100) kaffeetisch * t/11.GtkStatusbar.t: Test [sg]et_has_resize_grip and remove. 2003/12/29 20:05 (-0500) rwmcfa1 * pm/TestHelper.pm: allow init_check to be skipped. * t/22.GtkListStore.t, t/23.GtkTreeStore.t: don't init_check with TestHelper.pm 2003/12/29 16:32 (-0500) rwmcfa1 * t/ignore_keyboard.pl: deleted, functionality in TestHelper.pm * pm/TestHelper.pm: initial import * Makefile.PL: added pm/TestHelper.pm to list of pm_files * MANIFEST: added pm/TestHelper.pm and removed t/ignore_keyboard.pl * t/*: quit using ignore_keyboard.pl and use TestHelper.pm instead 2003/12/29 22:58 (+0100) kaffeetisch * t/15.GtkHandleBox.t * xs/GtkHandleBox.xs: Implement and test get_child_detached. * xs/GtkMessageDialog.xs: Don't use "../" for including gtk2perl.h and ppport.h. 2003/12/29 16:32 (-0500) rwmcfa1 * perl-Gtk2.spec.in: use the new DATE replacement in conjunction with VERSION to create the changlog on the fly, which is better. 2003/12/29 06:19 (+0100) kaffeetisch * t/01.GtkWindow.t: Disable the begin_resize_drag and begin_move_drag tests. 2003/12/29 03:21 (+0100) kaffeetisch * t/01.GtkWindow.t * t/12.GtkDialog.t * t/21.GtkContainer.t: Add tests for the remaining functions. * xs/GtkColorSelectionDialog.xs * xs/GtkFileSelection.xs: Provide accessors for all struct fields. * xs/GtkWindow.xs: Use gchar_ornull in set_title. Provide a default for the focus argument of set_focus and the mask argument of set_geometry_hints. Add a class parameter to set_auto_startup_notification. 2003/12/28 06:32 (+0100) kaffeetisch * xs/GdkEvent.xs: Implement Gtk2::Gdk::Event::Expose::region. * xs/GdkGC.xs: Implement set_clip_region. * gtk2perl.h * maps * xs/GdkRegion.xs: Initial implementation. Register a custom GBoxed GType for GdkRegion. * gdk.typemap * gtk2perl.h * xs/GdkTypes.xs: Extend the GdkGeometry handling. In addition to the accessor based approach, geometries can now also be created/changed/accessed as hash references. Change constrain_size to make the flags argument optional. * gdk.typemap * xs/GdkWindow.xs: Implement new, which required implementing GdkWindowAttr handling. Implement set_user_data; one should still use object though. Implement shape_combine_region, set_child_shapes, merge_child_shapes, set_static_gravities, is_visible, begin_paint_region, get_frame_extents, get_parent, get_children, peek_children, set_icon_list, set_icon, get_decorations, get_toplevels, invalidate_region, invalidate_maybe_recurse, get_update_area, and get_internal_paint_info. * xs/GdkWindow.xs * xs/GtkWindow.xs: Change set_geometry_hints so that the mask argument is optional. 2003/12/28 00:58 (+0100) kaffeetisch * xs/GtkContainer.xs: Implement propagate_expose. * xs/GtkFrame.xs: Use gchar_ornull instead of custom code to check for undef in new and set_label. * xs/GtkImageMenuItem.xs: In new_from_stock, provide a default for the accel_group argument so it can be omitted. * xs/GtkMenuItem.xs: Add two FIXME's. Enable gtk_menu_item_set_accel_path -- it's a convenience wrapper around gtk_widget_set_accel_path. * xs/GtkRadioButton.xs * xs/GtkRadioMenuItem.xs: Check for NULL-ness before using SvOK. 2003/12/23 11:10 (-0500) rwmcfa1 * examples/adding_stock_icons.pl: an example of adding your own stock id/icons. 2003/12/18 12:56 (-0500) rwmcfa1 * xs/GtkWidget.xs: implementation of some functions that weren't before for various reasons. * t/01.GtkWidget.t: phase two of widget testing, will probably break for some, but that's the price we must pay for thorough testing. there's 46 tests here, there will be well over 100 before it's done * t/accel-group-map.t: test out some of widget's stuff that we need accel stuff for. 2003/12/18 12:56 (-0500) muppetman * gtk2perl.h: previous change #undef'd the wrong symbols, resulted in "macro redefined" warnings all over the place. bad muppet, no biscuit. 2003/12/18 00:15 (-0500) muppetman * gtk2perl.h, maps: in versions prior to 2.3.0, GtkTreeSearchFlags was declared such that glib-mkenums interpreted and registered it as a GEnum type. sometime before 2.3.0, this was corrected, and the type is registered as a GFlags. Correct the maps file to declare this as GFlags (since that's correct), and mangle things with macro tricks to get things to work correctly with older libraries. * t/00.Gtk2.t: immediately after init, events_pending returns 0 on 2.0.x and 2.2.x, but insists on returning 1 on my system. marked that test as TODO for >= 2.3.0 until we figure out what's up. 2003/12/17 22:49 (-0500) muppetman * xs/GtkLabel.xs: use _ornull on get_mnemonic_widget to avoid warnings on 2.0.x. it's perplexing that this didn't generate warnings on 2.2.4. also flesh out get_attributes to allow proper NULL return. * t/05.GtkListStore-etc.t: clarifying commentary, reminding us to remove the special case if the workaround for $liststore->remove changes. 2003/12/17 21:54 (-0500) rwmcfa1 * t/05.GtkListStore-etc.t: bad bugs fixed, skips were needed, and stuff like that. 2003/12/16 22:44 (-0500) rwmcfa1 * xs/GdkTypes.xs, xs/GdkWindow.xs, xs/GtkHScrollbar.xs, xs/GtkPaned.xs, xs/GtkRc.xs, xs/GtkTreeModel.xs, xs/GtkVScrollbar.xs, xs/GtkWidget.xs, xs/GtkWindow.xs: warnings fixes. 2003/12/16 21:56 (-0500) rwmcfa1 * t/06.GtkLabel.t, t/08.GtkCombo.t: more complete testing * t/05.GtkListStore-etc.t: added complete comment * t/accel-group-map.t: added a version check to the skip, since it will be fixed by 2.4.x * xs/GtkListItem.xs: added an alias for new_with_label * xs/GtkListStore.xs: added an alias for set_value 2003/12/16 04:36 (-0500) rwmcfa1 * t/05.GtkListStore-etc.t: complete GtkListStore api testing. 2003/12/16 13:16 (-0500) rwmcfa1 * Makefile.PL: use the new BLIB_MOD_EXISTS var in place of pure_all 2003/12/16 09:23 (-0500) rwmcfa1 * Makefile.PL: \ should of been \\, caused a hang on perl with no script name. 2003/12/15 23:11 (-0500) rwmcfa1 * xs/GtkList.xs: checks on non-null list should of been list_items, minor bug, but a bug nontheless. 2003/12/15 20:44 (-0500) rwmcfa1 * Makefile.PL: added pure_all as a dep on a few things 2003/12/15 13:44 (-0500) muppetman * t/22.GtkListStore.t, t/23.GtkTreeStore.t: on GTK+ 2.0.x, gtk_main() and friends appear to assume that gtk_init() has been called. a plain GMainLoop would not do this, but these tests actually have no need for the main loop + idle hack in the first place. also correct the skip count. 2003/12/15 13:25 (-0500) muppetman * xs/GtkTreeModel.xs, AUTHORS: patch from Roderich Schupp implements a custom marshaler for the rows-reordered signal. applied with small changes. * xs/GtkTreeModel.xs: implement the old FIXMEd rows_reordered method. * xs/GtkTreeStore.xs: off-by-one error in reorder(). changed loop logic to be a little clearer at the expense of an extra iterator var. * t/22.GtkListStore.t, t/23.GtkTreeStore.t: add code to test the rows-reordered signal and rows_reordered method. also removed the init_check guards on these two, because they don't need a display to run their tests. 2003/12/14 17:16 (-0500) muppetman * t/paned.t: wait for size-allocate instead of using timeouts... still trying to get this test to be robust. 2003/12/14 20:12 (+0100) kaffeetisch * xs/GtkTreeModel.xs: Fix a slight glitch in the API doc of gtk_tree_model_get. 2003/12/12 11:39 (-0500) muppetman * xs/GtkWidget.xs: alias values in get_flags got changed, but the switches on ix were not updated, leading to bugs whenever apps tried to read or write flag values. fixed. renamed get_flags to flags_handler (it's hidden from API docs), and created a new xsub named flags (aliased to get_flags) as a binding for GTK_WIDGET_FLAGS. A t/01.GtkWidget.t * MANIFEST: new test, an attempt to catch future flags regressions. 2003/12/11 18:01 (-0500) rwmcfa1 * tools/podifystockitems.pl: was doing Gtk2 '-init' no reason to and it caused build (of doc) to fail when no display is set. 2003/12/11 16:53 (-0500) muppetman * t/27.GtkClipboard.t, t/30.GtkCellRenderer.t, t/text-iter-searches.t: these didn't skip all tests when there is no display, making builds fail on headless build servers. it would be nice to wrap up some of this testing boilerplate a bit more. 2003/12/08 13:47 (-0500) rwmcfa1 * t/paned.t: use strict and use warnings * xs/GtkLabel.xs, xs/GtkSizeGroup.xs, xs/GtkStock.xs: apidoc, added enum(s) 2003/12/08 11:14 (-0500) muppetman * pm/SimpleList.pm: call signature comments to make maintenance easier. * t/paned.t: give effect to statement with no effect 2003/12/08 02:39 (-0500) muppetman * xs/GtkWidget.xs: implement gtk_widget_style_get for >= 2.2.0 * t/paned.t: more robust testing 2003/12/07 22:34 (-0500) rwmcfa1 * t/trivial-widgets.t: initial import * MANIFEST: added t/trivial-widgets.t, and xs/GtkAccelMap.xs * xs/GtkArrow.xs: doc the GtkArrowtype and GtkShadowType enums in pod * xs/GtkDnd.xs, xs/GtkTreeStore.xs, xs/GtkTreeView.xs: removed a xxx1 param 2003/12/07 21:44 (-0500) muppetman * xs/GtkPaned.xs: turn the child[12]_(resize|shrink) accessors into mutators, with doc; rearrange the xsubs to make more sense, and adapt the docs from the C api reference for the description section. A t/paned.t * MANIFEST: new test 2003/12/07 16:19 (-0500) rwmcfa1 * xs/GtkCalendar.xs, xs/GtkTextIter.xs, xs/GtkTreeModel.xs, xs/GtkWidget.xs, xs/PangoTabs.xs: apidoc added/fixed. 2003/12/07 16:19 (-0500) rwmcfa1 * pm/SimpleList.pm: DELETE fixed, SPLICE implemented for simplelist. * t/19.SimpleList.t: test all of the splice stuff * examples/simplelist.pl: (muppet) test the new splice stuff 2003/12/06 01:30 (-0500) rwmcfa1 * xs/GtkAccelGroup.xs: Gtk2-> functions moved under Gtk2::AccellGroups which seems to make more sense. * xs/GtkAccelMap.xs: intial import, 3/4 complete. * t/accel-group-map.t: test out the new AccelMap stuff, in conjunction with AccelGroup. * xs_files-2.0: added xs/GtkAccelMap.xs 2003/12/05 13:42 (-0500) muppetman D Changes: we haven't maintained this since May, we use ChangeLog. D fetch_faq.pl D genkeysyms.pl D genmaps.pl D podifystockitems.pl A tools/fetch_faq.pl A tools/genkeysyms.pl A tools/genmaps.pl A tools/podifystockitems.pl move the not-to-be-installed helper scripts to a subdirectory to reduce clutter. A tools/podifyenums.pl * Makefile.PL: add tool and use it to generate a single pod file listing the values of all the enum and flags types listed in the maps file, installed as Gtk2::enums(3pm). * MANIFEST: updated to reflect all that movement. 2003/12/05 12:53 (-0500) rwmcfa1 * t/accel-group-map.t: updated and more complete * xs/GtkAccelGroup.xs: added a synopsis mainly showing that Gtk2::Window::add_accel_group is normally used. moved activate and groups_from_object to the Gtk2 namespace and added class params for them. 2003/12/05 07:49 (-0500) rwmcfa1 * t/accel-group-map.t: initial import of accel group and accel map test accel has some issues, way more to come, and resolution of those as well. 2003/12/04 23:23 (-0500) rwmcfa1 * t/calendar.t: initial import 2003/12/04 21:35 (-0500) muppetman * Gtk2.pm: bump version to 1.030 for next unstable devel series. sync authors section with the AUTHORS file. * AUTHORS: remove circular file reference and point readers to the LICENSE file rather than including more boilerplate than content. 2003/12/04 13:10 (-0500) rwmcfa1 * Makefile.PL: moved the --disable-apidoc thing to MakeHelper.pm, that way everyone can use it. 2003/12/04 09:44 (-0500) rwmcfa1 * fetch_faq.pl, MANIFEST: initial import for fetch_faq.pl, needs testing * Makefile.PL: --enable-faq and --disable-apidoc added and worked out 2003/12/04 00:51 (-0500) rwmcfa1 * : Merge of rel-1-02 doc and fixes back. (following 3 apply) * xs/(bunch).xs: ... (list) comments corrected * xs/GtkTreeDnd.xs: ^ and fixed bug in api of gtk_tree_drag_source_drag_data_get, selection_data is an out param. * xs/(bunch).xs: s/=(arg|signature)/=for $1/ 2003/12/02 13:58 (-0500) rwmcfa1 * : Merge of rel-1-02 doc and fixes back. (following 2 apply) * xs/GdkEvent.xs, xs/GdkPixmap.xs, xs/GtkObject.xs: doc * xs/GdkDnd.xs xs/GdkProperty.xs, xs/GtkClipboard.xs, xs/GtkDnd.xs, xs/GtkListStore.xs, xs/GtkSelection.xs, xs/GtkTextBuffer.xs, xs/GtkTreeDnd.xs, xs/GtkTreeStore.xs, xs/GtkTreeView.xs, xs/GtkTreeViewColumn.xs: api doc additions. 2003/11/29 16:51 (-0500) muppetman * t/ignore_keyboard.pl: merge test helper script from head * Gtk2.pm, README: bump to 1.013 * Makefile.PL: require Glib 1.013 2003/11/29 12:21 (-0500) muppetman * xs/GtkMessageDialog.xs: gtk_message_dialog_new uses printf-like semantics and does not offer a safe literal version. pass the message through "%s" to be safe, and allow Gtk2::MessageDialog->new to take printf-like arguments to be nice. 2003/11/29 12:14 (-0500) rwmcfa1 * MANIFEST: missing files added * t/ignore_keyboard.pl: initial import * t/*.t: use the new ignore_keyboard.pl stuff so that tests won't fail if you accidentally type while they're going on. 2003/11/29 11:23 (-0500) muppetman * MANIFEST A examples/inline-images.pl: new example * xs/GdkPixbuf.xs: lots of pod for various hard-to-use functions. removed unnecessary length() parameter from new_from_inline(), which will break any code that was using it, but it's really hard to use as it is so i can't imagine anyone's using it. if you are, i apologize. 2003/11/28 21:57 (-0500) muppetman * xs/GtkRc.xs: SV * class isn't needed 2003/11/28 14:54 (-0500) rwmcfa1 * Makefile.PL: DOC_PL_DEPENDS -> POD_DEPENDS 2003/11/28 12:44 (-0500) rwmcfa1 * Gtk2.pm: fixed bug in cleanpath code, spotty by kaffee * Makefile.PL: when running podifystockitems.pl include blib path for Gtk2, it may not be installed yet. * xs/Gdk.xs: doc ^ and gdk_threads -> gdk_threads_init * xs/GdkColor.xs, xs/GdkDnd.xs, xs/GdkDrawable.xs, xs/GdkGC.xs, xs/GdkProperty.xs, xs/GdkSelection.xs, xs/GtkColorSelection.xs, xs/GtkCombo.xs, xs/GtkContainer.xs, xs/GtkCurve.xs, xs/GtkFontSelection.xs, xs/GtkList.xs, xs/GtkListStore.xs, xs/GtkPaned.xs, xs/GtkRc.xs, xs/GtkSelection.xs, xs/GtkStock.xs, xs/GtkStyle.xs, xs/GtkTreeStore.xs, xs/GtkWidget.xs, xs/PangoFont.xs, xs/PangoLayout.xs, xs/PangoTabs.xs: doc updates, including ALIAS'es starting at 0 where appropriate. 2003/11/25 11:46 (-0500) rwmcfa1 * podifystockitems.pl: initial import * Gtk2.pm, xs/GtkButton.xs, xs/GtkWidget.xs, xs/GtkWindow.xs: link corrections * Makefile.PL: use new DOC_PL_DEPENDS var, added rule for building stock_items.podi * xs/Gtk2.xs: cause Gtk2::Separator and Gtk2::Scrollbar to have pages * xs/GtkStock.xs: use new include system to put list of stock items in pod 2003/11/24 11:27 (-0500) rwmcfa1 * xs/GtkCombo.xs, xs/GtkTextBuffer.xs, xs/GtkTextIter.xs, xs/GtkTreeViewColumn.xs, xs/GtkWidget.xs, xs/GtkWindow.xs: doc updates 2003/11/24 11:27 (-0500) muppetman * MANIFEST: added GdkKeys.xs * xs/GtkDialog.xs: nearly doubled the size of the file with api documentation, mostly copied or adapted from the C api reference. re-ordered some of the xsubs to make more sense in the doc, but changed no code. * xs/GtkWidget.xs: added some 2.2.x methods that got omitted by accident: get_root_window, get_screen, and has_screen. 2003/11/23 20:01 (-0500) rwmcfa1 * xs/GdkKeys.xs: initial import, implements Gtk2::Gdk::Keymap and Gtk2::Gdk::Keyval functions. some need Gtk2::Gdk::KeymapKey typemap. * xs_files-2.0: added ^ 2003/11/21 10:43 (-0500) muppetman * xs/GtkWindow.xs: add some enums to Gtk2::Window's doc. 2003/11/21 02:16 (-0500) muppetman * Gtk2.pm, README, Makefile.PL: update requirements to Glib 1.012, and bump version for 1.012 beta release. * xs/GtkIconFactory.xs, xs/GtkIconFactory.xs, xs/GtkSelection.xs, xs/GtkTextIter.xs, xs/GtkTextTag.xs, xs/GtkTreeModel.xs, xs/PangoTabs.xs: remove copy methods in favor of Glib::Boxed::copy. 2003/11/21 01:09 (-0500) muppetman * CodeGen.pm, gtk2perl.h, xs/GdkGC.xs, xs/GdkPixbuf.xs, xs/GtkCellRenderer.xs, xs/GtkItemFactory.xs, xs/GtkNotebook.xs, xs/GtkSelection.xs, xs/GtkTooltips.xs, xs/GtkTreeSortable.xs: use SvOK() as a lighter test for definedness than SvTRUE(). generally just try to make these tests cheaper. * xs/GtkTreeModel.xs: rearrange iter_next() to avoid leaking the iter copy when there is no next node. 2003/11/20 19:43 (-0500) rwmcfa1 * Makefile.PL: some of it, V should be in there even on win32. * xs/GtkItemFactory.xs: ..._factory_new, allow accel_group to default, Torsten Schoenfeld * Gtk2.pm: patch applied to improve the cleanpath stuff. 2003/11/19 14:14 (-0500) muppetman * Makefile.PL: don't do the install stuff on win32, it b0rks things. * Gtk2.exports: newSVGdkModifierType isn't a function anymore. * xs/GtkEditable.xs, xs/GtkMenu.xs: apparently cl.exe (MSVC's compiler) doesn't like the version of dSP used in PERL_IMPLICIT_CONTEXT to occur after code has started; move dGPERL_CLOSURE_MARSHAL_ARGS to the end of the variable declarations block to make it happy. (the last statement in that macro is dSP.) continue to loathe msvc. 2003/11/19 11:14 (-0500) muppetman * xs/GtkRc.xs: finally committing stuff i did for GtkRcStyle a looong time ago. accessors and mutators for various members of GtkRcStyle, and some methods that were commented out in GtkRc.xs. not commonly needed, but handy in rare situations. 2003/11/19 09:10 (-0500) rwmcfa1 * t/22.GtkListStore.t: there was a skip unless 2.2.x in which the iter was converted to a string, that iter is no longer the inc'd one and thus was 0 instead of 1. follow up to last commit. 2003/11/18 17:21 (-0500) muppetman * t/file-selection.t: new test * t/22.GtkListStore.t: fix GtkListStore test to expect new iter->next semantics. * xs/GtkFileSelection.xs: gtk_file_selection_get_filename returns a statically allocated string -- use GPerlFilename_const instead of GPerlFilename_own to avoid core dumps. * xs/GtkIconFactory.xs: use GPerlFilename_const to hush compiler warnings. 2003/11/18 09:42 (-0500) rwmcfa1 * xs/GtkTreeModel.xs: $model->iter_next fixed, we needed to make a copy of the iter, otherwise we were modifying the passed one (which isn't very perly) and then returning it. 2003/11/18 01:16 (-0500) muppetman * xs/GtkEntry.xs, xs/GtkTextIter.xs, xs/PangoLayout.xs: now that we have typemaps for gunichar, implement things that were waiting on it. * xs/PangoLayout.xs: convert a few things to use gchar_length and length(); don't make pango call strlen() when perl already knows the text's length! * t/text-iter-searches.t: new test for the GtkTextIter search tools. this one isn't numbered because it just needs to run after all of the numbered tests. 2003/11/17 23:21 (-0500) rwmcfa1 * xs/GdkDisplayManager.xs, xs/GdkDnd.xs, xs/GdkPixmap.xs, xs/GdkProperty.xs, xs/GdkScreen.xs, xs/GdkTypes.xs, xs/GdkWindow.xs, xs/Gtk2.xs, xs/GtkAccelGroup.xs, xs/GtkCellRenderer.xs, xs/GtkColorSelection.xs, xs/GtkCurve.xs, xs/GtkEditable.xs, xs/GtkFileSelection.xs, xs/GtkIconFactory.xs, xs/GtkLabel.xs, xs/GtkRadioMenuItem.xs, xs/GtkSelection.xs, xs/GtkStock.xs, xs/GtkTextBuffer.xs, xs/GtkTreeModel.xs, xs/GtkTreeSortable.xs, xs/GtkTreeViewColumn.xs, xs/PangoLayout.xs, xs/PangoTabs.xs: apidoc added, almost all PPCODE xsubs now have it * xs/GtkTreeDnd.xs: gtk_tree_get_row_drag_data had the outlist params in the prototype. apidoc added, almost all PPCODE xsubs now have it * xs/GtkContainer.xs: PPCODE -> CODE, return was always void. apidoc added, almost all PPCODE xsubs now have it * xs/GdkSelection.xs: added a class parameter to gdk_selection_property_get. apidoc added, almost all PPCODE xsubs now have it 2003/11/17 16:27 (-0500) muppetman * xs/GdkPixbuf.xs: i borked the get_from_(drawable|image) xsubs... this fixes them, and adds docs. 2003/11/17 22:04 (+0100) kaffeetisch * CodeGen.pm: Create INPUT typemaps for the 'const' equivalents of GBoxed's, too. 2003/11/17 12:51 (-0500) muppetman * TODO: updated * xs/Gtk2.xs: added key snoopers and docs for Gtk2->init. * xs/GdkPixbuf.xs: more missing methods, get_from_drawable and get_from_image. looks like these were missing because of bugs in genfirstpass a long time ago. * xs/GdkDrawable.xs: wrong PREFIX resulted in wrong method name for gdk_drawable_get_image(). bug report from dosmodi gergely. 2003/11/17 07:10 (-0500) rwmcfa1 * Makefile.PL: xs_files-2.3 shouldn't be involved outside of the 2.3 branch. problem found by Bjarne Steinsb?? 2003/11/16 21:36 (-0500) rwmcfa1 * ChangeLog, xs/GdkDisplay.xs, xs/GdkPixbuf.xs, xs/GtkImage.xs, xs/GtkRadioButton.xs, xs/GtkTextIter.xs, xs/GtkTooltips.xs, xs/GtkTreeView.xs, xs/GtkWidget.xs, xs/GtkWindow.xs, xs/PangoFont.xs: apidoc updates 2003/11/16 20:32 (-0500) muppetman * xs/GtkMenu.xs: use the new GPerlCallback helper macros in gperl_marshal.h 2003/11/16 02:44 (-0500) muppetman * xs/GtkCellRenderer.xs, xs/GtkEditable.xs, xs/GtkMenu.xs: clean up the stack properly after call_sv to stop internal bleeding. 2003/11/13 23:41 (-0500) muppetman * Gtk2.pm, Makefile.PL, README: bump version to 1.011 2003/11/14 04:06 pcg * xs/GdkTypes.xs: fix constrain_size name. 2003/11/13 21:26 (-0500) muppetman * xs/GdkWindow.xs, xs/GtkWidget.xs: genfirstpass appears to have skipped shape_combine_mask all those months ago. implemented it in both GdkWindow and GtkWidget because i like cool shaped windows. 2003/11/13 13:25 (-0500) muppetman * gdk.typemap: hush compiler warning 'incompatible type for arg 1 of Perl_croak_nocontext' -- croak() is by default croak_nocontext, which does not get aTHX_ passed to it. * xs/GdkTypes.xs: typo in constrain_size -- no such function as mewSViv, although the name is nice. :) add pod for the rectangle mutators, so their signatures make sense in the docs. 2003/11/12 18:28 pcg * gdk.typemap, xs/GdkTypes.xs: implement Gtk2::Gdk::Geometry. * xs/GdkWindow.xs, xs/GtkWindow.xs: use it and move gdk_window_constraing_size to GdkTypes.xs. 2003/11/12 16:05 pcg * xs/GdkTypes.xs: change acessor methods to mutators for Gtk2::Gdk:Rectangle. 2003/11/11 23:00 (-0500) muppetman * xs/PangoFont.xs: put the docs for the constants into the Gtk2::Pango::FontDescription package, so that the doc generation stuff doesn't overwrite the docs from Pango.pm. 2003/11/12 01:57 pcg * xs/GdkPixbuf.xs, xs/GtkWindow.xs, xs/GtkImage.xs, xs/GtkRc.xs, xs/GtkIconFactory.xs, xs/GdkPixmap.xs: use GPerlFilename and gperl_filename_from_sv on behalf of the user, so filenames work the same as in other parts of gtk/glib (and sometimes unlike perl, but it's the only way to load locale-encoded files). * xs/GtkFileSelection.xs: convert to use new typemap entries. 2003/11/11 00:36 (-0500) muppetman * MANIFEST, debian/*: remove the debian packaging files, since having them in the upstream dist makes it difficult for the maintainers * xs/GtkEditable.xs: use casts to hush the compiler's indignant warnings about our flagrant disregard for the const-ness of param_values * xs/PangoContext.xs: remove a couple of functions that are only enabled when building pango backends 2003/11/10 15:00 (-0500) muppetman * xs/GtkWidget.xs: bind gtk_widget_event(). * examples/rulers.pl, MANIFEST: add a ported version of the rulers example from the gtk-perl tutorial, using gtk_widget_event() to propagate the motion notify events to the rulers. this was previously not possible. 2003/11/10 13:35 (-0500) muppetman * xs/GtkDialog.xs, xs/GtkEditable.xs: use the new macros in the new gperl_marshal.h to implement custom signal marshallers. * examples/insert-text-test.pl: additional marshaller smoke test 2003/11/10 09:12 (-0500) rwmcfa1 * xs/GtkTreeSelection.xs: missing ; on the end of function call caused syntax error, with somewhat odd message, resolved. 2003/11/10 01:44 (-0500) muppetman * api.pod, xs/GdkColor.xs, xs/GdkPixbuf.xs, xs/GtkStyle.xs, xs/GtkWidget.xs, xs/GtkTreeSelection.xs: move descriptions of changed call signatures or semantics from api.pod to apidoc pod in the actual xs files. this isn't all of it, but almost. * xs/GtkTreeSelection.xs: shuffle the code for get_selected_rows and count_selected_rows to avoid them showing up twice in the pod. * xs/GtkTreeModel.xs, xs/GtkTreeView.xs: use the C name in the =for enums line --- let GenPod figure out the perl name. 2003/11/09 23:48 (-0500) muppetman * xs/GtkTreeModel.xs: get_value and get were implemented separately, for no good reason; get_value is now an alias for get. added apidoc pods to document the stuff that isn't obvious or is different from the C api. * xs/GtkTreeView.xs: switch widget_to_tree_coords and tree_to_widget_coords to use OUTLIST to save code and avoid the need to add a =for signature line. add apidoc pod for other stuff. * api.pod: removed stuff from the specifics section that is now documented directly in the apidoc pods. 2003/11/10 01:51 pcg * api.pod: Document new operation on GFlags. 2003/11/08 01:20 (-0500) muppetman * examples/cellrenderer_date.pl, examples/cellrenderer_popup.pl, examples/cellrenderer_spinbutton.pl, examples/histogramplot.pl: update to use new fangled flags operators * xs/GtkDialog.xs: fix the same sorts of bugs in the dialog::response marshaller as we found earlier this week in Glib/GClosure.xs. A examples/insert-text-test.pl * xs/GtkEditable.xs: fix the Gtk2::Editable::insert-text signal. allows you to modify the arguments or return values on the stack, by the TIMTOWTDI principle. new example code modifies @_. 2003/11/07 21:09 pcg * gtk2perl.h: removed newSVGdkModifierType hack. 2003/11/07 16:49 pcg * xs/GdkWindow.xs: implement gdk_window_set_debug_updates. * MANIFEST: Add xs_files*. 2003/11/07 11:53 (+0100) kaffeetisch * xs/GtkClipboard.xs: Two other places where PERL_UNUSED_VAR was called before variables are declared. Fix necessary to make it compile on FreeBSD. 2003/11/06 16:53 (-0500) muppetman * Gtk2.pm: link to the generated pods. 2003/11/06 10:30 (-0500) muppetman * xs/Gtk2.xs: handle logs for GdkPixbuf, too. 2003/11/06 13:48 kaffeetisch * xs/GtkItemFactory.xs: Call dSP before PERL_UNUSED_VAR to make it compile on FreeBSD. 2003/11/03 14:05 muppetman * xs/GdkEvent.xs: GenPod uses instance arg names now, so we can remove all the ugly signature overrides. 2003/11/03 18:37 pcg * Makefile.PL: avoid "package MY" for easier access to variables. * MANIFEST: ScrollBar => Scrollbar. * api.pod: Document Scorll[bB] change. 2003/11/03 12:18 muppetman * Makefile.PL: @lists needs to be our, not my. updated some comments. * t/00.Gtk2.t: scalar versus list context bug in version info test * AUTHORS: added bjarne to the contributors list 2003/11/03 16:24 pcg * xs/GtkWidget.xs: Implement a bunch of minor methods, some of them even tested. 2003/11/03 12:45 muppetman A xs_files-2.0: new file listing source files for gtk+-2.0.x A xs_files-2.2: new file listing source files for gtk+-2.2.x * CodeGen.pm, Makefile.PL: modify build to use explicit lists of source code files based on the discovered gtk+ version, rather than just globbing all the files the xs dir. D xs/GtkHScrollBar.xs A xs/GtkHScrollbar.xs D xs/GtkVScrollBar.xs A xs/GtkVScrollbar.xs long ago, in the early days of gtk2-perl-xs, these files were created with the wrong capitalization of the file and package names; register.xsh registers Gtk2::[VH]Scrollbar, but the files implement Gtk2::[VH]ScrollBar. since this is wrong, i have corrected it by changing the package names and renaming the files, but in order to retain compatibility with Gtk2-1.00, the old Gtk2::[VH]ScrollBar::new()s are aliased to the new ones. 2003/11/02 23:26 pcg * xs/GdkPixbuf.xs, api.pod: Implement and document gdk_pixbuf_render_pixmap_and_mask* functions. 2003/11/02 13:24 pcg * api.pod: Document Scrollbar vs. ScrollBar inconsistency. 2003/11/02 16:17 muppetman * Gtk2.pm: undo my silly "atleast" version checks, and so something more like what Exporter would do. we don't use Exporter directly because we're not an exporter, and we still need to watch for -init. * Makefile.PL: Glib doesn't use the "atleast" check anymore, either. 2003/11/02 02:12 muppetman * xs/GtkButton.xs: after fixing the GenPod bug, it became apparent that button's doc needed to hide label on new_with_mnemonic, too. while i was at it, fleshed out the description of mnemonics to make more sense to people who've never heard of them. 2003/11/01 14:52 rwmcfa1 * xs/Button.xs: autopod doc added 2003/10/30 22:10 rwmcfa1 * t/30.GtkCellRenderer.t: this test seems kinda flaky, it was counting that 24 callbacks happened, but often that number seems inconsistent. slight modifications made so that we now check that at least one, edit, render, size, and init happen. activate doesn't seem to ever occur. 2003/10/29 12:40 muppetman fixing a few things while tracking down bugs reported by Bjarne Steinsb??: * xs/GtkCellRenderer.xs, xs/GtkStyle.xs: all of the gtk_paint_foo() functions ask for GdkWindows, but actually work on GdkDrawables. according to http://bugzilla.gnome.org/show_bug.cgi?id=102678 , the same is true for gtk_cell_renderer_render(), and has been fixed in gtk+ 2.3.0. so, we use GdkDrawable instead of GdkWindow in all of those places. * examples/cellrenderer_popup.pl: if the treeview is reorderable, the popup and editing interaction is broken, resulting in the treeview thinking we're still dragging the row. fix that by using a dummy GtkCellEditable. * xs/GtkEntry.xs: GtkEntry also implements GtkCellEditable. use gperl_prepend_isa() instead of custom AV-handling code. 2003/10/29 09:36 rwmcfa1 * xs/GtkWidget.xs: improved error messages in get/set_flags. croak when trying to set a read only flag. 2003/10/29 02:00 muppetman * Gtk2.pm: add a version check to Gtk2's import * Makefile.PL: use Glib's new 'atleast' version check 2003/10/28 23:21 muppetman * Makefile.PL: use the new semantics for Glib::MakeHelper methods. never just 'use' a non-standard dependency module, place those use lines in the eval'd string. otherwise, the Makefile.PL won't pass the compile phase, and CPAN won't pick up dependencies properly. 2003/10/28 16:47 rwmcfa1 * Gtk2/MANIFEST: missing files added * Gtk2/Makefile.PL: updates to new system, MakeHelper. use strict and use warnings safe now * Gtk2/xs/Gtk2.xs: put things in an appropriate doc object 2003/10/27 19:38 muppetman * Makefile.PL: documentation generation experimentation * xs/GdkEvent.xs: apidoc pod bundles all of the event subtypes into GdkEvent's docs; which creates another problem, namely, they all have the same instance name in their call signatures. so, add =signature pods to give them better names. implemented a few of the more esoteric members, too. * xs/GtkCellRenderer.xs: document CellRendererState and CellRendererMode with CellRenderer. 2003/10/27 14:34 muppetman * xs/GtkCellRenderer.xs: merged the cellrenderer subclassing stuff, with lots of new-style experimental documentation. * t/30.GtkCellRenderer.t: new test * examples/cellrenderer_date.pl, examples/cellrenderer_popup.pl, examples/cellrenderer_spinbutton.pl: new examples 2003/10/22 13:31 muppetman stuff found while writing a documentation generator... * xs/GtkListStore.xs: stray semicolon * xs/GdkScreen.xs: arg list had an output parameter in it 2003/10/19 18:55 rwmcfa1 * xs/GdkPixbuf.xs: two missing semicolons added, in 2.2 section so wasn't caught compling on < 2.2. 2003/10/19 00:41 muppetman * examples/simplelist.pl, examples/scribble.pl, examples/histogramplot.pl: commentary cleanup and such 2003/10/18 02:41 muppetman * Gtk2.pm: bump version for devel series. * Makefile.PL: require Glib 1.01 (to pick up a new typemap) Made a pass through the source killing FIXMEs. * TODO: updated. * gtk.typemap, xs/GtkColorSelection.xs, xs/GtkTreeView.xs, xs/GtkTreeViewColumn.xs: cleaned up * xs/Gdk.xs, xs/GtkTextBuffer.xs, xs/GtkTextTag.xs: use the new gchar_ornull typemap to clean things up * xs/GdkGC.xs: implemented GdkGCValues stuff, mostly by porting Gtk-Perl code. * xs/GdkPixbuf.xs, api.pod: implemented the animation iter and pixbuf formats stuff, finally. * xs/GtkStyle.xs: painstakingly traced through the source of gtkstyle.c to see where NULL is and isn't allowed, and updated all the paint_foo functions accordingly. * xs/GtkTextIter.xs: implemented get_marks, get_toggled_tags, get_attributes, and get_language * xs/GtkWidget.xs: implement get_child_requisition. apparently this isn't equivalent to get_size_request after all; some widget implementations need this (e.g., placing popups by hand). * xs/PangoContext.xs: don't know why these weren't implemented. 2003/10/12 13:42 rwmcfa1 * xs/(most).xs: UNUSED is no more, PERL_UNUSED_VAR used where needed, relies on new ParseXS to prevent the other warnings that were its fault, we now only quite the ones that are ours * Gtk2/xs/GtkObject.xs: fixed problem where g_object_unref was being called on the wrong thing. there was both a SV * class and GtkObject class, no longer the case ======== 1.0 2003/10/10 00:13 muppetman * Gtk2.pm, README, META.yml, debian/changelog: 1.00 2003/10/03 16:13 muppetman * Gtk2.pm, README, META.yml, debian/changelog: 1.00rc4 2003/10/03 15:19 muppetman * xs/GdkPixbuf.xs, api.pod: implemented new_from_data. it doesn't take a destroy notify function, as that's automatic. 2003/10/03 13:27 muppetman * xs/GdkEvent.xs: some of the event functions return new events that are owned by the calling code. use _own and _own_ornull variants as necessary to prevent memory leaks. 2003/10/03 13:19 muppetman * pm/SimpleList.pm, t/19.GtkSimpleList.t: argument checks in the new and new_from_treeview constructors. new_from_treeview no longer allows you to pass undef for the treeview, new creates one. 2003/10/01 11:20 rwmcfa1 * Glib/GBoxed.xs, Glib/GLog.xs, Glib/GObject.xs, Glib/GSignal.xs, Glib/GType.xs, Glib/gperl.h, Gtk2/xs/GtkAccelGroup.xs, Gtk2/xs/GtkIconFactory.xs, Gtk2/xs/GtkListStore.xs, Gtk2/xs/GtkObject.xs, Gtk2/xs/GtkToolbar.xs, Gtk2/xs/GtkTreeView.xs, Gtk2/xs/GtkWidget.xs: // comments -> /* 2003/09/30 20:19 rwmcfa1 * pm/SimpleList.pm: fixed bugs with push and unshift not taking arrays for pushing, only first element was getting pushed. pointed out by Bjarne Steinsb?? * examples/simplelist.pl: example of push/unshift array of arrays * t/19.GtkSimpleList.t: tests of push/unshift array of arrays * xs/GtkClipboard.xs: removed an unused function destroy_data, quited some warnings in the same style as currently done. 2003/09/28 20:19 rwmcfa1 * xs/GdkWindow.xs: bugs found in _for_display functions, not accepting class arguments. 2003/09/26 16:42 muppetman * pm/SimpleList.pm: be defensive and use exists() to check whether keys already exist in %column_types; this fixes a bug reported by Jaap Karssenberg, where supply a bad column type would tell you that column type was invalid, but include that bad name in the list of valid keys (because of autovivification). (a lot of explaining for a simple bug.) 2003/09/26 26:25 rwmcfa1 * xs/GtkTextView.xs: new_with_buffer had class param but no spec for it this was not a bug, but now it's like everything else thoughout the whole of Gtk2. 2003/09/26 03:45 muppetman * Gtk2.pm, README, META.yml, debian/changelog: prep for 1.00rc3 release * pm/SimpleList.pm: Gtk2::SimpleList->new_from_treeview allows an existing Gtk2::TreeView to be turned into a SimpleList. intended for Glade users. * xs/GtkClipboard.xs, api.pod: several nasty bugs mean that this module couldn't have worked as it was. added class parameter to get and get_for_display. implemented set_with_data and set_with_owner. made the others actually work. * gtk2perl.h, xs/GtkSelection.xs: moved the macro to gtk2perl.h as GTK2PERL_STACK_ITEMS_TO_TARGET_ENTRY_ARRAY so clipboard could use it. * t/27.GtkClipboard.t, MANIFEST: new test. * xs/GtkStyle.xs: somehow we had implemented the deprecated gtk_draw_flat_box instead of gtk_paint_flat_box. 2003/09/24 14:15 muppetman * api.pod, xs.GtkWidget.xs, t/01.GtkWidget.xs: simplify gtk_widget_intersect to return either a rectangle or undef. 2003/09/24 11:39 rwmcfa1 * xs/GtkWidget.xs: implemented several missing functions * t/01.GtkWindow.t: test a couple of the above * api.pod: document where the api of the above changes differes from their c couterparts 2003/09/21 20:19 rwmcfa1 * Makefile.PL: fixed bug in specfile generation 2003/09/21 19:58 rwmcfa1 * (lots of files): license updates/additions 2003/09/21 11:18 muppetman * AUTHORS: torsten's officially on the team now. 2003/09/18 23:10 muppetman * pm/SimpleList.pm: added new_from_widget(), which allows glade users to use SimpleLists. this basically just re-blesses the treeview that comes in, which means it won't work if we ever change SimpleList to be a proper Glib::Object subclass. 2003/09/19 00:53 muppetman * Gtk2.pm, README, META.yml, debian/control, debian/changelog: updated for the 1.00rc2 release. * Makefile.PL: updated requirements 2003/09/17 10:44 rwmcfa1 * Makefile.PL: ExtUtils::PkgConfig can now deal with version requirements using pkg-config's interface, make use of it. 2003/09/16 23:50 rwmcfa1 * Makefile.PL, perl-*spec.in: somewhat automated versioning system implemented for depenancy modules 2003/09/16 15:00 muppetman * Makefile.PL: don't do any of the hand-coded install stuff on windows --- there's no sane place to install, and nmake barfs on the generated makefile code. * xs/GtkDialog.xs: unused variables * xs/GdkGC.xs, xs/GdkTypes.xs, xs/GtkCurve.xs, xs/GtkTreeView.xs: casts to hush pedantic compilers 2003/09/15 22:26 rwmcfa1 * Makefile.PL: spec file dependancies improved * xs/GdkPixbuf.xs: fixed ref count bug. 2003/09/15 16:02 muppetman * Gtk2.pm: remove Gtk2::Dialog::Responses, add a bunch of missing L * Makefile.PL, gtk-demo/changedisplay.pl, xs/GtkDialog.xs: use gperl_signal_set_marshaller_for() to set a custom marshaller for GtkDialog's response signal, so we can get the enum string values for the response id in the response handler instead of negative numbers. removes the need for Gtk2::Dialog::Responses, so that ugly wart is now gone as well. Gtk2 now requires Glib 1.00rc2. * MANIFEST, pm/Responses.pm (deleted): delete Responses.pm. 2003/09/15 14:02 muppetman the ones that got away... * xs/GtkItemFactory.xs: remove unused private function * xs/GtkNotebook.xs, xs/GtkTreeStore.xs: remove unused variable * xs/GtkToolbar.xs: initialize the uninitialized 2003/09/14 15:44 rwmcfa1 * xs/(most everything): quiet warnings from -Wall, and/or add void comments * xs/GdkDisplay.xs: added const qualifier to gchar * return value * xs/GdkDnd.xs: copy-and-paste bug fixed, get_protocol(_for_display) * xs/GdkPixbuf.xs: formatting cleanup * xs/GdkWindow.xs: quited warning about invalid paramter type * xs/GtkIconFactory.xs: non-void paramter with PPCODE, fixed * xs/GtkTearoffMenuItem.xs: teamoff -> tearoff, big bug * xs/GtkTreeModel.xs: looking for -1 list terminator incorrectly, bug-fix 2003/09/14 01:31 muppetman * maps: remove some deprecated types * xs/GtkIconFactory.xs: implement gtk_icon_set_render_icon 2003/09/14 01:09 muppetman * xs/GtkTextIter.xs: implement gtk_text_iter_get_tags() 2003/09/11 23:51 muppetman * ChangeLog, Gtk2.pm, MANIFEST, META.yml, README, debian/changelog, debian/control: updated for 1.00rc1 release * Makefile.PL: require Glib 1.00rc1 2003/09/11 23:41 muppetman * examples/histogramplot.pl: update to use the new, fixed overrides features of Glib::Object::Subclass in Glib 1.00rc1. 2003/09/11 11:01 rwmcfa1 * t/*.t: use strict and use warnings added and fixes made to allow things to run with them. 2003/09/10 15:04 rwmcfa1 * examples/socket.pl: make the same change in here that was made in the plug socket test way back when, use the perl socket is being run with to run the plug script. 2003/09/09 21:35 muppetman * t/22.GtkListStore.t, t/23.GtkTreeStore.t, t/24.GtkTreeView.t, t/25.GtkTreeSelection.t: patch from torsten uses isa_ok() instead of is(ref(), ...) all over the place. 2003/09/09 21:22 muppetman * pm/Responses.pm, Gtk2.pm, Makefile.PL, gtk-demo/changedisplay.pl, MANIFEST: tiny module adds named constants for the dialog responses, with pod * pm/Pango.pm: update the link in the see also section 2003/09/09 19:52 rwmcfa1 * Makefile.PL: new rule to install examples/gtk-demo * perl-Gtk2.spec: use new ^ rule to put examples and demo in bin rpm * gtk-demo/appwindow.pl: fixed small bug with demo_find_file from last commit. 2003/09/09 17:28 rwmcfa1 * gtk-demo/(various): fixed things so that you do not have to be in the gtk-demo directory to run it. the files just have to be in the same dir as main.pl 2003/09/08 23:15 muppetman * xs/GtkNotebook.xs, api.pod: ensure that the second parameter to append_page, prepend_page and insert_page is always a widget by stringifying and wrapping a label around anything that's not a Gtk2::Widget. 2003/09/07 15:57 muppetman * api.pod, xs/GtkTreeView.xs: patch from torsten makes get_path_at_pos return just the path in scalar context. * xs/GtkTreeStore.xs, xs/GtkListStore.xs: trap invalid columns supplied to $(tree|list)store->set at the binding level, because the error message from gtk doesn't make much sense. (torsten's idea) 2003/09/06 19:23 rwmcfa1 * Makefile.PL: dist-rpms build target added * perl-Gtk2.spec.in: initial import 2003/09/05 01:02 muppetman * xs/Gtk2.xs: route Gtk-related g_log domains through gperl * MANIFEST: updated * xs/GdkRgb.xs: keep SvImageDataPointer private 2003/09/04 22:20 muppetman * Gtk2.pm, README, debian/changelog, META.yml, ChangeLog: prep for 0.97 release * gtk2perl.h: export gtk2perl_menu_position_func * Gtk2.exports, Makefile.PL: add exports file 2003/09/04 18:48 rwmcfa1 * MANIFEST: gtk.typemap and t/26.GtkSimpleMenu.t added. 2003/09/03 18:37 rwmcfa1 * pm/SimpleMenu.pm: pod doc added, no longer keep entries and menu_tree around unless we're asked to. * t/26.GtkSimpleMenu.t: inital import 2003/08/31 19:59 muppetman * CodeGen.pm, gdk.typemap: use Glib's new T_GPERL_GENERIC_WRAPPER to cut out 2/3 of the typemap code. * Gtk2.pm: don't set RTLD_GLOBAL on darwin, it generates a warning. * Makefile.PL, README: we now require Glib 0.97 for T_GPERL_GENERIC_WRAPPER. * gtk2perl.h, xs/GtkDnd.xs, xs/GtkSelection.xs, gtk.typemap: implement GtkTargetList and several of the drag'n'drop APIs that depend on it. done with custom code, as these are apparently somewhat internal structures that don't have built-in boxed type support. 2003/08/30 02:33 muppetman changes made while listening to cheesy 80s scandinavian prog metal in the middle of the night while everyone's asleep (oh, the nostalgia): * AUTHORS, xs/GdkPixbuf.xs: patch from Anuradha Ratnaweera implements Gtk2::Gdk::Pixbuf->new_from_xpm_data * examples/timeouttest.pl: apparently this was broken for a long time. * xs/Gtk2.xs: updated commentary. 2003/08/28 23:17 muppetman * Gtk2.pm, README, debian/changelog: updated for 0.96 release * xs/GtkCalendar.xs: celendar members patch from chas, mangled by me 2003/08/28 10:09 rwmcfa1 * xs/GtkWidget.xs: slight modifications of a patch by thierry vignaud applied. impelements text direction functions. 2003/08/28 08:44 rwmcfa1 * t/24.GtkTreeView.t: torsten's patch applied to fix "assertion `column_in_tree' failed" problem on various systems/versions. cached version info into an array and then use rather than getting it over and over. 2003/08/27 18:43 muppetman another round of treeview-related patched from torsten: * xs/GtkTreeView.xs xs/GtkTreeViewColumn.xs: a few more missing functions * t/22.GtkListStore.t t/23.GtkTreeStore.t t/24.GtkTreeView.t: new tests * t/22.GtkTreeSelection.t, t/25.GtkTreeSelection.t: renamed and updated * MANIFEST: updated accordingly 2003/08/25 13:40 pcg * t/04.GtkSocket-GtkPlug.t: Applied patch by Skye Cove to add -Mblib. Also change ctrl-x character to the more readable (and transferable) ^X. 2003/08/22 01:38 muppetman * Gtk2.pm, README, MANIFEST, META.yml, debian/changelog: updated for 0.95 release 2003/08/21 14:22 muppetman * xs/GtkTreeModel.xs: even yet still another patch from torsten, implementing gtk_tree_path_new_from_indices and fixing thr broken signature of gtk_tree_row_reference_new. i took some liberties with the patch, making it croak with a helpful message on the -1 that will inevitably be passed in by people who read the C API reference. i also removed the separate binding of new_from_string and aliased it into new, since new already calls new_from_string if you supply a string. * api.pod: mention how new_from_indices differs from the C func, and actually commit the accel group stuff i thought i commited yesterday. 2003/08/20 14:27 muppetman * t/22.GtkTreeSelection.t: new test, another patch from torsten 2003/08/20 12:39 rwmcfa1 * api.pod: url of stock items strings added, thierry vignaud * t/04.GtkSocket-GtkPlug.t: make sure that forked perl runs under the same interperter that it does, calle dybedahl 2003/08/20 04:20 muppetman * TODO, examples/accel_groups.pl, xs/GtkAccelGroup.xs, api.pod: implemented a bunch of the GtkAccelGroup stuff, with an example. 2003/08/20 01:45 muppetma * xs/GtkTreeSelection.xs: patch from Torsten Schoenfeld implements gtk_tree_selection_set_select_function and gtk_tree_selection_selected_foreach * xs/GtkContainer.xs, t/21.GtkContainer.t: implemented a slew of missing GtkContainer methods, with a test. the functions for child properties are still unbound. * xs/GtkTreeDnd.xs: missing functions gtk_tree_get_row_drag_data and gtk_tree_drag_source_drag_data_get. changed package for gtk_tree_(get|set)_row_drag_data to Gtk2::SelectionData so they will be called properly as methods. * xs/GtkImage.xs: implemented the functions to do with GdkImages and GdkPixbufAnimations * xs/GtkStyle.xs api.pod: implement $style->render_icon and $style->paint_polygon 2003/08/19 22:52 rwmcfa1 * xs/GtkTextBuffer.xs: implemented gtk_text_buffer_insert_with_tags, torsten schoenfeld * xs/GtkTreeViewColumn.xs: corrected error message, torsten schoenfeld 2003/08/19 21:11 rwmcfa1 * Makefile.PL: added realclean removal of build dir to postamble section. 2003/08/19 21:11 rwmcfa1 * pm/SimpleMenu.pm, examples/simple_menu.pl: initial versions, and example of how to use it, pod still to come. * Makefile.PL: added realclean removal of build dir to postamble section. install SimpleMenu.pm 2003/08/19 10:19 rwmcfa1 * api.pod: url added for location of stock item strings, thierry vignaud * t/04.GtkSocket-GtkPlug.t: 2003/08/19 10:19 rwmcfa1 * t/*.t: fixed things so that test do not fail if init_check fails, this is so that it can be build without a DISPLAY. tests are skipped and a warning message is printed by Test::More. in reality passing this doesn't mean much more than Gtk2 will load, but without a display that's all that can be done. 2003/08/18 17:24 muppetman * README: remove FIXME: we do have more docs, they're linked from Gtk2.pm * api.pod: updated. * gtk-demo/changedisplay.pl: a few more tweaks. it almost works. * t/07.GtkBoxes.t: this is the most obvious place for tests for widget tools, since this test plays with packing boxes and such. * xs/GdkDisplay.xs: flesh out the get_window_at_pointer xsub, else the changedisplay.pl demo says it can't do something with a CODE reference. (i don't understand...) * xs/GdkWindow.xs: apparently $gdkwindow->get_user_data isn't the same as GObject user data... * xs/GtkWidget.xs: consolidating void $widget->method($void) methods into one ALIASED xsub saved over 2K in the object file, even with the other ten or so such methods implemented. wow. also implemented get_ancestor, is_ancestor gtk_widget_modify_style gtk_widget_get_modifier_style gtk_widget_path gtk_widget_class_path. 2003/08/18 11:54 muppetman went for a complete audit of xs/*.xs, looking for FIXMEs and unimplemented functions. this is part of that completeness sweep. * xs/GdkPixmap.xs xs/GtkClipboard.xs xs/GtkDnd.xs xs/GtkItemFactory.xs xs/GtkMenu.xs xs/GtkTextIter.xs xs/GtkTreeViewColumn.xs xs/PangoFont.xs xs/PangoLayout.xs xs/PangoContext.xs: updated FIXME comments * xs/GdkWindow.xs: updated FIXMEs, implemented several missing functions * xs/Gtk2.xs: quit_add_destroy, get_current_event, get_current_event_(time|state), get_event_widget * xs/GtkAccelGroup.xs xs/GtkHButtonBox.xs xs/GtkVButtonBox.xs xs/GtkHScale.xs xs/GtkVScale.xs xs/GtkWindow.xs: some static methods were implemented incorrectly (not taking the class parameter). this fixes that, but will break any code that used it. since i've not heard any complaints, i assume no-one is using it. at any rate, it was wrong, is now right. * xs/GtkButtonBox.xs xs/GtkMenuShell.xs xs/GtkPlug.xs xs/GtkScale.xs xs/GtkTextTag.xs xs/GtkTooltips.xs: removed commented implementation of private function; it will never be bound * xs/GtkEntry.xs: update FIXME comments, implement get_layout and get_layout_offesets * xs/GtkLabel.xs: implemented (get|set)_attributes * xs/GtkList.xs xs/GtkSelection.xs xs/GtkStock.xs xs/GtkTreeModel.xs xs/GtkTreeView.xs: clarified commentary * xs/GtkListStore.xs xs/GtkTreeStore.xs gtk2perl.h: implement gtk_(list|tree)_store_set_column_types, since it is now possible to derive GObject types in perl; this is necessary to implement the constructor of a derived list or tree store. factored out the stack handling code, into gtk2perl.h, to avoid needing to create another header. * xs/GtkTextBuffer.xs: implemented missing clipboard functions: add_selection_clipboard remove_selection_clipboard cut_clipboard copy_clipboard paste_clipboard * xs/GtkWidget.xs: implemented get_pointer, is_ancestor, translate_coordinates, set_style, ensure_style; added FIXMEs * xs/GdkEvent.xs: let gdk_event_set_screen in there twice, because i wasn't building against 2.2.x. fixed. 2003/08/18 03:56 muppetman * TODO: updates * xs/Gdk.xs: update some FIXMEs, implement the gdk_threads stuff * xs/GdkColor.xs, api.pod, t/20.GdkColor.t: gdk_colormap_alloc_colors, free_colors, and query_color * xs/GdkDisplay.xs, xs/GdkDrawable.xs, xs/GdkPixbuf.xs, xs/GdkPixbufLoader.xs, xs/GdkRgb.xs: update some FIXMEs * xs/GdkEvent.xs, xs/GdkGC.xs: more missing functions and FIXMEs 2003/08/15 18:06 rwmcfa1 * t/01.GtkWindow.t: fixed bug 'ok' -> 'is' causing really strange makemaker warnings. didn't have anything to do with libs. bad muppet, no cookie for you... 2003/08/15 09:35 muppetman * pm/SimpleList.pm, AUTHORS: patch from Dr. Michael Langner, allowing 0 to be a value in the tied list, implementing the SPLICE operation, and adding a new column type, 'hidden'. many thanks! * debian/*: patch from James Curbo adding maintainence files for debian packages. * devel.pod, Makefile.PL: more docs * Gtk2.pm, README: updated for 0.94 release 2003/08/14 22:43 muppetman busy day, busy day... * t/00.Gtk2.t, t/16.GtkMenu-etc.t, t/19.GtkSimpleList.t: patch from Torsten Schoenfeld hushes some warnings in make test * xs/GtkTreeView.xs: another TreeView patch from Torsten, hacked up a bit by me, to add some callbacks. get_search_equal_func isn't bound because there's really no reliable and not easily-broken way to return a function pointer value or a code reference and then know what to do with them on the other end. (presumably for restoring the search func after setting it.) also, i left out the destroy_count_func stuff, as the docs say they are supposed to be private. * t/04.GtkSocket-GtkPlug.t: i did it wrong. i swear it works, this time. 2003/08/14 16:59 muppetman * t/04.GtkSocket-GtkPlug.t: skip this test on win32 * Makefile.PL: find_extra_libs is a hack to look through the perl library tree for the library created when the Glib module was installed, so we can add that to the libs line for Gtk2. this is necessary because win32 doesn't allow unresolved symbols in anything, so we can't link to the all-important gperl_* without this. *grumble* * t/01.GtkWindow.t: true and false are not enums; use constants for them and get around some hidden bugs; try to skip tests that aren't available on windows. number of tests didn't match up on various versions because of improper method of skipping tests... i think it works right now. 2003/08/14 12:00 muppetman * TODO: updates * xs/GdkPixmap.xs, gtk-demo/textview.pl: a GdkBitmap is a GdkPixmap with depth 1. so, set Gtk2::Gdk::Pixmap in @Gtk2::Gdk::Bitmap rather than Gtk2::Gdk::Drawable. this fixes a couple of annoying FIXMEs." * xs/Gtk2.xs: cleanup and commentary * xs/GdkDisplay.xs, xs/GdkDisplayManager.xs, gtk-demo/changedisplay.pl: a couple more >=2.2 objects to make the changedisplay demo work. dunno if it actually works with more than one display, because i only have one here, but it doesn't crash like before... 2003/08/11 12:52 muppetman * xs/GtkTreeView.xs, AUTHORS: patch from Torsten Schoenfeld to enable drag and drop stuff for TreeView 2003/08/09 23:31 pcg * Makefile.PL: some more Win32 and command.com fixes. 2003/08/08 12:09 muppetman * Gtk2.pm, README: pod updates, bump version to 0.93 * Makefile.PL: use makefile variables for manpage extensions (idea suggested by Roderich Schupp, thanks) * genkeysyms.pl: add pod to generated file 2003/08/06 23:19 rwmcfa1 * Makefile.PL: .pm -> .3pm copy and paste bug corrected, spotted by James Curbo 2003/08-06 16:58 ggc * xs/GtkWidget.xs: add gtk_widget_size_request 2003/08/06 12:57 muppetman * xs/GtkWindow.xs: plug a memleak in list_toplevels * xs/GtkWidget.xs: ->get_clipboard 2003/08/05 22:16 muppetman * pm/SimpleList.pm: pod patch from James Curbo 2003/08/01 12:45 muppetman * MANIFEST, Gtk2.pm, README, Makefile.PL: updated for 0.92 release 2003/07/31 20:00 muppetman * Gtk2.pm: mention Gtk2::api and Gtk2::SimpleList manpages * Makefile.PL: install api.pod so perldoc can find it. * examples/simplelist.pl, pm/SimpleList.pm, t/19.GtkSimpleList.t: add simple interfaces to editable text cells and index-based selection handling; modify and clarify other pod. * xs/GtkTextView.xs: fixed get_iter_at_location to work correctly. * gtk-demo/textview.pl: clean up some flotsam and jetsam * CodeGen.pm: register GEnum and GFlags types with the bindings, so they can be used as column types 2003/07/29 22:06 rwmcfa1 * pm/SimpleList.pm: first pass at pod documentation done, small version bump, the on load warning has been removed. * examples/simplelist.pl, t/19.GtkSimpleList.t: added examples/tests for a more complex custom column type, sum_of_array, it better shows the power of the custom column system. 2003/07/29 14:52 rwmcfa1 * pm/SimpleList.pm: added code to allow users (well programmers anyway) to define their own column types, scalar impelements this in a simple example. this is very powerful and very cool, check it out. * t/19.GtkSimpleList.t, examples/simplelist.pl: make use of and exemplify the cool new custom column types interface. also get pixbuf's from a more relable source. both scalars and pixbuf's are more fully demonstraighted/tested. 2003/07/25 10:21 rwmcfa1 * pm/SimpleList.pm, t/19.GtkSimpleList.t: initial versions, lots of known bugs, submitted for testing, approval and suggests. 2003/07/25 10:21 muppetman * Gtk2.pm, README: bump version to 0.91 2003/07/25 03:41 pcg * xs/GtkCurve.xs: avoid calling set_vector with zero veclen to avoid segfault. 2003/07/24 16:37 muppetman * xs/GtkFileSelection.xs: add g_filename_(from|to)_utf8 to gtk_file_selection_(get|set)_filename. 2003/07/24 09:40 rwmcfa1 * t/01.GtkWindow.t: we aren't assured that a window will be the exact size that we ask it to be, so setting and testing that it is isn't a good thing. 2003/07/24 08:31 muppetman * xs/GtkFileSelection.xs: get_selections was broken; simplified the loop and used newSVGChar instead of newSVpv. 2003/07/24 00:56 pcg * gtk2perl.h, xs/GtkPlug.xs, xs/GtkSocket.xs: don't build these for the win32 backend. It defines the macros, but doesn't actually provide them. * xs/GtkRadioButton.xs: remove extra aliases (saves memory and avoids extra symbols). 2003/07/23 16:46 muppetman * README, Makefile.PL: update required versionf of Gtk2 and Glib to ensure that the gchar_own typemap (introduced in 0.90) is available. * xs/GtkImage.xs: get_pixbuf 2003/07/22 17:31 rwmcfa1 * xs/Gtk2.pm: much discussed immproved handling of the create_item via hash handling, now complains on bad keys. thanks to Joe Smith and Brett Kosinski for their input. 2003/07/22 16:41 muppetman * xs/GtkTreeModel.xs: more _ornulls * AUTHORS: add thierry, who should've been in a couple weeks ago 2003/07/21 07:36 rwmcfa1 * xs/GtkTreeModel.xs: Gtk2::TreeModel->get now returns an array of all of the columns when no column id's are passed, documented in api.pod, shouldn't affect anything normal documented api 2003/07/18 12:00 muppetman * xs/GtkTreeSortable.xs: implemented the missing sort callbacks. * Gtk2.pm, README, Makefile.PL, META.yml: bump version to 0.90 for first beta series release. require at least Glib 0.26. 2003/07/17 11:35 muppetman * xs/GdkX11.xs: a few x11-backend-specific functions from gdkx.h, only used on the X11 backend. * xs/GdkRgb.xs: hackish implementations for some rarely-used but handy gdk-rgb stuff. 2003/07/16 10:04 muppetman * xs/GtkTreeModel.xs, xs/GdkScreen.xs, xs/GtkWidget.xs: more instances of returning '_own'ed wrappers for stack items. coverted all of them to '_copy's. 2003/07/15 20:28 rwmcfa1 * t/18.GtkNotebook.t: almost, if not, complete testing of Gtk2::Notebook. 2003/07/15 08:29 rwmcfa1 * xs/GtkNotebook.xs: allowed NULL's, and defaulted to them, as appropriate for both parameters and return values in a lot of places, one of which Thierry Vignaud pointed out. 2003/07/14 22:30 muppetman * xs/GtkTreeModel.xs: bugfix, can't _own_ornull something that wasn't dynamically allocated. 2003/07/14 20:44 rwmcfa1 * t/00.Gtk2.t: more thorough testing, init_add, quit_add, quit_add_remove. * t/01.GtkWindow.t: much more thorough testing, but not complete. general re-org. * t/02.GtkButton.t: pretty nearly complete testing * xs/Gtk2.xs: implemented first pass at init_add, quit_add, and quit_add_remove. * xs/GtkWindow.xs: title defaults to NULL in set_title. get_icon is allowed (and does) return NULL when there are no icons associated with the window, api doc doesn't mention this. window_list_toplevels implemented 2003/07/14 15:05 muppetman * xs/GdkWindow.xs: back out the OUTLIST stuff for get_pointer. i don't understand why, but the OUTLIST form causes get_pointer to break in examples/histogramplot.pl and examples/scribble.pl. 2003/07/11 13:22 muppetman * xs/GtkIconFactory.xs, gtk-demo/stock_browser.pl: make some fixes to stock handling to make it more robust when local implementations add custom stock items without icons or proper sizes; i don't know what's up with redhat 9, but this makes the stock browser work there. 2003/07/09 13:39 muppetman * xs/GtkTreeSelection.xs, api.pod, gtk-demo/stock_browser.pl, gtk-demo/editable_cells.pl: reverse order of return values on $tree_selection->get_selected; now conforms to C API and old gtk2-perl. still returns $iter in scalar context. * xs/GdkWindow.xs: add process_updates and process_all_updates, convert hand-coded stuff to OUTLIST * gtk-demo/tree_store.pl, gtk-demo/main.pl: cleanup 2003/07/09 10:47 rwmcfa1 * xs/Gdk.xs: accept nulls for confine_to and cursor parameters of gdk_pointer_grab 2003/07/08 15:38 rwmcfa1 * xs/GdkWindow.xs: uncommented the freeze/thaw updates functions per thierry vignaud's request. * xs/GtkCheckButton.xs: duplicate alias value found by ^ 2003/07/08 14:23 muppetman * CodeGen.om: massive POD update; use regex to find module name instead of relying on people putting whitespace around the '=' 2003/07/07 23:10 muppetman * CodeGen.pm: slight rework of write_boot. now you can pass in an arbitrary regex for modules to be ignored; the default is still to ignore any module that has no :'s in its name. this fix allows us to use write_boot for packages like Gnome::Canvas, which *do* have colons in the name of the package that needs to be ignored. also reimplemented the MODULE search to avoid needing grep, which is conspicuously absent on most win32 systems. this changes the call signature of write_boot, but all the defaults are the same and no module in gtk2-perl-xs was actually using anything non-default. sorry if this breaks you, but it's for the best. 2003/07/07 23:03 rwmcfa1 * t/17.GtkItemFactory.t: added test for item factory 2003/07/06 17:30 muppetman * xs/Gtk2.xs: gtk_set_locale(). * Gtk2.pm: bump version for cvs devel series 2003/07/05 06:06 pcg * xs/GtkTextBuffer.xs, xs/GtkClipboard.xs: use length() syntax. * xs/GtkTextBuffer.xs, xs/GtkRc.xs, xs/Gdk.xs, xs/GdkProperty.xs, xs/GdkScreen.xs, xs/GtkAccelGroup.xs, xs/GtkEditable.xs, xs/GtkFontSelection.xs, xs/GtkTextIter.xs: use gchar_own* as result type to free the strings and avoid memleaks where no CLEANUP existed. * xs/GtkTextIter.xs: uncomment get_visible_slice and get_visible_text. * xs/GtkListItem.xs: fix #endif. 2003/07/04 16:31 muppetman * xs/GdkWindow.xs: added gdk_get_default_root_window * xs/PangoFont.xs: added PANGO_PIXELS * Gtk2.pm: bump version for release 2003/06/27 17:01 pcg * xs/GdkWindow.xs: gdk_window_set_back_pixmap allows null pixmap. * pm/Pango.pm: fix typo. * api.pod: small doc changes (basically proofreading for the new wrappers model). 2003/06/27 17:00 muppetman * Makefile.PL: require bleeding edge Glib. * gtk-demo/appwindow.pl, gtk-demo/item_factory.pl, gtk-demo/stock_browser.pl, testgtk.pl: remove bad usage of set_data and get_data * examples/histogramplot.pl: rewritten with new Glib::Object::Subclass features. 2003/06/26 14:49 rwmcfa1 * MANIFEST, MANIFEST.SKIP: the manifest was updated to include a few missing files and a MANIFEST.SKIP file was added to simplify the process in the future. * Gtk2.pm: cleaned up some of the ItemFactory stuff esp. error messages * xs/GtkItemFactor.xs: reworked all of the callback stuff, needs verification * examples/item_factory_demo.pl: added, simple exmaple of how to use Gtk2::ItemFactory 2003/06/26 13:48 muppetman * pm/Pango.pm: new file allows you to import the Pango constants. * Gtk2.pm: allow 'use Gtk2 -init', a la gtk-perl; bumped version to 0.25 for CVS. * Makefile.PL: add Pango.pm and api.pod to install; install manpages. * gtk-demo/images.pl: use normal operators rather than ->eq (works on overloaded and persistent wrappers) * xs/GtkWidget.xs: support for requisitions as writable objects. needed for supporting size_request event. * xs/GtkStock.xs: watch out for NULLs in stock_item_to_hv; this fixes a crash that resulted whenever the stock browser wasn't the first thing opened in gtk-demo. 2003/06/26 01:11 pcg * META.yml: Add module meta-data in YAML for CPAN. 2003/06/24 08:58 rwmcfa1 * maps: added GTK_TYPE_LIST and GTK_TYPE_LIST_ITEM * xs/GtkList.xs, xs/GtkListItem.xs: initial import required for use of Gtk2::Combo from perl even though they are both deprecated. in the future hopefully this won't be necessary. (also added files to the MANIFEST) 2003/06/23 12:07 pcg * xs/GtkWidget.xs: implement {get,create}_pango_context. 2003/06/22 13:37 pcg * gtk-demo/*: fix various minor problems, including using binmode for binary streams, and removing misleading "use bytes". * xs/GdkPixbufLoader.xs: the right way to access scalars is *not* SvPVX, but SvPV. Also removed "count" from ->write, since strings in perl are always counted and exposing this c-ism gives no benefit. * Makefile.PL: change the glib-not-found error message to the perl standard. * xs/GdkWindow.xs: enabled various non-deprecated methods I needed but weren't implemented yet, plus some rarely used ones. * t/01.GtkWindow.t: compare references with == not eq, and "$x == undef" is not the right way to tets defined'ness. 2003/06/20 11:33 muppetman * Gtk2.pm, README: bump version for 0.24 release * Makefile.PL: just seeing if Glib is available isn't enough, make sure it's recent enough, too. oh, and bump the required glib version while we're at it 2003/06/19 13:46 joered * xs/GdkColor.xs: added accessors for GdkColor struct members. 2003/06/19 00:58 pcg * Makefile.PL: write a fake Makefile using PREREQ when important modules are missing, this ensures auto-installation within CPAN. 2003/06/18 10:48 muppetman * Gtk2.pm: catch undefined values to hush warnings * xs/GtkMenu.xs, xs/GtkItemFactory.xs: change stack handling to avoid attempting to free undef. 2003/06/17 18:21 muppetman * gtk2perl.h, xs/GtkObject.xs: push sink functions into Glib, to avoid some problems in which GtkObject created via Glib::Object->new don't have gtk_object_sink called on them. 2003/06/16 22:25 muppetman * xs/GdkColor.xs, gtk-demo/drawingarea.pl: not sure how the GBoxed change could excite this, but suddenly gdk_color_free is very unhappy with the GdkColors created by Gtk2::Gdk::Color->new and ->parse. fixed by using gdk_color_copy instead of g_new. freaky. 2003/06/16 22:21 pcg * xs/GtkAdjustment.xs: two minor typoes, found while porting gimp-perl to 1.3. Reply to muppetman becomes urgent slowly. 2003/06/16 22:36 joered * xs/Gtk2/GtkTextIter.xs: fixed a memory leak. Thanks to muppet for the hint. 2003/06/16 14:31 muppetman * xs/GtkStyle.xs, AUTHORS: patch from Tom Hargreaves (hex at freezone dot co dot uk> makes font_desc work correctly. * api.pod: nasty typo in example code * Gtk2/xs/GdkEvent.xs, Gtk2/xs/GtkWidget.xs: updated to reflect changes in Glib-Perl's GBoxed handling. 2003/06/15 17:03 joered * xs/Gtk2/GtkTextIter.xs: added binding for gtk_text_iter_copy 2003/06/12 20:27 muppetman * xs/GdkScreen.xs, xs/PangoTabs.xs: newly implemented 2003/06/12 18:06 pcg * xs/GtkWidget.xs: enable add_events, set/get_extension_events. 2003/06/09 13:49 muppetman * xs/GtkClipboard.xs: new stuff; 2.2.x only, so only smoke-tested on my end... 2003/06/08 16:40 muppetman * api.pod: merged in stuff from the braindump 2003/06/07 18:51 muppetman * xs/GtkTreeModel.xs: implemented treemodel->foreach, and some others. * xs/GtkTreeView.xs: argument defaults patch from rene seindal 2003/06/06 23:55 muppetman * Gtk2.pm, xs/GdkProperty.xs, xs/GdkSelection.xs: added stuff for handling GdkAtoms and selections and such. it appears to have some problems, but i don't know if they are binding problems or what. * MANIFEST: added several missing files, make dist makes something appropriate, now. * Gtk2.pm: bumped version number to 0.22 for public release. 2003/06/06 11:39 pcg * xs/GtkTextTagTable.xs: new file, all methods of GtkTextTagTable. 2003/06/05 10:53 rwmcfa1 * t/[0-9]*: prepended 0's onto the front of the 0 - 9 tests to improve order. 2003/06/02 18:10 muppetman another patch from marc lehmann: * xs/GtkAdjustment.xs: added accessors and mutators for struct members * gtk-demo/textview.pl: fix demo to actually use unicode as opposed to the garbled latin1. 2003/06/02 12:24 muppetman * xs/GtkDialog.xs: allow enum strings as well as integers to $dialog->response * xs/GdkEvent.xs: remove unused parameters 2003/06/01 22:52 muppetman * xs/GtkAspectFrame.xs, GtkTreeSortable.xs: fixed package typos; change Gtk2::AspectFrame::set to set_params to avoid clashing with Glib::Object::set. (patch from Marc Lehmann, pcg at goof dot com) * xs/GtkTreeSelection.xs: patch from rene seindal, remove model from return value of get_selected_rows. 2003/05/31 11:07 rwmcfa1 * xs/GtkRc.xs: implemented gtk_rc_set_default_files 2003/05/28 14:02 muppetman * Makefile.PL: decent diagnostic messages for missing Glib modules 2003/05/27 20:44 rwmcfa1 * xs/GtkSelection.xs: gtk 2.2 function gtk_selection_owner_set_for_display didn't have the appropriate C_ARGS section ommitting the class parameter 2003/05/27 18:50 muppetman implementing missing bindings for selection handling and drag and drop stuff. * xs/GdkDnd.xs, xs/GtkDnd.xs, xs/GtkSelection.xs, examples/testdnd.pl: new files * gtk2perl.h, xs/GdkTypes.xs, gdk.typemap: added type handling for GdkAtom and GtkTargetEntry * xs/GtkWidget.xs: added get_colormap 2003/05/27 14:38 rwmcfa1 * xs/GtkWidget.xs: get_style was missing, in it's place was style, they're aliases of one another now. 2003/05/26 23:58 muppetman * xs/GtkMenu.xs: get_attach_widget 2003/05/26 04:05 muppetman * Gtk2.pm: bumped version number for development series 0.21 * xs/GtkTreeSelection.xs: wrapped get_selected_rows and count_selected_rows for 2.2 and implemented them for 2.0.x; get_selected handles scalar context gracefully. 2003/05/26 21:04 rwmcfa1 * xs/GtkTextBuffer.xs: bug fixed at insert_at_cursor. was taking an iter for some reason, was otherwise correct. 2003/05/22 10:30 muppetman * AUTHORS, LICENSE, *: added copyright and license info to just about every file, and pointers to the AUTHORS file which contains the list of who's responsible for this mess. 2003/05/18 14:00 muppetman * ChangeLog: since breaking the monolithic build into pieces, ChangeLog entries for Gtk2 will be in here. i've included the contents of the toplevel log up to this point for history. * MANIFEST: updated for proper make dist * Gtk2.pm: bumped up the version number. * Makefile.PL: require Glib >= 0.20 * README: updated 2003/05/17 09:06 rwmcfa1 * Glade/*: first pass at GladeXML added * Makefile: added, see comments within * Makefile.PL: is no more * lots and lots of files: G -> Glib and other related/required changes 2003/05/16 14:55 muppetman * Gtk2/xs/GtkSpinButton.xs: removed get_value_as_float because it is deprecated (and had the wrong return type anyway). 2003/05/15 11:45 muppetman * G/GSignal.xs: hush unused parameter warning, more efficient this way, anyway * Gtk2/xs/GtkContainer.xs: implemented foreach * Gtk2/xs/GtkIconFactory.xs: minor bugfix * G/GType.xs, G/GValue.xs, G/gperl.h, G/typemap, Gnome2/xs/GnomeProgram.xs, Gtk2/xs/GtkCombo.xs, Gtk2/xs/GtkDialog.xs, Gtk2/xs/GtkFrame.xs, Gtk2/xs/GtkItemFactory.xs, Gtk2/xs/GtkStock.xs, Gtk2/xs/GtkTextBuffer.xs, Gtk2/xs/GtkToolbar.xs, Gtk2/xs/GtkTooltips.xs, Gtk2/xs/GtkTreeViewColumn.xs: use newSVGChar and SvGChar instead of newSVpv and SvPV_nolen for gchar*, to ensure valid utf8 handling. this definitely needs testing. 2003/05/06 12:56 rwmcfa1 * Gtk2/t/1.GtkWindow.t, Gtk2/t/2.GtkButton.t: prevent windows from fighting over focus and thus stall tests (happends with wmaker) * Gtk2/t/16.GtkMenu-etc.t: we don't really know how to use tearoff_state so for the time being we won't 2003/05/05 23:11 muppetman * G/G.pm, Gtk2/Gtk2.pm: pod updates 2003/05/05 16:35 muppetman * Gtk2/xs/GtkTooltips.xs: work around a (bug|feature) in the Gtk+ C library by storing a GtkTooltips reference in the GtkWidget's user data. doesn't hurt normal behavior, and prevents some hard-to-explain pitfall errors. 2003/05/03 11:17 joered * Gtk2/: Gtk2.pm, Makefile.PL, pm/Helper.pm: removed deprecated timeout/idle/input methods from Gtk2.pm; added Gtk2/pm/Helper.pm with a convenience implementation of add_watch/remove_watch 2003/05/02 18:11 muppetman * Gtk2/gtk-demo/apple-red.png, Gtk2/gtk-demo/background.jpg, Gtk2/gtk-demo/gnome-applets.png, Gtk2/gtk-demo/gnome-calendar.png, Gtk2/gtk-demo/gnome-foot.png, Gtk2/gtk-demo/gnome-gimp.png, Gtk2/gtk-demo/gnome-gmush.png, Gtk2/gtk-demo/gnome-gsame.png, Gtk2/gtk-demo/gnu-keys.png: images needed by Gtk2/gtk-demo/pixbufs.pl, directly from the gtk+-2.2.1 source distribution. * G/GType.xs, Gtk2/examples/histogramplot.pl: a bunch of code, borrowed from pygtk, to add signals to a derived class. altered the histogramplot example to use a new signal. * Gtk2/xs/GtkTooltips.xs: allow tip_private to default to NULL 2003/05/02 00:30 muppetman * Gtk2/Gtk2.pm, Gtk2/gtk2perl.h, Gtk2/examples/scribble.pl, Gtk2/gtk-demo/drawingarea.pl, Gtk2/gtk-demo/pixbufs.pl, Gtk2/xs/Gdk.xs, Gtk2/xs/GdkTypes.xs, Gtk2/xs/GtkCellRenderer.xs, Gtk2/xs/GtkWidget.xs: reverted the whole GdkRectangle mess. it's a boxed type again. this clears up several bugs to do with GdkAllocation, and in fact makes the whole shebang more efficient because we don't just create an array any time the GdkRectangle is needed, in which case it is often thrown away or only one element is used. added a ->values function, like in gtk2-perl, which returns the members in a list in the order you'd want for passing to several important gdk functions. Gtk2::Gdk::Rectangle->new is good for creating new rectangles. * Gtk2/xs/GtkTextView.xs, Gtk2/xs/GtkTreeView.xs: implemented some functions found to be missing when looking for GdkRectangle returns that needed to be marked _copy. 2003/05/01 23:17 joered * Gtk2/xs/GtkCombo.xs: added GtkCombo->entry and GtkCombo->list returning the correspondent widgets * Gtk2/xs/GtkHBox.xs, Gtk2/xs/GtkVBox.xs: default homogenous is 0 and default spacing is 5, as in gtk-perl * Gtk2/xs/GtkWidget.xs: widget flags can now be set with Widget->flag_name(1) resp. unset with Widget->flag_name(0); Widget->flag_name() still returns current state 2003/05/01 08:00 rwmcfa1 * Gtk2/xs/GtkStyle.xs: removed deprecated functions, there was a lot of them. 2003/04/31 01:00 muppetman * Gtk2/xs/GtkFrame.xs: properly allow undef in Gtk2::Frame->new (was adding an empty string instead of passing NULL) * Gtk2/xs/Gdk.xs, Gtk2/xs/GdkPixbufLoader.xs, Gtk2/xs/GdkRegion.xs, Gtk2/xs/PangoContext.xs, Gtk2/xs/PangoLayout.xs: newly implemented * Gtk2/examples/histogramplot.pl: new code to test drive drawing primitives, pango text handling and drawing, and subclassing. lots of stuff in here; was ported from a working C class library i've been writing. * G/GType.xs, G/GObject.xs, Gtk2/xs/GtkObject.xs: support for pure-perl GObject subclasses. added G::Type->register to create a new GType (basically wraps g_type_register_static), G::Object->_new, to be called from perl constructors for things inheriting GObject, and Gtk2::Object->new, which MUST be used for things inheriting GtkObject (to handle the floating ref situation properly). this allows the perl developer to create new widgets without writing C code! adding signals and properties is currently not implemented. * Gtk2/CodeGen.pm: more correct handling of undef --- previous code was allowing a variable containing undef to pass, which would cause a croak in the wrapper-reader function. * Gtk2/Gtk2.pm, Gtk2/xs/GdkTypes.xs: stopgap solution, simple lvalue subs to get members from a rectangle list * Gtk2/gtk-demo/drawingarea.pl: revert to named member method syntax for rectangles * Gtk2/gtk-demo/pixbufs.pl: actually works now. you need the images, which i don't think are in CVS yet. * Gtk2/gtk-demo/stock_browser.pl: cleanup * Gtk2/xs/GdkPixmap.xs: implemented create_from_xpm_d and colormap_create_from_xpm_d * Gtk2/xs/GdkWindow.xs: allow NULL for cursor in set_cursor * Gtk2/xs/GtkWidget.xs: implemented create_pango_layout 2003/04/29 21:55 joered * Gtk2/xs/GtkListStore.xs: bugfix: gtk_list_store_append and gtk_list_store_prepend were swapped 2003/04/29 23:44 muppetman * Gtk2/xs/GdkDrawable.xs: implemented gdk_draw_polygon, gdk_draw_points, gdk_draw_lines, gdk_draw_segments, gdk_draw_layout, and gdk_draw_layout_with_colors * G/GObject.xs: removed some very old and very broken commented-out code (wrapper instance caching). added new methods for dealing with foreign objects in perl: G::Object->new_from_pointer(VAL, NOINC) (a direct wrapper around gperl_new_object), and $object->get_pointer. 2003/04/29 18:10 muppetman * Gtk2/xs/GtkWindow.xs: icon list stuff * Gtk2/gtk-demo/images.pl, Gtk2/gtk-demo/pixbufs.pl: the last two pieces of gtk-demo (need some image files and such, though), and these two don't work correctly. * Gtk2/gtk-demo/appwindow.pl, Gtk2/gtk-demo/button_box.pl, Gtk2/gtk-demo/changedisplay.pl, Gtk2/gtk-demo/colorsel.pl, Gtk2/gtk-demo/dialog.pl, Gtk2/gtk-demo/editable_cells.pl, Gtk2/gtk-demo/item_factory.pl, Gtk2/gtk-demo/list_store.pl, Gtk2/gtk-demo/main.pl, Gtk2/gtk-demo/menus.pl, Gtk2/gtk-demo/panes.pl, Gtk2/gtk-demo/sizegroup.pl, Gtk2/gtk-demo/stock_browser.pl, Gtk2/gtk-demo/textview.pl, Gtk2/gtk-demo/tree_store.pl: gtk-demo runs! lots of cleanup in the pieces, and changed each one to us a single entry point name, defined in a package with the same name as the file; this bit of subterfuge was necessary because of the differences between C and perl, and the fact that the app is designed as a C program. NOTE: drawingarea.pl is broken, because my copy has other changes that won't work with the current state of CVS. 2003/04/29 16:16 rwmcfa1 * Gtk2/xs/GdkGC.xs: impelemted gdk_gc_set_dashes 2003/04/29 15:10 muppetman * Gtk2/xs/GtkSizeGroup.xs: implemented size groups * Depends.pm, G/Depends.pm, G/Makefile.PL, Gnome2/Makefile.PL, GnomePrint2/Makefile.PL, Gtk2/Makefile.PL, GtkSpell/Makefile.PL, G/PkgConfig.pm, Gtk2/CodeGen.pm, helpers/genstuff.pl, helpers/genboot.pl: build system hacks. moved Depends.pm under G, so that G can install it. made a module of some boilerplate to handle dealing with pkgconfig, and converted the code in helpers/genstuff.pl and helpers/genboot.pl into Gtk2/CodeGen.pm, stuff that can be called from Makefile.PLs. hacked up a the Makefile.PLs to reflect these changes. this makes it possible to use the autogen build tools outside the source tree --- the first step towards breaking up the source tree into separately distributable modules. 2003/04/29 11:14 muppetman * Gtk2/gtk-demo/sizegroup.pl: another little piece of my heart * Gtk2/xs/GtkDialog.xs: use alias to ensure that new_with_buttons exists for those who seek it. 2003/04/28 23:25 muppetman * Gtk2/xs/GtkListStore.xs, Gtk2/xs/GtkTreeStore.xs: work around bizarre stack behavior by not using a helper function. trying to read the stack in a helper function called from an xsub was resulting in the stack showing the wrong number of items. 2003/04/28 18:00 muppetman * Gtk2/gtk-demo/panes.pl: another piece of the gtk-demo pie * G/G.pm G/GObject.xs: overload the == operator, for more natural object comparisons * Gtk2/xs/GtkPaned.xs: struct member access * Gtk2/Makefile.PL Gtk2/genkeysyms.pl: create a big hash of key symbols in Gtk2::Gdk::Keysyms, a la gtk-perl * Gtk2/xs/GtkRadioButton.xs, Gtk2/xs/GtkRadioMenuItem.xs, Gtk2/xs/GtkButton.xs, Gtk2/xs/GtkCheckButton.xs, Gtk2/xs/GtkCheckMenuItem.xs, Gtk2/xs/GtkImageMenuItem.xs, Gtk2/xs/GtkMenuItem.xs, Gtk2/xs/GtkToggleButton.xs: consolidate constructors with ALIAS to avoid copying code. make sure that group isn't a valid SV pointing to undef * Gtk2/xs/GtkWidget.xs: implemented queue_draw, add_accelerator, remove_accelerator, and get_display 2003/04/27 08:52- rwmcfa1 * Gtk2/t/16.GtkMenu-etc.t: Added a first pass at the testing of GtkMenu and friends. * Gtk2/t/15.GtkHandleBox.t: Added a decently complete test of GtkHandleBox * Gtk2/t/14.GtkToolbar.t: Added a decently complete test of GtkToolbar * Gtk2/xs/GtkToolbar.xs: Fixed a bug where GtkToolbarChildType was wrongly being used as a gtype, caused all _element functions to fail * Gtk2/t/13.GtkTooltips.t: Added a decently complete test of GtkTooltips * Gtk2/xs/GtkTooltips.xs: implemented an attempt at gtk_tooltips_data_get which returns what is in the GtkTooltipsData struct as a hash. * Gtk2/t/12.GtkDialog.t: Added a decently complete test of GtkDialog * Gtk2/xs/GtkDialog.xs: added gtk_dialog_add_butttons with multiple calls to gtk_dialog_add_button. combined the vbox and action_area get functions into one aliased function. also changed a char* to a gchar * * Gtk2/maps: hand added entry for Gtk2::Progress, removed * Gtk2/xs/GtkProgressBar.xs: added a BOOT section with a isa call to tell GtkProgressBar that it's a GtkWidget dependant. 2003/04/26 09:53- rwmcfa1 * GtkSpell/Spell.pm: first pass of documentation * GtkSpell/GtkSpell.xs: gtkspell_get_from_text_view now accepts and ignores a class * Gtk2/t/10.GtkProgressBar.t, Gtk2/t/11.GtkStatusBar.t: first passes at testing the two modules * Gtk2/maps: hand added a (maybe temporary) entry for Gtk2::Progress * Gtk2/xs/GtkProgressBar.xs: removed a bunch of deprecated functions * Gtk2/xs/GtkMenuItem.xs, Gtk2/xs/GtkRadioButton.xs, Gtk2/xs/GtkRadioMenuItem.xs, Gtk2/xs/GtkToggleButton.xs: now new with string new('string') uses mnemonic instead of label. seems like a good idea. you can use new_with_label if you don't want this behavior. also impelented news with aliases for new and new_with_mnemonic (saves code space/copying). * Gtk2/xs/GtkCheckButton.xs, Gtk2/xs/GtkCheckMenuItem.xs, Gtk2/xs/GtkImageMenuItem.xs: same as ^ with the addition of: wrappers for _new_with_label were invalid they're now fixed. 2003/04/25 23:01 rwmcfa1 * GtkSpell/: Initial import of working (for me anyway) GtkSpell mappings, give them a try. 2003/04/25 18:17 muppetman * Gtk2/gtk-demo/changedisplay.pl, Gtk2/gtk-demo/drawingarea.pl, Gtk2/gtk-demo/editable_cells.pl: more demo pieces. changedisplay.pl is completely untested, because i do not have Gtk+ 2.2 on my development machine. * G/GClosure.xs: always copy SVs that are to be stored. see the perlcall manpage. this fixes some intermittent bugs that happen when reusing the same variable for various objects. * Gtk2/xs/GdkWindow.xs: implemented gdk_window_invalidate_rect * new-gtk2-perl.html, G/GBoxed.xs, helpers/genstuff.pl, G/gperl.h, G/GObject.xs: renamed gperl_register_class to gperl_register_object to be more consistent (with gperl_register_fundamental and gperl_register_boxed). also added gperl_object_set_no_warn_unreg_subclass, made gperl_get_object honor it. * Gtk2/xs/GdkGC.xs, Gtk2/xs/GtkStyle.xs: set 'no warn for unregistered subclasses on GtkStyle and GdkGC. causes the type system to stop spewing messages on stderr about unregistered types from theme engines and gdk backends. * Gtk2/gtk2perl.h, Gtk2/examples/scribble.pl, Gtk2/xs/GdkEvent.xs, Gtk2/xs/GdkTypes.xs, Gtk2/xs/GtkCellRenderer.xs: completely reworked the handling of GdkRectangle. it's now treated as a perl list instead of an opaque type; this is consistent with gtk-perl and makes life easier for manipulating the rectangles in perl. * Gtk2/xs/GtkWidget.xs: changed handling of GtkAllocation, since handling of GdkRectangle changed. invisible from the perl side. also implemented gtk_widget_get_events. * Gtk2/xs/GtkImage.xs: implemented gtk_image_new_from_pixmap, gtk_image_set_from_pixmap, and gtk_image_get_pixmap * Gtk2/xs/GtkLabel.xs: allow Label->new to default to NULL for creating empty labels. * Gtk2/xs/GtkTreeModel.xs: implemented gtk_tree_path_get_indices 2003/04/25 12:40 rwmcfa1 * Gtk2/t/1.GtkWindow.t: corrected check for gtk >= 2.2 * Gtk2/t/5.GtkListStore-etc.t: if 2.2 then try the reorder function * Gtk2/xs/GtkCurve.xs: re-did set_vector to be clearer and removed a unused param name from prototype. * Gtk2/xs/GtkFileSelection.xs: clarified the a for loop's operations in get_selections * Gtk2/xs/GtkTreeStore.xs, Gtk2/xs/GtkListStore.xs: added itital pass at _store_reorder * Gtk2/maps: added stuff new as of gtk2.2.1 * Gtk2/xs/GtkPlug.xs Gtk2/xs/GtkWindow.xs Gtk2/xs/GdkCursor.xs Gtk2/xs/GdkDrawable.xs Gtk2/xs/GtkInvisible.xs Gtk2/xs/GtkMenu.xs: uncommented stuff new to gtk 2.2 now that maps is up to date for 2.2.1 2003/04/24 18:24 muppetman * Gtk2/gtk-demo/appwindow.pl, Gtk2/gtk-demo/button_box.pl, Gtk2/gtk-demo/colorsel.pl, Gtk2/gtk-demo/dialog.pl: more pieces of the demo * Gtk2/xs/GtkToolbar.xs: implemented all the append/prepend/insert functions that were left out because they require callbacks * Gtk2/xs/GtkStock.xs: implemented gtk_stock_add * G/GSignal.xs, G/gperl.h: export gperl_signal_connect, the actual workhorse, so other XSubs can use it * Gtk2/xs/GtkColorSelection.xs: fixed get_current_color and get_previous_color * Gtk2/xs/GtkColorSelectionDialog.xs: member access * TODO: high-level things (i forgot to commit this last week) 2003/04/24 17:55 rwmcfa1 * Gtk2/t/5.GtkListStore-etc.t: fixed type-o, datam -> data that was preventing entries being made into the list * Gtk2/xs/GtkMessagedialog.xs: removed a TODO, it is probably better to just pass the message as you want it rather than use the varargs stuff anyway 2003/04/24 13:30 muppetman * Gnome2/xs/GnomeProgram.xs, Gnome2/druid.pl: implemented object properties on Gnome2::Program->init (was a FIXME) * G/GObject.xs: created alias get_property for get and set_property for set, since some objects mask the G::Object-level method with their own. in list_properties, don't die if the descr isn't set. 2003/04/24 12:55 muppetman * helpers/genstuff.pl: wrap generated code in #ifdefs to support versioning (typemaps must be generated even if the code isn't, so we generate everything but only use part of it) 2003/04/23 10:44 rwmcfa1 * Gtk2/xs/GtkHButtonBox.xs, Gtk2/xs/GtkVButtonBox.xs: get_spacing_defaults should accept and ignore class * Gtk2/gtk2perl.h: type-o newSVGdkModiferType -> newSVGdkModifierType * Gtk2/xs/GtkFontSelection.xs: type functions should not be in XS, it's all automagical * Gtk2/xs/GtkWindow.xs: a first pass at set_icon_list_function added 2003/04/23 10:37 muppetman * ChangeLog: new change log, from the cvs log on sourceforge. please keep it updated. 2003/04/22 muppetman * G/GBoxed.xs: updates to debugging output * G/GClosure.xs: don't keep the supplemental arguments array in gperl_closure_marshal --- just put mortal values on the stack and everything works out fine. simplifies the code quite a bit, and removes some subtle and nasty bugs. * G/GType.xs: GPERL_TYPE_SV, a boxed wrapper for perl scalars, mapped to the package G::Scalar. this is handy for storing hashes and other perl data structures in a TreeModel. * G/GValue.xs: special handling for GPERL_TYPE_SV. implement handling for G_TYPE_INTERFACE. * Gtk2/gtk-demo/stock_browser.pl, Gtk2/xs/GtkIconFactory.xs: stock browser demo and some supporting code * Gtk2/gtk2perl.h, Gtk2/xs/GdkTypes.xs: special handling for GdkModifierType flags... GDK_MODIFIER_MASK matches all of the flag values, and causes nasty problems when you try to convert the SV flags wrapper *back* to C. so, handle it separately, and don't allow GDK_MODIFIER_MASK to make it into perl from C. (can still go the other way, though) * Gtk2/xs/GtkItemFactory.xs: bracket callback with ENTER/SAVETMPS & FREETMPS/LEAVE * Gtk2/xs/GtkMenu.xs: implemented gtk_menu_popup * Gtk2/xs/GtkTreeModel.xs: it's possible for gtk_tree_model_iter_next to return NULL * Gtk2/xs/GtkTreeView.xs: implemented gtk_tree_view_insert_column_with_data_func * Gtk2/xs/GtkTreeViewColumn.xs: implemented gtk_tree_view_column_set_cell_data_func * Gtk2/xs/GtkWidget.xs: default params on set_size_request, and implemented render_icon 2003/04/22 rwmcfa1 * Gtk2/t/5.GtkListStore-etc.t, Gtk2/t/6.GtkLabel.t, Gtk2/t/7.GtkBoxes.t, Gtk2/t/8.GtkCombo.t: initial import * Gtk2/t/9.GtkRadioButton.t: test out a little more throughly * Gtk2/xs/GtkFileSelection.xs: first pass at gtk_file_selection_get_selections, needs to be utf8 tested/implemented maybe * Gtk2/xs/GtkRadioButton.xs: crash bug, need to make sure that svp exists * Gtk2/xs/GtkRadioMenuItem.xs: first pass at implementing this class, not tested yet 2003/04/21 muppetman * G/G.xs, G/gperl.h: added gperl_alloc_temp * G/GClosure.xs: added GPerlCallback, and made some robustness fixes for GPerlClosure. (there was bizarre stuff happening in the marshaller, wrong number of items in the supplemental arguments array.) * G/gperl.h: add GPerlCallback, with docs, and some other noise * Gtk2/gtk-demo/item_factory.pl: gtk-demo driver for GtkItemFactory * Gtk2/xs/GtkItemFactory.xs: implemented GtkItemFactory * Gtk2/xs/GtkWidget.xs: set_flags and unset_flags 2003/04/21 rwmcfa1 * Gtk2/xs/GtkRadioButton.xs: implement all of the functions now with a first pass at how to deal with GSList/group stuff. (notice: it's subject to change) 2003/04/20 rwmcfa1 * just about every file: added cvs Header: tags * Gtk2/xs/GtkWindow.xs: missing functions added; version 2.2 functions added (some commented out); decorated_window functions added, but commented out (how should we go about these?) 2003/04/18 gthyni added .cvsignore files for cleaner updates 2003/04/18 muppetman * Gnome2/druid.pl: add a button to test out Gnome2::About * Gnome2/xs/GnomeAbout.xs: patch from Chas Owens to implement the authors and documenters parameter lists, and allow defaults on parameters following authors. (authors is required by gnome_about_new) * Gtk2/xs/GtkAccelGroup.xs: implemented gtk_accelerator_parse and gtk_accelerator_name * Gtk2/xs/GtkFileSelection.xs: patch from Chas Owens giving access to member widgets * Gtk2/xs/GtkImage.xs: implemented new_from_pixbuf and set_from_pixbuf * Gtk2/xs/GtkStock.xs: implemented some stock handling stuff, enough to get the stock_browser demo working * Gtk2/xs/GtkTreeSelection.xs: implemented gtk_tree_selection_get_selected 2003/04/18 rwmcfa1 * Gtk2/xs/GtkWindow.xs: add a header tag and see if i can commit, header tags need to be added to everything before to long. 2003/04/17 muppetman massive commit of changes made by muppetman and rwmcfa1 since the last pre-sourceforge snapshot. * G/G.xs, G/gperl.h: added gperl_croak_gerror, takes care of properly freeing a GError before croaking with the message it contains * G/GObject.xs: don't allow non-RVs in gperl_get_object; added G::Object->eq * G/gperl.h: added gperl_croak_gerror, takes care of properly freeing a GError before croaking with the message it contains * Gtk2/gdk.typemap, Gtk2/gtk2perl.h: custom handling for GdkBitmap * Gtk2/examples/layout.pl: new example (ported from C by ross) * Gtk2/examples/socket.pl, Gtk2/t/0.Gtk2.t, Gtk2/t/1.GtkWindow.t, Gtk2/t/2.GtkButton.t, Gtk2/t/3.GtkGammaCurve.t: updates since snapshot * Gtk2/gtk-demo/textview.pl, Gtk2/gtk-demo/floppybuddy.gif, Gtk2/gtk-demo/gtk-logo-rgb.gif: another piece of gtk-demo, and accessories * Gtk2/xs/GdkPixbuf.xs: added lots of missing functionality * Gtk2/xs/GdkPixmap.xs: can now create GdkBitmaps. warning, GdkBitmap may be in the wrong class, there are some complaints at runtime about it (porting C code passing a GdkBitmap where a GdkPixmap was wanted, i had to re-bless in perl to achieve that). * Gtk2/xs/Gtk2.xs: added version information functions * Gtk2/xs/GtkCurve.xs: work around a C bug that the Gtk+ maintainers say won't be fixed (because the widget is to be removed in future versions) * Gtk2/xs/GtkHScale.xs, Gtk2/xs/GtkHScrollBar.xs, Gtk2/xs/GtkVScale.xs, Gtk2/xs/GtkVScrollBar.xs, Gtk2/xs/GtkScrolledWindow.xs: allow default parameters * Gtk2/xs/GtkListStore.xs: place TreeModel at the beginning of ISA so Gtk2::TreeModel::get is found before G::Object::get. remove some warn()s. * Gtk2/xs/GtkNotebook.xs: patch from Emmanuele Bassi, which was a double commit, because goran had already fixed it and i didn't notice in time * Gtk2/xs/GtkTextBuffer.xs: implemented insert_with_tags_by_name * Gtk2/xs/GtkTextIter.xs: allow NULL return from get_child_anchor * Gtk2/xs/GtkTextView.xs: oops, bad signature * Gtk2/xs/GtkTreeView.xs: implemented missing new_with_model * Gtk2/xs/GtkTreeViewColumn.xs: stack randomly had the wrong number of items. converted to a macro to avoid the use of dXSARGS, and suddenly the list_store.pl portion of gtk-demo works. dXSARGS is supposed to work anywhere; i don't understand why it didn't. * Gtk2/xs/GtkWidget.xs: implemented several _modify_* methods * Gtk2/xs/GtkWindow.xs: allow window type to default to 'toplevel' on ->new; all NULL for several other functions' parameters. * Gtk2/xs/PangoFont.xs: pango constants. 2003/04/17 gthyni imported 20030415 snapshot into CVS Gtk2-1.2498/constants-2.0000644 001750 000024 00000000313 11664366546 015775 0ustar00bdmanningstaff000000 000000 GDK_CURRENT_TIME GDK_PRIORITY_EVENTS GDK_PRIORITY_REDRAW GTK_PRIORITY_RESIZE GTK_PATH_PRIO_LOWEST GTK_PATH_PRIO_GTK GTK_PATH_PRIO_APPLICATION GTK_PATH_PRIO_THEME GTK_PATH_PRIO_RC GTK_PATH_PRIO_HIGHEST Gtk2-1.2498/constants-2.18000644 001750 000024 00000000042 11664366546 016065 0ustar00bdmanningstaff000000 000000 GTK_ENTRY_BUFFER_MAX_SIZE newSVuv Gtk2-1.2498/copyright.pod000644 001750 000024 00000000172 11664366546 016260 0ustar00bdmanningstaff000000 000000 Copyright (C) 2003-2011 by the gtk2-perl team. This software is licensed under the LGPL. See L for a full notice. Gtk2-1.2498/doctypes000644 001750 000024 00000001542 11664366546 015323 0ustar00bdmanningstaff000000 000000 # Use this file to add to the documentation generation system a set of # C type name to Perl type description mappings for types which are not # registered with the GLib type system. This allows the documentation # system to produce useful type names or descriptions in documentation. # The C type name should have no spaces; namely, do NOT include # "const" and/or "*". Also, "_ornull" is handled for you ("or undef" gets # appended to the description). The description may have spaces. # # C name description # ------------ ---------------- GtkTargetEntry Gtk2::TargetEntry GtkTargetList Gtk2::TargetList GdkAtom Gtk2::Gdk::Atom GdkBitmap Gtk2::Gdk::Bitmap GdkNativeWindow Gtk2::Gdk::NativeWindow GdkGeometry Gtk2::Gdk::Geometry GdkKeymap_orclass Gtk2::Gdk::Keymap GdkPixbuf_noinc Gtk2::Gdk::Pixbuf GdkPixbufFormat hash reference Gtk2-1.2498/examples/000755 001750 000024 00000000000 12651227144 015345 5ustar00bdmanningstaff000000 000000 Gtk2-1.2498/gdk.typemap000644 001750 000024 00000002764 11664366546 015723 0ustar00bdmanningstaff000000 000000 # # Copyright (C) 2003-2005 by the gtk2-perl team (see the file AUTHORS for the # full list) # # This library is free software; you can redistribute it and/or modify it under # the terms of the GNU Library General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # # This library is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for # more details. # # You should have received a copy of the GNU Library General Public License # along with this library; if not, write to the Free Software Foundation, Inc., # 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA. # # $Id$ # # this is where Gdk hand coded typemap stuff resides TYPEMAP # can be either a pointer or an integer, this handles both cases GdkNativeWindow T_UV # GdkBitmap doesn't get its own type id, but needs to be treated separately. GdkBitmap * T_GPERL_GENERIC_WRAPPER GdkBitmap_ornull * T_GPERL_GENERIC_WRAPPER GdkBitmap_noinc * T_GPERL_GENERIC_WRAPPER # one of those magickal opaque pointer types GdkAtom T_GPERL_GENERIC_WRAPPER GdkGeometry * T_GPERL_GENERIC_WRAPPER GdkWindowAttr * T_GPERL_GENERIC_WRAPPER # can be either an object or NULL to get the default keymap GdkKeymap_orclass * T_GPERL_GENERIC_WRAPPER # wrapped as a blessed hash GdkPixbufFormat * T_GPERL_GENERIC_WRAPPER Gtk2-1.2498/gtk-demo/000755 001750 000024 00000000000 12651227143 015235 5ustar00bdmanningstaff000000 000000 Gtk2-1.2498/gtk.typemap000644 001750 000024 00000001744 11664366546 015740 0ustar00bdmanningstaff000000 000000 # Copyright (C) 2003 by the gtk2-perl team (see the file AUTHORS for the full # list) # # This library is free software; you can redistribute it and/or modify it under # the terms of the GNU Library General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # # This library is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for # more details. # # You should have received a copy of the GNU Library General Public License # along with this library; if not, write to the Free Software Foundation, Inc., # 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA. # # $Id$ # hand-coded Gtk+ typemaps TYPEMAP GtkTargetList * T_GPERL_GENERIC_WRAPPER GtkTargetList_ornull * T_GPERL_GENERIC_WRAPPER GtkTargetEntry * T_GPERL_GENERIC_WRAPPER Gtk2-1.2498/Gtk2.exports000644 001750 000024 00000002247 11664366546 016006 0ustar00bdmanningstaff000000 000000 # # Copyright (C) 2003-2005 by the gtk2-perl team (see the file AUTHORS for the full # list) # # This library is free software; you can redistribute it and/or modify it under # the terms of the GNU Library General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # # This library is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for # more details. # # You should have received a copy of the GNU Library General Public License # along with this library; if not, write to the Free Software Foundation, Inc., # 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA. # # $Id$ # @exports = qw( gtk2perl_menu_position_func gtk2perl_new_gtkobject gtk2perl_read_gtk_target_entry newSVGdkAtom newSVGdkBitmap newSVGdkBitmap_noinc newSVGdkGCValues newSVGdkGeometry newSVGdkPixbufFormat newSVGtkTargetEntry newSVGtkTargetList SvGdkAtom SvGdkGCValues SvGdkGeometry SvGdkGeometryReal SvGdkPixbufFormat SvGtkTargetEntry SvGtkTargetList ); 1; Gtk2-1.2498/gtk2perl-private.h000644 001750 000024 00000004223 11664366546 017120 0ustar00bdmanningstaff000000 000000 /* * Copyright (C) 2003-2006 by the gtk2-perl team (see the file AUTHORS for the * full list) * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU Library General Public License as published by * the Free Software Foundation; either version 2.1 of the License, or (at your * option) any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public * License for more details. * * You should have received a copy of the GNU Library General Public License * along with this library; if not, write to the Free Software Foundation, * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA. * * THIS IS A PRIVATE HEADER FOR USE ONLY IN Gtk2 ITSELF. * * $Id$ */ #ifndef _GTK2PERL_PRIVATE_H_ #define _GTK2PERL_PRIVATE_H_ #include "gtk2perl.h" /* Implemented in GtkItemFactory.xs. */ GPerlCallback * gtk2perl_translate_func_create (SV * func, SV * data); gchar * gtk2perl_translate_func (const gchar *path, gpointer data); /* Implemented in GtkRecentManager.xs */ const gchar ** gtk2perl_sv_to_strv (SV *sv); SV * gtk2perl_sv_from_strv (const gchar **strv); #if GTK_CHECK_VERSION (2, 6, 0) /* Implemented in GtkTreeView.xs. */ GPerlCallback * gtk2perl_tree_view_row_separator_func_create (SV * func, SV * data); gboolean gtk2perl_tree_view_row_separator_func (GtkTreeModel *model, GtkTreeIter *iter, gpointer data); #endif /* Implemented in GtkDialog.xs. */ gint gtk2perl_dialog_response_id_from_sv (SV * sv); SV * gtk2perl_dialog_response_id_to_sv (gint response); void gtk2perl_dialog_response_marshal (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data); #endif /* _GTK2PERL_PRIVATE_H_ */ Gtk2-1.2498/gtk2perl.h000644 001750 000024 00000016443 11664366546 015457 0ustar00bdmanningstaff000000 000000 /* * * Copyright (C) 2003-2009 by the gtk2-perl team (see the file AUTHORS for the * full list) * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU Library General Public License as published by * the Free Software Foundation; either version 2.1 of the License, or (at your * option) any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public * License for more details. * * You should have received a copy of the GNU Library General Public License * along with this library; if not, write to the Free Software Foundation, * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA. * * * $Id$ */ #ifndef _GTK2PERL_H_ #define _GTK2PERL_H_ #include #include #include #include "gtk2perl-versions.h" /* custom GType for GtkBindingSet */ #ifndef GTK_TYPE_BINDING_SET # define GTK_TYPE_BINDING_SET (gtk2perl_binding_set_get_type ()) GType gtk2perl_binding_set_get_type (void) G_GNUC_CONST; #endif /* custom GType for GdkRegion */ #ifndef GDK_TYPE_REGION # define GDK_TYPE_REGION (gtk2perl_gdk_region_get_type ()) GType gtk2perl_gdk_region_get_type (void) G_GNUC_CONST; #endif #include "gtk2perl-autogen.h" /* no plug/socket on non-X11 despite patches exist for years. */ #ifndef GDK_WINDOWING_X11 # undef GTK_TYPE_PLUG # undef GTK_TYPE_SOCKET #endif /** * gtk2perl_new_gtkobject: * @object: object to wrap. * * convenient wrapper around gperl_new_object() which always passes %TRUE * for gperl_new_object()'s "own" parameter. for #GtkObjects, that parameter * merely results in gtk_object_sink() being called; if the object was not * floating, this does nothing. thus, everything just works out. * * returns: scalar wrapper for @object. * * in xs/GtkObject.xs */ SV * gtk2perl_new_gtkobject (GtkObject * object); /* custom handling for GdkBitmaps, since there are no typemacros for them. */ /* GObject derivative GdkBitmap */ #define SvGdkBitmap(sv) ((GdkBitmap*)gperl_get_object_check (sv, GDK_TYPE_DRAWABLE)) typedef GdkBitmap GdkBitmap_ornull; #define SvGdkBitmap_ornull(sv) (gperl_sv_is_defined (sv) ? SvGdkBitmap(sv) : NULL) typedef GdkBitmap GdkBitmap_noinc; /* these are real functions, rather than macros, because there's some extra * work involved in making sure it's blessed into Gtk2::Gdk::Bitmap when no * GType exists for GdkBitmap. */ SV * newSVGdkBitmap (GdkBitmap * bitmap); SV * newSVGdkBitmap_noinc (GdkBitmap * bitmap); #define newSVGdkBitmap_ornull(b) (b ? newSVGdkBitmap (b) : Nullsv) /* exported for GtkGC */ SV * newSVGdkGCValues (GdkGCValues * v); void SvGdkGCValues (SV * data, GdkGCValues * v, GdkGCValuesMask * m); /* exported for various other parts of pango */ SV * newSVPangoRectangle (PangoRectangle * rectangle); PangoRectangle * SvPangoRectangle (SV * sv); /* * GdkAtom, an opaque pointer */ SV * newSVGdkAtom (GdkAtom atom); GdkAtom SvGdkAtom (SV * sv); SV * newSVGtkTargetEntry (GtkTargetEntry * target_entry); /* do not store GtkTargetEntry objects returned from this function -- * they are only good for the block of code in which they are created */ GtkTargetEntry * SvGtkTargetEntry (SV * sv); void gtk2perl_read_gtk_target_entry (SV * sv, GtkTargetEntry * entry); #define GTK2PERL_STACK_ITEMS_TO_TARGET_ENTRY_ARRAY(first, targets, ntargets) \ { \ guint i; \ if (items <= first) { \ ntargets = 0; \ targets = NULL; \ } else { \ ntargets = items - first; \ targets = gperl_alloc_temp (sizeof (GtkTargetEntry) * ntargets); \ for (i = 0 ; i < ntargets ; i++) \ gtk2perl_read_gtk_target_entry (ST (i + first), \ targets + i); \ } \ } /* * get a list of GTypes from the xsub argument stack * used to collect column types for creating and initializing GtkTreeStores * and GtkListStores. */ #define GTK2PERL_STACK_ITEMS_TO_GTYPE_ARRAY(arrayvar, first, last) \ (arrayvar) = g_array_new (FALSE, FALSE, sizeof (GType)); \ g_array_set_size ((arrayvar), (last) - (first) + 1); \ { \ int i; \ for (i = (first) ; i <= (last) ; i++) { \ char * package = SvPV_nolen (ST (i)); \ /* look up GType by package name. */ \ GType t = gperl_type_from_package (package); \ if (t == 0) { \ g_array_free ((arrayvar), TRUE); \ croak ("package %s is not registered with GPerl", \ package); \ g_assert ("not reached"); \ } \ g_array_index ((arrayvar), GType, i-(first)) = t; \ } \ } /* * some custom opaque object handling for private gtk structures needed * for doing drag and drop. */ /* gtk+ 2.10 introduces a boxed type for GtkTargetList and we use it for * property marshalling, etc. But we also need to keep backwards compatability * with the old wrappers so we overwrite the macros. */ #if GTK_CHECK_VERSION (2, 10, 0) # undef newSVGtkTargetList # undef newSVGtkTargetList_ornull # undef SvGtkTargetList # undef SvGtkTargetList_ornull #else typedef GtkTargetList GtkTargetList_ornull; #endif SV * newSVGtkTargetList (GtkTargetList * list); #define newSVGtkTargetList_ornull(list) ((list) ? newSVGtkTargetList (list) : &PL_sv_undef) GtkTargetList * SvGtkTargetList (SV * sv); #define SvGtkTargetList_ornull(sv) (gperl_sv_is_defined (sv) ? SvGtkTargetList (sv) : NULL) /* * exported so Gnome2 can reuse it in wrappers. other modules might want to * do the same. the callback for it needn't worry about param_types or * return type, as this does all the marshaling by hand (the C function writes * through the params, so we have to handle the stack specially). */ void gtk2perl_menu_position_func (GtkMenu * menu, gint * x, gint * y, gboolean * push_in, GPerlCallback * callback); #if ! GTK_CHECK_VERSION (2, 4, 0) /* in versions prior to 2.4.0, GtkTreeSearchFlags was declared such that * glib-mkenums interpreted and registered it as a GEnum type. sometime * before 2.3.0, this was corrected, and the type is registered as a GFlags. * The maps file has GFlags (since that's correct), but we have to mangle * things somewhat for the bindings to work properly with older libraries. */ # undef SvGtkTextSearchFlags # undef newSVGtkTextSearchFlags # define SvGtkTextSearchFlags(sv) (gperl_convert_enum (GTK_TYPE_TEXT_SEARCH_FLAGS, sv)) # define newSVGtkTextSearchFlags(val) (gperl_convert_back_enum (GTK_TYPE_TEXT_SEARCH_FLAGS, val)) #endif /* object handling for GdkGeometry */ SV * newSVGdkGeometry (GdkGeometry *geometry); GdkGeometry * SvGdkGeometry (SV *object); GdkGeometry * SvGdkGeometryReal (SV *object, GdkWindowHints *hints); /* special handling for GdkPixbufFormat, which was introduced in gtk+ 2.2.0 */ #if GTK_CHECK_VERSION (2, 2, 0) SV * newSVGdkPixbufFormat (GdkPixbufFormat * format); GdkPixbufFormat * SvGdkPixbufFormat (SV * sv); #endif #endif /* _GTK2PERL_H_ */ Gtk2-1.2498/lib/000755 001750 000024 00000000000 12651227143 014274 5ustar00bdmanningstaff000000 000000 Gtk2-1.2498/LICENSE000644 001750 000024 00000063465 11664366546 014567 0ustar00bdmanningstaff000000 000000 GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. , 1 April 1990 Ty Coon, President of Vice That's all there is to it! Gtk2-1.2498/Makefile.PL000644 001750 000024 00000033633 12104044234 015477 0ustar00bdmanningstaff000000 000000 # Copyright (C) 2003-2011, 2013 by the gtk2-perl team (see the file AUTHORS # for the full list) # # This library is free software; you can redistribute it and/or modify it under # the terms of the GNU Library General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # # This library is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for # more details. # # You should have received a copy of the GNU Library General Public License # along with this library; if not, write to the Free Software Foundation, Inc., # 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA. # # $Id$ # BEGIN { require 5.008; } use strict; use warnings; # use only standard modules here! any non-standard module, or anything which is # a dependency which may not be installed, should be use'd from the dependency # test eval, below. use ExtUtils::MakeMaker; use File::Spec; use Cwd; # minimum required version of dependencies we need to build our %build_reqs = ( 'perl-ExtUtils-Depends' => '0.300', 'perl-ExtUtils-PkgConfig' => '1.030', 'perl-Glib' => '1.280', 'perl-Pango' => '1.220', 'perl-Cairo' => '1.000', 'Gtk+' => '2.0.0', ); our %PREREQ_PM = ( 'ExtUtils::Depends' => $build_reqs{'perl-ExtUtils-Depends'}, 'ExtUtils::PkgConfig' => $build_reqs{'perl-ExtUtils-PkgConfig'}, 'Glib' => $build_reqs{'perl-Glib'}, 'Pango' => $build_reqs{'perl-Pango'}, ); # Writing a fake Makefile ensures that CPAN will pick up the correct # dependencies and install them. unless (eval "use ExtUtils::Depends '$build_reqs{'perl-ExtUtils-Depends'}';" . "use ExtUtils::PkgConfig '$build_reqs{'perl-ExtUtils-PkgConfig'}';" . "use Glib '$build_reqs{'perl-Glib'}';" . "use Glib::MakeHelper;" # for do_pod_files() . "use Pango '$build_reqs{'perl-Pango'}';" . "1") { warn "$@\n"; WriteMakefile( PREREQ_FATAL => 1, PREREQ_PM => \%PREREQ_PM, ); exit 1; # not reached } # other modules should 'use Gtk2::CodeGen;' -- we can't because it's not # installed yet. require './lib/Gtk2/CodeGen.pm'; # all the generated stuff will go into this subdir... mkdir 'build', 0777; # # look for our packages. if they can't be found, warn and exit with status 0 # to indicate to CPAN testers that their system isn't supported. # my %pkgcfg_gtk; unless (eval { %pkgcfg_gtk = ExtUtils::PkgConfig->find ("gtk+-2.0 >= $build_reqs{'Gtk+'}"); 1; }) { warn $@; exit 0; } # # retrieve gtk's version # my @gtk_version = split /\./, $pkgcfg_gtk{modversion}; # # decide what files to use in the build based on the version we found. # our @xs_files = (); our @xs_lists = ( Glib::MakeHelper->select_files_by_version ("xs_files", @gtk_version), ); foreach my $filename (@xs_lists) { my @names = Glib::MakeHelper->read_source_list_file ($filename); #print "Loaded ".scalar(@names)." xs files from $filename\n"; push @xs_files, @names; } my $target = ExtUtils::PkgConfig->variable ('gtk+-2.0', 'target'); if ($target =~ /x11/) { push @xs_files, 'xs/GdkX11.xs'; } # if gtk+ >= 2.8, we depend on Cairo my $have_cairo = 0; if ($gtk_version[0] > 2 || ($gtk_version[0] == 2 && $gtk_version[1] >= 8)) { $PREREQ_PM{Cairo} = $build_reqs{'perl-Cairo'}; unless (eval "use Cairo '$build_reqs{'perl-Cairo'}'; 1;") { warn "$@\n"; WriteMakefile( PREREQ_FATAL => 1, PREREQ_PM => \%PREREQ_PM, ); exit 1; # not reached } $have_cairo = 1; } # # generate the constants wrappers # my @gtk_constants_lists = Glib::MakeHelper->select_files_by_version ('constants', @gtk_version); my $gtk_constants_file = File::Spec->catfile ('build', 'constants.xs'); Gtk2::CodeGen->generate_constants_wrappers ( prefix => 'Gtk2', lists => \@gtk_constants_lists, xs_file => $gtk_constants_file, header => 'gtk2perl.h', export_tag => 'constants'); push @xs_files, $gtk_constants_file; # # create version macros for atk # ExtUtils::PkgConfig->write_version_macros( "build/gtk2perl-versions.h", atk => "ATK", ); # # since we've started down the dark path of breaking from standard # MakeMaker, forever will it dominate our destiny; we must specify # install paths for the modules and man files by hand. # our %pm_files = ( 'lib/Gtk2.pm' => '$(INST_LIBDIR)/Gtk2.pm', 'build/Keysyms.pm' => '$(INST_LIBDIR)/Gtk2/Gdk/Keysyms.pm', 'lib/Gtk2/CodeGen.pm' => '$(INST_LIBDIR)/Gtk2/CodeGen.pm', 'lib/Gtk2/Helper.pm' => '$(INST_LIBDIR)/Gtk2/Helper.pm', 'lib/Gtk2/Pango.pm' => '$(INST_LIBDIR)/Gtk2/Pango.pm', 'lib/Gtk2/SimpleList.pm' => '$(INST_LIBDIR)/Gtk2/SimpleList.pm', 'lib/Gtk2/SimpleMenu.pm' => '$(INST_LIBDIR)/Gtk2/SimpleMenu.pm', 'lib/Gtk2/TestHelper.pm' => '$(INST_LIBDIR)/Gtk2/TestHelper.pm', 'lib/Gtk2/api.pod' => '$(INST_LIBDIR)/Gtk2/api.pod', 'lib/Gtk2/devel.pod' => '$(INST_LIBDIR)/Gtk2/devel.pod', ); our %pod_files = ( 'lib/Gtk2.pm' => '$(INST_MAN3DIR)/Gtk2.$(MAN3EXT)', # Keysyms is generated by Makefile.PL. 'build/Keysyms.pm' => '$(INST_MAN3DIR)/Gtk2::Gdk::Keysyms.$(MAN3EXT)', 'lib/Gtk2/CodeGen.pm' => '$(INST_MAN3DIR)/Gtk2::CodeGen.$(MAN3EXT)', 'lib/Gtk2/Helper.pm' => '$(INST_MAN3DIR)/Gtk2::Helper.$(MAN3EXT)', 'lib/Gtk2/Pango.pm' => '$(INST_MAN3DIR)/Gtk2::Pango.$(MAN3EXT)', 'lib/Gtk2/SimpleList.pm' => '$(INST_MAN3DIR)/Gtk2::SimpleList.$(MAN3EXT)', 'lib/Gtk2/SimpleMenu.pm' => '$(INST_MAN3DIR)/Gtk2::SimpleMenu.$(MAN3EXT)', 'lib/Gtk2/api.pod' => '$(INST_MAN3DIR)/Gtk2::api.$(MAN3EXT)', 'lib/Gtk2/devel.pod' => '$(INST_MAN3DIR)/Gtk2::devel.$(MAN3EXT)', # enums.pod is generated by rules we add to the postamble, below. # it is generated straight into blib to avoid dependency problems. '$(INST_LIB)/$(FULLEXT)/enums.pod' => '$(INST_MAN3DIR)/Gtk2::enums.$(MAN3EXT)', # we will be installing a whole slew of pod files generated directly # from the xs source -- but to have them installed and manified # properly, we have to know their names at Makefile.PL time. # This is a bit of a chicken and egg problem, and this solution # basically means that if you create a new package name in the xs # code, you'll need to re-run Makefile.PL. you already need to # re-run to pick up new XS files, so that's not such a big deal. Glib::MakeHelper->do_pod_files (@xs_files), ); if (grep /enable[-_]faq/i, @ARGV) { print STDERR "Including FAQ in pod, retrieved from Gtk2-Perl site.\n"; # Writing a fake Makefile ensures that CPAN will pick up the correct # dependencies and install them. unless (eval "use LWP; 1") { warn "$@\n"; WriteMakefile( PREREQ_FATAL => 1, PREREQ_PM => { 'LWP' => 0.1, }, ); exit 1; # not reached } require 'tools/fetch_faq.pl'; $pm_files{'build/FAQ.pod'} = '$(INST_LIBDIR)/Gtk2/FAQ.pod'; $pod_files{'build/FAQ.pod'} = '$(INST_MAN3DIR)/Gtk2::devel.$(MAN3EXT)'; } # # autogeneration # # we have a whole lot of types which need cast macros, typemap entries, # and package mapping registration; instead of writing this by hand, we # use a set of map files which define how things are laid out, and then use # some boilerplate code to convert those mappings into a header, typemap, # and xsh file. see the docs for Gtk2::CodeGen for more info. # # all possible maps must be available at xsubpp time, as xsubpp processes # all code, even inside #ifdefs. # # For backwards compatibility, the pango maps must be included so that the # Gtk2::Pango::* names are registered with Glib. These maps have special types # (GObjectAlias, for example) that are handled by our own Gtk2::CodeGen. # Gtk2::CodeGen->parse_maps ('gtk2perl', input => [, ]); # but for enums.pod, we only want to document the stuff we can actually # query from this target library. our @used_maps = Glib::MakeHelper->select_files_by_version ("maps", @gtk_version); # one more command generates code to boot all the various extra XS modules. # we need this because we have lots of XS files without corresponding PMs to # bootstrap them. Gtk2::CodeGen->write_boot (xs_files => \@xs_files); # this one turns the long list of #defines in gdkkeysyms.h into a large # hash of key names and values, %Gtk2::Gdk::Keysyms. system "$^X tools/genkeysyms.pl >\"build/Keysyms.pm\""; # the "" are essential for command.com # # now we're ready to start creating the makefile... finally. # we need to use ExtUtils::Depends to get relevant information out of # the Glib extension, and to save config information for other modules which # will chain from this one. # my @deps = qw/Glib Pango/; if ($have_cairo) { push @deps, qw/Cairo/; } our $gtk2 = ExtUtils::Depends->new ('Gtk2', @deps); # Glib added -I. for us, but we'll need to add -I./build so we can get to # the autogenerated files. we do this kindof as a public service to client # modules, as these will carry through via the depends mechanism. $gtk2->set_inc ($pkgcfg_gtk{cflags} . ' -I./build '); $gtk2->set_libs ($pkgcfg_gtk{libs}); $gtk2->add_pm (%pm_files); $gtk2->add_xs (@xs_files); my $cwd = cwd(); $gtk2->add_typemaps (map {File::Spec->catfile($cwd,$_)} 'build/gtk2perl.typemap', 'gdk.typemap', 'gtk.typemap'); $gtk2->install (qw(gtk2perl.h build/gtk2perl-autogen.h build/gtk2perl-versions.h doctypes)); $gtk2->save_config ('build/IFiles.pm'); # exports list needed for win32, unused on others our @exports; require 'Gtk2.exports'; my %meta_merge = ( q(meta-spec) => { version => '2', url => 'http://search.cpan.org/perldoc?CPAN::Meta::Spec', }, author => ['gtk2-perl Team '], release_status => 'stable', # valid values: https://metacpan.org/module/CPAN::Meta::Spec#license license => 'lgpl_2_1', resources => { license => 'http://www.gnu.org/licenses/lgpl-2.1.html', homepage => 'http://gtk2-perl.sourceforge.net', x_MailingList => 'https://mail.gnome.org/mailman/listinfo/gtk-perl-list', bugtracker => { web => 'http://rt.cpan.org/Public/Dist/Display.html?Name=Gtk2', mailto => 'bug-Gtk2 [at] rt.cpan.org', }, repository => { url => 'git://git.gnome.org/perl-Gtk2', type => 'git', web => 'http://git.gnome.org/browse/perl-Gtk2', }, }, prereqs => { configure => { requires => {%PREREQ_PM}, # no direct ref for 5.14 compatibility }, }, no_index => { directory => [qw/tools xs/], file => [qw|Makefile.PL gtk-demo/main.pl|], }, ); WriteMakefile( NAME => 'Gtk2', VERSION_FROM => 'lib/Gtk2.pm', # finds $VERSION ABSTRACT_FROM => 'lib/Gtk2.pm', # retrieve abstract from module PREREQ_PM => \%PREREQ_PM, XSPROTOARG => '-noprototypes', MAN3PODS => \%pod_files, FUNCLIST => \@exports, DL_FUNCS => { Gtk2 => [] }, META_MERGE => \%meta_merge, $gtk2->get_makefile_vars, ); =unstable print <<__EOW__; WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING This is an unstable development release of Gtk2. The API is not frozen and things are subject to change at any time. Report any bugs to gtk-perl-list AT gnome DOT org as soon as possible. Please use the 1.22x series for important work. WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING __EOW__ =cut =frozen print <<__EOW__; WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING This is an unstable development release of Gtk2. The API is frozen in accordance with the GNOME 2.16 schedule. Report any bugs to gtk-perl-list AT gnome DOT org as soon as possible. Please use the 1.12x series for important work. WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING __EOW__ =cut # # extra makefile override stuff... watch for falling wizardry. # sub MY::postamble { my $text = "POD_DEPENDS=build/stock_items.podi\n\n" . Glib::MakeHelper->postamble_precompiled_headers (qw/gtk2perl.h/) . Glib::MakeHelper->postamble_clean () . Glib::MakeHelper->postamble_docs_full ( DEPENDS => $gtk2, DOCTYPES => 'doctypes', COPYRIGHT_FROM => 'copyright.pod', ) . Glib::MakeHelper->postamble_rpms ( 'GTK' => $build_reqs{'Gtk+'}, 'PERL_EXTUTILS_DEPENDS' => $build_reqs{'perl-ExtUtils-Depends'}, 'PERL_EXTUTILS_PKGCONFIG' => $build_reqs{'perl-ExtUtils-PkgConfig'}, 'PERL_GLIB' => $build_reqs{'perl-Glib'}, 'PERL_PANGO' => $build_reqs{'perl-Pango'}, ) . " # rebuild the makefile if the file lists change Makefile : ".join(" ", @xs_lists)." \$(INST_LIB)/\$(FULLEXT)/enums.pod : \$(BLIB_DONE) @used_maps tools/podifyenums.pl \$(NOECHO) \$(ECHO) Creating enum POD... \$(NOECHO) \$(PERLRUNINST) -M\$(NAME) tools/podifyenums.pl \$(NAME) @used_maps > \$@ build/stock_items.podi: \$(BLIB_DONE) tools/podifystockitems.pl \$(NOECHO) \$(ECHO) Creating stock items POD... \$(NOECHO) \$(PERLRUNINST) -M\$(NAME) tools/podifystockitems.pl > \$@ build/FAQ.pod: tools/fetch_faq.pl $^X \$< "; # this installation stuff doesn't make sense on windows, where # we don't really have a /usr. also, nmake barfs on $+. unless ($^O eq 'MSWin32') { $text .= " # the tmp-xxx stuff is just so that only the pl files get installed install-\%: % \@\$(MKPATH) tmp-\$+/ \@\$(CP) \$+/*.* tmp-\$+/ \@\$(MOD_INSTALL) ./tmp-\$+/ \\ \$(PREFIX)/share/doc/perl-\$(DISTNAME)/\$+ \@\$(RM_RF) tmp-\$+/ "; } return $text; } Gtk2-1.2498/MANIFEST000644 001750 000024 00000025576 12651227144 014677 0ustar00bdmanningstaff000000 000000 AUTHORS ChangeLog.pre-git constants-2.0 constants-2.18 copyright.pod doctypes examples/accel_groups.pl examples/adding_stock_icons.pl examples/assistant.pl examples/attributes.pl examples/buttonbox.pl examples/cairo-clock.pl examples/cairo-rendering.pl examples/calendar.pl examples/cellrenderer_date.pl examples/cellrenderer_popup.pl examples/cellrenderer_progress.pl examples/cellrenderer_spinbutton.pl examples/color_list.pl examples/color_snooper.pl examples/combo_box.pl examples/customlist.pl examples/customrenderer.pl examples/customtree.pl examples/dialog.pl examples/draw_text.pl examples/file_chooser.pl examples/filesel_multisel.pl examples/histogramplot.pl examples/inline-images.pl examples/insert-text-test.pl examples/item_factory_demo.pl examples/layout.pl examples/linkbutton.pl examples/multisel.pl examples/offscreen_reflection.pl examples/offscreen_rotation.pl examples/offscreen_scale.pl examples/plug.pl examples/rulers.pl examples/scribble.pl examples/simple_menu.pl examples/simplelist.pl examples/socket.pl examples/table_packing.pl examples/testdnd.pl examples/thread_usage.pl examples/timeouttest.pl gdk.typemap gtk-demo/alphatest.png gtk-demo/apple-red.png gtk-demo/appwindow.pl gtk-demo/assistant.pl gtk-demo/background.jpg gtk-demo/button_box.pl gtk-demo/changedisplay.pl gtk-demo/colorsel.pl gtk-demo/combobox.pl gtk-demo/demo.ui gtk-demo/dialog.pl gtk-demo/drawingarea.pl gtk-demo/editable_cells.pl gtk-demo/entry_completion.pl gtk-demo/floppybuddy.gif gtk-demo/gnome-applets.png gtk-demo/gnome-calendar.png gtk-demo/gnome-foot.png gtk-demo/gnome-gimp.png gtk-demo/gnome-gmush.png gtk-demo/gnome-gsame.png gtk-demo/gnu-keys.png gtk-demo/gtk-logo-rgb.gif gtk-demo/hypertext.pl gtk-demo/images.pl gtk-demo/item_factory.pl gtk-demo/list_store.pl gtk-demo/main.pl gtk-demo/menus.pl gtk-demo/panes.pl gtk-demo/pixbufs.pl gtk-demo/rotated_text.pl gtk-demo/sizegroup.pl gtk-demo/stock_browser.pl gtk-demo/textview.pl gtk-demo/tree_store.pl gtk-demo/ui_manager.pl gtk.typemap Gtk2.exports gtk2perl-private.h gtk2perl.h lib/Gtk2.pm lib/Gtk2/api.pod lib/Gtk2/CodeGen.pm lib/Gtk2/devel.pod lib/Gtk2/Helper.pm lib/Gtk2/Pango.pm lib/Gtk2/SimpleList.pm lib/Gtk2/SimpleMenu.pm lib/Gtk2/TestHelper.pm LICENSE Makefile.PL MANIFEST MANIFEST.SKIP maps-2.0 maps-2.10 maps-2.12 maps-2.14 maps-2.16 maps-2.18 maps-2.2 maps-2.20 maps-2.4 maps-2.6 maps-2.8 maps_pango-1.0 maps_pango-1.10 maps_pango-1.16 maps_pango-1.18 maps_pango-1.4 maps_pango-1.6 maps_pango-1.8 NEWS perl-Gtk2.doap perl-Gtk2.spec.in README t/00.Gtk2.t t/01.GtkWindow.t t/02.GtkContainer.t t/constants.t t/Gdk.t t/GdkCairo.t t/GdkColor.t t/GdkCursor.t t/GdkDisplay.t t/GdkDisplayManager.t t/GdkDrawable.t t/GdkEvent.t t/GdkGC.t t/GdkImage.t t/GdkInput.t t/GdkKeys.t t/GdkPango.t t/GdkPixbuf.t t/GdkPixbufLoader.t t/GdkPixbufSimpleAnim.t t/GdkPixmap.t t/GdkProperty.t t/GdkRegion.t t/GdkRgb.t t/GdkScreen.t t/GdkSelection.t t/GdkVisual.t t/GdkWindow.t t/GdkX11.t t/GtkAboutDialog.t t/GtkAccelGroup.t t/GtkAccelLabel.t t/GtkAccelMap.t t/GtkAction.t t/GtkActionGroup.t t/GtkActivatable.t t/GtkAdjustment.t t/GtkAlignment.t t/GtkArrow.t t/GtkAspectFrame.t t/GtkAssistant.t t/GtkBin.t t/GtkBindings.t t/GtkBox.t t/GtkBuildable.t t/GtkBuildableIface.t t/GtkBuilder.t t/GtkButton.t t/GtkButtonBox.t t/GtkCalendar.t t/GtkCellEditable.t t/GtkCellLayout.t t/GtkCellLayoutIface.t t/GtkCellRenderer.t t/GtkCellRendererAccel.t t/GtkCellRendererCombo.t t/GtkCellRendererIface-Chaining.t t/GtkCellRendererPixbuf.t t/GtkCellRendererProgress.t t/GtkCellRendererSpin.t t/GtkCellRendererSpinner.t t/GtkCellRendererText.t t/GtkCellRendererToggle.t t/GtkCellView.t t/GtkCheckButton.t t/GtkCheckMenuItem.t t/GtkClipboard.t t/GtkColorButton.t t/GtkColorSelection.t t/GtkColorSelectionDialog.t t/GtkCombo.t t/GtkComboBox.t t/GtkComboBoxEntry.t t/GtkCurve.t t/GtkDialog.t t/GtkDrawingArea.t t/GtkEditable.t t/GtkEntry.t t/GtkEntryBuffer.t t/GtkEntryCompletion.t t/GtkEventBox.t t/GtkExpander.t t/GtkFileChooser.t t/GtkFileChooserButton.t t/GtkFileChooserDialog.t t/GtkFileChooserWidget.t t/GtkFileFilter.t t/GtkFileSelection.t t/GtkFixed.t t/GtkFontButton.t t/GtkFontSelection.t t/GtkFrame.t t/GtkGammaCurve.t t/GtkGC.t t/GtkHandleBox.t t/GtkHBox.t t/GtkHButtonBox.t t/GtkHPaned.t t/GtkHRuler.t t/GtkHScale.t t/GtkHScrollbar.t t/GtkHSeparator.t t/GtkHSV.t t/GtkIconFactory.t t/GtkIconTheme.t t/GtkIconView.t t/GtkImage.t t/GtkImageMenuItem.t t/GtkIMContext.t t/GtkInfoBar.t t/GtkInputDialog.t t/GtkInvisible.t t/GtkItemFactory.t t/GtkLabel.t t/GtkLayout.t t/GtkLinkButton.t t/GtkListStore.t t/GtkMenu.t t/GtkMenuBar.t t/GtkMenuItem.t t/GtkMenuShell.t t/GtkMenuToolButton.t t/GtkMessageDialog.t t/GtkMisc.t t/GtkNotebook.t t/GtkObject.t t/GtkOffscreenWindow.t t/GtkOptionMenu.t t/GtkOrientable.t t/GtkPageSetup.t t/GtkPaned.t t/GtkPaperSize.t t/GtkPrintContext.t t/GtkPrintOperation.t t/GtkPrintOperationPreview.t t/GtkPrintSettings.t t/GtkProgressBar.t t/GtkRadioAction.t t/GtkRadioButton.t t/GtkRadioMenuItem.t t/GtkRadioToolButton.t t/GtkRange.t t/GtkRc.t t/GtkRecentAction.t t/GtkRecentChooser.t t/GtkRecentChooserDialog.t t/GtkRecentChooserMenu.t t/GtkRecentChooserWidget.t t/GtkRecentFilter.t t/GtkRecentManager.t t/GtkRuler.t t/GtkScale.t t/GtkScaleButton.t t/GtkScrolledWindow.t t/GtkSelection.t t/GtkSeparatorMenuItem.t t/GtkSeparatorToolItem.t t/GtkShow.t t/GtkSimpleList.t t/GtkSimpleMenu.t t/GtkSizeGroup.t t/GtkSpinButton.t t/GtkSpinner.t t/GtkStatusbar.t t/GtkStatusIcon.t t/GtkStock.t t/GtkStyle.t t/GtkTable.t t/GtkTearoffMenuItem.t t/GtkTextBuffer.t t/GtkTextBufferRichText.t t/GtkTextChildAnchor.t t/GtkTextIter.t t/GtkTextMark.t t/GtkTextTag.t t/GtkTextTagTable.t t/GtkTextView.t t/GtkToggleAction.t t/GtkToggleButton.t t/GtkToggleToolButton.t t/GtkToolbar.t t/GtkToolButton.t t/GtkToolItem.t t/GtkToolItemGroup.t t/GtkToolPalette.t t/GtkToolShell.t t/GtkTooltip.t t/GtkTooltips.t t/GtkTreeDnd.t t/GtkTreeModel.t t/GtkTreeModelFilter.t t/GtkTreeModelIface.t t/GtkTreeModelSort.t t/GtkTreeSelection.t t/GtkTreeSortable.t t/GtkTreeStore.t t/GtkTreeView-Dnd.t t/GtkTreeView.t t/GtkUIManager.t t/GtkVBox.t t/GtkVButtonBox.t t/GtkViewport.t t/GtkVolumeButton.t t/GtkVPaned.t t/GtkVRuler.t t/GtkVScale.t t/GtkVScrollbar.t t/GtkVSeparator.t t/GtkWidget.t t/options.t t/pango-compat.t t/PangoAttributes.t t/PangoCairo.t t/PangoContext.t t/PangoFont.t t/PangoFontMap.t t/PangoFontset.t t/PangoGravity.t t/PangoLayout.t t/PangoMatrix.t t/PangoRenderer.t t/PangoScript.t t/PangoTabs.t t/PangoTypes.t t/set-scroll-adjustments-signal.t t/signal-chaining.t t/tied-objects.t t/version-checks.t TODO tools/fetch_faq.pl tools/genkeysyms.pl tools/genmaps.pl tools/podifyenums.pl tools/podifystockitems.pl xs/Gdk.xs xs/GdkCairo.xs xs/GdkColor.xs xs/GdkCursor.xs xs/GdkDisplay.xs xs/GdkDisplayManager.xs xs/GdkDnd.xs xs/GdkDrawable.xs xs/GdkEvent.xs xs/GdkGC.xs xs/GdkImage.xs xs/GdkInput.xs xs/GdkKeys.xs xs/GdkPango.xs xs/GdkPixbuf.xs xs/GdkPixbufLoader.xs xs/GdkPixbufSimpleAnim.xs xs/GdkPixmap.xs xs/GdkProperty.xs xs/GdkRegion.xs xs/GdkRgb.xs xs/GdkScreen.xs xs/GdkSelection.xs xs/GdkTypes.xs xs/GdkVisual.xs xs/GdkWindow.xs xs/GdkX11.xs xs/Gtk2.xs xs/GtkAboutDialog.xs xs/GtkAccelGroup.xs xs/GtkAccelLabel.xs xs/GtkAccelMap.xs xs/GtkAction.xs xs/GtkActionGroup.xs xs/GtkActivatable.xs xs/GtkAdjustment.xs xs/GtkAlignment.xs xs/GtkArrow.xs xs/GtkAspectFrame.xs xs/GtkAssistant.xs xs/GtkBin.xs xs/GtkBindings.xs xs/GtkBox.xs xs/GtkBuildable.xs xs/GtkBuilder.xs xs/GtkButton.xs xs/GtkButtonBox.xs xs/GtkCalendar.xs xs/GtkCellEditable.xs xs/GtkCellLayout.xs xs/GtkCellRenderer.xs xs/GtkCellRendererAccel.xs xs/GtkCellRendererCombo.xs xs/GtkCellRendererPixbuf.xs xs/GtkCellRendererProgress.xs xs/GtkCellRendererSpin.xs xs/GtkCellRendererSpinner.xs xs/GtkCellRendererText.xs xs/GtkCellRendererToggle.xs xs/GtkCellView.xs xs/GtkCheckButton.xs xs/GtkCheckMenuItem.xs xs/GtkClipboard.xs xs/GtkColorButton.xs xs/GtkColorSelection.xs xs/GtkColorSelectionDialog.xs xs/GtkCombo.xs xs/GtkComboBox.xs xs/GtkComboBoxEntry.xs xs/GtkContainer.xs xs/GtkCurve.xs xs/GtkDialog.xs xs/GtkDnd.xs xs/GtkDrawingArea.xs xs/GtkEditable.xs xs/GtkEntry.xs xs/GtkEntryBuffer.xs xs/GtkEntryCompletion.xs xs/GtkEventBox.xs xs/GtkExpander.xs xs/GtkFileChooser.xs xs/GtkFileChooserButton.xs xs/GtkFileChooserDialog.xs xs/GtkFileChooserWidget.xs xs/GtkFileFilter.xs xs/GtkFileSelection.xs xs/GtkFixed.xs xs/GtkFontButton.xs xs/GtkFontSelection.xs xs/GtkFrame.xs xs/GtkGammaCurve.xs xs/GtkGC.xs xs/GtkHandleBox.xs xs/GtkHBox.xs xs/GtkHButtonBox.xs xs/GtkHPaned.xs xs/GtkHRuler.xs xs/GtkHScale.xs xs/GtkHScrollbar.xs xs/GtkHSeparator.xs xs/GtkHSV.xs xs/GtkIconFactory.xs xs/GtkIconTheme.xs xs/GtkIconView.xs xs/GtkImage.xs xs/GtkImageMenuItem.xs xs/GtkIMContext.xs xs/GtkIMContextSimple.xs xs/GtkIMMulticontext.xs xs/GtkInfoBar.xs xs/GtkInputDialog.xs xs/GtkInvisible.xs xs/GtkItem.xs xs/GtkItemFactory.xs xs/GtkLabel.xs xs/GtkLayout.xs xs/GtkLinkButton.xs xs/GtkList.xs xs/GtkListItem.xs xs/GtkListStore.xs xs/GtkMenu.xs xs/GtkMenuBar.xs xs/GtkMenuItem.xs xs/GtkMenuShell.xs xs/GtkMenuToolButton.xs xs/GtkMessageDialog.xs xs/GtkMisc.xs xs/GtkNotebook.xs xs/GtkObject.xs xs/GtkOffscreenWindow.xs xs/GtkOptionMenu.xs xs/GtkOrientable.xs xs/GtkPageSetup.xs xs/GtkPaned.xs xs/GtkPaperSize.xs xs/GtkPlug.xs xs/GtkPrintContext.xs xs/GtkPrintOperation.xs xs/GtkPrintOperationPreview.xs xs/GtkPrintSettings.xs xs/GtkProgressBar.xs xs/GtkRadioAction.xs xs/GtkRadioButton.xs xs/GtkRadioMenuItem.xs xs/GtkRadioToolButton.xs xs/GtkRange.xs xs/GtkRc.xs xs/GtkRecentAction.xs xs/GtkRecentChooser.xs xs/GtkRecentChooserDialog.xs xs/GtkRecentChooserMenu.xs xs/GtkRecentChooserWidget.xs xs/GtkRecentFilter.xs xs/GtkRecentManager.xs xs/GtkRuler.xs xs/GtkScale.xs xs/GtkScaleButton.xs xs/GtkScrolledWindow.xs xs/GtkSelection.xs xs/GtkSeparatorMenuItem.xs xs/GtkSeparatorToolItem.xs xs/GtkShow.xs xs/GtkSizeGroup.xs xs/GtkSocket.xs xs/GtkSpinButton.xs xs/GtkSpinner.xs xs/GtkStatusbar.xs xs/GtkStatusIcon.xs xs/GtkStock.xs xs/GtkStyle.xs xs/GtkTable.xs xs/GtkTearoffMenuItem.xs xs/GtkTextBuffer.xs xs/GtkTextBufferRichText.xs xs/GtkTextChildAnchor.xs xs/GtkTextIter.xs xs/GtkTextMark.xs xs/GtkTextTag.xs xs/GtkTextTagTable.xs xs/GtkTextView.xs xs/GtkToggleAction.xs xs/GtkToggleButton.xs xs/GtkToggleToolButton.xs xs/GtkToolbar.xs xs/GtkToolButton.xs xs/GtkToolItem.xs xs/GtkToolItemGroup.xs xs/GtkToolPalette.xs xs/GtkToolShell.xs xs/GtkTooltip.xs xs/GtkTooltips.xs xs/GtkTreeDnd.xs xs/GtkTreeModel.xs xs/GtkTreeModelFilter.xs xs/GtkTreeModelSort.xs xs/GtkTreeSelection.xs xs/GtkTreeSortable.xs xs/GtkTreeStore.xs xs/GtkTreeView.xs xs/GtkTreeViewColumn.xs xs/GtkUIManager.xs xs/GtkVBox.xs xs/GtkVButtonBox.xs xs/GtkViewport.xs xs/GtkVolumeButton.xs xs/GtkVPaned.xs xs/GtkVRuler.xs xs/GtkVScale.xs xs/GtkVScrollbar.xs xs/GtkVSeparator.xs xs/GtkWidget.xs xs/GtkWindow.xs xs_files-2.0 xs_files-2.10 xs_files-2.12 xs_files-2.14 xs_files-2.16 xs_files-2.18 xs_files-2.2 xs_files-2.20 xs_files-2.4 xs_files-2.6 xs_files-2.8 xt/GdkDnd.t xt/GtkDnd.t xt/GtkSocket-GtkPlug.t META.yml Module YAML meta-data (added by MakeMaker) META.json Module JSON meta-data (added by MakeMaker) Gtk2-1.2498/MANIFEST.SKIP000644 001750 000024 00000000206 11664366546 015440 0ustar00bdmanningstaff000000 000000 ~$ \.bak$ blib \.bs$ build \.c$ \.git \.gitignore$ gtk2perl.h.gch$ Makefile$ Makefile\.old$ MYMETA\..* \.o$ \.spec$ \.sw.$ \.tar\.gz$ Gtk2-1.2498/maps-2.0000644 001750 000024 00000050220 11664366546 014723 0ustar00bdmanningstaff000000 000000 # Copyright (C) 2003-2009 by the gtk2-perl team (see the file AUTHORS for the # full list) # # This library is free software; you can redistribute it and/or modify it under # the terms of the GNU Library General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # # This library is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for # more details. # # You should have received a copy of the GNU Library General Public License # along with this library; if not, write to the Free Software Foundation, Inc., # 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA. # # $Id$ # # # this file defines mappings only for types that existed in gtk+ 2.0.x # # Error domains # domain enum type base type package GDK_PIXBUF_ERROR GDK_TYPE_PIXBUF_ERROR GError Gtk2::Gdk::Pixbuf::Error # the rest of the types # typemacro C type name base type package # ATK_TYPE_ACTION AtkAction GInterface Gtk2::Atk::Action # ATK_TYPE_COMPONENT AtkComponent GInterface Gtk2::Atk::Component # ATK_TYPE_COORD_TYPE AtkCoordType GEnum Gtk2::Atk::CoordType # ATK_TYPE_DOCUMENT AtkDocument GInterface Gtk2::Atk::Document # ATK_TYPE_EDITABLE_TEXT AtkEditableText GInterface Gtk2::Atk::EditableText # ATK_TYPE_GOBJECT_ACCESSIBLE AtkGObjectAccessible GObject Gtk2::Atk::GObjectAccessible # ATK_TYPE_HYPERLINK AtkHyperlink GObject Gtk2::Atk::Hyperlink # ATK_TYPE_HYPERLINK_STATE_FLAGS AtkHyperlinkStateFlags GFlags Gtk2::Atk::HyperlinkStateFlags # ATK_TYPE_HYPERTEXT AtkHypertext GInterface Gtk2::Atk::Hypertext # ATK_TYPE_IMAGE AtkImage GInterface Gtk2::Atk::Image # ATK_TYPE_IMPLEMENTOR AtkImplementor GInterface Gtk2::Atk::Implementor # ATK_TYPE_KEY_EVENT_TYPE AtkKeyEventType GEnum Gtk2::Atk::KeyEventType # ATK_TYPE_LAYER AtkLayer GEnum Gtk2::Atk::Layer # ATK_TYPE_NO_OP_OBJECT AtkNoOpObject GObject Gtk2::Atk::NoOpObject # ATK_TYPE_NO_OP_OBJECT_FACTORY AtkNoOpObjectFactory GObject Gtk2::Atk::NoOpObjectFactory ATK_TYPE_OBJECT AtkObject GObject Gtk2::Atk::Object # ATK_TYPE_OBJECT_FACTORY AtkObjectFactory GObject Gtk2::Atk::ObjectFactory # ATK_TYPE_REGISTRY AtkRegistry GObject Gtk2::Atk::Registry # ATK_TYPE_RELATION AtkRelation GObject Gtk2::Atk::Relation # ATK_TYPE_RELATION_SET AtkRelationSet GObject Gtk2::Atk::RelationSet # ATK_TYPE_RELATION_TYPE AtkRelationType GEnum Gtk2::Atk::RelationType # ATK_TYPE_ROLE AtkRole GEnum Gtk2::Atk::Role # ATK_TYPE_SELECTION AtkSelection GInterface Gtk2::Atk::Selection # ATK_TYPE_STATE_SET AtkStateSet GObject Gtk2::Atk::StateSet # ATK_TYPE_STATE_TYPE AtkStateType GEnum Gtk2::Atk::StateType # ATK_TYPE_STREAMABLE_CONTENT AtkStreamableContent GInterface Gtk2::Atk::StreamableContent # ATK_TYPE_TABLE AtkTable GInterface Gtk2::Atk::Table # ATK_TYPE_TEXT AtkText GInterface Gtk2::Atk::Text # ATK_TYPE_TEXT_ATTRIBUTE AtkTextAttribute GEnum Gtk2::Atk::TextAttribute # ATK_TYPE_TEXT_BOUNDARY AtkTextBoundary GEnum Gtk2::Atk::TextBoundary # ATK_TYPE_TEXT_CLIP_TYPE AtkTextClipType GEnum Gtk2::Atk::TextClipType # ATK_TYPE_UTIL AtkUtil GObject Gtk2::Atk::Util # ATK_TYPE_VALUE AtkValue GInterface Gtk2::Atk::Value GDK_TYPE_AXIS_USE GdkAxisUse GEnum Gtk2::Gdk::AxisUse GDK_TYPE_BYTE_ORDER GdkByteOrder GEnum Gtk2::Gdk::ByteOrder GDK_TYPE_CAP_STYLE GdkCapStyle GEnum Gtk2::Gdk::CapStyle GDK_TYPE_COLOR GdkColor GBoxed Gtk2::Gdk::Color GDK_TYPE_COLORMAP GdkColormap GObject Gtk2::Gdk::Colormap GDK_TYPE_COLORSPACE GdkColorspace GEnum Gtk2::Gdk::Colorspace GDK_TYPE_CROSSING_MODE GdkCrossingMode GEnum Gtk2::Gdk::CrossingMode GDK_TYPE_CURSOR GdkCursor GBoxed Gtk2::Gdk::Cursor GDK_TYPE_CURSOR_TYPE GdkCursorType GEnum Gtk2::Gdk::CursorType GDK_TYPE_DEVICE GdkDevice GObject Gtk2::Gdk::Device GDK_TYPE_DRAG_ACTION GdkDragAction GFlags Gtk2::Gdk::DragAction GDK_TYPE_DRAG_CONTEXT GdkDragContext GObject Gtk2::Gdk::DragContext GDK_TYPE_DRAG_PROTOCOL GdkDragProtocol GEnum Gtk2::Gdk::DragProtocol GDK_TYPE_DRAWABLE GdkDrawable GObject Gtk2::Gdk::Drawable GDK_TYPE_EVENT GdkEvent GBoxed Gtk2::Gdk::Event GDK_TYPE_EVENT_MASK GdkEventMask GFlags Gtk2::Gdk::EventMask GDK_TYPE_EVENT_TYPE GdkEventType GEnum Gtk2::Gdk::EventType GDK_TYPE_EXTENSION_MODE GdkExtensionMode GEnum Gtk2::Gdk::ExtensionMode GDK_TYPE_FILL GdkFill GEnum Gtk2::Gdk::Fill GDK_TYPE_FILL_RULE GdkFillRule GEnum Gtk2::Gdk::FillRule GDK_TYPE_FILTER_RETURN GdkFilterReturn GEnum Gtk2::Gdk::FilterReturn GDK_TYPE_FONT GdkFont GBoxed Gtk2::Gdk::Font GDK_TYPE_FONT_TYPE GdkFontType GEnum Gtk2::Gdk::FontType GDK_TYPE_FUNCTION GdkFunction GEnum Gtk2::Gdk::Function GDK_TYPE_GC GdkGC GObject Gtk2::Gdk::GC GDK_TYPE_GC_VALUES_MASK GdkGCValuesMask GFlags Gtk2::Gdk::GCValuesMask GDK_TYPE_GRAB_STATUS GdkGrabStatus GEnum Gtk2::Gdk::GrabStatus GDK_TYPE_GRAVITY GdkGravity GEnum Gtk2::Gdk::Gravity GDK_TYPE_IMAGE GdkImage GObject Gtk2::Gdk::Image GDK_TYPE_IMAGE_TYPE GdkImageType GEnum Gtk2::Gdk::ImageType GDK_TYPE_INPUT_CONDITION GdkInputCondition GFlags Gtk2::Gdk::InputCondition GDK_TYPE_INPUT_MODE GdkInputMode GEnum Gtk2::Gdk::InputMode GDK_TYPE_INPUT_SOURCE GdkInputSource GEnum Gtk2::Gdk::InputSource GDK_TYPE_INTERP_TYPE GdkInterpType GEnum Gtk2::Gdk::InterpType GDK_TYPE_JOIN_STYLE GdkJoinStyle GEnum Gtk2::Gdk::JoinStyle GDK_TYPE_KEYMAP GdkKeymap GObject Gtk2::Gdk::Keymap GDK_TYPE_LINE_STYLE GdkLineStyle GEnum Gtk2::Gdk::LineStyle GDK_TYPE_MODIFIER_TYPE GdkModifierType GFlags Gtk2::Gdk::ModifierType GDK_TYPE_NOTIFY_TYPE GdkNotifyType GEnum Gtk2::Gdk::NotifyType GDK_TYPE_OVERLAP_TYPE GdkOverlapType GEnum Gtk2::Gdk::OverlapType GDK_TYPE_PIXBUF_ALPHA_MODE GdkPixbufAlphaMode GEnum Gtk2::Gdk::PixbufAlphaMode GDK_TYPE_PIXBUF_ANIMATION GdkPixbufAnimation GObject Gtk2::Gdk::PixbufAnimation GDK_TYPE_PIXBUF_ANIMATION_ITER GdkPixbufAnimationIter GObject Gtk2::Gdk::PixbufAnimationIter GDK_TYPE_PIXBUF_ERROR GdkPixbufError GEnum Gtk2::Gdk::PixbufError GDK_TYPE_PIXBUF GdkPixbuf GObject Gtk2::Gdk::Pixbuf GDK_TYPE_PIXBUF_LOADER GdkPixbufLoader GObject Gtk2::Gdk::PixbufLoader GDK_TYPE_PIXMAP GdkPixmap GObject Gtk2::Gdk::Pixmap GDK_TYPE_PROPERTY_STATE GdkPropertyState GEnum Gtk2::Gdk::PropertyState GDK_TYPE_PROP_MODE GdkPropMode GEnum Gtk2::Gdk::PropMode GDK_TYPE_RECTANGLE GdkRectangle GBoxed Gtk2::Gdk::Rectangle GDK_TYPE_RGB_DITHER GdkRgbDither GEnum Gtk2::Gdk::RgbDither GDK_TYPE_SCROLL_DIRECTION GdkScrollDirection GEnum Gtk2::Gdk::ScrollDirection GDK_TYPE_SETTING_ACTION GdkSettingAction GEnum Gtk2::Gdk::SettingAction GDK_TYPE_STATUS GdkStatus GEnum Gtk2::Gdk::Status GDK_TYPE_SUBWINDOW_MODE GdkSubwindowMode GEnum Gtk2::Gdk::SubwindowMode GDK_TYPE_VISIBILITY_STATE GdkVisibilityState GEnum Gtk2::Gdk::VisibilityState GDK_TYPE_VISUAL GdkVisual GObject Gtk2::Gdk::Visual GDK_TYPE_VISUAL_TYPE GdkVisualType GEnum Gtk2::Gdk::VisualType GDK_TYPE_WINDOW_ATTRIBUTES_TYPE GdkWindowAttributesType GFlags Gtk2::Gdk::WindowAttributesType GDK_TYPE_WINDOW_CLASS GdkWindowClass GEnum Gtk2::Gdk::WindowClass GDK_TYPE_WINDOW_EDGE GdkWindowEdge GEnum Gtk2::Gdk::WindowEdge GDK_TYPE_WINDOW GdkWindow GObject Gtk2::Gdk::Window GDK_TYPE_WINDOW_HINTS GdkWindowHints GFlags Gtk2::Gdk::WindowHints GDK_TYPE_WINDOW_STATE GdkWindowState GFlags Gtk2::Gdk::WindowState GDK_TYPE_WINDOW_TYPE GdkWindowType GEnum Gtk2::Gdk::WindowType GDK_TYPE_WINDOW_TYPE_HINT GdkWindowTypeHint GEnum Gtk2::Gdk::WindowTypeHint GDK_TYPE_WM_DECORATION GdkWMDecoration GFlags Gtk2::Gdk::WMDecoration GDK_TYPE_WM_FUNCTION GdkWMFunction GFlags Gtk2::Gdk::WMFunction GTK_TYPE_ACCEL_FLAGS GtkAccelFlags GFlags Gtk2::AccelFlags GTK_TYPE_ACCEL_GROUP GtkAccelGroup GObject Gtk2::AccelGroup GTK_TYPE_ACCEL_LABEL GtkAccelLabel GtkObject Gtk2::AccelLabel GTK_TYPE_ACCESSIBLE GtkAccessible GObject Gtk2::Accessible GTK_TYPE_ADJUSTMENT GtkAdjustment GtkObject Gtk2::Adjustment GTK_TYPE_ALIGNMENT GtkAlignment GtkObject Gtk2::Alignment GTK_TYPE_ANCHOR_TYPE GtkAnchorType GEnum Gtk2::AnchorType GTK_TYPE_ARG_FLAGS GtkArgFlags GFlags Gtk2::ArgFlags GTK_TYPE_ARROW GtkArrow GtkObject Gtk2::Arrow GTK_TYPE_ARROW_TYPE GtkArrowType GEnum Gtk2::ArrowType GTK_TYPE_ASPECT_FRAME GtkAspectFrame GtkObject Gtk2::AspectFrame GTK_TYPE_ATTACH_OPTIONS GtkAttachOptions GFlags Gtk2::AttachOptions GTK_TYPE_BIN GtkBin GtkObject Gtk2::Bin GTK_TYPE_BORDER GtkBorder GBoxed Gtk2::Border GTK_TYPE_BOX GtkBox GtkObject Gtk2::Box GTK_TYPE_BUTTON_BOX GtkButtonBox GtkObject Gtk2::ButtonBox GTK_TYPE_BUTTON_BOX_STYLE GtkButtonBoxStyle GEnum Gtk2::ButtonBoxStyle GTK_TYPE_BUTTON GtkButton GtkObject Gtk2::Button GTK_TYPE_BUTTONS_TYPE GtkButtonsType GEnum Gtk2::ButtonsType GTK_TYPE_CALENDAR_DISPLAY_OPTIONS GtkCalendarDisplayOptions GFlags Gtk2::CalendarDisplayOptions GTK_TYPE_CALENDAR GtkCalendar GtkObject Gtk2::Calendar GTK_TYPE_CELL_EDITABLE GtkCellEditable GInterface Gtk2::CellEditable GTK_TYPE_CELL_RENDERER GtkCellRenderer GtkObject Gtk2::CellRenderer GTK_TYPE_CELL_RENDERER_MODE GtkCellRendererMode GEnum Gtk2::CellRendererMode GTK_TYPE_CELL_RENDERER_PIXBUF GtkCellRendererPixbuf GtkObject Gtk2::CellRendererPixbuf GTK_TYPE_CELL_RENDERER_STATE GtkCellRendererState GFlags Gtk2::CellRendererState GTK_TYPE_CELL_RENDERER_TEXT GtkCellRendererText GtkObject Gtk2::CellRendererText GTK_TYPE_CELL_RENDERER_TOGGLE GtkCellRendererToggle GtkObject Gtk2::CellRendererToggle GTK_TYPE_CHECK_BUTTON GtkCheckButton GtkObject Gtk2::CheckButton GTK_TYPE_CHECK_MENU_ITEM GtkCheckMenuItem GtkObject Gtk2::CheckMenuItem GTK_TYPE_COLOR_SELECTION_DIALOG GtkColorSelectionDialog GtkObject Gtk2::ColorSelectionDialog GTK_TYPE_COLOR_SELECTION GtkColorSelection GtkObject Gtk2::ColorSelection GTK_TYPE_COMBO GtkCombo GtkObject Gtk2::Combo GTK_TYPE_CONTAINER GtkContainer GtkObject Gtk2::Container GTK_TYPE_CORNER_TYPE GtkCornerType GEnum Gtk2::CornerType GTK_TYPE_CURVE GtkCurve GtkObject Gtk2::Curve GTK_TYPE_CURVE_TYPE GtkCurveType GEnum Gtk2::CurveType GTK_TYPE_DEBUG_FLAG GtkDebugFlag GFlags Gtk2::DebugFlag GTK_TYPE_DELETE_TYPE GtkDeleteType GEnum Gtk2::DeleteType GTK_TYPE_DEST_DEFAULTS GtkDestDefaults GFlags Gtk2::DestDefaults GTK_TYPE_DIALOG_FLAGS GtkDialogFlags GFlags Gtk2::DialogFlags GTK_TYPE_DIALOG GtkDialog GtkObject Gtk2::Dialog GTK_TYPE_DIRECTION_TYPE GtkDirectionType GEnum Gtk2::DirectionType GTK_TYPE_DRAWING_AREA GtkDrawingArea GtkObject Gtk2::DrawingArea GTK_TYPE_EDITABLE GtkEditable GInterface Gtk2::Editable GTK_TYPE_ENTRY GtkEntry GtkObject Gtk2::Entry GTK_TYPE_EVENT_BOX GtkEventBox GtkObject Gtk2::EventBox GTK_TYPE_EXPANDER_STYLE GtkExpanderStyle GEnum Gtk2::ExpanderStyle GTK_TYPE_FILE_SELECTION GtkFileSelection GtkObject Gtk2::FileSelection GTK_TYPE_FIXED GtkFixed GtkObject Gtk2::Fixed GTK_TYPE_FONT_SELECTION_DIALOG GtkFontSelectionDialog GtkObject Gtk2::FontSelectionDialog GTK_TYPE_FONT_SELECTION GtkFontSelection GtkObject Gtk2::FontSelection GTK_TYPE_FRAME GtkFrame GtkObject Gtk2::Frame GTK_TYPE_GAMMA_CURVE GtkGammaCurve GtkObject Gtk2::GammaCurve GTK_TYPE_HANDLE_BOX GtkHandleBox GtkObject Gtk2::HandleBox GTK_TYPE_HBOX GtkHBox GtkObject Gtk2::HBox GTK_TYPE_HBUTTON_BOX GtkHButtonBox GtkObject Gtk2::HButtonBox GTK_TYPE_HPANED GtkHPaned GtkObject Gtk2::HPaned GTK_TYPE_HRULER GtkHRuler GtkObject Gtk2::HRuler GTK_TYPE_HSCALE GtkHScale GtkObject Gtk2::HScale GTK_TYPE_HSCROLLBAR GtkHScrollbar GtkObject Gtk2::HScrollbar GTK_TYPE_HSEPARATOR GtkHSeparator GtkObject Gtk2::HSeparator GTK_TYPE_ICON_FACTORY GtkIconFactory GObject Gtk2::IconFactory GTK_TYPE_ICON_SET GtkIconSet GBoxed Gtk2::IconSet GTK_TYPE_ICON_SIZE GtkIconSize GEnum Gtk2::IconSize GTK_TYPE_ICON_SOURCE GtkIconSource GBoxed Gtk2::IconSource # GTK_TYPE_IDENTIFIER GtkIdentifier GString Gtk2::Identifier GTK_TYPE_IMAGE GtkImage GtkObject Gtk2::Image GTK_TYPE_IMAGE_MENU_ITEM GtkImageMenuItem GtkObject Gtk2::ImageMenuItem GTK_TYPE_IMAGE_TYPE GtkImageType GEnum Gtk2::ImageType GTK_TYPE_IM_CONTEXT GtkIMContext GObject Gtk2::IMContext GTK_TYPE_IM_CONTEXT_SIMPLE GtkIMContextSimple GObject Gtk2::IMContextSimple GTK_TYPE_IM_MULTICONTEXT GtkIMMulticontext GObject Gtk2::IMMulticontext GTK_TYPE_IM_PREEDIT_STYLE GtkIMPreeditStyle GEnum Gtk2::IMPreeditStyle GTK_TYPE_IM_STATUS_STYLE GtkIMStatusStyle GEnum Gtk2::IMStatusStyle GTK_TYPE_INPUT_DIALOG GtkInputDialog GtkObject Gtk2::InputDialog GTK_TYPE_INVISIBLE GtkInvisible GtkObject Gtk2::Invisible GTK_TYPE_ITEM_FACTORY GtkItemFactory GtkObject Gtk2::ItemFactory GTK_TYPE_ITEM GtkItem GtkObject Gtk2::Item GTK_TYPE_JUSTIFICATION GtkJustification GEnum Gtk2::Justification GTK_TYPE_LABEL GtkLabel GtkObject Gtk2::Label GTK_TYPE_LAYOUT GtkLayout GtkObject Gtk2::Layout # NOTE: GtkList and GtkListItem are deprecated, and only included b/c GtkCombo # still makes use of them. do not use them outside of GtkCombo. GTK_TYPE_LIST GtkList GtkObject Gtk2::List GTK_TYPE_LIST_ITEM GtkListItem GtkObject Gtk2::ListItem GTK_TYPE_LIST_STORE GtkListStore GObject Gtk2::ListStore GTK_TYPE_MATCH_TYPE GtkMatchType GEnum Gtk2::MatchType GTK_TYPE_MENU_BAR GtkMenuBar GtkObject Gtk2::MenuBar GTK_TYPE_MENU_DIRECTION_TYPE GtkMenuDirectionType GEnum Gtk2::MenuDirectionType GTK_TYPE_MENU GtkMenu GtkObject Gtk2::Menu GTK_TYPE_MENU_ITEM GtkMenuItem GtkObject Gtk2::MenuItem GTK_TYPE_MENU_SHELL GtkMenuShell GtkObject Gtk2::MenuShell GTK_TYPE_MESSAGE_DIALOG GtkMessageDialog GtkObject Gtk2::MessageDialog GTK_TYPE_MESSAGE_TYPE GtkMessageType GEnum Gtk2::MessageType GTK_TYPE_METRIC_TYPE GtkMetricType GEnum Gtk2::MetricType GTK_TYPE_MISC GtkMisc GtkObject Gtk2::Misc GTK_TYPE_MOVEMENT_STEP GtkMovementStep GEnum Gtk2::MovementStep GTK_TYPE_NOTEBOOK GtkNotebook GtkObject Gtk2::Notebook GTK_TYPE_NOTEBOOK_TAB GtkNotebookTab GEnum Gtk2::NotebookTab GTK_TYPE_OBJECT_FLAGS GtkObjectFlags GFlags Gtk2::ObjectFlags GTK_TYPE_OBJECT GtkObject GtkObject Gtk2::Object GTK_TYPE_OPTION_MENU GtkOptionMenu GtkObject Gtk2::OptionMenu GTK_TYPE_ORIENTATION GtkOrientation GEnum Gtk2::Orientation GTK_TYPE_PACK_TYPE GtkPackType GEnum Gtk2::PackType GTK_TYPE_PANED GtkPaned GtkObject Gtk2::Paned GTK_TYPE_PATH_PRIORITY_TYPE GtkPathPriorityType GEnum Gtk2::PathPriorityType GTK_TYPE_PATH_TYPE GtkPathType GEnum Gtk2::PathType GTK_TYPE_PLUG GtkPlug GtkObject Gtk2::Plug GTK_TYPE_POLICY_TYPE GtkPolicyType GEnum Gtk2::PolicyType GTK_TYPE_POSITION_TYPE GtkPositionType GEnum Gtk2::PositionType GTK_TYPE_PREVIEW_TYPE GtkPreviewType GEnum Gtk2::PreviewType GTK_TYPE_PRIVATE_FLAGS GtkPrivateFlags GFlags Gtk2::PrivateFlags GTK_TYPE_PROGRESS_BAR GtkProgressBar GtkObject Gtk2::ProgressBar GTK_TYPE_PROGRESS_BAR_ORIENTATION GtkProgressBarOrientation GEnum Gtk2::ProgressBarOrientation GTK_TYPE_PROGRESS_BAR_STYLE GtkProgressBarStyle GEnum Gtk2::ProgressBarStyle GTK_TYPE_RADIO_BUTTON GtkRadioButton GtkObject Gtk2::RadioButton GTK_TYPE_RADIO_MENU_ITEM GtkRadioMenuItem GtkObject Gtk2::RadioMenuItem GTK_TYPE_RANGE GtkRange GtkObject Gtk2::Range GTK_TYPE_RC_FLAGS GtkRcFlags GFlags Gtk2::RcFlags GTK_TYPE_RC_STYLE GtkRcStyle GObject Gtk2::RcStyle GTK_TYPE_RC_TOKEN_TYPE GtkRcTokenType GEnum Gtk2::RcTokenType GTK_TYPE_RELIEF_STYLE GtkReliefStyle GEnum Gtk2::ReliefStyle GTK_TYPE_REQUISITION GtkRequisition GBoxed Gtk2::Requisition GTK_TYPE_RESIZE_MODE GtkResizeMode GEnum Gtk2::ResizeMode GTK_TYPE_RESPONSE_TYPE GtkResponseType GEnum Gtk2::ResponseType GTK_TYPE_RULER GtkRuler GtkObject Gtk2::Ruler GTK_TYPE_SCALE GtkScale GtkObject Gtk2::Scale GTK_TYPE_SCROLLBAR GtkScrollbar GtkObject Gtk2::Scrollbar GTK_TYPE_SCROLLED_WINDOW GtkScrolledWindow GtkObject Gtk2::ScrolledWindow GTK_TYPE_SCROLL_TYPE GtkScrollType GEnum Gtk2::ScrollType GTK_TYPE_SELECTION_DATA GtkSelectionData GBoxed Gtk2::SelectionData GTK_TYPE_SELECTION_MODE GtkSelectionMode GEnum Gtk2::SelectionMode GTK_TYPE_SEPARATOR GtkSeparator GtkObject Gtk2::Separator GTK_TYPE_SEPARATOR_MENU_ITEM GtkSeparatorMenuItem GtkObject Gtk2::SeparatorMenuItem GTK_TYPE_SETTINGS GtkSettings GObject Gtk2::Settings GTK_TYPE_SHADOW_TYPE GtkShadowType GEnum Gtk2::ShadowType GTK_TYPE_SIDE_TYPE GtkSideType GEnum Gtk2::SideType GTK_TYPE_SIGNAL_RUN_TYPE GtkSignalRunType GFlags Gtk2::SignalRunType GTK_TYPE_SIZE_GROUP GtkSizeGroup GObject Gtk2::SizeGroup GTK_TYPE_SIZE_GROUP_MODE GtkSizeGroupMode GEnum Gtk2::SizeGroupMode GTK_TYPE_SOCKET GtkSocket GtkObject Gtk2::Socket GTK_TYPE_SORT_TYPE GtkSortType GEnum Gtk2::SortType GTK_TYPE_SPIN_BUTTON GtkSpinButton GtkObject Gtk2::SpinButton GTK_TYPE_SPIN_BUTTON_UPDATE_POLICY GtkSpinButtonUpdatePolicy GEnum Gtk2::SpinButtonUpdatePolicy GTK_TYPE_SPIN_TYPE GtkSpinType GEnum Gtk2::SpinType GTK_TYPE_STATE_TYPE GtkStateType GEnum Gtk2::StateType GTK_TYPE_STATUSBAR GtkStatusbar GtkObject Gtk2::Statusbar GTK_TYPE_STYLE GtkStyle GObject Gtk2::Style GTK_TYPE_SUBMENU_DIRECTION GtkSubmenuDirection GEnum Gtk2::SubmenuDirection GTK_TYPE_SUBMENU_PLACEMENT GtkSubmenuPlacement GEnum Gtk2::SubmenuPlacement GTK_TYPE_TABLE GtkTable GtkObject Gtk2::Table GTK_TYPE_TARGET_FLAGS GtkTargetFlags GFlags Gtk2::TargetFlags GTK_TYPE_TEAROFF_MENU_ITEM GtkTearoffMenuItem GtkObject Gtk2::TearoffMenuItem GTK_TYPE_TEXT_ATTRIBUTES GtkTextAttributes GBoxed Gtk2::TextAttributes GTK_TYPE_TEXT_BUFFER GtkTextBuffer GObject Gtk2::TextBuffer GTK_TYPE_TEXT_CHILD_ANCHOR GtkTextChildAnchor GObject Gtk2::TextChildAnchor GTK_TYPE_TEXT_DIRECTION GtkTextDirection GEnum Gtk2::TextDirection GTK_TYPE_TEXT_ITER GtkTextIter GBoxed Gtk2::TextIter GTK_TYPE_TEXT_MARK GtkTextMark GObject Gtk2::TextMark # in versions before 2.4.0, GtkTextSearchFlags was declared in such a way that # caused it to be misdetected by glib-mkenums as a GEnum. gtk2-perl.h accounts # for that by redefining the generated macros on those versions. GTK_TYPE_TEXT_SEARCH_FLAGS GtkTextSearchFlags GFlags Gtk2::TextSearchFlags GTK_TYPE_TEXT_TAG GtkTextTag GObject Gtk2::TextTag GTK_TYPE_TEXT_TAG_TABLE GtkTextTagTable GObject Gtk2::TextTagTable GTK_TYPE_TEXT_VIEW GtkTextView GtkObject Gtk2::TextView GTK_TYPE_TEXT_WINDOW_TYPE GtkTextWindowType GEnum Gtk2::TextWindowType GTK_TYPE_TOGGLE_BUTTON GtkToggleButton GtkObject Gtk2::ToggleButton GTK_TYPE_TOOLBAR_CHILD_TYPE GtkToolbarChildType GEnum Gtk2::ToolbarChildType GTK_TYPE_TOOLBAR GtkToolbar GtkObject Gtk2::Toolbar GTK_TYPE_TOOLBAR_SPACE_STYLE GtkToolbarSpaceStyle GEnum Gtk2::ToolbarSpaceStyle GTK_TYPE_TOOLBAR_STYLE GtkToolbarStyle GEnum Gtk2::ToolbarStyle GTK_TYPE_TOOLTIPS GtkTooltips GtkObject Gtk2::Tooltips GTK_TYPE_TREE_DRAG_DEST GtkTreeDragDest GInterface Gtk2::TreeDragDest GTK_TYPE_TREE_DRAG_SOURCE GtkTreeDragSource GInterface Gtk2::TreeDragSource GTK_TYPE_TREE_ITER GtkTreeIter GBoxed Gtk2::TreeIter GTK_TYPE_TREE_MODEL_FLAGS GtkTreeModelFlags GFlags Gtk2::TreeModelFlags GTK_TYPE_TREE_MODEL GtkTreeModel GInterface Gtk2::TreeModel GTK_TYPE_TREE_MODEL_SORT GtkTreeModelSort GObject Gtk2::TreeModelSort GTK_TYPE_TREE_PATH GtkTreePath GBoxed Gtk2::TreePath GTK_TYPE_TREE_ROW_REFERENCE GtkTreeRowReference GBoxed Gtk2::TreeRowReference GTK_TYPE_TREE_SELECTION GtkTreeSelection GObject Gtk2::TreeSelection GTK_TYPE_TREE_SORTABLE GtkTreeSortable GInterface Gtk2::TreeSortable GTK_TYPE_TREE_STORE GtkTreeStore GObject Gtk2::TreeStore GTK_TYPE_TREE_VIEW_COLUMN GtkTreeViewColumn GtkObject Gtk2::TreeViewColumn GTK_TYPE_TREE_VIEW_COLUMN_SIZING GtkTreeViewColumnSizing GEnum Gtk2::TreeViewColumnSizing GTK_TYPE_TREE_VIEW_DROP_POSITION GtkTreeViewDropPosition GEnum Gtk2::TreeViewDropPosition GTK_TYPE_TREE_VIEW GtkTreeView GtkObject Gtk2::TreeView GTK_TYPE_TREE_VIEW_MODE GtkTreeViewMode GEnum Gtk2::TreeViewMode GTK_TYPE_UPDATE_TYPE GtkUpdateType GEnum Gtk2::UpdateType GTK_TYPE_VBOX GtkVBox GtkObject Gtk2::VBox GTK_TYPE_VBUTTON_BOX GtkVButtonBox GtkObject Gtk2::VButtonBox GTK_TYPE_VIEWPORT GtkViewport GtkObject Gtk2::Viewport GTK_TYPE_VISIBILITY GtkVisibility GEnum Gtk2::Visibility GTK_TYPE_VPANED GtkVPaned GtkObject Gtk2::VPaned GTK_TYPE_VRULER GtkVRuler GtkObject Gtk2::VRuler GTK_TYPE_VSCALE GtkVScale GtkObject Gtk2::VScale GTK_TYPE_VSCROLLBAR GtkVScrollbar GtkObject Gtk2::VScrollbar GTK_TYPE_VSEPARATOR GtkVSeparator GtkObject Gtk2::VSeparator GTK_TYPE_WIDGET_FLAGS GtkWidgetFlags GFlags Gtk2::WidgetFlags GTK_TYPE_WIDGET GtkWidget GtkObject Gtk2::Widget GTK_TYPE_WIDGET_HELP_TYPE GtkWidgetHelpType GEnum Gtk2::WidgetHelpType GTK_TYPE_WINDOW_GROUP GtkWindowGroup GObject Gtk2::WindowGroup GTK_TYPE_WINDOW GtkWindow GtkObject Gtk2::Window GTK_TYPE_WINDOW_POSITION GtkWindowPosition GEnum Gtk2::WindowPosition GTK_TYPE_WINDOW_TYPE GtkWindowType GEnum Gtk2::WindowType GTK_TYPE_WRAP_MODE GtkWrapMode GEnum Gtk2::WrapMode # not really defined by GTK+, but we'll use it for ourselves. GDK_TYPE_REGION GdkRegion GBoxed Gtk2::Gdk::Region # GTK_TYPE_BINDING_SET not defined as of Gtk 2.16, instead jigged up # ourselves in gtk2perl.h GTK_TYPE_BINDING_SET GtkBindingSet GBoxed Gtk2::BindingSet Gtk2-1.2498/maps-2.10000644 001750 000024 00000005354 11664366546 015014 0ustar00bdmanningstaff000000 000000 GTK_TYPE_ASSISTANT GtkAssistant GtkObject Gtk2::Assistant GTK_TYPE_ASSISTANT_PAGE_TYPE GtkAssistantPageType GEnum Gtk2::AssistantPageType GTK_TYPE_CELL_RENDERER_ACCEL GtkCellRendererAccel GtkObject Gtk2::CellRendererAccel GTK_TYPE_CELL_RENDERER_ACCEL_MODE GtkCellRendererAccelMode GEnum Gtk2::CellRendererAccelMode GTK_TYPE_CELL_RENDERER_SPIN GtkCellRendererSpin GtkObject Gtk2::CellRendererSpin GTK_TYPE_LINK_BUTTON GtkLinkButton GtkObject Gtk2::LinkButton GTK_PRINT_ERROR GTK_TYPE_PRINT_ERROR GError Gtk2::PrintError GTK_TYPE_PAGE_ORIENTATION GtkPageOrientation GEnum Gtk2::PageOrientation GTK_TYPE_PAGE_SET GtkPageSet GEnum Gtk2::PageSet GTK_TYPE_PAGE_SETUP GtkPageSetup GObject Gtk2::PageSetup GTK_TYPE_PAPER_SIZE GtkPaperSize GBoxed Gtk2::PaperSize GTK_TYPE_PRINT_CONTEXT GtkPrintContext GObject Gtk2::PrintContext GTK_TYPE_PRINT_DUPLEX GtkPrintDuplex GEnum Gtk2::PrintDuplex GTK_TYPE_PRINT_OPERATION GtkPrintOperation GObject Gtk2::PrintOperation GTK_TYPE_PRINT_OPERATION_ACTION GtkPrintOperationAction GEnum Gtk2::PrintOperationAction GTK_TYPE_PRINT_OPERATION_PREVIEW GtkPrintOperationPreview GInterface Gtk2::PrintOperationPreview GTK_TYPE_PRINT_OPERATION_RESULT GtkPrintOperationResult GEnum Gtk2::PrintOperationResult GTK_TYPE_PRINT_PAGES GtkPrintPages GEnum Gtk2::PrintPages GTK_TYPE_PRINT_QUALITY GtkPrintQuality GEnum Gtk2::PrintQuality GTK_TYPE_PRINT_SETTINGS GtkPrintSettings GObject Gtk2::PrintSettings GTK_TYPE_PRINT_STATUS GtkPrintStatus GEnum Gtk2::PrintStatus GTK_RECENT_CHOOSER_ERROR GTK_TYPE_RECENT_CHOOSER_ERROR GError Gtk2::RecentChooser::Error GTK_RECENT_MANAGER_ERROR GTK_TYPE_RECENT_MANAGER_ERROR GError Gtk2::RecentManager::Error GTK_TYPE_RECENT_CHOOSER GtkRecentChooser GInterface Gtk2::RecentChooser GTK_TYPE_RECENT_CHOOSER_DIALOG GtkRecentChooserDialog GtkObject Gtk2::RecentChooserDialog GTK_TYPE_RECENT_CHOOSER_MENU GtkRecentChooserMenu GtkObject Gtk2::RecentChooserMenu GTK_TYPE_RECENT_CHOOSER_WIDGET GtkRecentChooserWidget GtkObject Gtk2::RecentChooserWidget GTK_TYPE_RECENT_FILTER GtkRecentFilter GtkObject Gtk2::RecentFilter GTK_TYPE_RECENT_FILTER_FLAGS GtkRecentFilterFlags GFlags Gtk2::RecentFilterFlags GTK_TYPE_RECENT_INFO GtkRecentInfo GBoxed Gtk2::RecentInfo GTK_TYPE_RECENT_MANAGER GtkRecentManager GObject Gtk2::RecentManager GTK_TYPE_RECENT_SORT_TYPE GtkRecentSortType GEnum Gtk2::RecentSortType GTK_TYPE_SENSITIVITY_TYPE GtkSensitivityType GEnum Gtk2::SensitivityType GTK_TYPE_STATUS_ICON GtkStatusIcon GObject Gtk2::StatusIcon GTK_TYPE_TARGET_LIST GtkTargetList GBoxed Gtk2::TargetList GTK_TYPE_TREE_VIEW_GRID_LINES GtkTreeViewGridLines GEnum Gtk2::TreeViewGridLines GTK_TYPE_UNIT GtkUnit GEnum Gtk2::Unit Gtk2-1.2498/maps-2.12000644 001750 000024 00000000644 11664366546 015013 0ustar00bdmanningstaff000000 000000 GTK_TYPE_BUILDABLE GtkBuildable GInterface Gtk2::Buildable GTK_TYPE_BUILDER GtkBuilder GObject Gtk2::Builder GTK_TYPE_DRAG_RESULT GtkDragResult GEnum Gtk2::DragResult GTK_TYPE_RECENT_ACTION GtkRecentAction GObject Gtk2::RecentAction GTK_TYPE_SCALE_BUTTON GtkScaleButton GtkObject Gtk2::ScaleButton GTK_TYPE_TOOLTIP GtkTooltip GObject Gtk2::Tooltip GTK_TYPE_VOLUME_BUTTON GtkVolumeButton GtkObject Gtk2::VolumeButton Gtk2-1.2498/maps-2.14000644 001750 000024 00000000253 11664366546 015011 0ustar00bdmanningstaff000000 000000 GTK_TYPE_HSV GtkHSV GtkObject Gtk2::HSV GTK_TYPE_NUMBER_UP_LAYOUT GtkNumberUpLayout GEnum Gtk2::NumberUpLayout GTK_TYPE_TOOL_SHELL GtkToolShell GInterface Gtk2::ToolShell Gtk2-1.2498/maps-2.16000644 001750 000024 00000000433 11664366546 015013 0ustar00bdmanningstaff000000 000000 GTK_TYPE_ACTIVATABLE GtkActivatable GInterface Gtk2::Activatable GTK_TYPE_ARROW_PLACEMENT GtkArrowPlacement GEnum Gtk2::ArrowPlacement GTK_TYPE_ORIENTABLE GtkOrientable GInterface Gtk2::Orientable GTK_TYPE_ENTRY_ICON_POSITION GtkEntryIconPosition GEnum Gtk2::EntryIconPosition Gtk2-1.2498/maps-2.18000644 001750 000024 00000000177 11664366546 015022 0ustar00bdmanningstaff000000 000000 GTK_TYPE_INFO_BAR GtkInfoBar GtkObject Gtk2::InfoBar GTK_TYPE_ENTRY_BUFFER GtkEntryBuffer GObject Gtk2::EntryBuffer Gtk2-1.2498/maps-2.2000644 001750 000024 00000002056 11664366546 014731 0ustar00bdmanningstaff000000 000000 # Copyright (C) 2003 by the gtk2-perl team (see the file AUTHORS for the full # list) # # This library is free software; you can redistribute it and/or modify it under # the terms of the GNU Library General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # # This library is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for # more details. # # You should have received a copy of the GNU Library General Public License # along with this library; if not, write to the Free Software Foundation, Inc., # 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA. # # $Id$ # GDK_TYPE_DISPLAY GdkDisplay GObject Gtk2::Gdk::Display GDK_TYPE_DISPLAY_MANAGER GdkDisplayManager GObject Gtk2::Gdk::DisplayManager GDK_TYPE_SCREEN GdkScreen GObject Gtk2::Gdk::Screen GTK_TYPE_CLIPBOARD GtkClipboard GObject Gtk2::Clipboard Gtk2-1.2498/maps-2.20000644 001750 000024 00000000727 11664366546 015014 0ustar00bdmanningstaff000000 000000 GTK_TYPE_CELL_RENDERER_SPINNER GtkCellRendererSpinner GtkObject Gtk2::CellRendererSpinner GTK_TYPE_OFFSCREEN_WINDOW GtkOffscreenWindow GtkObject Gtk2::OffscreenWindow GTK_TYPE_SPINNER GtkSpinner GtkObject Gtk2::Spinner GTK_TYPE_TOOL_ITEM_GROUP GtkToolItemGroup GtkObject Gtk2::ToolItemGroup GTK_TYPE_TOOL_PALETTE GtkToolPalette GtkObject Gtk2::ToolPalette Gtk2::ToolPalette GTK_TYPE_TOOL_PALETTE_DRAG_TARGETS GtkToolPaletteDragTargets GFlags Gtk2::ToolPaletteDragTargets Gtk2-1.2498/maps-2.4000644 001750 000024 00000005265 11664366546 014740 0ustar00bdmanningstaff000000 000000 # # type mapping definitions for stuff new in 2.4.0 # # Error domains # domain enum type base type package GTK_FILE_CHOOSER_ERROR GTK_TYPE_FILE_CHOOSER_ERROR GError Gtk2::FileChooser::Error GTK_ICON_THEME_ERROR GTK_TYPE_ICON_THEME_ERROR GError Gtk2::IconTheme::Error # the rest of the types # typemacro C type name base type package GTK_TYPE_COMBO_BOX_ENTRY GtkComboBoxEntry GtkObject Gtk2::ComboBoxEntry GTK_TYPE_COMBO_BOX GtkComboBox GtkObject Gtk2::ComboBox GTK_TYPE_CELL_LAYOUT GtkCellLayout GInterface Gtk2::CellLayout GTK_TYPE_COLOR_BUTTON GtkColorButton GtkObject Gtk2::ColorButton GTK_TYPE_FONT_BUTTON GtkFontButton GtkObject Gtk2::FontButton GTK_TYPE_ENTRY_COMPLETION GtkEntryCompletion GObject Gtk2::EntryCompletion GTK_TYPE_EXPANDER GtkExpander GtkObject Gtk2::Expander GTK_TYPE_FILE_CHOOSER GtkFileChooser GInterface Gtk2::FileChooser GTK_TYPE_FILE_CHOOSER_ACTION GtkFileChooserAction GEnum Gtk2::FileChooserAction GTK_TYPE_FILE_CHOOSER_ERROR GtkFileChooserError GEnum Gtk2::FileChooserError GTK_TYPE_FILE_CHOOSER_DIALOG GtkFileChooserDialog GtkObject Gtk2::FileChooserDialog GTK_TYPE_FILE_CHOOSER_WIDGET GtkFileChooserWidget GtkObject Gtk2::FileChooserWidget GTK_TYPE_FILE_FILTER GtkFileFilter GtkObject Gtk2::FileFilter GTK_TYPE_FILE_FILTER_INFO GtkFileFilterInfo GBoxed Gtk2::FileFilterInfo GTK_TYPE_FILE_FILTER_FLAGS GtkFileFilterFlags GFlags Gtk2::FileFilterFlags GTK_TYPE_ICON_THEME GtkIconTheme GObject Gtk2::IconTheme GTK_TYPE_ICON_THEME_ERROR GtkIconThemeError GEnum Gtk2::IconThemeError GTK_TYPE_ICON_INFO GtkIconInfo GBoxed Gtk2::IconInfo GTK_TYPE_ICON_LOOKUP_FLAGS GtkIconLookupFlags GFlags Gtk2::IconLookupFlags GTK_TYPE_TREE_MODEL_FILTER GtkTreeModelFilter GObject Gtk2::TreeModelFilter GTK_TYPE_UI_MANAGER GtkUIManager GObject Gtk2::UIManager GTK_TYPE_UI_MANAGER_ITEM_TYPE GtkUIManagerItemType GFlags Gtk2::UIManagerItemType GTK_TYPE_ACTION_GROUP GtkActionGroup GObject Gtk2::ActionGroup GTK_TYPE_ACTION GtkAction GObject Gtk2::Action GTK_TYPE_TOGGLE_ACTION GtkToggleAction GObject Gtk2::ToggleAction GTK_TYPE_RADIO_ACTION GtkRadioAction GObject Gtk2::RadioAction GTK_TYPE_ACTION_ENTRY GtkActionEntry GBoxed Gtk2::ActionEntry GTK_TYPE_TOGGLE_ACTION_ENTRY GtkToggleActionEntry GBoxed Gtk2::ToggleActionEntry GTK_TYPE_RADIO_ACTION_ENTRY GtkRadioActionEntry GBoxed Gtk2::RadioActionEntry GTK_TYPE_TOOL_ITEM GtkToolItem GtkObject Gtk2::ToolItem GTK_TYPE_TOOL_BUTTON GtkToolButton GtkObject Gtk2::ToolButton GTK_TYPE_TOGGLE_TOOL_BUTTON GtkToggleToolButton GtkObject Gtk2::ToggleToolButton GTK_TYPE_RADIO_TOOL_BUTTON GtkRadioToolButton GtkObject Gtk2::RadioToolButton GTK_TYPE_SEPARATOR_TOOL_ITEM GtkSeparatorToolItem GtkObject Gtk2::SeparatorToolItem GTK_TYPE_ACCEL_MAP GtkAccelMap GObject Gtk2::AccelMap Gtk2-1.2498/maps-2.6000644 001750 000024 00000001435 11664366546 014735 0ustar00bdmanningstaff000000 000000 # # type mapping definitions for stuff new in 2.6.0 # GDK_TYPE_OWNER_CHANGE GdkOwnerChange GEnum Gtk2::Gdk::OwnerChange GDK_TYPE_PIXBUF_ROTATION GdkPixbufRotation GEnum Gtk2::Gdk::PixbufRotation GTK_TYPE_ABOUT_DIALOG GtkAboutDialog GtkObject Gtk2::AboutDialog GTK_TYPE_CELL_RENDERER_COMBO GtkCellRendererCombo GtkObject Gtk2::CellRendererCombo GTK_TYPE_CELL_RENDERER_PROGRESS GtkCellRendererProgress GtkObject Gtk2::CellRendererProgress GTK_TYPE_CELL_VIEW GtkCellView GtkObject Gtk2::CellView GTK_TYPE_FILE_CHOOSER_BUTTON GtkFileChooserButton GtkObject Gtk2::FileChooserButton GTK_TYPE_ICON_VIEW GtkIconView GtkObject Gtk2::IconView GTK_TYPE_MENU_TOOL_BUTTON GtkMenuToolButton GtkObject Gtk2::MenuToolButton GDK_TYPE_PANGO_RENDERER GdkPangoRenderer GObject Gtk2::Gdk::PangoRenderer Gtk2-1.2498/maps-2.8000644 001750 000024 00000000621 11664366546 014733 0ustar00bdmanningstaff000000 000000 # # type mapping definitions for stuff new in 2.8.0 # GTK_TYPE_FILE_CHOOSER_CONFIRMATION GtkFileChooserConfirmation GEnum Gtk2::FileChooserConfirmation GTK_TYPE_PACK_DIRECTION GtkPackDirection GEnum Gtk2::PackDirection GTK_TYPE_ICON_VIEW_DROP_POSITION GtkIconViewDropPosition GEnum Gtk2::IconView::DropPosition GDK_TYPE_PIXBUF_SIMPLE_ANIM GdkPixbufSimpleAnim GObject Gtk2::Gdk::PixbufSimpleAnim Gtk2-1.2498/maps_pango-1.0000644 001750 000024 00000006012 11664366546 016106 0ustar00bdmanningstaff000000 000000 # Copyright (C) 2004 by the gtk2-perl team (see the file AUTHORS for the full # list) # # This library is free software; you can redistribute it and/or modify it under # the terms of the GNU Library General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # # This library is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for # more details. # # You should have received a copy of the GNU Library General Public License # along with this library; if not, write to the Free Software Foundation, Inc., # 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA. # # $Id$ # # # this file defines mappings only for types that existed in pango 1.0.x # PANGO_TYPE_ALIGNMENT PangoAlignment GEnumAlias Gtk2::Pango::Alignment PANGO_TYPE_ATTR_LIST PangoAttrList GBoxedAlias Gtk2::Pango::AttrList PANGO_TYPE_ATTR_TYPE PangoAttrType GEnumAlias Gtk2::Pango::AttrType PANGO_TYPE_COLOR PangoColor GBoxedAlias Gtk2::Pango::Color PANGO_TYPE_CONTEXT PangoContext GObjectAlias Gtk2::Pango::Context PANGO_TYPE_COVERAGE_LEVEL PangoCoverageLevel GEnumAlias Gtk2::Pango::CoverageLevel PANGO_TYPE_DIRECTION PangoDirection GEnumAlias Gtk2::Pango::Direction PANGO_TYPE_FONT_DESCRIPTION PangoFontDescription GBoxedAlias Gtk2::Pango::FontDescription PANGO_TYPE_FONT_FACE PangoFontFace GObjectAlias Gtk2::Pango::FontFace PANGO_TYPE_FONT_FAMILY PangoFontFamily GObjectAlias Gtk2::Pango::FontFamily PANGO_TYPE_FONT_MAP PangoFontMap GObjectAlias Gtk2::Pango::FontMap PANGO_TYPE_FONT_MASK PangoFontMask GFlagsAlias Gtk2::Pango::FontMask PANGO_TYPE_FONT_METRICS PangoFontMetrics GBoxedAlias Gtk2::Pango::FontMetrics PANGO_TYPE_FONT PangoFont GObjectAlias Gtk2::Pango::Font PANGO_TYPE_FONTSET PangoFontset GObjectAlias Gtk2::Pango::Fontset PANGO_TYPE_GLYPH_STRING PangoGlyphString GBoxedAlias Gtk2::Pango::GlyphString PANGO_TYPE_LANGUAGE PangoLanguage GBoxedAlias Gtk2::Pango::Language PANGO_TYPE_LAYOUT PangoLayout GObjectAlias Gtk2::Pango::Layout PANGO_TYPE_SCRIPT PangoScript GEnumAlias Gtk2::Pango::Script PANGO_TYPE_STRETCH PangoStretch GEnumAlias Gtk2::Pango::Stretch PANGO_TYPE_STYLE PangoStyle GEnumAlias Gtk2::Pango::Style PANGO_TYPE_TAB_ALIGN PangoTabAlign GEnumAlias Gtk2::Pango::TabAlign PANGO_TYPE_TAB_ARRAY PangoTabArray GBoxedAlias Gtk2::Pango::TabArray PANGO_TYPE_UNDERLINE PangoUnderline GEnumAlias Gtk2::Pango::Underline PANGO_TYPE_VARIANT PangoVariant GEnumAlias Gtk2::Pango::Variant PANGO_TYPE_WEIGHT PangoWeight GEnumAlias Gtk2::Pango::Weight PANGO_TYPE_WRAP_MODE PangoWrapMode GEnumAlias Gtk2::Pango::WrapMode # custom types PANGO_TYPE_ATTRIBUTE PangoAttribute GBoxedAlias Gtk2::Pango::Attribute PANGO_TYPE_ATTR_ITERATOR PangoAttrIterator GBoxedAlias Gtk2::Pango::AttrIterator PANGO_TYPE_LAYOUT_ITER PangoLayoutIter GBoxedAlias Gtk2::Pango::LayoutIter PANGO_TYPE_LAYOUT_LINE PangoLayoutLine GBoxedAlias Gtk2::Pango::LayoutLine Gtk2-1.2498/maps_pango-1.10000644 001750 000024 00000000246 11664366546 016172 0ustar00bdmanningstaff000000 000000 # # this file defines mappings only for types that existed in pango 1.10.x # PANGO_TYPE_CAIRO_FONT_MAP PangoCairoFontMap GInterfaceAlias Gtk2::Pango::Cairo::FontMap Gtk2-1.2498/maps_pango-1.16000644 001750 000024 00000000334 11664366546 016176 0ustar00bdmanningstaff000000 000000 # # this file defines mappings only for types that existed in pango 1.16.x # PANGO_TYPE_GRAVITY PangoGravity GEnumAlias Gtk2::Pango::Gravity PANGO_TYPE_GRAVITY_HINT PangoGravityHint GEnumAlias Gtk2::Pango::GravityHint Gtk2-1.2498/maps_pango-1.18000644 001750 000024 00000000234 11664366546 016177 0ustar00bdmanningstaff000000 000000 # # this file defines mappings only for types that existed in pango 1.18.x # PANGO_TYPE_CAIRO_FONT PangoCairoFont GInterfaceAlias Gtk2::Pango::Cairo::Font Gtk2-1.2498/maps_pango-1.4000644 001750 000024 00000001727 11664366546 016122 0ustar00bdmanningstaff000000 000000 # Copyright (C) 2004 by the gtk2-perl team (see the file AUTHORS for the full # list) # # This library is free software; you can redistribute it and/or modify it under # the terms of the GNU Library General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # # This library is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for # more details. # # You should have received a copy of the GNU Library General Public License # along with this library; if not, write to the Free Software Foundation, Inc., # 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA. # # $Id$ # # # this file defines mappings only for types that existed in pango 1.4.x # PANGO_TYPE_SCRIPT_ITER PangoScriptIter GBoxedAlias Gtk2::Pango::ScriptIter Gtk2-1.2498/maps_pango-1.6000644 001750 000024 00000002035 11664366546 016115 0ustar00bdmanningstaff000000 000000 # Copyright (C) 2004 by the gtk2-perl team (see the file AUTHORS for the full # list) # # This library is free software; you can redistribute it and/or modify it under # the terms of the GNU Library General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # # This library is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for # more details. # # You should have received a copy of the GNU Library General Public License # along with this library; if not, write to the Free Software Foundation, Inc., # 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA. # # $Id$ # # # this file defines mappings only for types that existed in pango 1.6.x # PANGO_TYPE_MATRIX PangoMatrix GBoxedAlias Gtk2::Pango::Matrix PANGO_TYPE_ELLIPSIZE_MODE PangoEllipsizeMode GEnumAlias Gtk2::Pango::EllipsizeMode Gtk2-1.2498/maps_pango-1.8000644 001750 000024 00000000343 11664366546 016117 0ustar00bdmanningstaff000000 000000 # # this file defines mappings only for types that existed in pango 1.8.x # PANGO_TYPE_RENDERER PangoRenderer GObjectAlias Gtk2::Pango::Renderer PANGO_TYPE_RENDER_PART PangoRenderPart GEnumAlias Gtk2::Pango::RenderPart Gtk2-1.2498/META.json000644 001750 000024 00000003576 12651227144 015163 0ustar00bdmanningstaff000000 000000 { "abstract" : "Perl interface to the 2.x series of the Gimp Toolkit library", "author" : [ "gtk2-perl Team " ], "dynamic_config" : 1, "generated_by" : "ExtUtils::MakeMaker version 7.04, CPAN::Meta::Converter version 2.150001", "license" : [ "lgpl_2_1" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : "2" }, "name" : "Gtk2", "no_index" : { "directory" : [ "t", "inc", "tools", "xs" ], "file" : [ "Makefile.PL", "gtk-demo/main.pl" ] }, "prereqs" : { "build" : { "requires" : { "ExtUtils::MakeMaker" : "0" } }, "configure" : { "requires" : { "Cairo" : "1.000", "ExtUtils::Depends" : "0.300", "ExtUtils::MakeMaker" : "0", "ExtUtils::PkgConfig" : "1.030", "Glib" : "1.280", "Pango" : "1.220" } }, "runtime" : { "requires" : { "Cairo" : "1.000", "ExtUtils::Depends" : "0.300", "ExtUtils::PkgConfig" : "1.030", "Glib" : "1.280", "Pango" : "1.220" } } }, "release_status" : "stable", "resources" : { "bugtracker" : { "mailto" : "bug-Gtk2 [at] rt.cpan.org", "web" : "http://rt.cpan.org/Public/Dist/Display.html?Name=Gtk2" }, "homepage" : "http://gtk2-perl.sourceforge.net", "license" : [ "http://www.gnu.org/licenses/lgpl-2.1.html" ], "repository" : { "type" : "git", "url" : "git://git.gnome.org/perl-Gtk2", "web" : "http://git.gnome.org/browse/perl-Gtk2" }, "x_MailingList" : "https://mail.gnome.org/mailman/listinfo/gtk-perl-list" }, "version" : "1.2498" } Gtk2-1.2498/META.yml000644 001750 000024 00000002115 12651227144 014777 0ustar00bdmanningstaff000000 000000 --- abstract: 'Perl interface to the 2.x series of the Gimp Toolkit library' author: - 'gtk2-perl Team ' build_requires: ExtUtils::MakeMaker: '0' configure_requires: Cairo: '1.000' ExtUtils::Depends: '0.300' ExtUtils::MakeMaker: '0' ExtUtils::PkgConfig: '1.030' Glib: '1.280' Pango: '1.220' dynamic_config: 1 generated_by: 'ExtUtils::MakeMaker version 7.04, CPAN::Meta::Converter version 2.150001' license: lgpl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: '1.4' name: Gtk2 no_index: directory: - t - inc - tools - xs file: - Makefile.PL - gtk-demo/main.pl requires: Cairo: '1.000' ExtUtils::Depends: '0.300' ExtUtils::PkgConfig: '1.030' Glib: '1.280' Pango: '1.220' resources: MailingList: https://mail.gnome.org/mailman/listinfo/gtk-perl-list bugtracker: http://rt.cpan.org/Public/Dist/Display.html?Name=Gtk2 homepage: http://gtk2-perl.sourceforge.net license: http://www.gnu.org/licenses/lgpl-2.1.html repository: git://git.gnome.org/perl-Gtk2 version: '1.2498' Gtk2-1.2498/NEWS000644 001750 000024 00000174156 12651225016 014240 0ustar00bdmanningstaff000000 000000 Overview of changes in Gtk2 1.2498 ================================== * Add blurbs for the Gtk2::Pango::* POD/man pages Overview of changes in Gtk2 1.2497 ================================== * Avoid a stack handling error in Gtk2::TreeModel::get on perl >= 5.23 * Fix a test failure in t/GdkWindow.t; it occurs only on gtk+ >= 2.24.26 and < 2.24.29. Overview of changes in Gtk2 1.2496 ================================== * Avoid registering a GType for GConnectFlags if not needed * MANIFEST: added missing gtk-demo files Overview of changes in Gtk2 1.2495 ================================== * Fix incorrect memory management in Gtk2::Gdk::Display::list_devices Overview of changes in Gtk2 1.2494 ================================== * Skip all tests that use threads under the hood on FreeBSD if necessary Overview of changes in Gtk2 1.2493 ================================== * Make t/GtkCellRenderer.t more robust ∗ Add a FIXME comment about a slight API problem Overview of changes in Gtk2 1.2492 ================================== * Fix compatibility with perl 5.20 and non-dot locales. * Disable some tests that are known to behave erratically in certain environments. They are still available in the "xt" directory, but they will not be run by default. Overview of changes in Gtk2 1.2491 ================================== * Fix a test failure in t/GdkPixbufLoader.t. Overview of changes in Gtk2 1.249 ================================= * Eliminate test failures by using unique temp directories during testing Overview of changes in Gtk2 1.248 ================================= * Avoid misusing the macro PL_na, thus preventing issues when Gtk2 is used in conjunction with certain XS modules, among them XML::Parser and String::Approx. Overview of changes in Gtk2 1.247 ================================= * Require Glib 1.280 for the fixes to custom signal marshalling. * Fix a test failure in t/GtkRecentChooser.t. * Created %meta_merge which follows v2 of CPAN Meta Spec - %meta_merge is used for generating metadata via ExtUtils::MakeMaker/CPAN::Meta Overview of changes in Gtk2 1.246 ================================= * Improve the failure diagnostics of some tests Overview of changes in Gtk2 1.245 ================================= * Fix two test failures. Overview of changes in Gtk2 1.244 ================================= * Disable the correct potentially annoying test for GtkDnD. * Tell CPAN to some ignore POD fragments Overview of changes in Gtk2 1.243 ================================= * Avoid trying to re-register a GType for GConnectFlags. Overview of changes in Gtk2 1.242 ================================= * Add gitweb link to old ChangeLog * Be compatible with perl 5.8.0 (Bugzilla bug #666227) * Gtk2::Widget: don't implement is_sensitive() twice * Disable a few potentially annoying tests Overview of changes in Gtk2 1.241 ================================= * Add the missing NEWS entries from the stable branch * Fix a test failure in t/tied-objects.t * Fix a test failure in t/GtkEntryBuffer.t Overview of changes in Gtk2 1.240 ================================= Since 1.22x (the previous stable series) ---------------------------------------- * Wrap missing gdk, gdk-pixbuf and gtk+ 2.12, 2.14, 2.16, 2.18, 2.20 and 2.22 API. * Add Gtk2::Gdk::Image. * Add Gtk2::Container->find_child_property and list_child_properties. * Add Gtk2::Widget->find_style_property and list_style_properties. * Add Gtk2::Gdk::Pixbuf->get_option. * Add is_writable field to Gtk2::Gdk::PixbufFormat. * Make Gtk2::FontButton->new and Gtk2::ColorButton->new more flexible. * Accept format strings in Gtk2::MessageDialog->format_secondary_markup. * In syntax check mode, do not call gtk_init. * Improve the documentation in many places. Since 1.232 ----------- * Document the unusual return semantics of Gtk2::CellLayout::get_cells. Overview of changes in Gtk2 1.232 ================================= * Gtk2::Gdk::Pixbuf->new_from_data(): accept overloaded strings * Expand and clarify some of the documentation. * Allow undef in a few more places. * Fix a few test failures. Overview of changes in Gtk2 1.231 ================================= * Wrap gtk+ 2.22 API. * Wrap gdk 2.20 and 2.22 API. * Wrap missing gtk+ 2.8, 2.10, 2.12, 2.14, 2.16, 2.18 and 2.20 API. * Wrap missing gdk 2.18 API. * Wrap missing gdk-pixbuf 2.18 API. * Add Gtk2::Gdk::Image. * Add Gtk2::Container->find_child_property and list_child_properties. * Add Gtk2::Widget->find_style_property and list_style_properties. * Add Gtk2::Gdk::Pixbuf->get_option. * Add is_writable field to Gtk2::Gdk::PixbufFormat. * Allow Gtk2::Buildable implementations to return undef from GET_INTERNAL_CHILD. * Cope with the rename of the keysym defines in gtk+ 2.22. * Fix invocation of Gtk2::Notebook window creation hooks. * Fix length of Gtk2::Gdk::Pixbuf->get_pixels() return. * Ensure that the option strings passed to Gtk2::Gdk::Pixbuf->save() are upgraded to utf8 if necessary. Also, complain if an odd number of key/value args is given. * Update Gtk2->show_about_dialog to match upstream. * Make damage events Gtk2::Gdk::Event::Expose objects. * Allow undef in a few more places. * Correct the memory management in Gtk2::Gdk::Window->new. * Correct length of the Gtk2::Gdk::Pixbuf->get_pixels() return. * Plug leaks in Gtk2::Gdk::Drawable->get_image, Gtk2::CellLayout and Gtk2::TreeSortable. * Use Glib's infrastructure for attaching "magic". * Add some examples. * Improve the documentation in a few places. * Fix a few build and test failures. Overview of changes in Gtk2 1.230 ================================= * Wrap gtk+ 2.20 API in: [Special thanks to Quentin Sculo] - Gtk2::Notebook * Wrap gtk+ 2.18 API in: [Special thanks to Quentin Sculo] - Gtk2::FileChooser - Gtk2::IconView - Gtk2::InfoBar - Gtk2::Label - Gtk2::Menu - Gtk2::Range - Gtk2::StatusIcon - Gtk2::Gdk::Cairo - Gtk2::Gdk::Region - Gtk2::Gdk::Window * Wrap gtk+ 2.16 API in: [Special thanks to Emmanuele Bassi and Quentin Sculo] - Gtk2::Action - Gtk2::Entry - Gtk2::Gdk::Keymap - Gtk2::IMContext - Gtk2::MenuItem, Gtk2::ImageMenuItem - Gtk2::Scale - Gtk2::Window * Wrap gtk+ 2.14 API: - Gtk2::Adjustment [Special thanks to Kevin Ryde] - Gtk2::Gdk::Event - Gtk2::Gdk::Screen * Wrap gtk+ 2.12 API in Gtk2::Gdk::Window. * Make Gtk2::FontButton->new and Gtk2::ColorButton->new more flexible: When called with an argument, turn new() into new_with_color() or new_with_font(), respectively. * Accept format strings in Gtk2::MessageDialog->format_secondary_markup. * Allow undef in a few places: - Gtk2::Gdk::Drawable->draw_pixbuf, draw_layout_with_colors, draw_layout_line_with_colors, draw_segments - Gtk2::Gdk::Window->invalidate_rect, set_icon_name, input_shape_combine_mask, shape_combine_mask, input_shape_combine_region, shape_combine_region - Gtk2::AccelLabel->set_accel_widget - Gtk2::Menu->set_screen - Gtk2::Widget->set_accel_path, shape_combine_mask - Gtk2::Window->set_default_icon_name * In syntax check mode, do not call gtk_init. gtk_init may abort the program (e.g. if DISPLAY is not set), so only call gtk_init_check even if asked to call gtk_init. * Gtk2::Menu: trap exceptions in popup callbacks. Uncaught exceptions in a popup callback can result in persistent mouse and keyboard grabs, locking the screen until the program is killed. * Make Gtk2::ListStore->remove()'s return value consistent on gtk+ 2.0. * Fix memory handling in Gtk2::RecentInfo->get_application_info. * Improve the documentation in many places. [Special thanks to Kevin Ryde] * Fix some build and test failures. Overview of changes in Gtk2 1.224 ================================= * Fix a few test failures. Overview of changes in Gtk2 1.223 ================================= * Cope with the rename of the keysym defines in gtk+ 2.22 * Correct the memory management in Gtk2::Gdk::Window->new * Fix a test failure in GtkBuilder.t Overview of changes in Gtk2 1.222 ================================= * Make Gtk2::ListStore->remove()'s return value consistent on gtk+ 2.0 * Fix some build and test failures. Overview of changes in Gtk2 1.221 ================================= * Properly wrap the binding for gtk_binding_entry_skip in version guards. * Fix some build and test failures. Overview of changes in Gtk2 1.220 ================================= Since 1.20x (the previous stable series) ---------------------------------------- * Split out our pango bindings into the standalone Pango module and depend on it. * Add constants Gtk2::EVENT_STOP and EVENT_PROPAGATE for use in event handlers. * Wrap new API for GtkEntry, GtkCellView, GtkIMMulticontext, GtkStatusIcon, GtkPrintOperation, GtkPrintSettings, GtkStyle, and GdkX11. * Wrap GtkOrientable. * Wrap GtkBindings. * Wrap gtk_get_option_group. Since 1.212 ----------- * Make Gtk2::Style::get_style_property an alias for Gtk2::Style::get. Overview of changes in Gtk2 1.212 ================================= * Wrap gtk_style_get. * Fix a leak in Gtk2::TreeModelFilter::new. * Fix a few POD errors. * Fix some test suite issues. Overview of changes in Gtk2 1.211 ================================= * Wrap new API for GtkEntry, GtkCellView, GtkIMMulticontext, GtkStatusIcon, GtkPrintOperation, GtkPrintSettings, and GdkX11. * Wrap GtkOrientable. * Wrap GtkBindings. * Wrap gtk_get_option_group. * In Gtk2::EntryCompletion::set_model and Gtk2::CellView::set_model, allow undef for the model parameter. * Fix a leak in Gtk2::EntryCompletion::new. * In Gtk2::CellRenderer, make sure we handle floating objects correctly. * Fix some stack handling bugs in Gtk2::IconView. * Fix a few test failures. Overview of changes in Gtk2 1.210 ================================= * Split out our pango bindings into the standalone Pango module and depend on it. * Add constants Gtk2::EVENT_STOP and EVENT_PROPAGATE for use in event handlers * Fix the stack handling in Gtk2::CellRenderer::get_size(). Overview of changes in Gtk2 1.202 ================================= * Correctly handle undef for callbacks in Gtk2::TreeView::set_column_drag_function() and set_row_separator_func(). * Fix more test failures. Overview of changes in Gtk2 1.201 ================================= * Improve documentation in a few places. * Fix another round of stack handling bugs in Gtk2::StatusIcon::position_menu, Gtk2::TreeDragSource::drag_data_get, Gtk2::TreeView::get_tooltip_context, and Gtk2::TreeViewColumn::cell_get_size. * Fix Gtk2::Action::get_proxies to correctly handle the returned widgets. This fixes problems with using it in the "connect-proxy" signal. * Fix some test failures. Overview of changes in Gtk2 1.200 ================================= Since 1.18x (the previous stable series) ---------------------------------------- * Wrap new API from gtk+ 2.14. * Add exportable constants: GTK_PRIORITY_RESIZE, GDK_PRIORITY_EVENTS, GDK_PRIORITY_REDRAW, and GDK_CURRENT_TIME. * Add Gtk2::Gdk::Event::GrabBroken::implicit and grab_window. * Add Gtk2::Widget::hide_on_delete. * Automatically handle releasing of GCs returned by Gtk2::GC->get. * Fix the marshalling of modify callbacks in Gtk2::TreeModelFilter. * Correctly marshal the push_in return value of Gtk2::Menu position callback. * Fix marshaling of the rows-reordered signal for custom Perl tree models. * Provide Gtk2::TreeIter::set for custom model implementations to set the contents of an iter. * Fix the gtk_plug_new_for_display wrapper so it is callable as Gtk2::Plug->new_for_display(display, socket_id). * Change Gtk2::TreeDragSource::drag_data_get to also accept a selection data object that is to be filled in, instead of always just returning a new one. * Improve the documentation in a lot of places. Since 1.193 ----------- * Fix more stack handling bugs in Gtk2::TreeSortable::get_sort_column_id, Gtk2::CellLayout::get_cells, and Gtk2::TreeModel::get. * Improve the explanation of callbacks and user data in the POD page Gtk2::api. Overview of changes in Gtk2 1.193 ================================= * Fix the explicit-columns case of Gtk2::TreeModel::get. * Add Gtk2::TestHelper::delta_ok for comparing floating point numbers. Use it. * Fix compilation and test problems. Overview of changes in Gtk2 1.192 ================================= * Wrap gtk_link_button_set_visited and gtk_link_button_get_visited. * Wrap gtk_selection_data_get_length, update the wrapper for gtk_selection_data_get_data. * Change Gtk2::TreeDragSource::drag_data_get to also accept a selection data object that is to be filled in, instead of always just returning a new one. * Fix a memory leak in Gtk2::Pango::LayoutLine::get_x_ranges. * Make Gtk2::Widget::hide_on_delete actually usable as a delete-event signal handler. * Fix a stack handling issue in Gtk2::TreeModel::get. Overview of changes in Gtk2 1.191 ================================= * Wrap a lot of new API from gtk+ 2.14, among which: - gtk_builder_add_objects_from_file and gtk_builder_add_objects_from_string - gtk_calendar_set_detail_func - gtk_clipboard_request_uris, gtk_clipboard_wait_for_uris, and gtk_clipboard_wait_is_uris_available - gtk_icon_info_new_for_pixbuf - gtk_page_setup_load_file and gtk_page_setup_load_key_file - gtk_print_settings_load_file and gtk_print_settings_load_key_file - gtk_widget_get_snapshot - gtk_show_uri - gdk_screen_get_monitor_height_mm, gdk_screen_get_monitor_width_mm, and gdk_screen_get_monitor_plug_name - gdk_window_redirect_to_drawable and gdk_window_remove_redirection * Improve the documentation in many places. * For Gtk2::CellRenderer subclasses, use a more robust approach for chaining up in the fallback implementations of interface functions. * Correctly marshal the push_in return value of Gtk2::Menu position callback. * Fix marshaling of the rows-reordered signal for custom Perl tree models. * Fix the gtk_plug_new_for_display wrapper so it is callable as Gtk2::Plug->new_for_display(display, socket_id). * Provide Gtk2::TreeIter::set for custom model implementations to set the contents of an iter. * Wrap gtk_widget_hide_on_delete. Overview of changes in Gtk2 1.190 ================================= * Add exportable constants: GTK_PRIORITY_RESIZE, GDK_PRIORITY_EVENTS, GDK_PRIORITY_REDRAW, and GDK_CURRENT_TIME. * Automatically handle releasing of GCs returned by Gtk2::GC->get. * Provide Gtk2::Gdk::Event::GrabBroken::implicit and grab_window accessors. * Fix the marshalling of modify callbacks in Gtk2::TreeModelFilter. Technically, this is an API change since an input argument turned into a return value. The previous version was not usable, however, so nothing should be affected by this. If this change does break your code, please let us know. * Improve the documentation in a few places. * Fix some test failures. Overview of changes in Gtk2 1.183 ================================= * Overload '!=' for Gtk2::Gdk::Atom. * Accept all the usual values for booleans in a few places. * Allow undef for the display name parameter of Gtk2::Gdk::Display::open. * Improve the documentation in many places. * Fix some test failures. Overview of changes in Gtk2 1.182 ================================= * Correct memory management in Gtk2::ScaleButton::new() and set_icons(). * Fix many build and test suite issues, especially on MSWin32 and cygwin. Overview of changes in Gtk2 1.181 ================================= * Fix a test failure. * Fix a Makefile.PL problem encountered by CPAN testers. Overview of changes in Gtk2 1.180 ================================= Since 1.16x (the previous stable series) ---------------------------------------- * Add bindings for GtkIMContext, GtkIMContextSimple, and GtkIMMulticontext. * Correct the way we check values for definedness. * Allow Perl code to implement GtkCellLayoutIface. * Allow Perl code to implement GtkBuildableIface. * Add accessors for Gtk2::Assistant's buttons. * Add Gtk2::Container::forall, Gtk2::Pango::Layout::set_height, Gtk2::Pango::Layout::get_height, Gtk2::Pango::LayoutIter_get_layout, Gtk2::Pango::Renderer::get_layout, and Gtk2::Pango::Renderer::get_layout_line. * Improve documentation. * Fix many leaks and other memory handling issues. Since 1.173 ----------- * Fix test failures. Overview of changes in Gtk2 1.173 ================================= * Fix memory handling bugs in Gtk2::Gdk::Region::get_clipbox and Gtk2::StatusIcon::get_geometry. * Make Gtk2::Gdk::Pixbuf::new_from_xpm_data handle incomplete XPM data gracefully. * Wrap new API: - pango_layout_set_height, pango_layout_get_height - pango_layout_iter_get_layout - pango_renderer_get_layout, pango_renderer_get_layout_line * Improve documentation in many places. * Fix some test failures. Overview of changes in Gtk2 1.172 ================================= * Improve the documentation significantly in many places. * Allow Perl code to implement GtkCellLayoutIface. * Allow Perl code to implement GtkBuildableIface. * Make Gtk2::CellLayout::set_attributes() properly clear all previous attributes. * Add accessors for Gtk2::Assistant's cancel, forward, back, apply, close, and last buttons. * Add Gtk2::Container::forall. * Fix build and test suite issues. Overview of changes in Gtk2 1.171 ================================= * Avoid syntax that was causing perl errors in Gtk2::Builder::_do_connect on some platforms. * Add bindings for GtkIMContext, GtkIMContextSimple, and GtkIMMulticontext. * Improve the documentation in various places. * Make Gtk2::Gdk::Color::new take an optional pixel value. * Correct the way we check values for definedness: use Glib's gperl_sv_defined(), an XS version of perl's defined(). Among other things, this should fix the problems where tied values were reported as undefined. * Plug memory leaks. Overview of changes in Gtk2 1.170 ================================= * Make our build output prettier. * Publicize our Makefile.PL-time requirements through META.yml's configure_requires. * Fix leak in Gtk2::Pango::Layout::get_iter. * Fix a few test failures. Overview of changes in Gtk2 1.164 ================================= * Fix build and test suite issues. Overview of changes in Gtk2 1.163 ================================= * Improve the documentation in many places. * Fix many small memory leaks. * Fix a few build and test suite issues. Overview of changes in Gtk2 1.162 ================================= * Fix a strange parse error related to the use of qw// that occured on some versions of perl. [Jeffrey Ratcliffe] Overview of changes in Gtk2 1.161 ================================= * Fix a leak in Gtk2::Pango::Layout::get_iter. * Fix a few test failures. Overview of changes in Gtk2 1.160 ================================= Since 1.14x (the previous stable series) ---------------------------------------- * Add Gtk2::Pango::LayoutLine, Gtk2::Gdk::Pango::AttrEmbossColor, Gtk2::Builder, Gtk2::RecentAction, Gtk2::ScaleButton, and Gtk2::Tooltip. * Add new API in: Gtk2::Gdk, Gtk2::Gdk::Color, Gtk2::Gdk::Display, Gtk2::Gdk::Event, Gtk2::Gdk::Keymap, Gtk2::Gdk::Pixbuf, Gtk2::Gdk::Window, Gtk2::Gdk::X11, Gtk2::Pango, Gtk2::Pango::Cairo, Gtk2::Pango::Color, Gtk2::Pango::Context, Gtk2::Pango::FontFace, Gtk2::Action, Gtk2::CellLayout, Gtk2::EntryCompletion, Gtk2::IconTheme, Gtk2::IconView, Gtk2::Layout, Gtk2::MenuToolButton, Gtk2::PageSetup, Gtk2::PrintSettings, Gtk2::Range, Gtk2::TextBuffer, Gtk2::TextMark, Gtk2::ToolItem, Gtk2::TreeView, Gtk2::Widget, and Gtk2::Window. * Add support for pango attributes and pango gravity. Since 1.155 ----------- * Make the x, y arguments to Gtk2::StatusIcon::position_menu optional. [muppet] * Fix a test failure or two. [Torsten] Overview of changes in Gtk2 1.155 ================================= * Fix a compilation problem. [Torsten, Thierry Vignaud] * Fix a few test failures. [Torsten] Overview of changes in Gtk2 1.154 ================================= * New API: [Torsten] - gdk_color_to_string - gdk_display_supports_composite - gdk_pixbuf_apply_embedded_orientation - gdk_window_set_composited - gtk_icon_view_convert_widget_to_bin_window_coords, gtk_icon_view_set_tooltip_item, gtk_icon_view_set_tooltip_cell, gtk_icon_view_get_tooltip_context, gtk_icon_view_set_tooltip_column, gtk_icon_view_get_tooltip_column - gtk_menu_tool_button_set_arrow_tooltip_text, gtk_menu_tool_button_set_arrow_tooltip_markup - gtk_tool_item_set_tooltip_text, gtk_tool_item_set_tooltip_markup - gtk_tooltip_set_tip_area - gtk_tree_view_set_tooltip_row, gtk_tree_view_set_tooltip_cell, gtk_tree_view_get_tooltip_context, gtk_tree_view_set_tooltip_column, gtk_tree_view_get_tooltip_column - gtk_widget_set_has_tooltip, gtk_widget_get_has_tooltip - pango_cairo_font_get_scaled_font * Make it possible to call methods on the arrays used to represent PangoColor. [Torsten] * Fix Gtk2::Pango::Matrix::new so it doesn't cause memory errors with pango >= 1.12. [Torsten, Quentin Sculo] * Fix a few test failures. [Torsten] Overview of changes in Gtk2 1.153 ================================= * Supply default values for Gtk2::IconView::scroll_to_path. [Torsten, Jeffrey Ratcliffe] * Hide Gtk2::AboutDialogs constructed with Gtk2::show_about_dialog on any reponse. [muppet] * Make Gtk2::Builder::connect_signals default to the calling package (instead of main) if none was specified. [Torsten] * New API: [Torsten] - gdk_keymap_have_bidi_layouts - gdk_notify_startup_complete_with_id - gdk_window_set_startup_id - gdk_x11_display_get_startup_notification_id - gtk_tree_view_is_rubber_banding_active - pango_cairo_font_map_new_for_font_type, pango_cairo_font_map_get_font_type - pango_font_face_is_synthesized * Plug memory leaks. [muppet, Torsten] Overview of changes in Gtk2 1.152 ================================= * Make Gtk2::TreeModelSort::convert_child_iter_to_iter usable. [Adrian Priscak, muppet] * Make sure calling get() on a Gtk2::TreeModelSort resolves to Gtk2::TreeModel::get if appropriate. [Torsten] * Fix string encoding problems in Gtk2::Editable's insert-text signal marshaller. [Roderich Schupp] * Handle the recent deprecation of gtk_about_dialog_[sg]et_name and the removal of the "name" property. [Torsten, muppet] * Add support for GtkTooltip. [Torsten] * Add support for the pango gravity stuff. [Torsten] * Add support for GtkRecentAction. [Torsten] * Add support for GtkScaleButton and GtkVolumeButton. [Torsten] * Add support for GtkBuilder. [Torsten] * New API: [Torsten] - gdk_event_request_motions - gtk_action_create_menu - gtk_entry_completion_set_inline_selection, gtk_entry_completion_get_inline_selection, gtk_entry_completion_get_completion_prefix, gtk_entry_set_cursor_hadjustment and gtk_entry_get_cursor_hadjustment - gtk_icon_theme_list_contexts and gtk_icon_theme_choose_icon - gtk_page_setup_new_from_file, gtk_page_setup_to_file, gtk_page_setup_new_from_key_file, and gtk_page_setup_to_key_file - gtk_paper_size_new_from_key_file, gtk_paper_size_to_key_file, and gtk_paper_size_get_paper_sizes - gtk_print_settings_new_from_file, gtk_print_settings_to_file, gtk_print_settings_new_from_key_file, and gtk_print_settings_to_key_file - gtk_text_mark_new - gtk_text_buffer_add_mark - gtk_tree_view_column_get_tree_view, gtk_tree_view_convert_widget_to_tree_coords, gtk_tree_view_convert_tree_to_widget_coords, gtk_tree_view_convert_widget_to_bin_window_coords, gtk_tree_view_convert_bin_window_to_widget_coords, gtk_tree_view_convert_tree_to_bin_window_coords, and gtk_tree_view_convert_bin_window_to_tree_coords - gtk_widget_set_tooltip_window, gtk_widget_get_tooltip_window, gtk_widget_trigger_tooltip_query, gtk_widget_set_tooltip_text, gtk_widget_get_tooltip_text, gtk_widget_set_tooltip_markup, gtk_widget_get_tooltip_markup, and gtk_widget_modify_cursor - gtk_window_set_startup_id, gtk_window_set_opacity, and gtk_window_get_opacity - PangoLogAttr property is_expandable_space - pango_cairo_context_set_shape_renderer - pango_color_to_string Overview of changes in Gtk2 1.151 ================================= * Make the GET_SORT_COLUMN_ID vfunc handling in Gtk2::TreeSortable more robust. [muppet] * Mark some widgets as deprecated in the documentation and suggest alternatives. [Emmanuele] * New API: [Torsten] - pango_units_from_double, pango_units_to_double, pango_extents_to_pixels, pango_extents_to_pixels, pango_matrix_transform_distance, pango_matrix_transform_point, pango_matrix_transform_rectangle, and pango_matrix_transform_pixel_rectangle; - pango_layout_get_line_readonly, pango_layout_get_lines_readonly, and pango_layout_iter_get_line_readonly; - gtk_cell_layout_get_cells. * Make the paths returned by Gtk2::IconView::get_selected_items usable. [Torsten] Overview of changes in Gtk2 1.150 ================================= * Add support for pango attributes. [Torsten] * Add support for PangoLayoutLine. [Torsten] * Add support for GdkPangoAttrEmbossColor. [Torsten] * Wrap new API: [Torsten] - gdk_window_beep - gtk_range_set_show_fill_level, gtk_range_get_show_fill_level, gtk_range_set_restrict_to_fill_level, gtk_range_get_restrict_to_fill_level, gtk_range_set_fill_level, gtk_range_get_fill_level - gtk_tree_view_set_show_expanders, gtk_tree_view_get_show_expanders, gtk_tree_view_set_level_indentation, gtk_tree_view_get_level_indentation - pango_context_set_base_gravity, pango_context_get_base_gravity, pango_context_get_gravity, pango_font_description_set_gravity, pango_font_description_get_gravity * Allow passing undef to Gtk2::Entry::set_completion. [Torsten] * Add Gtk2::Layout::bin_window. [Philipp Rumpf] * When building on Win32, also look for Cairo.lib to make linking work. [Torsten] * Fix a few test suite issues. [Torsten] Overview of changes in Gtk2 1.145 ================================= * Fix test failures and compilation problems. [Torsten, Mario Fischer] * Make Gtk2::ListStore's and Gtk2::TreeStore's move_before() and move_after() accept undef for the position parameter. [Torsten] * Supply default values for Gtk2::IconView::scroll_to_path(). [Torsten] * Plug reference leaks on the pixmap and bitmap returned from Gtk2::Gdk::Pixbuf::render_pixmap_and_mask() and render_pixmap_and_mask_for_colormap(). [muppet] * Hide Gtk2::AboutDialogs constructed with Gtk2::show_about_dialog on any reponse. [muppet] Overview of changes in Gtk2 1.144 ================================= * Fix a string encoding problem in Gtk2::Editable's insert-text signal marshaller. [Roderich Schupp] Overview of changes in Gtk2 1.143 ================================= * Make Gtk2::TreeModelSort::convert_child_iter_to_iter work correctly. [muppet] * Make sure calling get() on a Gtk2::TreeModelSort resolves to Gtk2::TreeModel::get if appropriate. [Torsten] Overview of changes in Gtk2 1.142 ================================= * Avoid segfaults in the GET_SORT_COLUMN_ID marshaller for custom Gtk2::TreeSortable implementations. [muppet] * Expand documentation for Gtk2::RecentManager::add_item and Gtk2::RecentManager::add_full. [Emmanuele] * Make the paths returned by Gtk2::IconView::get_selected_items usable. [Torsten] Overview of changes in Gtk2 1.141 ================================= * Allow passing undef to Gtk2::Entry::set_completion. [Torsten] * Allow using method calling semantics for Gtk2::Pango::Cairo::Context::*. [Torsten] * On Win32, also try to locate Cairo.lib if necessary. [Torsten] * Fix some POD errors. [Torsten] * Fix a few test suite issues. [Torsten] Overview of changes in Gtk2 1.140 ================================= Since 1.12x (the previous stable series) ---------------------------------------- * Add Gtk2::Assistant, Gtk2::CellRendererAccel, Gtk2::CellRendererSpin, Gtk2::LinkButton, Gtk2::PageSetup, Gtk2::PaperSize, Gtk2::PrintContext, Gtk2::PrintOperation, Gtk2::PrintOperationPreview, Gtk2::PrintSettings, Gtk2::RecentChooser, Gtk2::RecentChooserDialog, Gtk2::RecentChooserMenu, Gtk2::RecentChooserWidget, Gtk2::RecentFilter, Gtk2::RecentManager, Gtk2::StatusIcon, and Gtk2::TextBufferRichText * Add new API in Gtk2::Gdk::Cairo, Gtk2::Gdk::Screen, Gtk2::Gdk::Display, Gtk2::Gdk::Pixmap, Gtk2::Gdk::Window, Gtk2::Button, Gtk2::Clipboard, Gtk2::ComboBox, Gtk2::Entry, Gtk2::FileChooserButton, Gtk2::Label, Gtk2::MessageDialog, Gtk2::Notebook, Gtk2::RadioAction, Gtk2::Range, Gtk2::ScrolledWindow, Gtk2::SizeGroup, Gtk2::StatusIcon, Gtk2::Style, Gtk2::TextBuffer, Gtk2::TreeStore, Gtk2::TreeView, Gtk2::Widet, Gtk2::Window, Gtk2::Pango::Cairo, and Gtk2::Pango::Font. * Allow passing undef to Gtk2::Widget::modify_*, Gtk2::RcStyle::name, Gtk2::RcStyle::bg_pixmap_name, and Gtk2::RcStyle::font_desc. Since 1.133 ----------- * Allow passing undef to Gtk2::RcStyle::name, bg_pixmap_name, and font_desc. * Require Cairo 1.00 (still only if gtk+ >= 2.8). Overview of changes in Gtk2 1.133 ================================= * Require Cairo 0.92 if the installed gtk+ is as new or newer as 2.8. [Torsten] Overview of changes in Gtk2 1.132 ================================= * Make Gtk2::TestHelper enforce strict and warnings. [Grant McLean] * Cleanup some code comments and fix a few test suite issues. [Torsten] Overview of changes in Gtk2 1.131 ================================= * Allow passing undef to the Gtk2::Widget::modify_* methods. [muppet] * Add support for GtkCellRendererSpin. [Torsten] * Add support for GtkPageSetup, GtkPaperSize, GtkPrintContext, GtkPrintOperation, GtkPrintOperationPreview, GtkPrintSettings. [Torsten] * Add support for GtkRecentChooser, GtkRecentChooserDialog, GtkRecentChooserMenu, GtkRecentChooserWidget, GtkRecentFilter, GtkRecentManager. [Emmanuele] * Wrap new API: [Torsten, muppet] - gtk_button_set_image_position, gtk_button_get_image_position - gtk_clipboard_request_rich_text, gtk_clipboard_wait_for_rich_text, gtk_clipboard_wait_is_rich_text_available - gtk_combo_box_set_title, gtk_combo_box_get_title - gtk_drag_dest_set_track_motion, gtk_drag_dest_get_track_motion - gtk_entry_set_inner_border, gtk_entry_get_inner_border - gtk_file_chooser_button_set_focus_on_click, gtk_file_chooser_button_get_focus_on_click - gtk_label_set_line_wrap_mode, gtk_label_get_line_wrap_mode - gtk_message_dialog_set_image - gtk_notebook_set_window_creation_hook, gtk_notebook_set_group_id, gtk_notebook_get_group_id, gtk_notebook_set_tab_reorderable, gtk_notebook_get_tab_reorderable, gtk_notebook_set_tab_detachable, gtk_notebook_get_tab_detachable - gtk_radio_action_set_current_value - gtk_range_get_lower_stepper_sensitivity, gtk_range_set_lower_stepper_sensitivity, gtk_range_get_upper_stepper_sensitivity, gtk_range_set_upper_stepper_sensitivity - gtk_scrolled_window_unset_placement - gtk_target_list_add_rich_text_targets, gtk_targets_include_text, gtk_targets_include_uri, gtk_targets_include_rich_text, gtk_targets_include_image, gtk_selection_data_targets_include_rich_text, gtk_selection_data_targets_include_uri - gtk_size_group_get_widgets - gtk_status_icon_position_menu, gtk_status_icon_get_geometry - gtk_style_lookup_color - gtk_text_buffer_get_has_selection, gtk_text_buffer_get_copy_target_list, gtk_text_buffer_get_paste_target_list - gtk_tree_store_insert_with_values - gtk_tree_view_get_headers_clickable, gtk_tree_view_set_search_entry, gtk_tree_view_get_search_entry, gtk_tree_view_set_search_position_func, gtk_tree_view_set_rubber_banding, gtk_tree_view_get_rubber_banding, gtk_tree_view_get_grid_lines, gtk_tree_view_set_grid_lines, gtk_tree_view_get_enable_tree_lines, gtk_tree_view_set_enable_tree_lines - gtk_widget_get_action, gtk_widget_input_shape_combine_mask - gtk_window_set_deletable, gtk_window_get_deletable, gtk_window_get_group - pango_cairo_show_error_underline, pango_cairo_error_underline_path - pango_font_describe_with_absolute_size, pango_font_get_font_map * Fix a few memory leaks. [Torsten] * Make many tests more robust. [Torsten, Emmanuele] Overview of changes in Gtk2 1.130 ================================= * Add support for GtkStatusIcon, GtkAssistant, GtkLinkButton, GtkCellRendererAccel, and GtkTextBufferRichText. [muppet, Torsten] * Wrap new API: [muppet, Torsten] - gdk_cairo_set_source_pixmap - gdk_screen_get_font_options, gdk_screen_set_font_options - gdk_display_supports_shapes, gdk_display_supports_input_shapes - gdk_pixmap_foreign_new_for_screen - gdk_screen_get_resolution, gdk_screen_set_resolution - gdk_screen_get_active_window - gdk_screen_get_window_stack - gdk_screen_is_composited - gdk_window_get_type_hint - gdk_window_input_shape_combine_mask - gdk_window_input_shape_combine_region - gdk_window_set_child_input_shapes - gdk_window_merge_child_input_shapes * Fix some test suite issues. [muppet, Torsten] Overview of changes in Gtk2 1.122 ================================= * Allow passing undef to the Gtk2::Widget::modify_* methods. [muppet] * Fix multiple test suite issues. [Torsten] Overview of changes in Gtk2 1.121 ================================= * Fix a test issue that occured on non-threaded perls. [muppet] Overview of changes in Gtk2 1.120 ================================= Since 1.10x (the previous stable series) ---------------------------------------- * Make GDK's and Pango's cairo glue available if the Perl module Cairo is installed. * Add Gtk2::AboutDialog::[gs]et_wrap_license and Gtk2::Dnd::set_icon_name. * Add most of the missing functions of GDK's X11 API. * Add Gtk2::Gdk::Pixbuf::save_to_buffer. * Make it possible to implement natively-scrollable widgets in Perl. Since 1.116 ----------- * Nada. Overview of changes in Gtk2 1.116 ================================= * Fix a memory handling bug in Gtk2::Gdk::Region::get_rectangles. [Marc Lehmann] Overview of changes in Gtk2 1.115 ================================= * Make use of Glib's new type mapping semantics in some more places. [Torsten] * Allow undef for the parameters of Gtk2::Widget::set_scroll_adjustments. [muppet] * Make it possible to implement natively-scrollable widgets in Perl by recognizing signals named "set-scroll-adjustments" as special in custom types derived from Gtk2::Widget. [muppet] Overview of changes in Gtk2 1.114 ================================= * Remove the GInitiallyUnowned hack again; Glib 1.114 fixes the problem. [Torsten] * Add bindings for gdk_pixbuf_save_to_buffer. [muppet] * Remove the recently added atk support again -- it was untested and apparently unusable. Let us know if you need it. [Torsten] Overview of changes in Gtk2 1.113 ================================= * Make Gtk2::TreeModelSort::new an alias for new_with_model. [muppet] * Add a new example that shows how to use Gtk2::Table's packing options. [muppet] * Add a temporary hack to work around a problem with the most recent, not-yet-released version of the GLib library that causes Gtk2::Object to not inherit from Glib::Object. [Torsten] Overview of changes in Gtk2 1.112 ================================= * Fix a tiny test suite issue. [Torsten] Overview of changes in Gtk2 1.111 ================================= * Handle unknown event types gracefully. [muppet] * Allow passing undef to Gtk2::Gdk::Event::get_time. [muppet] * Fix a few compilation and test suite issues. [Ross, Torsten] Overview of changes in Gtk2 1.110 ================================= * Take advantage of Glib's new automatic @ISA registration for interfaces. [Torsten] * Wrap most of the atk API. [Torsten] * Make gdk's and pango's cairo glue available if the Perl module Cairo is installed. [Torsten] * Add Gtk2::AboutDialog::[gs]et_wrap_license and Gtk2::Dnd::set_icon_name. [Torsten] * Improve some of the Gtk2::Gdk::GC API and fix a leak in Gtk2::Gdk::Pixbuf. [Marc Lehmann] * Wrap most of gdk's X11-related API. [Marc, Torsten] Overview of changes in Gtk2 1.104 ================================= * Allow undef for the adjustment parameters of Gtk2::Widget::set_scroll_adjustments. [muppet] * Fix a memory handling bug in Gtk2::Gdk::Region::get_rectangles. [Marc Lehmann] Overview of changes in Gtk2 1.103 ================================= * Depend on Glib 1.103 for the new object registration semantics. Make use of them. [Torsten] Overview of changes in Gtk2 1.102 ================================= * Handle unknown event types gracefully. [muppet] * Improve some of the Gtk2::Gdk::GC API and fix a leak in Gtk2::Gdk::Pixbuf. [Marc Lehmann] * Fix a few test suite issues. [Scott Lanning, Torsten] Overview of changes in Gtk2 1.101 ================================= * Improve the date cell renderer example. [Daniel Kasak, muppet] * Fix a few test suite issues. [Torsten] Overview of changes in Gtk2 1.100 ================================= Since 1.08x (the previous stable series) ---------------------------------------- * Add new API in Gtk2::Gdk::Pixbuf, Gtk2::Gdk::PixbufFormat, Gtk2::Gdk::Cursor, Gtk2::Gdk::Display, Gtk2::Gdk::Screen, Gtk2::Gdk::Window, Gtk2::Gdk::X11, Gtk2::Dialog, Gtk2::Dnd, Gtk2::EntryCompletion, Gtk2::FileChooser, Gtk2::IconView, Gtk2::Image, Gtk2::MenuBar, Gtk2::MenuShell, Gtk2::ScrolledWindow, Gtk2::SizeGroup, Gtk2::Stock, Gtk2::TextIter, Gtk2::ToolButton, Gtk2::TreeModel, Gtk2::TreeView, Gtk2::TreeViewColumn and Gtk2::Window. * Fix Gtk2::show_about_dialog to actually cache the dialog instance. * Make it possible to change a Gtk2::SimpleList's model. * Turn Gtk2::Widget::window into a mutator. * Make it possible to implement GtkTreeSortable, GtkTreeDragSource and GtkTreeDragDest interfaces. * Add support for the grab-broken event. * Turn Gtk2::CodeGen into a thin wrapper around Glib::CodeGen. * Make Gtk2::Dialog::set_alternative_button_order() accept string constants. Since 1.093 ----------- * Fix some pointer signedness warnings. [muppet] * Fix up some bad version checks. [Marc Brockschmidt] Overview of changes in Gtk2 1.093 ================================= * Bind new API in Gtk2::FileChooser, Gtk2::TreeModel, Gtk2::TreeView and Gtk2::TreeViewColumn. [Torsten] * Make Gtk2::Dialog::set_alternative_button_order() accept string constants. [LoneFox] * Turn Gtk2::CodeGen into a thin wrapper around Glib::CodeGen. [muppet] * Make the test suite more robust. [Torsten] Overview of changes in Gtk2 1.092 ================================= * Fix Gtk2::show_about_dialog to actually cache the dialog instance. [muppet] * Make it possible to change a Gtk2::SimpleList's model. [muppet] * Turn Gtk2::Widget::window into a mutator. [Torsten] * Fix a few test suite issues and add some new tests. [Torsten, muppet] * Make it possible to implement GtkTreeSortable, GtkTreeDragSource and GtkTreeDragDest interfaces. [Torsten, muppet] * Add new API in: [Torsten] - Gtk2::Gdk::Cursor, - Gtk2::Gdk::Display, - Gtk2::Gdk::Screen, - Gtk2::Gdk::Window, - Gtk2::Gdk::X11, - Gtk2::Dialog, - Gtk2::Dnd, - Gtk2::EntryCompletion, - Gtk2::IconView (yay, d'n'd support!), - Gtk2::Image, - Gtk2::MenuBar, - Gtk2::MenuShell, - Gtk2::ScrolledWindow, - Gtk2::SizeGroup, - Gtk2::Stock, - Gtk2::TextIter, - Gtk2::ToolButton, - Gtk2::Window. * Add support for the grab-broken event. [Torsten] * Fix the signature of Gtk2::Gdk::PixbufLoader::new_with_type and Gtk2::Gdk::PixbufLoader::new_with_mime_type. Add Gtk2::Gdk::PixbufLoader::get_format. [muppet] Overview of changes in Gtk2 1.091 ================================= * Fix a minor test suite issue. Overview of changes in Gtk2 1.090 ================================= * Test updates and fixes. [Torsten] * Bind and test Gtk2::Gdk::Pixbuf::new_from_file_at_scale, Gtk2::Gdk::Pixbuf::rotate_simple, Gtk2::Gdk::Pixbuf::flip, Gtk2::Gdk::Pixbuf::get_file_info, the new Gtk2::Gdk::PixbufFormat members and Gtk2::Gdk::PixbufFormat::set_disabled. [Torsten] * Documentation updates. [Torsten] Overview of changes in Gtk2 1.082 ================================= * Add many synopses and introductions to the docs. [muppet] * Fix a few test suite issues. [Torsten] Overview of changes in Gtk2 1.081 ================================= * Make code generated by Gtk2::CodeGen compilable with C++ compilers. [Torsten] * Allow undef for the mask argument of Gtk2::Gdk::DragContext::drag_set_icon_pixmap. [muppet] * Documentation updates. [Ross] Overview of changes in Gtk2 1.080 ================================= Since 1.06x (the previous stable series) ---------------------------------------- * New objects: Gtk2::AboutDialog, Gtk2::CellRendererCombo, Gtk2::CellRendererProgress, Gtk2::CellView, Gtk2::FileChooserButton, Gtk2::IconView, Gtk2::MenuToolButton, Gtk2::Pango::FontMap, and Gtk2::Pango::Script. * New API in: Gtk2, Gtk2::Accelerator, Gtk2::Action, Gtk2::Button, Gtk2::CellRenderer, Gtk2::Clipboard, Gtk2::ComboBox, Gtk2::Dialog, Gtk2::Entry, Gtk2::EntryCompletion, Gtk2::FileChooser, Gtk2::FileFilter, Gtk2::Gdk::Display, Gtk2::Gdk::DragContext, Gtk2::Gdk::Pixbuf, Gtk2::Gdk::Rgb, Gtk2::Gdk::Window, Gtk2::IconTheme, Gtk2::IconView, Gtk2::Image, Gtk2::Label, Gtk2::ListStore, Gtk2::Menu, Gtk2::MessageDialog, Gtk2::Pango, Gtk2::Pango::FontDescription, Gtk2::Pango::Layout, Gtk2::ProgressBar, Gtk2::SelectionData, Gtk2::TargetList, Gtk2::TextBuffer, Gtk2::TextView, Gtk2::ToolItem, Gtk2::TreeView, Gtk2::Widget, and Gtk2::Window. * Support owner-change events. * Enable translation of action groups. * Gtk2::SimpleList handles undefined iters gracefully. * Insertion methods in Gtk2::Notebook return the new position. * Gtk2::Gdk::Pixmap::create_from_xpm handles non-existent files gracefully. Since 1.074 ----------- * Sidestep a test failure. Overview of changes in Gtk2 1.074 ================================= * Fix many test suite issues. [Torsten, muppet] * Make Gtk2::SimpleList catch undef iters gotten from requests for non-existent entries. [muppet] * Make the insertion methods in Gtk2::Notebook return the new position of the inserted page. [Marc Lehmann, muppet] * Make Gtk2::Gdk::Pixmap::create_from_xpm handle non-existent files gracefully. [muppet] Overview of changes in Gtk2 1.073 ================================= * Require Glib 1.073. * API additions: [muppet] - Gtk2::show_about_dialog (new in gtk+ 2.6.0) - Gtk2::CellRenderer::stop_editing (new in gtk+ 2.6.0) - Gtk2::Gdk::Pixbuf::get_option - Gtk2::IconView::selected_foreach (new in gtk+ 2.6.0) - Gtk2::Pango::parse_markup * Add missing @ISA entries for various GInterfaces. [Ross, muppet] * Make sure to treat text as utf8 in AboutDialog methods. [muppet] * Test suite updates. [muppet, Ross] Overview of changes in Gtk2 1.072 ================================= * API additions: [Torsten, muppet] - New objects in 2.6: Gtk2::CellRendererCombo, Gtk2::CellRendererProgress, Gtk2::FileChooserButton, Gtk2::MenuToolButton - 59 new gtk+ 2.6 functions, in Gtk2, Gtk2::Action, Gtk2::Clipboard, Gtk2::Gdk::Display, Gtk2::Gdk::DragContext, Gtk2::Gdk::Rgb, Gtk2::Gdk::Window, Gtk2::Label, Gtk2::ListStore, Gtk2::Menu, Gtk2::MessageDialog, Gtk2::Pango::FontDescription, Gtk2::Pango::Layout, Gtk2::ProgressBar, Gtk2::SelectionData, Gtk2::TargetList, Gtk2::TextBuffer, Gtk2::TextView, Gtk2::ToolItem, Gtk2::Widget, Gtk2::Window * Enable translation of action groups when built against gtk+ 2.6. [muppet] * Improvements to examples. [Torsten, muppet] * Bugfixes and cleanup. [Torsten] * Test suite improvements and fixes. [Torsten, Ross, muppet] * Add a _noinc_ornull variant to the typemaps for GObjects. [Torsten] * Allow undef where appropriate for Gtk2::AboutDialog. [Torsten] Overview of changes in Gtk2 1.071 ================================= * Bind new API in: - Gtk2::Accelerator - Gtk2::Button - Gtk2::Dialog - Gtk2::Entry - Gtk2::FileChooser - Gtk2::FileFilter - Gtk2::Image Overview of changes in Gtk2 1.070 ================================= * Documentation fixes. [muppet] * Generate a correct META.yml. [muppet] * API additions: - GtkAboutDialog, GtkCellView, and GtkIconView. [Ross, Torsten] - New stuff in GtkComboBox, GtkTreeView, GtkClipboard, GtkEntryCompletion, GtkIconTheme, and GtkLabel. [muppet, Torsten] - PangoFontMap, PangoScript, and miscellaneous other pango functions. [Torsten] * Add support for owner-change events. [Torsten] Overview of Changes in Gtk2 1.062 ================================= * Documentation fixes. [muppet] * Properly create META.yml. [muppet] * Make Gtk2::TreeModelFilter actually work by letting it inherit from Gtk2::TreeModel. [muppet] * Add missing interfaces to widgets that implement them. [Ross] * Make the Gtk2::Clipboard constructors not assume ownership. [Torsten] * Fix or disable some tests that fail with newer versions of Test::More. [Torsten] Overview of Changes in Gtk2 1.061 ================================= * Miscellaneous code cleanup and build fixes. [Torsten] * Doc fixes and improvements. [Torsten] * Fix some utf-8 issues related to non-English locales. [muppet, ender] Overview of Changes in Gtk2 1.060 ================================= Since 1.04x (the previous stable series) ---------------------------------------- * Require Glib 1.060. * Support new stuff in Pango 1.6. * Documentation and example code improvements. * Code cleanup and various bugfixes. * Even yet still more test suite improvements. * Allow undef to various Gtk2::Toolbar methods where appropriate. * Add important utility functions (with docs) for use by custom tree model implementations: Gtk2::TreeIter::to_arrayref and Gtk2::TreeIter::new_from_arrayref. * Add bindings for more esoteric bits if API from GDK and GTK+. * Thread support improvement. A new module import option, -threads-init, calls Gtk2::Gdk::Threads::init() for you. * Allow the creation of anonymous marks. * Allow easy access to the data of a SimpleList row when given a path. Since 1.055 ----------- * Fix refcounting bugs in Gtk2::CellRenderer and Gtk2::ItemFactory. [muppet] * Documentation improvements. [muppet, Ross, A. Pagaltzis] Overview of Changes in Gtk2 1.055 ================================= * Require Glib 1.055 for docgen updates. [Ross] * Remove custom GType for PangoMatrix, since pango 1.6 (since 1.5.1) will ship with its own. [Torsten] * Adjust Gtk2::TextIter tests to account for bugfix in gtk+. [Torsten] Overview of Changes in Gtk2 1.054 ================================= * Documentation updates for Gtk2::Toolbar, more accurately describing the types of parameters. [muppet] * Allow undef to various Gtk2::Toolbar methods where appropriate. [Torsten, muppet] Overview of Changes in Gtk2 1.053 ================================= * Require Glib 1.053. * Add important utility functions (with docs) for use by custom tree model implementations: Gtk2::TreeIter::to_arrayref and Gtk2::TreeIter::new_from_arrayref. [Zach Bean, muppet] * Bind and test late additions to gtk+ and pango: [Torsten] - Gtk2::Pango::Layout::get_ellipsize - Gtk2::Pango::Layout::set_ellipsize - Gtk2::parse_args Overview of Changes in Gtk2 1.052 ================================= * Require Glib 1.052. * Documentation fixes and improvements. [Torsten, muppet] * Improvements and bugfixes in the cellrenderer examples. [muppet, bug report from Jens Wilke] * Minor bugfixes and warning suppression. [muppet] * Gtk2::CodeGen improvements: [Torsten] - allow const modifier on boxed types. - add newSV$classname\_ornull variant for boxed types. * Bind and test new API from Pango 1.5.x, including PangoMatrix. [Torsten] Overview of Changes in Gtk2 1.051 ================================= * Code fixes and cleanup for C89 compatibility. [Albert Chin, muppet] * Thread support improvement [Ross] - New import option, -threads-init, calls Gtk2::Gdk::Threads::init() for you. - Updated the thread usage example. * Documentation improvements. [muppet, adapted from the gtk+ C api ref.] * Bugfixes. [Torsten] Overview of Changes in Gtk2 1.050 ================================= * New unstable development branch. * Require Glib 1.050. * Code cleanup in XS, tests, and examples. [Torsten, muppet, Ross] * Even yet still more test suite improvements. [Torsten the Test Master] * Documentation improvements. [Torsten, muppet, Marc Lehmann] * Allow the creation of anonymous marks. [Marc Lehmann] * ABI cleanup -- remove private functions from ABI by marking them as static. This has the possibility of breaking ABI compatibility; it *shouldn't*, because nobody should be using these private functions outside of the Gtk2 module, but you never know what's going to happen when dealing with win32's braindead linker. If there are any bugs you think are related to this, please report them immediately to the gtk-perl-list and we'll fix them asap. [Torsten] * Newly bound functions and such [Torsten unless otherwise noted]: - gtk+'s GC pool (the GtkGC functions) - Gtk2::Gdk::text_property_to_text_list, text_property_to_utf8_list, string_to_compound_text, utf8_to_compound_text, text_property_to_text_list_for_display, text_property_to_utf8_list_for_display, string_to_compound_text_for_display, utf8_to_compound_text_for_display, and utf8_to_string_target. - Gtk2::Gdk::draw_indexed_image. - Gtk2::Pango::Font::get_glyph_extents. - Gtk2::Pango::Rectangle and functions that use it, Gtk2::Pango::Layout::index_to_pos, get_cursor_pos, get_extents, and get_pixel_extents. - Gtk2::Pango::LayoutIter and functions that use it, Gtk2::Pango::Layout::get_iter, Gtk2::Pango::LayoutIter::get_index, at_last_line, next_char, next_cluster, next_run, next_line, get_char_extents, get_cluster_extents, get_run_extents, get_line_extents, get_layout_extents, get_line_yrange, and get_baseline. - Gtk2::Pango::Fontset. - Gtk2::Gdk::Visual. - Gtk2::Pango::Context::list_families, Gtk2::Pango::FontFamily::get_name, is_monospace, list_faces, Gtk2::Pango::FontFace::describe, get_face_name, and list_sizes. [muppet] - Gtk2::Gdk::Input. - Gtk2::Gdk::init, init_check, and parse_args. - Add and test the ability to change the device with Gtk2::Gdk::Event::Motion::device, Gtk2::Gdk::Event::Button::device, Gtk2::Gdk::Event::Scroll::device, and Gtk2::Gdk::Event::Proximity::device. - Gtk2::Gdk::Pixmap::lookup, lookup_for_display, foreign_new, and foreign_new_for_display. - Gtk2::TreeSelection::get_user_data. - Gtk2::Gdk::Keymap::get_entries_for_keyval and get_entries_for_keycode. * Rework GdkKeymap handling to allow the methods to be called properly. [Torsten] * Allow easy access to the data of a SimpleList row when given a path. [Nathan Kurz] Overview of Changes in Gtk2 1.042 ================================= * Documentation fixes and improvements. [muppet, Torsten, Jason Stirling] * Fix silly bugs in examples. [Thierry Vignaud] * Hush nastygrams from test suite. [muppet] Overview of Changes in 1.041 ============================ * SimpleList bugfixes; store, pop, shift, unshift, and splice now return the proper values. [Ross] * Fix incorrect code in examples. [muppet] * Doc updates. [Torsten, Ross] * Don't overwrite the Gtk2.pm docs with a Gtk2.pod. Unfortunately, those upgrading from source or CPAN will need to remove the stray Gtk2.pod from the perl library manually in order to get the correct docs from perldoc; the manpage should upgrade fine. [Torsten] * Test suite updates and fixes. [Torsten, Ross] * Fix miscellaneous issues. [Thierry Vignaud, Cory Omand, muppet, Ross] Overview of Changes in 1.040 ============================ Since 1.02x (the previous stable series) ---------------------------------------- * Updated requirements: - Glib >= 1.040 - ExtUtils::Depends >= 0.2 (required only at build time) - ExtUtils::PkgConfig >= 1.03 (require only at build time) * Add support for new objects and API in gtk+-2.4.0. * Derivation of Gtk2::CellRenderer has been reworked; it's much more sane now, but we retain backward compatibility with the 1.02x code. * It is now possible to implement GInterfaces in Perl code, so you can now implement your own Gtk2::TreeModels and Gtk2::CellEditables. Examples are included. * The SPLICE operation is now supported on Gtk2::SimpleList's tied data. * New, standardized versioning API and documentation. * Documentation enhancements all around. * Huge test suite expansion and amazing increase in API coverage. * New utility module Gtk2::TestHelper wraps up some of the boilerplate involved in testing Gtk2-based modules. Since 1.0391 ------------ * Test fixes. [Torsten] * Use INT2PTR to quell cast warnings. [muppet] * Documentation updates. [all] * Hide private symbols from ABI. [muppet] * Add examples/dialog.pl [Ross] * Assorted bits of code cleanup. [muppet] Overview of Changes in 1.0391 ============================= * Disavow the existence of gtk+ 2.3.x, bump all version checks to 2.4. [muppet] * Add, document, and test Gtk2::GET_VERSION_INFO; rename Gtk2::Pango::get_version_info to Gtk2::Pango::GET_VERSION_INFO. [muppet] * New example, improved examples, improved commentary. [Ross, muppet] * Documentation improvements. * Allow embedded \0s in property strings. [Torsten] * Test suite stuff. * Portability fixes, and update the exports file for win32. [muppet] Overview of Changes in Gtk2 1.039 ================================= * Update Glib requirement to 1.039, remove the unstable nastygram, and generally prep things for a stable series. [muppet] * Track upstream API changes for the GtkFileChooser. [muppet] * Miscellaneous documentation improvements. [muppet, Torsten, Ross] * Allow undef for the text parameter of Gtk2::ProgressBar::set_text. [Torsten] * Un-break Gtk2::Gdk::Pixbuf::get_pixels. [muppet] * New example, color_snooper.pl * More tests. Overview of Changes in Gtk2 1.038 ================================= * Despite the warning from Makefile.PL, this release marks an API freeze. * Code sweep removed many FIXMEs and fixed lots of problems, and uncovered a large handful of missing trivial functions. * Cleanup on examples. [Ross] * New bindings, with tests, for things new in gtk+ in the latest unstable release, and for things we found at the last minute while auditing the code [mostly Torsten]: Gtk2::ComboBoxEntry::new_text (new in 2.3.5) Gtk2::Entry::[gs]et_alignment Gtk2::FileChooser::[gs]et_use_preview_label (new in gtk+ 2.3.5) Gtk2::FileChooser::new_with_backend (new in gtk+ 2.3.5) Gtk2::Gdk::Event::handler_set Gtk2::Gdk::Event::set_state (and added setter capability to state()) Gtk2::Gdk::Event::set_time (and added setter capability to time()) Gtk2::MenuItem::toggle_size_allocate Gtk2::MenuItem::toggle_size_request Gtk2::Pango::Layout::[sg]et_auto_dir (new in pango 1.3.5) Gtk2::Rc::reset_styles Gtk2::TreeModel::ref_node Gtk2::TreeModel::unref_node Gtk2::TreeViewColumn::cell_get_size Gtk2::TreeViewColumn::cell_set_cell_data Gtk2::Widget::add_mnemonic_label Gtk2::Widget::can_activate_accel (new in gtk+ 2.3.5) Gtk2::Widget::child_focus Gtk2::Widget::drag_source_[sg]et_target_list Gtk2::Widget::list_mnemonic_labels Gtk2::Widget::region_intersect Gtk2::Widget::remove_mnemonic_label Gtk2::Widget::requisition Gtk2::Widget::saved_state Gtk2::Widget::size_allocate Gtk2::Window::activate_key Gtk2::Window::propagate_key_event Gtk2::draw_insertion_cursor Gtk2::main_do_event Removed API: Gtk2::FileChooser::[gs]et_folder_mode (removed from gtk+ in 2.3.5) Gtk2::Allocations have been replaced by Gtk2::Gdk::Rectangles; they were just reblessed rectangles anyway. * Test fixes. [muppet, Torsten, Ross] * Random pod updates all over the place. [muppet] * Gtk2::CellRenderer now hides "this api is deprecated!" warnings unless env var GTK2PERL_DEBUG is set and true. [muppet] * Finally fixed Gtk2::Gdk::DragContext::find_window and friends. [muppet] * New regression test for custom TreeModel interface implementations. There are several TODO tests that fail, as a reminder to muppet to fix them properly. [Torsten] * Build GdkX11.xs (and the associated Gtk2::Gdk::X11 namespace) only when linking against the x11 gtk+ target. [muppet] * Numerous bugfixes. It was a busy weekend. Some features important for deriving containers in Perl code have been punted for the 1.060 API freeze. Overview of Changes in Gtk2 1.037 ================================= * Updated Glib requirement to 1.037. * Decided on a versioning scheme, implemented it, and applied it. http://lists.gnome.org/archives/gtk-perl-list/2004-February/msg00085.html New functions: Gtk2->CHECK_VERSION, Gtk2::MAJOR_VERSION, Gtk2::MINOR_VERSION, Gtk2::MICRO_VERSION, Gtk2::major_version, Gtk2::minor_version, Gtk2::micro_version. Change Gtk2::Pango::check_version to Gtk2::Pango::CHECK_VERSION. [Ross, muppet] * New functions, tracking HEAD: Gtk2::FileChooserDialog::new_with_backend. Gtk2::RadioMenuItem::new_from_widget Gtk2::RadioMenuItem::new_with_mnemonic_from_widget Gtk2::RadioMenuItem::new_with_label_from_widget * Added to parse_maps the ability to generate error domain registrations; use that for Gtk2's own error domains. [muppet] * Use a weakref rather than object data to keep Tooltips objects alive. [muppet, implementing yosh's suggestion] * Pod fixes and enhancements. [Ross] * Fix up the license notifications in source files. [Torsten] * Minor bugfixes, corrections, and cleanups. [Torsten, Ross, muppet, Marc Brockschmidt] * As always, more tests. [Torsten] Overview of Changes in Gtk2 1.036 ================================= * Fix GdkDisplay test. [Torsten] * Don't crash when when passing an empty list to Gtk2::TargetList. [Torsten] * Register error domains for use with the new Glib::Error stuff. [muppet] * Doc fixes. [Ross] * Bind and test missing methods: Gtk2::Gdk::Event::send_client_message Gtk2::Gdk::Event::send_clientmessage_toall Gtk2::Gdk::Event::send_client_message_for_display Gtk2::Gdk::Event::Client::message_type Gtk2::Gdk::Event::Client::data Gtk2::Gdk::CHARS Gtk2::Gdk::USHORTS Gtk2::Gdk::ULONGS Gtk2::CellRenderer::editing_canceled Gtk2::Scale::get_layout Gtk2::Scale::get_layout_offsets [Torsten] * Miscellaneous test updates and fixes. [Torsten] Overview of Changes in Gtk2 1.035 ================================= * Updated Glib requirement to 1.035. * Updated ExtUtils::Depends requirement to 0.200. * Added and updated POD in several places. [muppet] * Added few more straggling missing bindings. [Torsten] * Minor updates to example code. [Torsten] * As always, added more tests. [Tortsen] Overview of Changes in Gtk2 1.034 ================================= * Updated Glib requirement to 1.034. * Updated ExtUtils::PkgConfig requirement to 1.03. * Even yet still more tests, examples, and bugfixes. * Improved (corrected?) handling of Gtk2::CellRenderer derivation; based on a more generic method for handling vfuncs as inheritable ALL_CAPS methods. Includes backward compatibility, plenty of documentation, and updated examples. [muppet] * Allow perl implementations of the Gtk2::CellEditable and Gtk2::TreeModel interfaces; two new examples included. Huge thanks to Bjarne Steinsbo. [muppet] * Per-entry callback data in SimpleMenu. [Ross] * Add versioning macros for Pango. [Torsten] * Implement startup-time version checking. [Ross] * Add skip_all option to Gtk2::TestHelper. [Ross] Overview of Changes in Gtk2 1.033 ================================= * Lots of new regresion tests, and exsting tests are more thorough * apidoc POD updates. * GdkCursor's type member now accessable. * GdkKeys incorrect mapping fixed, unreg'd subclass warnings quelled. * SimpleList now supports a column type markup, for pango marked-up text * x/y event members are now available where they should be, GdkEvent doc improved. corrected some invalid function -> package mappings. * missing/TODO functions implemented in GdkDrawable * Bug fix related to colormaps fixed in GdkGC Overview of Changes in Gtk2 1.031 ================================= * Updated Glib requirement to 1.031. * Added binding support for objects and functions new in gtk+-2.3.x. Not all tests are complete. Updated gtk-demo and examples to use the new stuff if available. This code will be protected by 2.4.0 version guards when gtk+-2.4.0 is finally released. Note: The unstable-2-3-x-branch in CVS is now dead. [muppet] * New example in gtk-demo (ported from C) shows how to make hyperlinks in a TextView. [muppet, from gtk+] * Converted all of the Gtk2::Gdk::Event accessors into combination accessors and mutators. [Ross] * Provide a fallback implementation of Gtk2::Gdk::Event::new when linking against gtk+-2.0.x, so we can always create events (needed for synthesizing events in tests). [muppet] * Even yet still more tests. [Torsten] * Don't copy colors when accessing Style members; this makes it possible to change the colors in a style. [Torsten] * Various little bugfixes, memory leak plugs, ornulls, doc updates, build enhancements, etc. Overview of Changes from Gtk2 1.02x to 1.030 ============================================ * All of the fixes on the 1.02x branch have been made here as well, including the 64-bit cleanliness stuff, the MessageDialog utf8 fix, and the SimpleList base issue that broke upgrades from really old gtk2-perl. * Torsten has competely redone the test suite, more than doubling its size. Exhaustive is a good word. Added Gtk2::TestHelper, which automates several tedious jobs for testing things based on Gtk2. * Lots of general clean up. Many small bugfixes (add ornull here, fix a broken call signature there, fix uninitialized variables all over the place, etc). Adjust ALIASed xsubs to remove invalid methods from the perl namespace. Never allow NULL to be passed to SvOK(). * New examples: how to use Perl threads and Gtk2 together safely; how to colorize rows in a SimpleList; how to add your own stock items; how to use inline XPM images. * Add support for GdkRegions. Improved support for GtkRcStyles. * Added lots of other esoteric functions. Our api coverage is creeping up. * Move the implementation of the ItemFactory stuff from Perl to XS, and in the process fixed the bug that kept accelerators from showing up properly. * Extended handling of GdkGeometry. In addition to the method accessors, you can create the geom as a hash; the bindings will calculate the valid mask for you. * Implement custom marshaller for the rows-reordered signal, making it usable. (Patch from Roderich Schupp) * Completed the implementation of SPLICE on SimpleList's TiedList class. Gtk2-1.2498/perl-Gtk2.doap000644 001750 000024 00000001622 11664366546 016161 0ustar00bdmanningstaff000000 000000 Gtk2 Perl bindings for gtk+ 2.x muppet sarringt Torsten Schönfeld tsch Gtk2-1.2498/perl-Gtk2.spec.in000644 001750 000024 00000005502 11664366546 016576 0ustar00bdmanningstaff000000 000000 Summary: Gtk2 Perl module Name: perl-Gtk2 Version: @VERSION@ Release: 1 Packager: gtk-perl-list@gnome.org License: LGPL Group: Development/Libraries URL: http://search.cpan.org/dist/Gtk2/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: perl >= 2:5.8.0 BuildRequires: gtk2-devel >= @GTK@ BuildRequires: perl-ExtUtils-Depends >= @PERL_EXTUTILS_DEPENDS@ BuildRequires: perl-ExtUtils-PkgConfig >= @PERL_EXTUTILS_PKGCONFIG@ BuildRequires: perl-Glib >= @PERL_GLIB@ Requires: gtk2 >= %(pkg-config --modversion gtk+-2.0) Requires: perl-Glib >= @PERL_GLIB@ Requires: %(perl -MConfig -le 'if (defined $Config{useithreads}) { print "perl(:WITH_ITHREADS)" } else { print "perl(:WITHOUT_ITHREADS)" }') Requires: %(perl -MConfig -le 'if (defined $Config{usethreads}) { print "perl(:WITH_THREADS)" } else { print "perl(:WITHOUT_THREADS)" }') Requires: %(perl -MConfig -le 'if (defined $Config{uselargefiles}) { print "perl(:WITH_LARGEFILES)" } else { print "perl(:WITHOUT_LARGEFILES)" }') Source0: @SOURCE@ %description Perl bindings to the 2.x series of the Gtk+ widget set. This module allows you to write graphical user interfaces in a perlish and object-oriented way, freeing you from the casting and memory management in C, yet remaining very close in spirit to original API. %prep %setup -q -n Gtk2-%{version} %build CFLAGS="$RPM_OPT_FLAGS" perl Makefile.PL PREFIX=$RPM_BUILD_ROOT%{_prefix} make OPTIMIZE="$RPM_OPT_FLAGS" make test %install %makeinstall install-examples install-gtk-demo [ -x /usr/lib/rpm/brp-compress ] && /usr/lib/rpm/brp-compress find $RPM_BUILD_ROOT \( -name perllocal.pod -o -name .packlist \) -exec rm -v {} \; find $RPM_BUILD_ROOT/usr -type f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" | \ grep -v perllocal.pod | \ grep -v "\.packlist" > %{name}-%{version}-filelist if [ "$(cat %{name}-%{version}-filelist)X" = "X" ] ; then exit -1 fi %clean rm -rf $RPM_BUILD_ROOT %files -f %{name}-%{version}-filelist %defattr(-,root,root) %changelog * @DATE@ gtk-perl-list@gnome.org - @VERSION@ - Specfile autogenerated. # Copyright (C) 2003 by the gtk2-perl team (see the file AUTHORS for the full # list) # # This library is free software; you can redistribute it and/or modify it under # the terms of the GNU Library General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # # This library is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for # more details. # # You should have received a copy of the GNU Library General Public License # along with this library; if not, write to the Free Software Foundation, Inc., # 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA. Gtk2-1.2498/README000644 001750 000024 00000006173 12075175647 014430 0ustar00bdmanningstaff000000 000000 Gtk2 ==== Perl bindings to the 2.x series of the Gtk+ graphical user interface library. This module allows you to write graphical user interfaces in a Perlish and object-oriented way, freeing you from the casting and memory management in C, yet remaining very close in spirit to original API. Find out more about Gtk+ at http://www.gtk.org. The GTK+ Reference Manual [ http://developer.gnome.org/doc/API/2.0/gtk/ ] is also a handy companion when writing Gtk programs in any language. The Perl bindings follow the C API very closely, and the C reference should be considered the canonical documentation. Be sure to check out the example programs in the "examples" and "gtk-demo" directories. To discuss gtk2-perl, ask questions and flame/praise the authors, join gtk-perl-list@gnome.org at lists.gnome.org. Also have a look at the gtk2-perl website and sourceforge project page, http://gtk2-perl.sourceforge.net INSTALLATION ------------ To install this module type the following: perl Makefile.PL make make test make install To avoid installing to a system directory, since this is a beta release, you can change the installation prefix at Makefile.PL time with perl Makefile.PL PREFIX=/some/other/place This will install the module to the subdirectory lib/perl5 under the given prefix. If this is not already in perl's include path, you'll need to tell perl how to get to this library directory so you can use it; there are three ways: in your environment (the easiest): # assuming a bourne-style shell PERL5LIB=/some/other/place/lib/perl5/site_perl export PERL5LIB on the perl command line: perl -I /some/other/place/lib/perl5/site_perl yourscript in the code of your perl script: use lib '/some/other/place/lib/perl5/site_perl'; DEPENDENCIES ------------ This module requires these other modules and libraries: perl >= 5.8.0 Glib >= 1.280 (Perl module) Pango >= 1.220 (Perl module) GTK+ > 2.x (C library) If GTK+ is as new or newer as 2.8, the Cairo module is also required: Cairo >= 1.00 (Perl module) In order to build it from source, you'll also need ExtUtils::Depends >= 0.300 ExtUtils::PkgConfig >= 1.030 BUG REPORTS ----------- Please report bugs to the gnome-perl product in GNOME's Bugzilla: COPYRIGHT AND LICENSE --------------------- Copyright (C) 2003-2012 by the gtk2-perl team (see the file AUTHORS for the full list) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA. # $Id$ Gtk2-1.2498/t/000755 001750 000024 00000000000 12651227143 013771 5ustar00bdmanningstaff000000 000000 Gtk2-1.2498/TODO000644 001750 000024 00000001037 11664366546 014235 0ustar00bdmanningstaff000000 000000 $Id$ give a better name to the entry point for gtk-demo make gtk-demo not show the 2.2 stuff when running on 2.0 should example programs be installed? there are plenty of unbound apis, either because of lack of interest or lack of need -- these should be audited. no typemap (and therefore no bindings) for GdkRgbCmap GScanner <- i'd consider this to be internal PangoEngineShape PangoCoverage PangoLayoutLine what about decorated window stuff? foreach callbacks (and possibly other types) need some doc on the callback api/params. Gtk2-1.2498/tools/000755 001750 000024 00000000000 12651227143 014666 5ustar00bdmanningstaff000000 000000 Gtk2-1.2498/xs/000755 001750 000024 00000000000 12651227143 014160 5ustar00bdmanningstaff000000 000000 Gtk2-1.2498/xs_files-2.0000644 001750 000024 00000006167 11664366546 015612 0ustar00bdmanningstaff000000 000000 # these are only the files that implement things that existed in the # 2.0.x series of gtk+. files implementing types introduced in later # versions of gtk+ should not be listed here. # one filename per line, whitespace and comments are ignored. # Atk stuff -- commented out for now; scream if you need them. # xs/AtkAction.xs # xs/AtkComponent.xs # xs/AtkDocument.xs # xs/AtkEditableText.xs # xs/AtkHyperlink.xs # xs/AtkHypertext.xs # xs/AtkImage.xs # xs/AtkImplementor.xs # xs/AtkObject.xs # xs/AtkSelection.xs # xs/AtkStreamableContent.xs # xs/AtkTable.xs # xs/AtkText.xs # xs/AtkValue.xs # Gdk stuff xs/Gdk.xs xs/GdkColor.xs xs/GdkCursor.xs xs/GdkDnd.xs xs/GdkDrawable.xs xs/GdkEvent.xs xs/GdkGC.xs xs/GdkImage.xs xs/GdkInput.xs xs/GdkKeys.xs xs/GdkPixbuf.xs xs/GdkPixbufLoader.xs xs/GdkPixmap.xs xs/GdkProperty.xs xs/GdkRegion.xs xs/GdkRgb.xs xs/GdkSelection.xs xs/GdkTypes.xs xs/GdkVisual.xs xs/GdkWindow.xs #xs/GdkX11.xs is only built when using the X11 backend # Gtk+ proper xs/Gtk2.xs xs/GtkAccelGroup.xs xs/GtkAccelLabel.xs xs/GtkAccelMap.xs xs/GtkAdjustment.xs xs/GtkAlignment.xs xs/GtkArrow.xs xs/GtkAspectFrame.xs xs/GtkBin.xs xs/GtkBindings.xs xs/GtkBox.xs xs/GtkButton.xs xs/GtkButtonBox.xs xs/GtkCalendar.xs xs/GtkCellEditable.xs xs/GtkCellRenderer.xs xs/GtkCellRendererPixbuf.xs xs/GtkCellRendererText.xs xs/GtkCellRendererToggle.xs xs/GtkCheckButton.xs xs/GtkCheckMenuItem.xs xs/GtkColorSelection.xs xs/GtkColorSelectionDialog.xs xs/GtkCombo.xs xs/GtkContainer.xs xs/GtkCurve.xs xs/GtkDialog.xs xs/GtkDnd.xs xs/GtkDrawingArea.xs xs/GtkEditable.xs xs/GtkEntry.xs xs/GtkEventBox.xs xs/GtkFileSelection.xs xs/GtkFixed.xs xs/GtkFontSelection.xs xs/GtkFrame.xs xs/GtkGC.xs xs/GtkGammaCurve.xs xs/GtkHBox.xs xs/GtkHButtonBox.xs xs/GtkHPaned.xs xs/GtkHRuler.xs xs/GtkHScale.xs xs/GtkHScrollbar.xs xs/GtkHSeparator.xs xs/GtkHandleBox.xs xs/GtkIconFactory.xs xs/GtkImage.xs xs/GtkImageMenuItem.xs xs/GtkIMContext.xs xs/GtkIMContextSimple.xs xs/GtkIMMulticontext.xs xs/GtkInputDialog.xs xs/GtkInvisible.xs xs/GtkItem.xs xs/GtkItemFactory.xs xs/GtkLabel.xs xs/GtkLayout.xs xs/GtkList.xs xs/GtkListItem.xs xs/GtkListStore.xs xs/GtkMenu.xs xs/GtkMenuBar.xs xs/GtkMenuItem.xs xs/GtkMenuShell.xs xs/GtkMessageDialog.xs xs/GtkMisc.xs xs/GtkNotebook.xs xs/GtkObject.xs xs/GtkOptionMenu.xs xs/GtkPaned.xs xs/GtkPlug.xs xs/GtkProgressBar.xs xs/GtkRadioButton.xs xs/GtkRadioMenuItem.xs xs/GtkRange.xs xs/GtkRc.xs xs/GtkRuler.xs xs/GtkScale.xs xs/GtkScrolledWindow.xs xs/GtkSelection.xs xs/GtkSeparatorMenuItem.xs xs/GtkSizeGroup.xs xs/GtkSocket.xs xs/GtkSpinButton.xs xs/GtkStatusbar.xs xs/GtkStock.xs xs/GtkStyle.xs xs/GtkTable.xs xs/GtkTearoffMenuItem.xs xs/GtkTextChildAnchor.xs xs/GtkTextBuffer.xs xs/GtkTextIter.xs xs/GtkTextMark.xs xs/GtkTextTag.xs xs/GtkTextTagTable.xs xs/GtkTextView.xs xs/GtkToggleButton.xs xs/GtkToolbar.xs xs/GtkTooltips.xs xs/GtkTreeDnd.xs xs/GtkTreeModel.xs xs/GtkTreeModelSort.xs xs/GtkTreeSelection.xs xs/GtkTreeSortable.xs xs/GtkTreeStore.xs xs/GtkTreeView.xs xs/GtkTreeViewColumn.xs xs/GtkVBox.xs xs/GtkVButtonBox.xs xs/GtkVPaned.xs xs/GtkVRuler.xs xs/GtkVScale.xs xs/GtkVScrollbar.xs xs/GtkVSeparator.xs xs/GtkViewport.xs xs/GtkWidget.xs xs/GtkWindow.xs Gtk2-1.2498/xs_files-2.10000644 001750 000024 00000000657 11664366546 015671 0ustar00bdmanningstaff000000 000000 xs/GtkAssistant.xs xs/GtkCellRendererAccel.xs xs/GtkCellRendererSpin.xs xs/GtkLinkButton.xs xs/GtkPageSetup.xs xs/GtkPaperSize.xs xs/GtkPrintContext.xs xs/GtkPrintOperation.xs xs/GtkPrintOperationPreview.xs xs/GtkPrintSettings.xs xs/GtkRecentChooser.xs xs/GtkRecentChooserDialog.xs xs/GtkRecentChooserMenu.xs xs/GtkRecentChooserWidget.xs xs/GtkRecentFilter.xs xs/GtkRecentManager.xs xs/GtkStatusIcon.xs xs/GtkTextBufferRichText.xs Gtk2-1.2498/xs_files-2.12000644 001750 000024 00000000166 11664366546 015666 0ustar00bdmanningstaff000000 000000 xs/GtkBuildable.xs xs/GtkBuilder.xs xs/GtkRecentAction.xs xs/GtkScaleButton.xs xs/GtkTooltip.xs xs/GtkVolumeButton.xs Gtk2-1.2498/xs_files-2.14000644 001750 000024 00000000056 11664366546 015666 0ustar00bdmanningstaff000000 000000 xs/GtkHSV.xs xs/GtkShow.xs xs/GtkToolShell.xs Gtk2-1.2498/xs_files-2.16000644 001750 000024 00000000051 11664366546 015663 0ustar00bdmanningstaff000000 000000 xs/GtkActivatable.xs xs/GtkOrientable.xs Gtk2-1.2498/xs_files-2.18000644 001750 000024 00000000046 11664366546 015671 0ustar00bdmanningstaff000000 000000 xs/GtkInfoBar.xs xs/GtkEntryBuffer.xs Gtk2-1.2498/xs_files-2.2000644 001750 000024 00000000317 11664366546 015603 0ustar00bdmanningstaff000000 000000 # these xs files implement types that were introduced in gtk+ 2.2.0. # one filename per line, whitespace and comments are ignored. xs/GdkDisplay.xs xs/GdkDisplayManager.xs xs/GdkScreen.xs xs/GtkClipboard.xs Gtk2-1.2498/xs_files-2.20000644 001750 000024 00000000163 11664366546 015662 0ustar00bdmanningstaff000000 000000 xs/GtkCellRendererSpinner.xs xs/GtkOffscreenWindow.xs xs/GtkSpinner.xs xs/GtkToolItemGroup.xs xs/GtkToolPalette.xs Gtk2-1.2498/xs_files-2.4000644 001750 000024 00000000763 11664366546 015612 0ustar00bdmanningstaff000000 000000 xs/GtkAction.xs xs/GtkActionGroup.xs xs/GtkCellLayout.xs xs/GtkColorButton.xs xs/GtkComboBox.xs xs/GtkComboBoxEntry.xs xs/GtkEntryCompletion.xs xs/GtkExpander.xs xs/GtkFileChooser.xs xs/GtkFileChooserDialog.xs xs/GtkFileChooserWidget.xs xs/GtkFileFilter.xs xs/GtkFontButton.xs xs/GtkIconTheme.xs xs/GtkRadioAction.xs xs/GtkRadioToolButton.xs xs/GtkSeparatorToolItem.xs xs/GtkToggleAction.xs xs/GtkToggleToolButton.xs xs/GtkToolButton.xs xs/GtkToolItem.xs xs/GtkTreeModelFilter.xs xs/GtkUIManager.xs Gtk2-1.2498/xs_files-2.6000644 001750 000024 00000000264 11664366546 015610 0ustar00bdmanningstaff000000 000000 xs/GdkPango.xs xs/GtkAboutDialog.xs xs/GtkCellRendererCombo.xs xs/GtkCellRendererProgress.xs xs/GtkCellView.xs xs/GtkFileChooserButton.xs xs/GtkIconView.xs xs/GtkMenuToolButton.xs Gtk2-1.2498/xs_files-2.8000644 001750 000024 00000000051 11664366546 015604 0ustar00bdmanningstaff000000 000000 xs/GdkCairo.xs xs/GdkPixbufSimpleAnim.xs Gtk2-1.2498/xt/000755 001750 000024 00000000000 12651227142 014160 5ustar00bdmanningstaff000000 000000 Gtk2-1.2498/xt/GdkDnd.t000644 001750 000024 00000007247 12435270264 015515 0ustar00bdmanningstaff000000 000000 #!/usr/bin/perl -w use strict; use Gtk2::TestHelper tests => 26; # $Id$ my $window = Gtk2::Window -> new(); $window -> realize(); $window -> show_now; ############################################################################### my $context = Gtk2::Gdk::DragContext -> new(); isa_ok($context, "Gtk2::Gdk::DragContext"); my @targets = (Gtk2::Gdk::Atom -> new("target-string"), Gtk2::Gdk::Atom -> new("target-bitmap")); $context = Gtk2::Gdk::DragContext -> begin($window -> window(), @targets); isa_ok($context, "Gtk2::Gdk::DragContext"); my ($destination, $protocol); SKIP: { skip("GdkScreen is new in 2.2", 2) unless Gtk2 -> CHECK_VERSION(2, 2, 0); ($destination, $protocol) = $context -> find_window_for_screen($window -> window(), Gtk2::Gdk::Screen -> get_default(), 0, 0); ok(not defined $destination or ref $destination eq "Gtk2::Gdk::Window"); ok(not defined $destination or $protocol); } $context -> abort(0); ############################################################################### $context = Gtk2::Gdk::DragContext -> begin($window -> window(), @targets); isa_ok($context, "Gtk2::Gdk::DragContext"); ok($context -> protocol()); is($context -> is_source(), 1); is($context -> source_window(), $window -> window()); is_deeply([map { $_ -> name() } $context -> targets()], [map { $_ -> name() } @targets]); isa_ok(($context -> targets())[0], "Gtk2::Gdk::Atom"); ($destination, $protocol) = $context -> find_window($window -> window(), 0, 0); ok(not defined $destination or ref $destination eq "Gtk2::Gdk::Window"); ok(not defined $destination or $protocol); SKIP: { skip "find_window returned no destination window, skipping the tests that need one", 9 unless defined $destination; # FIXME: what about the return value? $context -> motion($destination, $protocol, 100, 100, [qw(copy)], [qw(copy move)], 0); ok($context -> actions() == [qw(copy move)]); ok($context -> suggested_action() == qw(copy)); is($context -> start_time(), 0); SKIP: { skip "can't do x11 stuff on this platform", 2 if $^O eq 'MSWin32'; is_deeply([Gtk2::Gdk::DragContext -> get_protocol($destination -> get_xid())], [$destination -> get_xid(), $protocol]); skip("get_protocol_for_display is new in 2.2", 1) unless Gtk2->CHECK_VERSION (2, 2, 0); is_deeply([Gtk2::Gdk::DragContext -> get_protocol_for_display(Gtk2::Gdk::Display -> get_default(), $destination -> get_xid())], [$destination -> get_xid(), $protocol]); } is($context -> dest_window(), $destination); my $selection = $context -> get_selection(); SKIP: { skip "selection test: get_selection returned undef", 1 unless defined $selection; isa_ok($selection, "Gtk2::Gdk::Atom"); } $context -> status(qw(move), 0); ok($context -> action() == qw(move)); $context -> status([], 0); $context -> drop_reply(1, 0); $context -> drop_finish(1, 0); SKIP: { skip "new 2.6 stuff", 1 unless Gtk2 -> CHECK_VERSION(2, 6, 0); like($context -> drag_drop_succeeded(), qr/^(?:1|)$/); } $context -> drop(0); $context -> abort(0); } SKIP: { skip 'new 2.22 stuff', 5 unless Gtk2->CHECK_VERSION(2, 22, 0); my $context = Gtk2::Gdk::DragContext -> begin($window -> window(), @targets); ok(defined $context -> get_actions()); ok(defined $context -> get_selected_action()); ok(defined $context -> get_suggested_action()); is($context -> get_source_window(), $window -> window()); is_deeply([map { $_ -> name() } $context -> list_targets()], [map { $_ -> name() } @targets]); } __END__ Copyright (C) 2003 by the gtk2-perl team (see the file AUTHORS for the full list). See LICENSE for more information. Gtk2-1.2498/xt/GtkDnd.t000644 001750 000024 00000007254 12435270264 015533 0ustar00bdmanningstaff000000 000000 #!/usr/bin/perl -w use strict; use Gtk2::TestHelper tests => 6; # $Id$ my $button = Gtk2::Button -> new("Bla"); my $window = Gtk2::Window -> new(); $window -> add($button); $window -> realize(); $button -> realize(); # Dest ######################################################################## $button -> drag_dest_set("all", "copy", { target => "BITMAP", info => 23 }, { target => "STRING", flags => ["same-app", "same-widget"], info => 42 } ); my $list = $button -> drag_dest_get_target_list(); $button -> drag_dest_set_target_list(undef); $button -> drag_dest_set_target_list($list); is($list -> find(Gtk2::Gdk -> TARGET_BITMAP), 23); is($list -> find(Gtk2::Gdk -> TARGET_STRING), 42); my $pixbuf = Gtk2::Gdk::Pixbuf -> new("rgb", 0, 8, 10, 10); my $event = Gtk2::Gdk::Event -> new("button-press"); my $context = Gtk2::Drag -> begin($button, $list, "default", 1, $event); SKIP: { skip "context test", 1 unless defined $context; isa_ok($context, "Gtk2::Gdk::DragContext"); } $context = $button -> drag_begin($list, "default", 1, $event); SKIP: { skip "context test", 1 unless defined $context; isa_ok($context, "Gtk2::Gdk::DragContext"); } if (defined($context)) { # warn $button -> drag_dest_find_target($context, $list); # $context -> finish(1, 0, 0); # $button -> drag_get_data($context, Gtk2::Gdk -> TARGET_STRING, 0); # warn $context -> get_source_widget(); $context -> set_icon_widget($window, 5, 5); my $pixmap = Gtk2::Gdk::Pixmap->new ($window->window, 16, 16, -1); $context -> set_icon_pixmap($pixmap->get_colormap, $pixmap, undef, 5, 5); my $mask = Gtk2::Gdk::Pixmap->new ($window->window, 16, 16, 1); $context -> set_icon_pixmap($pixmap->get_colormap, $pixmap, $mask, 5, 5); $context -> set_icon_pixbuf($pixbuf, 5, 5); $context -> set_icon_stock("gtk-add", 5, 5); $context -> set_icon_default(); SKIP: { skip "new 2.8 stuff", 0 unless Gtk2 -> CHECK_VERSION(2, 8, 0); $context -> set_icon_name("gtk-add", 5, 5); } } is($button -> drag_check_threshold(5, 5, 100, 100), 1); $button -> drag_highlight(); $button -> drag_unhighlight(); $button -> drag_dest_set_proxy($window -> window(), "xdnd", 0); SKIP: { skip("2.6 stuff", 0) unless Gtk2 -> CHECK_VERSION(2, 6, 0); $button -> drag_dest_add_text_targets(); $button -> drag_dest_add_image_targets(); $button -> drag_dest_add_uri_targets(); } SKIP: { skip("2.10 stuff", 1) unless Gtk2 -> CHECK_VERSION(2, 10, 0); $button -> drag_dest_set_track_motion(FALSE); ok(!$button -> drag_dest_get_track_motion()); } $button -> drag_dest_unset(); # Source ###################################################################### $button -> drag_source_set("shift-mask", "copy", { target => "BITMAP", info => 23 }, { target => "STRING", flags => ["same-app", "same-widget"], info => 42 } ); # $button -> drag_source_set_icon(...); $button -> drag_source_set_icon_pixbuf($pixbuf); $button -> drag_source_set_icon_stock("gtk-quit"); SKIP: { skip("drag_source_[sg]et_target_list is new in 2.4", 0) unless Gtk2->CHECK_VERSION (2, 4, 0); $list = $button -> drag_source_get_target_list(); $button -> drag_source_set_target_list(undef); $button -> drag_source_set_target_list($list); } SKIP: { skip("2.6 stuff", 0) unless Gtk2 -> CHECK_VERSION(2, 6, 0); $button -> drag_source_add_text_targets(); $button -> drag_source_add_image_targets(); $button -> drag_source_add_uri_targets(); } SKIP: { skip("2.8 stuff", 0) unless Gtk2 -> CHECK_VERSION(2, 8, 0); $button -> drag_source_set_icon_name("gtk-ok"); } $button -> drag_source_unset(); __END__ Copyright (C) 2003-2006 by the gtk2-perl team (see the file AUTHORS for the full list). See LICENSE for more information. Gtk2-1.2498/xt/GtkSocket-GtkPlug.t000644 001750 000024 00000003634 12435270264 017627 0ustar00bdmanningstaff000000 000000 #!/usr/bin/perl # # $Id$ # # ...despite patches that have been around for a long time, no win32 use Gtk2::TestHelper tests => 12, nowin32 => 1; SKIP: { skip "blib can't be found", 6 unless -d "blib"; ok( my $win = Gtk2::Window->new ); ok( my $socket = Gtk2::Socket->new ); $win->add($socket); ok( my $id = $socket->get_id ); SKIP: { skip 'new 2.14 stuff', 2 unless Gtk2->CHECK_VERSION(2, 14, 0); is( $socket->get_plug_window, undef ); $socket->signal_connect (plug_added => sub { isa_ok( $socket->get_plug_window, 'Gtk2::Gdk::Window' ); }); } my $pid = fork; skip 'fork failed', 2 unless defined $pid && $pid >= 0; if( $pid == 0 ) { exec("$^X -Mblib -e 'my \$id = $id;\n\n" . <init; my \$plug = Gtk2::Plug->new($id); my \$btn = Gtk2::Button->new("gtk-quit"); \$btn->signal_connect("clicked" => sub { Gtk2->main_quit; 1; }); \$plug->add(\$btn); \$plug->show_all; Glib::Idle->add(sub { \$btn->clicked; 0; }); Gtk2->main;' EOL exit 0; } else { $socket->signal_connect('plug-removed' => sub { Gtk2->main_quit; 1; }); $win->show_all; Gtk2->main; ok( waitpid($pid, 0) ); } } # Standalone GtkPlug tests. SKIP: { my $id = 23; my $display = Gtk2::Gdk::Display->get_default; # Backwards compatibility tests my $plug = Gtk2::Plug->new($id); isa_ok( $plug, 'Gtk2::Plug' ); $plug->construct($id); $plug->construct_for_display($display, $id); ok( defined $plug->get_id ); skip 'new 2.14 stuff', 2 unless Gtk2->CHECK_VERSION(2, 14, 0); is( $plug->get_embedded, FALSE ); is( $plug->get_socket_window, undef ); } # Backwards compatibility tests. { my $id = 23; my $display = Gtk2::Gdk::Display->get_default; isa_ok( Gtk2::Plug::new_for_display($display, $id), 'Gtk2::Plug' ); isa_ok( Gtk2::Plug->new_for_display($display, $id), 'Gtk2::Plug' ); } __END__ Copyright (C) 2003 by the gtk2-perl team (see the file AUTHORS for the full list). See LICENSE for more information. Gtk2-1.2498/xs/Gdk.xs000644 001750 000024 00000016217 11664366546 015266 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" MODULE = Gtk2::Gdk PACKAGE = Gtk2::Gdk PREFIX = gdk_ ## void gdk_init (gint *argc, gchar ***argv) gboolean gdk_init (class=NULL) ALIAS: Gtk2::Gdk::init_check = 1 PREINIT: GPerlArgv *pargv; CODE: pargv = gperl_argv_new (); if (ix == 1) { RETVAL = gdk_init_check (&pargv->argc, &pargv->argv); } else { gdk_init (&pargv->argc, &pargv->argv); /* gdk_init() either succeeds or does not return. */ RETVAL = TRUE; } gperl_argv_update (pargv); gperl_argv_free (pargv); OUTPUT: RETVAL #if GTK_CHECK_VERSION(2,2,0) ## void gdk_parse_args (gint *argc, gchar ***argv) void gdk_parse_args (class=NULL) PREINIT: GPerlArgv *pargv; CODE: pargv = gperl_argv_new (); gdk_parse_args (&pargv->argc, &pargv->argv); gperl_argv_update (pargv); gperl_argv_free (pargv); const gchar * gdk_get_display_arg_name (class) C_ARGS: /* void */ #endif /* >= 2.2.0 */ ### deprecated ## gchar* gdk_set_locale (void) gchar* gdk_set_locale (class) C_ARGS: /* void */ ## allow NULL to remove the property void gdk_set_sm_client_id (class, sm_client_id=NULL) const gchar_ornull * sm_client_id C_ARGS: sm_client_id #if GTK_CHECK_VERSION(2,2,0) ## void gdk_notify_startup_complete (void) void gdk_notify_startup_complete (class) C_ARGS: /* void */ #endif /* 2.2.0 */ #if GTK_CHECK_VERSION(2, 12, 0) void gdk_notify_startup_complete_with_id (class, const gchar* startup_id) C_ARGS: startup_id #endif const char * gdk_get_program_class (class) C_ARGS: /* void */ void gdk_set_program_class (class, program_class) const char *program_class C_ARGS: program_class ## gchar* gdk_get_display (void) gchar * gdk_get_display (class) C_ARGS: /* void */ CLEANUP: /* in versions later than 2.2.0, this string is malloc'd. */ if (NULL == gtk_check_version (2, 2, 0)) g_free (RETVAL); ## void gdk_flush (void) void gdk_flush (class) C_ARGS: /* void */ gint screen_width (class) ALIAS: Gtk2::Gdk::screen_height = 1 Gtk2::Gdk::screen_width_mm = 2 Gtk2::Gdk::screen_height_mm = 3 CODE: switch (ix) { case 0: RETVAL = gdk_screen_width (); break; case 1: RETVAL = gdk_screen_height (); break; case 2: RETVAL = gdk_screen_width_mm (); break; case 3: RETVAL = gdk_screen_height_mm (); break; default: RETVAL = 0; g_assert_not_reached (); } OUTPUT: RETVAL ## GdkGrabStatus gdk_pointer_grab (GdkWindow *window, gboolean owner_events, GdkEventMask event_mask, GdkWindow *confine_to, GdkCursor *cursor, guint32 time_) GdkGrabStatus gdk_pointer_grab (class, window, owner_events, event_mask, confine_to, cursor, time_) GdkWindow * window gboolean owner_events GdkEventMask event_mask GdkWindow_ornull * confine_to GdkCursor_ornull * cursor guint32 time_ C_ARGS: window, owner_events, event_mask, confine_to, cursor, time_ ## void gdk_pointer_ungrab (guint32 time_) void gdk_pointer_ungrab (class, time_) guint32 time_ C_ARGS: time_ ## gboolean gdk_pointer_is_grabbed (void) gboolean gdk_pointer_is_grabbed (class) C_ARGS: /* void */ ## GdkGrabStatus gdk_keyboard_grab (GdkWindow *window, gboolean owner_events, guint32 time_) GdkGrabStatus gdk_keyboard_grab (class, window, owner_events, time_) GdkWindow *window gboolean owner_events guint32 time_ C_ARGS: window, owner_events, time_ ## void gdk_keyboard_ungrab (guint32 time_) void gdk_keyboard_ungrab (class, time_) guint32 time_ C_ARGS: time_ ## void gdk_beep (void) void gdk_beep (class) C_ARGS: /* void */ ### deprecated ## gboolean gdk_get_use_xshm (void) ## void gdk_set_use_xshm (gboolean use_xshm) ## void gdk_error_trap_push (void) void gdk_error_trap_push (class) C_ARGS: /* void */ ## gint gdk_error_trap_pop (void) gint gdk_error_trap_pop (class) C_ARGS: /* void */ ### deprecated in favor of Glib::IO::add_watch etc ## gint gdk_input_add_full (gint source, GdkInputCondition condition, GdkInputFunction function, gpointer data, GdkDestroyNotify destroy) ## gint gdk_input_add (gint source, GdkInputCondition condition, GdkInputFunction function, gpointer data) ## void gdk_input_remove (gint tag) ### applications should not set this. ## void gdk_set_double_click_time (guint msec) MODULE = Gtk2::Gdk PACKAGE = Gtk2::Gdk::Rectangle PREFIX = gdk_rectangle_ ## gboolean gdk_rectangle_intersect (GdkRectangle *src1, GdkRectangle *src2, GdkRectangle *dest) GdkRectangle_copy * gdk_rectangle_intersect (src1, src2) GdkRectangle *src1 GdkRectangle *src2 PREINIT: GdkRectangle dest; CODE: if (!gdk_rectangle_intersect (src1, src2, &dest)) XSRETURN_UNDEF; RETVAL = &dest; OUTPUT: RETVAL ## void gdk_rectangle_union (GdkRectangle *src1, GdkRectangle *src2, GdkRectangle *dest) GdkRectangle_copy * gdk_rectangle_union (src1, src2) GdkRectangle *src1 GdkRectangle *src2 PREINIT: GdkRectangle dest; CODE: gdk_rectangle_union (src1, src2, &dest); RETVAL = &dest; OUTPUT: RETVAL MODULE = Gtk2::Gdk PACKAGE = Gtk2::Gdk PREFIX = gdk_ ### not bound, in favor of native perl support for unicode and utf8. ## gchar *gdk_wcstombs (const GdkWChar *src) ## gint gdk_mbstowcs (GdkWChar *dest, const gchar *src, gint dest_max) MODULE = Gtk2::Gdk PACKAGE = Gtk2::Gdk::Event PREFIX = gdk_event_ ## gboolean gdk_event_send_client_message (GdkEvent *event, GdkNativeWindow winid) gboolean gdk_event_send_client_message (class, event, winid) GdkEvent *event GdkNativeWindow winid C_ARGS: event, winid ## void gdk_event_send_clientmessage_toall (GdkEvent *event) void gdk_event_send_clientmessage_toall (class, event) GdkEvent *event C_ARGS: event #if GTK_CHECK_VERSION (2, 2, 0) ## gboolean gdk_event_send_client_message_for_display (GdkDisplay *display, GdkEvent *event, GdkNativeWindow winid) gboolean gdk_event_send_client_message_for_display (class, display, event, winid) GdkDisplay *display GdkEvent *event GdkNativeWindow winid C_ARGS: display, event, winid #endif MODULE = Gtk2::Gdk PACKAGE = Gtk2::Gdk::Threads PREFIX = gdk_threads_ ### void gdk_threads_enter (void) ### void gdk_threads_leave (void) ### void gdk_threads_init (void) void gdk_threads_init (class) ALIAS: enter = 1 leave = 2 CODE: switch (ix) { case 0: gdk_threads_init (); break; case 1: gdk_threads_enter (); break; case 2: gdk_threads_leave (); break; default: g_assert_not_reached (); } Gtk2-1.2498/xs/GdkCairo.xs000644 001750 000024 00000010377 11664366546 016245 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2005, 2011 by the gtk2-perl team (see the file AUTHORS) * * Licensed under the LGPL, see LICENSE file for more information. * * $Id$ */ #include "gtk2perl.h" #include MODULE = Gtk2::Gdk::Cairo PACKAGE = Gtk2::Gdk::Cairo::Context PREFIX = gdk_cairo_ =for position SYNOPSIS =head1 HIERARCHY Cairo::Context +---- Gtk2::Gdk::Cairo::Context (Perl subclass) =head1 DESCRIPTION This is some inter-operation between Cairo (see L) and Gdk things. A C lets Cairo draw on a Gdk drawable (window or pixmap). It's a Perl-level subclass of C and the various functions below can be used as methods on it. The methods can also be used on other C as plain functions. For example C can setup to draw from a C to any Cairo context, my $cr = Cairo::Context->create ($surface); Gtk2::Gdk::Cairo::Context::set_source_pixbuf ($cr, $pixbuf, $x,$y); $cr->paint; =cut BOOT: gperl_set_isa ("Gtk2::Gdk::Cairo::Context", "Cairo::Context"); # cairo_t *gdk_cairo_create (GdkDrawable *drawable); =for signature gdkcr = Gtk2::Gdk::Cairo::Context->create ($drawable) =cut SV * gdk_cairo_create (class, GdkDrawable *drawable) PREINIT: cairo_t *cr; CODE: /* We own cr. */ cr = gdk_cairo_create (drawable); RETVAL = newSV (0); sv_setref_pv (RETVAL, "Gtk2::Gdk::Cairo::Context", (void *) cr); OUTPUT: RETVAL =for signature $gdkcr->set_source_color ($color) =for signature Gtk2::Gdk::Cairo::Context::set_source_color ($anycr, $color) =cut void gdk_cairo_set_source_color (cairo_t *cr, GdkColor *color); =for signature $gdkcr->set_source_pixbuf ($pixbuf, $pixbuf_x, $pixbuf_y) =for signature Gtk2::Gdk::Cairo::Context::set_source_pixbuf ($anycr, $pixbuf, $pixbuf_x, $pixbuf_y) =cut void gdk_cairo_set_source_pixbuf (cairo_t *cr, GdkPixbuf *pixbuf, double pixbuf_x, double pixbuf_y); # void gdk_cairo_rectangle (cairo_t *cr, GdkRectangle *rectangle); =for apidoc =for signature $gdkcr->rectangle ($rectangle) =for signature $gdkcr->rectangle ($x, $y, $width, $height) =for signature Gtk2::Gdk::Cairo::Context::rectangle ($anycr, $rectangle) =for arg rectangle (Gtk2::Gdk::Rectangle) =for arg cr (__hide__) =for arg ... (__hide__) The 4-argument x,y,width,height is the base L style. This extends to also take a C. =cut void gdk_cairo_rectangle (cairo_t *cr, ...) CODE: if (items == 2) { GdkRectangle *rect = SvGdkRectangle (ST (1)); gdk_cairo_rectangle (cr, rect); } else if (items == 5) { double x = SvNV (ST(1)); double y = SvNV (ST(2)); double width = SvNV (ST(3)); double height = SvNV (ST(4)); cairo_rectangle (cr, x, y, width, height); } else { croak ("Usage: Gtk2::Gdk::Cairo::Context::rectangle (cr, rectangle)"); } =for signature $gdkcr->region ($region) =for signature Gtk2::Gdk::Cairo::Context::region ($anycr, $region) =cut void gdk_cairo_region (cairo_t *cr, GdkRegion *region); #if GTK_CHECK_VERSION (2, 10, 0) =for signature $gdkcr->set_source_pixmap ($pixmap, $pixmap_x, $pixmap_y) =for signature Gtk2::Gdk::Cairo::Context::set_source_pixmap ($anycr, $pixmap, $pixmap_x, $pixmap_y) =cut void gdk_cairo_set_source_pixmap (cairo_t *cr, GdkPixmap *pixmap, double pixmap_x, double pixmap_y); #endif #if GTK_CHECK_VERSION (2, 18, 0) =for signature $gdkcr->reset_clip ($drawable) =for signature Gtk2::Gdk::Cairo::Context::reset_clip ($anycr, $drawable) =cut void gdk_cairo_reset_clip (cairo_t *cr, GdkDrawable *drawable); #endif # ---------------------------------------------------------------------------- # #if GTK_CHECK_VERSION (2, 10, 0) MODULE = Gtk2::Gdk::Cairo PACKAGE = Gtk2::Gdk::Screen PREFIX = gdk_screen_ const cairo_font_options_t_ornull* gdk_screen_get_font_options (GdkScreen *screen); void gdk_screen_set_font_options (GdkScreen *screen, const cairo_font_options_t_ornull *options); #endif # ---------------------------------------------------------------------------- # MODULE = Gtk2::Gdk::Cairo PACKAGE = Gtk2::Gdk::Window PREFIX = gdk_window_ #if GTK_CHECK_VERSION (2, 22, 0) cairo_surface_t * gdk_window_create_similar_surface (GdkWindow *window, cairo_content_t content, int width, int height); cairo_pattern_t * gdk_window_get_background_pattern (GdkWindow *window); #endif Gtk2-1.2498/xs/GdkColor.xs000644 001750 000024 00000017135 11664366546 016265 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" /* GdkColormap is a direct GObject subclass; be sure to use GdkColormap_noinc in the proper places. GdkColor is a plain structure treated as a boxed type. use GdkColor_own and GdkColor_copy in all the right places. */ MODULE = Gtk2::Gdk::Color PACKAGE = Gtk2::Gdk::Colormap PREFIX = gdk_colormap_ =for position DESCRIPTION =head1 DESCRIPTION Colormaps are used to store the mappings between the RGB values you ask for and the actual, hardware-dependent values used to display those colors. The C<< $colormap->alloc_color >> and C<< $colormap->alloc_colors >> methods do the necessary work to allocate a color within the visual; this actually has nothing to do with memory management, so it is important that you call C<< $colormap->free_colors >> to release those spots in the colormap allocated by C and C. =cut ## GdkColormap* gdk_colormap_new (GdkVisual *visual, gboolean allocate) GdkColormap_noinc* gdk_colormap_new (class, visual, allocate) GdkVisual *visual gboolean allocate C_ARGS: visual, allocate ## deprecated ## GdkColormap* gdk_colormap_ref (GdkColormap *cmap) ## deprecated ## void gdk_colormap_unref (GdkColormap *cmap) ## GdkColormap* gdk_colormap_get_system (void) GdkColormap* gdk_colormap_get_system (class) C_ARGS: /* void */ ## deprecated ## gint gdk_colormap_get_system_size (void) ## gint gdk_colormap_alloc_colors (GdkColormap *colormap, GdkColor *colors, gint ncolors, gboolean writeable, gboolean best_match, gboolean *success) ## success becomes an array of TRUE or FALSE corresponding to each input ## color, telling whether each one was successfully allocated. the return ## value is the number that were NOT allocated. =for apidoc =for arg ... of Gtk2::Gdk::Color's to be allocated Returns a list of boolean values, telling whether the color at the corresponding spot in I<...> could be allocated. =cut void gdk_colormap_alloc_colors (colormap, writeable, best_match, ...) GdkColormap *colormap gboolean writeable gboolean best_match PREINIT: gint ncolors, i; GdkColor *colors = NULL; GdkColor **argcolors = NULL; /* so we can modify the ones passed in */ gboolean *success = NULL; PPCODE: #define first 3 ncolors = items - first; if (ncolors < 1) XSRETURN_EMPTY; colors = g_new0 (GdkColor, ncolors); argcolors = g_new0 (GdkColor*, ncolors); success = g_new0 (gboolean, ncolors); for (i = 0 ; i < ncolors ; i++) { argcolors[i] = SvGdkColor (ST (first + i)); colors[i] = *(argcolors[i]); } gdk_colormap_alloc_colors (colormap, colors, ncolors, writeable, best_match, success); EXTEND (SP, ncolors); for (i = 0 ; i < ncolors ; i++) { *(argcolors[i]) = colors[i]; PUSHs (sv_2mortal (newSViv (success[i]))); } g_free (argcolors); g_free (colors); g_free (success); #undef first ## gboolean gdk_colormap_alloc_color (GdkColormap *colormap, GdkColor *color, gboolean writeable, gboolean best_match) gboolean gdk_colormap_alloc_color (colormap, color, writeable, best_match) GdkColormap *colormap GdkColor *color gboolean writeable gboolean best_match # this deallocates colors in the colormap, as allocated by alloc_color(s) # above; it has nothing to do with memory management. we do need this. ## void gdk_colormap_free_colors (GdkColormap *colormap, GdkColor *colors, gint ncolors) =for apidoc =for arg ... of Gtk2::Gdk::Color's to be freed =cut void gdk_colormap_free_colors (colormap, ...) GdkColormap *colormap PREINIT: GdkColor *colors; gint ncolors, i; CODE: #define first 1 ncolors = items - first; if (ncolors < 1) XSRETURN_EMPTY; colors = g_new (GdkColor, ncolors); for (i = 0; i < ncolors ; i++) { GdkColor * c = (GdkColor*) SvGdkColor (ST (i + first)); colors[i] = *c; } gdk_colormap_free_colors (colormap, colors, ncolors); g_free (colors); #undef first ## void gdk_colormap_query_color (GdkColormap *colormap, gulong pixel, GdkColor *result) GdkColor_copy * gdk_colormap_query_color (colormap, pixel) GdkColormap *colormap gulong pixel PREINIT: GdkColor result; CODE: gdk_colormap_query_color (colormap, pixel, &result); RETVAL = &result; OUTPUT: RETVAL ## GdkVisual* gdk_colormap_get_visual (GdkColormap *colormap) GdkVisual * gdk_colormap_get_visual (colormap) GdkColormap *colormap #if GTK_CHECK_VERSION(2,2,0) ## GdkScreen* gdk_colormap_get_screen (GdkColormap *cmap) GdkScreen * gdk_colormap_get_screen (cmap) GdkColormap *cmap #endif MODULE = Gtk2::Gdk::Color PACKAGE = Gtk2::Gdk::Color PREFIX = gdk_color_ =for position DESCRIPTION =head1 DESCRIPTION Gdk's colors are 16-bit RGB values -- that is, the red, green, and blue components are integer values from 0 to 65535, with 65535 meaning full saturation. If you are used to dealing with colors on the range of 0 to 255, just scale those numbers by a factor of 257 (yes, 257!). =cut GdkColor_own * gdk_color_new (class, red, green, blue, pixel=0) guint16 red guint16 green guint16 blue guint32 pixel PREINIT: GdkColor c; CODE: c.red = red; c.green = green; c.blue = blue; c.pixel = pixel; RETVAL = gdk_color_copy (&c); OUTPUT: RETVAL # unnecessary, taken care of by the GBoxed::DESTROY method ## void gdk_color_free (GdkColor *color) # can return undef if the color isn't properly parsed ## gint gdk_color_parse (const gchar *spec, GdkColor *color) GdkColor_own * gdk_color_parse (class, spec) const gchar *spec PREINIT: GdkColor c = {0, 0, 0, 0}; /* initializers to hush valgrind */ CODE: RETVAL = gdk_color_copy (&c); if (!gdk_color_parse (spec, RETVAL)) { gdk_color_free (RETVAL); XSRETURN_UNDEF; } OUTPUT: RETVAL ## guint gdk_color_hash (const GdkColor *colora) guint gdk_color_hash (colora) GdkColor *colora ## gboolean gdk_color_equal (const GdkColor *colora, const GdkColor *colorb) gboolean gdk_color_equal (colora, colorb) GdkColor *colora GdkColor *colorb ## deprecated ## gint gdk_color_white (GdkColormap *colormap, GdkColor *color) ## deprecated ## gint gdk_color_black (GdkColormap *colormap, GdkColor *color) ## deprecated ## gint gdk_color_alloc (GdkColormap *colormap, GdkColor *color) ## deprecated ## gint gdk_color_change (GdkColormap *colormap, GdkColor *color) ## deprecated ## void gdk_colors_free (GdkColormap *colormap, gulong *pixels, gint npixels, gulong planes) ## accessors for struct members guint32 gdk_color_pixel (color) GdkColor *color CODE: RETVAL = color->pixel; OUTPUT: RETVAL guint16 gdk_color_red (color) GdkColor *color CODE: RETVAL = color->red; OUTPUT: RETVAL guint16 gdk_color_green (color) GdkColor *color CODE: RETVAL = color->green; OUTPUT: RETVAL guint16 gdk_color_blue (color) GdkColor *color CODE: RETVAL = color->blue; OUTPUT: RETVAL #if GTK_CHECK_VERSION (2, 12, 0) gchar_own * gdk_color_to_string (const GdkColor *color); #endif Gtk2-1.2498/xs/GdkCursor.xs000644 001750 000024 00000006217 11664366546 016463 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003-2005, 2010 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" MODULE = Gtk2::Gdk::Cursor PACKAGE = Gtk2::Gdk::Cursor PREFIX = gdk_cursor_ =for position DESCRIPTION =head1 DESCRIPTION For reference, cursors are a per-display resource and can only be used with the display they were created on. As of Gtk 2.22 a cursor doesn't keep a reference to its C and if the display object is destroyed before the cursor then a later destroy of the cursor may get a segv. Perl-Gtk2 doesn't try to do anything about this. Care may be needed if keeping a cursor separate from a widget or window. (Closing the display is fine, but not destroying it.) =cut GdkCursorType gdk_cursor_type (cursor) GdkCursor *cursor CODE: RETVAL = cursor->type; OUTPUT: RETVAL #if GTK_CHECK_VERSION(2,2,0) ## GdkCursor* gdk_cursor_new_for_display (GdkDisplay *display, GdkCursorType cursor_type) GdkCursor_own* gdk_cursor_new_for_display (class, display, cursor_type) GdkDisplay *display GdkCursorType cursor_type C_ARGS: display, cursor_type ## GdkDisplay* gdk_cursor_get_display (GdkCursor *cursor) GdkDisplay* gdk_cursor_get_display (cursor) GdkCursor *cursor #endif ## GdkCursor* gdk_cursor_new (GdkCursorType cursor_type) GdkCursor_own* gdk_cursor_new (class, cursor_type) GdkCursorType cursor_type C_ARGS: cursor_type ## GdkCursor* gdk_cursor_new_from_pixmap (GdkPixmap *source, GdkPixmap *mask, GdkColor *fg, GdkColor *bg, gint x, gint y) GdkCursor_own* gdk_cursor_new_from_pixmap (class, source, mask, fg, bg, x, y) GdkPixmap *source GdkPixmap *mask GdkColor *fg GdkColor *bg gint x gint y C_ARGS: source, mask, fg, bg, x, y #if GTK_CHECK_VERSION(2, 4, 0) ## GdkCursor * gdk_cursor_new_from_pixbuf (GdkDisplay *display, GdkPixbuf *pixbuf, gint x, gint y) GdkCursor_own * gdk_cursor_new_from_pixbuf (class, display, pixbuf, x, y) GdkDisplay *display GdkPixbuf *pixbuf gint x gint y C_ARGS: display, pixbuf, x, y #endif #if GTK_CHECK_VERSION (2, 8, 0) ## GdkCursor* gdk_cursor_new_from_name (GdkDisplay *display, const gchar *name); GdkCursor_own* gdk_cursor_new_from_name (class, display, name) GdkDisplay *display const gchar *name C_ARGS: display, name GdkPixbuf_noinc* gdk_cursor_get_image (GdkCursor *cursor); #endif #if GTK_CHECK_VERSION (2, 22, 0) GdkCursorType gdk_cursor_get_cursor_type (GdkCursor *cursor); #endif /* 2.22 */ Gtk2-1.2498/xs/GdkDisplay.xs000644 001750 000024 00000015366 12460715110 016574 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003-2005 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" MODULE = Gtk2::Gdk::Display PACKAGE = Gtk2::Gdk::Display PREFIX = gdk_display_ BOOT: /* the various gdk backends will provide private subclasses of * GdkDisplay; we shouldn't complain about them. */ gperl_object_set_no_warn_unreg_subclass (GDK_TYPE_DISPLAY, TRUE); ## gint (*get_n_screens) (GdkDisplay *display) ## void (*closed) (GdkDisplay *display, gboolean is_error) ## GdkDisplay *gdk_display_open (const gchar *display_name) GdkDisplay_ornull * gdk_display_open (class, const gchar_ornull * display_name) C_ARGS: display_name const gchar * gdk_display_get_name (GdkDisplay * display) gint gdk_display_get_n_screens (GdkDisplay *display) GdkScreen * gdk_display_get_screen (GdkDisplay *display, gint screen_num) GdkScreen * gdk_display_get_default_screen (GdkDisplay *display) void gdk_display_pointer_ungrab (GdkDisplay *display, guint32 time_) void gdk_display_keyboard_ungrab (GdkDisplay *display, guint32 time_) gboolean gdk_display_pointer_is_grabbed (GdkDisplay *display) void gdk_display_beep (GdkDisplay *display) void gdk_display_sync (GdkDisplay *display) void gdk_display_close (GdkDisplay *display) ## GList * gdk_display_list_devices (GdkDisplay *display) =forapi Returns a list of Gtk2::Gdk::Devices =cut void gdk_display_list_devices (display) GdkDisplay *display PREINIT: GList * devices, * i; PPCODE: devices = gdk_display_list_devices (display); for (i = devices ; i != NULL ; i = i->next) XPUSHs (sv_2mortal (newSVGdkDevice (i->data))); GdkEvent* gdk_display_get_event (GdkDisplay *display) GdkEvent* gdk_display_peek_event (GdkDisplay *display) void gdk_display_put_event (GdkDisplay *display, GdkEvent *event) # FIXME ### void gdk_display_add_client_message_filter (GdkDisplay *display, GdkAtom message_type, GdkFilterFunc func, gpointer data) #void #gdk_display_add_client_message_filter (display, message_type, func, data) # GdkDisplay *display # GdkAtom message_type # GdkFilterFunc func # gpointer data void gdk_display_set_double_click_time (GdkDisplay *display, guint msec) #if GTK_CHECK_VERSION(2, 4, 0) void gdk_display_set_double_click_distance (GdkDisplay *display, guint distance) #endif ## GdkDisplay *gdk_display_get_default (void) GdkDisplay_ornull * gdk_display_get_default (class) C_ARGS: /*void*/ ## GdkDevice *gdk_display_get_core_pointer (GdkDisplay *display) GdkDevice * gdk_display_get_core_pointer (display) GdkDisplay *display ## void gdk_display_get_pointer (GdkDisplay *display, GdkScreen **screen, gint *x, gint *y, GdkModifierType *mask) void gdk_display_get_pointer (GdkDisplay *display) PREINIT: GdkScreen *screen = NULL; gint x; gint y; GdkModifierType mask; PPCODE: gdk_display_get_pointer (display, &screen, &x, &y, &mask); EXTEND (SP, 4); PUSHs (sv_2mortal (newSVGdkScreen (screen))); PUSHs (sv_2mortal (newSViv (x))); PUSHs (sv_2mortal (newSViv (y))); PUSHs (sv_2mortal (newSVGdkModifierType (mask))); ## GdkWindow * gdk_display_get_window_at_pointer (GdkDisplay *display, gint *win_x, gint *win_y) ###GdkWindow * gdk_display_get_window_at_pointer (GdkDisplay *display, OUTLIST gint win_x, OUTLIST gint win_y) =for apidoc =for signature (window, win_x, win_y) = $display->get_window_at_pointer ($display) =cut void gdk_display_get_window_at_pointer (GdkDisplay *display) PREINIT: GdkWindow * window; gint win_x = 0, win_y = 0; PPCODE: window = gdk_display_get_window_at_pointer (display, &win_x, &win_y); if (!window) XSRETURN_EMPTY; EXTEND (SP, 3); PUSHs (sv_2mortal (newSVGdkWindow (window))); PUSHs (sv_2mortal (newSViv (win_x))); PUSHs (sv_2mortal (newSViv (win_y))); # API reference says this shouldn't be used by apps, and is only useful for # event recorders. would a perl event recorder be usable? ## GdkDisplayPointerHooks *gdk_display_set_pointer_hooks (GdkDisplay *display, const GdkDisplayPointerHooks *new_hooks) # not documented ## GdkDisplay *gdk_display_open_default_libgtk_only (void) #if GTK_CHECK_VERSION(2, 4, 0) gboolean gdk_display_supports_cursor_alpha (GdkDisplay * display) gboolean gdk_display_supports_cursor_color (GdkDisplay * display) guint gdk_display_get_default_cursor_size (GdkDisplay * display) ## void gdk_display_get_maximal_cursor_size (GdkDisplay *display, guint *width, guint *height) void gdk_display_get_maximal_cursor_size (GdkDisplay *display, OUTLIST guint width, OUTLIST guint height) void gdk_display_flush (GdkDisplay *display) GdkWindow *gdk_display_get_default_group (GdkDisplay *display) #endif #if GTK_CHECK_VERSION (2, 6, 0) gboolean gdk_display_supports_selection_notification (GdkDisplay *display); gboolean gdk_display_request_selection_notification (GdkDisplay *display, GdkAtom selection); gboolean gdk_display_supports_clipboard_persistence (GdkDisplay *display); ## void gdk_display_store_clipboard (GdkDisplay *display, GdkWindow *clipboard_window, guint32 time_, GdkAtom *targets, gint n_targets); =for apidoc =for arg ... of Gtk2::Gdk::Atom's =cut void gdk_display_store_clipboard (display, clipboard_window, time_, ...); GdkDisplay *display GdkWindow *clipboard_window guint32 time_ PREINIT: GdkAtom *targets = NULL; gint n_targets = 0; CODE: if (items > 3) { int i; n_targets = items - 3; targets = g_new0 (GdkAtom, n_targets); for (i = 3; i < items; i++) targets[i - 3] = SvGdkAtom (ST (i)); } gdk_display_store_clipboard (display, clipboard_window, time_, targets, n_targets); if (targets) g_free (targets); #endif #if GTK_CHECK_VERSION (2, 8, 0) void gdk_display_warp_pointer (GdkDisplay *display, GdkScreen *screen, gint x, gint y); #endif #if GTK_CHECK_VERSION (2, 10, 0) gboolean gdk_display_supports_shapes (GdkDisplay *display); gboolean gdk_display_supports_input_shapes (GdkDisplay *display); #endif #if GTK_CHECK_VERSION (2, 12, 0) gboolean gdk_display_supports_composite (GdkDisplay *display); #endif #if GTK_CHECK_VERSION (2, 22, 0) gboolean gdk_display_is_closed (GdkDisplay *display); #endif /* 2.22 */ Gtk2-1.2498/xs/GdkDisplayManager.xs000644 001750 000024 00000004275 11664366546 020110 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" MODULE = Gtk2::Gdk::DisplayManager PACKAGE = Gtk2::Gdk::DisplayManager PREFIX = gdk_display_manager_ #if GTK_CHECK_VERSION(2,2,0) ## void (*display_opened) (GdkDisplayManager *display_manager, GdkDisplay *display) ## ## GdkDisplayManager is a singleton object, so we must not attempt to ## unref it. ## ## GdkDisplayManager *gdk_display_manager_get (void) GdkDisplayManager * gdk_display_manager_get (class) C_ARGS: /*void*/ ## GdkDisplay * gdk_display_manager_get_default_display (GdkDisplayManager *display_manager) GdkDisplay * gdk_display_manager_get_default_display (display_manager) GdkDisplayManager *display_manager ## void gdk_display_manager_set_default_display (GdkDisplayManager *display_manager, GdkDisplay *display) void gdk_display_manager_set_default_display (display_manager, display) GdkDisplayManager *display_manager GdkDisplay *display ## GSList * gdk_display_manager_list_displays (GdkDisplayManager *display_manager) =for apidoc Returns a list of Gtk2::Gdk::Display's. =cut void gdk_display_manager_list_displays (display_manager) GdkDisplayManager *display_manager PREINIT: GSList * displays, * i; PPCODE: displays = gdk_display_manager_list_displays (display_manager); for (i = displays ; i != NULL ; i = i->next) XPUSHs (sv_2mortal (newSVGdkDisplay (i->data))); g_slist_free (displays); #endif /* >= 2.2.0 */ Gtk2-1.2498/xs/GdkDnd.xs000644 001750 000024 00000020460 11664366546 015707 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" MODULE = Gtk2::Gdk::Dnd PACKAGE = Gtk2::Gdk::DragContext PREFIX = gdk_drag_context_ SV * protocol (dc) GdkDragContext * dc ALIAS: Gtk2::Gdk::DragContext::is_source = 1 Gtk2::Gdk::DragContext::source_window = 2 Gtk2::Gdk::DragContext::dest_window = 3 Gtk2::Gdk::DragContext::actions = 5 Gtk2::Gdk::DragContext::suggested_action = 6 Gtk2::Gdk::DragContext::action = 7 Gtk2::Gdk::DragContext::start_time = 8 CODE: switch (ix) { case 0: RETVAL = newSVGdkDragProtocol (dc->protocol); break; case 1: RETVAL = newSViv (dc->is_source); break; case 2: RETVAL = newSVGdkWindow (dc->source_window); break; case 3: RETVAL = newSVGdkWindow (dc->dest_window); break; /* must use get_targets to access targets */ case 5: RETVAL = newSVGdkDragAction (dc->actions); break; case 6: RETVAL = newSVGdkDragAction (dc->suggested_action); break; case 7: RETVAL = newSVGdkDragAction (dc->action); break; case 8: RETVAL = newSVuv (dc->start_time); break; default: RETVAL = NULL; g_assert_not_reached (); } OUTPUT: RETVAL =for apidoc Returns a list of Gtk2::Gdk::Atom's, the targets. =cut void targets (dc) GdkDragContext * dc PREINIT: GList * i; PPCODE: for (i = dc->targets; i != NULL ; i = i->next) XPUSHs (sv_2mortal (newSVGdkAtom ((GdkAtom)i->data))); ## GdkDragContext * gdk_drag_context_new (void) GdkDragContext_noinc * gdk_drag_context_new (class) C_ARGS: /* void */ # deprecated ## void gdk_drag_context_ref (GdkDragContext *context) ## void gdk_drag_context_unref (GdkDragContext *context) #if GTK_CHECK_VERSION (2, 22, 0) GdkDragAction gdk_drag_context_get_actions (GdkDragContext *context); GdkDragAction gdk_drag_context_get_selected_action (GdkDragContext *context); GdkDragAction gdk_drag_context_get_suggested_action (GdkDragContext *context); # GList * gdk_drag_context_list_targets (GdkDragContext *context); void gdk_drag_context_list_targets (GdkDragContext *context) PREINIT: GList * i; PPCODE: for (i = gdk_drag_context_list_targets (context); i != NULL ; i = i->next) XPUSHs (sv_2mortal (newSVGdkAtom ((GdkAtom)i->data))); GdkWindow * gdk_drag_context_get_source_window (GdkDragContext *context); #endif /* 2.22 */ # --------------------------------------------------------------------------- # MODULE = Gtk2::Gdk::Dnd PACKAGE = Gtk2::Gdk::DragContext PREFIX = gdk_drag_ ## void gdk_drag_status (GdkDragContext *context, GdkDragAction action, guint32 time_) void gdk_drag_status (context, action, time_=GDK_CURRENT_TIME) GdkDragContext *context GdkDragAction action guint32 time_ ## GdkAtom gdk_drag_get_selection (GdkDragContext *context) GdkAtom gdk_drag_get_selection (context) GdkDragContext *context ## GdkDragContext * gdk_drag_begin (GdkWindow *window, GList *targets) =for apidoc =for arg ... of Gtk2::Gdk::Atom's =cut GdkDragContext_noinc * gdk_drag_begin (class, window, ...) GdkWindow *window PREINIT: GList *targets = NULL; int i; CODE: for (i = items - 1 ; i >= 2 ; i--) targets = g_list_prepend (targets, GUINT_TO_POINTER (SvGdkAtom (ST (i)))); /* the Gdk source code uses GUINT_TO_POINTER * when storing atoms in hashes. */ RETVAL = gdk_drag_begin (window, targets); OUTPUT: RETVAL CLEANUP: g_list_free (targets); #if GTK_CHECK_VERSION(2,2,0) ## guint32 gdk_drag_get_protocol_for_display (GdkDisplay *display, guint32 xid, GdkDragProtocol *protocol) =for apidoc =for signature (ret, protocol) = Gtk2::Gdk::DragContext->get_protocol_for_display ($display, $xid) =cut void gdk_drag_get_protocol_for_display (class, display, xid) GdkDisplay *display guint32 xid PREINIT: GdkDragProtocol protocol; guint32 ret; PPCODE: ret = gdk_drag_get_protocol_for_display (display, xid, &protocol); XPUSHs (sv_2mortal (newSVuv (ret))); XPUSHs (sv_2mortal (ret ? newSVGdkDragProtocol (protocol) : newSVsv (&PL_sv_undef))); ## void gdk_drag_find_window_for_screen (GdkDragContext *context, GdkWindow *drag_window, GdkScreen *screen, gint x_root, gint y_root, GdkWindow **dest_window, GdkDragProtocol *protocol) =for apidoc =for signature (dest_window, protocol) = $context->find_window_for_screen ($drag_window, $screen, $x_root, $y_root) =cut void gdk_drag_find_window_for_screen (context, drag_window, screen, x_root, y_root) GdkDragContext *context GdkWindow *drag_window GdkScreen *screen gint x_root gint y_root PREINIT: GdkWindow *dest_window = NULL; GdkDragProtocol protocol; PPCODE: gdk_drag_find_window_for_screen (context, drag_window, screen, x_root, y_root, &dest_window, &protocol); XPUSHs (sv_2mortal (newSVGdkWindow (dest_window))); XPUSHs (sv_2mortal ((dest_window ? newSVGdkDragProtocol (protocol) : newSVsv (&PL_sv_undef)))); #endif /* >= 2.2.0 */ ## guint32 gdk_drag_get_protocol (guint32 xid, GdkDragProtocol *protocol) =for apidoc =for signature (ret, protocol) = Gtk2::Gdk::DragContext->get_protocol ($xid) =cut void gdk_drag_get_protocol (class, xid) guint32 xid PREINIT: GdkDragProtocol protocol; guint32 ret; PPCODE: ret = gdk_drag_get_protocol (xid, &protocol); XPUSHs (sv_2mortal (newSVuv (ret))); XPUSHs (sv_2mortal (newSVGdkDragProtocol (protocol))); ## void gdk_drag_find_window (GdkDragContext *context, GdkWindow *drag_window, gint x_root, gint y_root, GdkWindow **dest_window, GdkDragProtocol *protocol) =for apidoc =for signature (dest_window, protocol) = $context->find_window ($drag_window, $x_root, $y_root) =cut void gdk_drag_find_window (context, drag_window, x_root, y_root) GdkDragContext *context GdkWindow *drag_window gint x_root gint y_root PREINIT: GdkWindow *dest_window; GdkDragProtocol protocol; PPCODE: gdk_drag_find_window (context, drag_window, x_root, y_root, &dest_window, &protocol); XPUSHs (sv_2mortal (newSVGdkWindow_ornull (dest_window))); XPUSHs (sv_2mortal (dest_window ? newSVGdkDragProtocol (protocol) : newSVsv (&PL_sv_undef))); ## gboolean gdk_drag_motion (GdkDragContext *context, GdkWindow *dest_window, GdkDragProtocol protocol, gint x_root, gint y_root, GdkDragAction suggested_action, GdkDragAction possible_actions, guint32 time_) gboolean gdk_drag_motion (context, dest_window, protocol, x_root, y_root, suggested_action, possible_actions, time_) GdkDragContext *context GdkWindow *dest_window GdkDragProtocol protocol gint x_root gint y_root GdkDragAction suggested_action GdkDragAction possible_actions guint32 time_ ## void gdk_drag_drop (GdkDragContext *context, guint32 time_) void gdk_drag_drop (context, time_) GdkDragContext *context guint32 time_ ## void gdk_drag_abort (GdkDragContext *context, guint32 time_) void gdk_drag_abort (context, time_) GdkDragContext *context guint32 time_ # --------------------------------------------------------------------------- # MODULE = Gtk2::Gdk::Dnd PACKAGE = Gtk2::Gdk::DragContext PREFIX = gdk_ ## void gdk_drop_reply (GdkDragContext *context, gboolean ok, guint32 time_) void gdk_drop_reply (context, ok, time_=GDK_CURRENT_TIME) GdkDragContext *context gboolean ok guint32 time_ ## void gdk_drop_finish (GdkDragContext *context, gboolean success, guint32 time_) void gdk_drop_finish (context, success, time_=GDK_CURRENT_TIME) GdkDragContext *context gboolean success guint32 time_ #if GTK_CHECK_VERSION (2, 6, 0) gboolean gdk_drag_drop_succeeded (GdkDragContext *context); #endif Gtk2-1.2498/xs/GdkDrawable.xs000644 001750 000024 00000024550 11664366546 016727 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003-2005, 2009, 2010 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" #ifndef G_LIKELY /* new in glib 2.2 */ #define G_LIKELY(cond) (cond) /* fallback */ #endif /* NOTE: GdkDrawable descends directly from GObject, so be sure to use GdkDrawable_noinc for functions that return brand-new objects! (i don't think there are any, but there are several functions in other modules returning GdkDrawable subclasses) */ MODULE = Gtk2::Gdk::Drawable PACKAGE = Gtk2::Gdk::Drawable PREFIX = gdk_drawable_ ## deprecated ## GdkDrawable* gdk_drawable_ref (GdkDrawable *drawable) ## deprecated ## void gdk_drawable_unref (GdkDrawable *drawable) ## deprecated ## gpointer gdk_drawable_get_data (GdkDrawable *drawable, const gchar *key) ## void gdk_drawable_get_size (GdkDrawable *drawable, gint *width, gint *height) void gdk_drawable_get_size (GdkDrawable *drawable, OUTLIST gint width, OUTLIST gint height) ## void gdk_drawable_set_colormap (GdkDrawable *drawable, GdkColormap *colormap) void gdk_drawable_set_colormap (drawable, colormap) GdkDrawable *drawable GdkColormap *colormap ## GdkColormap* gdk_drawable_get_colormap (GdkDrawable *drawable) GdkColormap_ornull * gdk_drawable_get_colormap (drawable) GdkDrawable *drawable ## GdkVisual* gdk_drawable_get_visual (GdkDrawable *drawable) GdkVisual* gdk_drawable_get_visual (drawable) GdkDrawable *drawable ## gint gdk_drawable_get_depth (GdkDrawable *drawable) gint gdk_drawable_get_depth (drawable) GdkDrawable *drawable #if GTK_CHECK_VERSION(2,2,0) ## GdkScreen* gdk_drawable_get_screen (GdkDrawable *drawable) GdkScreen* gdk_drawable_get_screen (drawable) GdkDrawable *drawable ## GdkDisplay* gdk_drawable_get_display (GdkDrawable *drawable) GdkDisplay* gdk_drawable_get_display (drawable) GdkDrawable *drawable #endif ## GdkRegion* gdk_drawable_get_clip_region (GdkDrawable *drawable) GdkRegion_own* gdk_drawable_get_clip_region (drawable) GdkDrawable *drawable ## GdkRegion* gdk_drawable_get_visible_region (GdkDrawable *drawable) GdkRegion_own* gdk_drawable_get_visible_region (drawable) GdkDrawable *drawable MODULE = Gtk2::Gdk::Drawable PACKAGE = Gtk2::Gdk::Drawable PREFIX = gdk_ ## void gdk_draw_line (GdkDrawable *drawable, GdkGC *gc, gint x1_, gint y1_, gint x2_, gint y2_) void gdk_draw_line (drawable, gc, x1_, y1_, x2_, y2_) GdkDrawable *drawable GdkGC *gc gint x1_ gint y1_ gint x2_ gint y2_ ## void gdk_draw_rectangle (GdkDrawable *drawable, GdkGC *gc, gboolean filled, gint x, gint y, gint width, gint height) void gdk_draw_rectangle (drawable, gc, filled, x, y, width, height) GdkDrawable *drawable GdkGC *gc gboolean filled gint x gint y gint width gint height ## void gdk_draw_arc (GdkDrawable *drawable, GdkGC *gc, gboolean filled, gint x, gint y, gint width, gint height, gint angle1, gint angle2) void gdk_draw_arc (drawable, gc, filled, x, y, width, height, angle1, angle2) GdkDrawable *drawable GdkGC *gc gboolean filled gint x gint y gint width gint height gint angle1 gint angle2 ## void gdk_draw_polygon (GdkDrawable *drawable, GdkGC *gc, gboolean filled, GdkPoint *points, gint npoints) =for apidoc =for arg x1 (integer) the x coordinate of the first point =for arg y1 (integer) the y coordinate of the first point =for arg ... pairs of x and y coordinates =cut void gdk_draw_polygon (drawable, gc, filled, x1, y1, ...) GdkDrawable *drawable GdkGC *gc gboolean filled PREINIT: GdkPoint * points; gint npoints; gint i, j; CODE: npoints = (items-3)/2; points = g_new (GdkPoint, npoints); for (i = 0, j = 3; i < npoints ; i++, j+=2) { points[i].x = SvIV (ST (j)); points[i].y = SvIV (ST (j+1)); } gdk_draw_polygon (drawable, gc, filled, points, npoints); g_free (points); ## void gdk_draw_drawable (GdkDrawable *drawable, GdkGC *gc, GdkDrawable *src, gint xsrc, gint ysrc, gint xdest, gint ydest, gint width, gint height) void gdk_draw_drawable (drawable, gc, src, xsrc, ysrc, xdest, ydest, width, height) GdkDrawable *drawable GdkGC *gc GdkDrawable *src gint xsrc gint ysrc gint xdest gint ydest gint width gint height ## void gdk_draw_image (GdkDrawable *drawable, GdkGC *gc, GdkImage *image, gint xsrc, gint ysrc, gint xdest, gint ydest, gint width, gint height) void gdk_draw_image (drawable, gc, image, xsrc, ysrc, xdest, ydest, width, height) GdkDrawable *drawable GdkGC *gc GdkImage *image gint xsrc gint ysrc gint xdest gint ydest gint width gint height ## void gdk_draw_point (GdkDrawable *drawable, GdkGC *gc, gint x, gint y) void gdk_draw_point (drawable, gc, x, y) GdkDrawable *drawable GdkGC *gc gint x gint y ## void gdk_draw_points (GdkDrawable *drawable, GdkGC *gc, GdkPoint *points, gint npoints) ## void gdk_draw_lines (GdkDrawable *drawable, GdkGC *gc, GdkPoint *points, gint npoints) =for apidoc Gtk2::Gdk::Drawable::draw_lines =for arg ... integer x,y coordinates (possibly none) For example $win->draw_lines ($gc, 0,0, 20,30, 40,20); =cut =for apidoc =for arg ... integer x,y coordinates (possibly none) For example three points $win->draw_points ($gc, 0,0, 10,10, 20,20); =cut void gdk_draw_points (drawable, gc, ...) GdkDrawable *drawable GdkGC *gc ALIAS: Gtk2::Gdk::Drawable::draw_lines = 1 PREINIT: GdkPoint * points; gint npoints; gint i, j; CODE: npoints = (items-2)/2; /* gdk_draw_points() and gdk_draw_lines() both accept npoints==0 but can skip entirely with a couple of bytes of code. */ if (G_LIKELY (npoints != 0)) { points = g_new (GdkPoint, npoints); for (i = 0, j = 2; i < npoints ; i++, j+=2) { points[i].x = SvIV (ST (j)); points[i].y = SvIV (ST (j+1)); } if (ix == 1) gdk_draw_lines (drawable, gc, points, npoints); else gdk_draw_points (drawable, gc, points, npoints); g_free (points); } #### void gdk_draw_segments (GdkDrawable *drawable, GdkGC *gc, GdkSegment *segs, gint nsegs) =for apidoc =for arg ... quads of x1,y1,x2,y2 coordinates For example to draw two diagonal line segments, $drawable->draw_segments($gc, 0,0,100,100, 200,200,300,300); =cut void gdk_draw_segments (drawable, gc, ...) GdkDrawable *drawable GdkGC *gc PREINIT: GdkSegment * segs; gint nsegs; gint i, j; CODE: nsegs = (items-2)/4; segs = g_new (GdkSegment, nsegs); for (i = 0, j = 2; i < nsegs ; i++, j+=4) { segs[i].x1 = SvIV (ST (j+0)); segs[i].y1 = SvIV (ST (j+1)); segs[i].x2 = SvIV (ST (j+2)); segs[i].y2 = SvIV (ST (j+3)); } gdk_draw_segments (drawable, gc, segs, nsegs); g_free (segs); #if GTK_CHECK_VERSION(2,2,0) ## void gdk_draw_pixbuf (GdkDrawable *drawable, GdkGC *gc, GdkPixbuf *pixbuf, gint src_x, gint src_y, gint dest_x, gint dest_y, gint width, gint height, GdkRgbDither dither, gint x_dither, gint y_dither) void gdk_draw_pixbuf (drawable, gc, pixbuf, src_x, src_y, dest_x, dest_y, width, height, dither, x_dither, y_dither) GdkDrawable *drawable GdkGC_ornull *gc GdkPixbuf *pixbuf gint src_x gint src_y gint dest_x gint dest_y gint width gint height GdkRgbDither dither gint x_dither gint y_dither #endif # FIXME need a way to retrieve a PangoGlyphString ## ## void gdk_draw_glyphs (GdkDrawable *drawable, GdkGC *gc, PangoFont *font, gint x, gint y, PangoGlyphString *glyphs) ##void ##gdk_draw_glyphs (drawable, gc, font, x, y, glyphs) ## GdkDrawable *drawable ## GdkGC *gc ## PangoFont *font ## gint x ## gint y ## PangoGlyphString *glyphs # FIXME: gdk_draw_glyphs_transformed ## void gdk_draw_layout_line (GdkDrawable *drawable, GdkGC *gc, gint x, gint y, PangoLayoutLine *line) void gdk_draw_layout_line (drawable, gc, x, y, line) GdkDrawable *drawable GdkGC *gc gint x gint y PangoLayoutLine *line ## void gdk_draw_layout (GdkDrawable *drawable, GdkGC *gc, gint x, gint y, PangoLayout *layout) void gdk_draw_layout (drawable, gc, x, y, layout) GdkDrawable *drawable GdkGC *gc gint x gint y PangoLayout *layout ## void gdk_draw_layout_line_with_colors (GdkDrawable *drawable, GdkGC *gc, gint x, gint y, PangoLayoutLine *line, GdkColor *foreground, GdkColor *background) void gdk_draw_layout_line_with_colors (drawable, gc, x, y, line, foreground, background) GdkDrawable *drawable GdkGC *gc gint x gint y PangoLayoutLine *line GdkColor_ornull *foreground GdkColor_ornull *background ## void gdk_draw_layout_with_colors (GdkDrawable *drawable, GdkGC *gc, gint x, gint y, PangoLayout *layout, GdkColor *foreground, GdkColor *background) void gdk_draw_layout_with_colors (drawable, gc, x, y, layout, foreground, background) GdkDrawable *drawable GdkGC *gc gint x gint y PangoLayout *layout GdkColor_ornull *foreground GdkColor_ornull *background ## The docs say that "[t]his is low level functionality used internally to ## implement rotated underlines and backgrouds when rendering a PangoLayout ## and is likely not useful for applications." ## void gdk_draw_trapezoids (GdkDrawable *drawable, GdkGC *gc, GdkTrapezoid *trapezoids, gint n_trapezoids); MODULE = Gtk2::Gdk::Drawable PACKAGE = Gtk2::Gdk::Drawable PREFIX = gdk_drawable_ ## GdkImage* gdk_drawable_get_image (GdkDrawable *drawable, gint x, gint y, gint width, gint height) ## The return is a non-floating refcount==1, hence _noinc. GdkImage_noinc * gdk_drawable_get_image (drawable, x, y, width, height) GdkDrawable *drawable gint x gint y gint width gint height #if GTK_CHECK_VERSION(2, 4, 0) GdkImage * gdk_drawable_copy_to_image (drawable, image, src_x, src_y, dest_x, dest_y, width, height) GdkDrawable * drawable GdkImage_ornull * image gint src_x gint src_y gint dest_x gint dest_y gint width gint height CLEANUP: /* if the return value has been allocated anew, * the caller will own it. */ if (!image) g_object_unref (RETVAL); #endif Gtk2-1.2498/xs/GdkEvent.xs000644 001750 000024 00000132475 11664366546 016275 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003-2006 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" /* since the GdkEvent is a union, it behaves like a polymorphic structure. gdk provides a couple of functions to return some common values regardless of the type of event, but we need to provide access to pretty much all of the members. thus, i've created a bit of hierarchy within the GdkEvent itself. specialized event types inherit evreything else from Gtk2::Gdk::Event, but add their own methods to provide access to the struct members. by the way, we do everything as opaque types and methods instead of creating a hash like gtk-perl in order to avoid the performance hit of always creating a hash that maybe 20% of client code will ever actually use. */ static const char * gdk_event_get_package (GType gtype, GdkEvent * event) { PERL_UNUSED_VAR (gtype); switch (event->type) { case GDK_NOTHING: case GDK_DELETE: case GDK_DESTROY: case GDK_MAP: case GDK_UNMAP: return "Gtk2::Gdk::Event"; case GDK_EXPOSE: #if GTK_CHECK_VERSION (2, 14, 0) case GDK_DAMAGE: #endif return "Gtk2::Gdk::Event::Expose"; case GDK_MOTION_NOTIFY: return "Gtk2::Gdk::Event::Motion"; case GDK_BUTTON_PRESS: case GDK_2BUTTON_PRESS: case GDK_3BUTTON_PRESS: case GDK_BUTTON_RELEASE: return "Gtk2::Gdk::Event::Button"; case GDK_KEY_PRESS: case GDK_KEY_RELEASE: return "Gtk2::Gdk::Event::Key"; case GDK_ENTER_NOTIFY: case GDK_LEAVE_NOTIFY: return "Gtk2::Gdk::Event::Crossing"; case GDK_FOCUS_CHANGE: return "Gtk2::Gdk::Event::Focus"; case GDK_CONFIGURE: return "Gtk2::Gdk::Event::Configure"; case GDK_PROPERTY_NOTIFY: return "Gtk2::Gdk::Event::Property"; case GDK_SELECTION_CLEAR: case GDK_SELECTION_REQUEST: case GDK_SELECTION_NOTIFY: return "Gtk2::Gdk::Event::Selection"; case GDK_PROXIMITY_IN: case GDK_PROXIMITY_OUT: return "Gtk2::Gdk::Event::Proximity"; case GDK_DRAG_ENTER: case GDK_DRAG_LEAVE: case GDK_DRAG_MOTION: case GDK_DRAG_STATUS: case GDK_DROP_START: case GDK_DROP_FINISHED: return "Gtk2::Gdk::Event::DND"; case GDK_CLIENT_EVENT: return "Gtk2::Gdk::Event::Client"; case GDK_VISIBILITY_NOTIFY: return "Gtk2::Gdk::Event::Visibility"; case GDK_NO_EXPOSE: return "Gtk2::Gdk::Event::NoExpose"; case GDK_SCROLL: return "Gtk2::Gdk::Event::Scroll"; case GDK_WINDOW_STATE: return "Gtk2::Gdk::Event::WindowState"; case GDK_SETTING: return "Gtk2::Gdk::Event::Setting"; #if GTK_CHECK_VERSION (2, 6, 0) case GDK_OWNER_CHANGE: return "Gtk2::Gdk::Event::OwnerChange"; #endif #if GTK_CHECK_VERSION (2, 8, 0) case GDK_GRAB_BROKEN: return "Gtk2::Gdk::Event::GrabBroken"; #endif default: { GEnumClass * class = g_type_class_ref (GDK_TYPE_EVENT_TYPE); GEnumValue * value = g_enum_get_value (class, event->type); if (value) warn ("Unhandled event type %s (%d) in event->type", value->value_name, event->type); else warn ("Unknown value %d in event->type", event->type); g_type_class_unref (class); } return "Gtk2::Gdk::Event"; /* limp along */ } } static void gtk2perl_gdk_event_set_state (GdkEvent * event, GdkModifierType newstate) { if (event) { switch (event->type) { case GDK_MOTION_NOTIFY: event->motion.state = newstate; break; case GDK_BUTTON_PRESS: case GDK_2BUTTON_PRESS: case GDK_3BUTTON_PRESS: case GDK_BUTTON_RELEASE: event->button.state = newstate; break; case GDK_SCROLL: event->scroll.state = newstate; break; case GDK_KEY_PRESS: case GDK_KEY_RELEASE: event->key.state = newstate; break; case GDK_ENTER_NOTIFY: case GDK_LEAVE_NOTIFY: event->crossing.state = newstate; break; case GDK_PROPERTY_NOTIFY: event->property.state = newstate; break; case GDK_VISIBILITY_NOTIFY: /* visibility state is something else. */ case GDK_CLIENT_EVENT: case GDK_NO_EXPOSE: case GDK_CONFIGURE: case GDK_FOCUS_CHANGE: case GDK_SELECTION_CLEAR: case GDK_SELECTION_REQUEST: case GDK_SELECTION_NOTIFY: case GDK_PROXIMITY_IN: case GDK_PROXIMITY_OUT: case GDK_DRAG_ENTER: case GDK_DRAG_LEAVE: case GDK_DRAG_MOTION: case GDK_DRAG_STATUS: case GDK_DROP_START: case GDK_DROP_FINISHED: case GDK_NOTHING: case GDK_DELETE: case GDK_DESTROY: case GDK_EXPOSE: case GDK_MAP: case GDK_UNMAP: case GDK_WINDOW_STATE: case GDK_SETTING: #if GTK_CHECK_VERSION (2, 6, 0) case GDK_OWNER_CHANGE: #endif #if GTK_CHECK_VERSION (2, 8, 0) case GDK_GRAB_BROKEN: #endif #if GTK_CHECK_VERSION (2, 14, 0) case GDK_DAMAGE: #endif /* no state field */ break; } } } static void gtk2perl_gdk_event_set_time (GdkEvent * event, guint32 newtime) { if (event) { switch (event->type) { case GDK_MOTION_NOTIFY: event->motion.time = newtime; break; case GDK_BUTTON_PRESS: case GDK_2BUTTON_PRESS: case GDK_3BUTTON_PRESS: case GDK_BUTTON_RELEASE: event->button.time = newtime; break; case GDK_SCROLL: event->scroll.time = newtime; break; case GDK_KEY_PRESS: case GDK_KEY_RELEASE: event->key.time = newtime; break; case GDK_ENTER_NOTIFY: case GDK_LEAVE_NOTIFY: event->crossing.time = newtime; break; case GDK_PROPERTY_NOTIFY: event->property.time = newtime; break; case GDK_SELECTION_CLEAR: case GDK_SELECTION_REQUEST: case GDK_SELECTION_NOTIFY: event->selection.time = newtime; break; case GDK_PROXIMITY_IN: case GDK_PROXIMITY_OUT: event->proximity.time = newtime; break; case GDK_DRAG_ENTER: case GDK_DRAG_LEAVE: case GDK_DRAG_MOTION: case GDK_DRAG_STATUS: case GDK_DROP_START: case GDK_DROP_FINISHED: event->dnd.time = newtime; break; #if GTK_CHECK_VERSION (2, 6, 0) case GDK_OWNER_CHANGE: event->owner_change.time = newtime; #endif case GDK_CLIENT_EVENT: case GDK_VISIBILITY_NOTIFY: case GDK_NO_EXPOSE: case GDK_CONFIGURE: case GDK_FOCUS_CHANGE: case GDK_NOTHING: case GDK_DELETE: case GDK_DESTROY: case GDK_EXPOSE: case GDK_MAP: case GDK_UNMAP: case GDK_WINDOW_STATE: case GDK_SETTING: #if GTK_CHECK_VERSION (2, 8, 0) case GDK_GRAB_BROKEN: #endif #if GTK_CHECK_VERSION (2, 14, 0) case GDK_DAMAGE: #endif /* no time */ break; } } } /* initialized in the boot section. */ static GPerlBoxedWrapperClass gdk_event_wrapper_class; static GPerlBoxedWrapperClass * default_wrapper_class; static SV * gdk_event_wrap (GType gtype, const char * package, GdkEvent * event, gboolean own) { HV * stash; SV * sv; sv = default_wrapper_class->wrap (gtype, package, event, own); /* we don't really care about the registered package, override it. */ package = gdk_event_get_package (gtype, event); stash = gv_stashpv (package, TRUE); return sv_bless (sv, stash); } static GdkEvent * gdk_event_unwrap (GType gtype, const char * package, SV * sv) { GdkEvent * event = default_wrapper_class->unwrap (gtype, package, sv); /* we don't really care about the registered package, override it. */ package = gdk_event_get_package (gtype, event); if (!sv_derived_from (sv, package)) croak ("%s is not of type %s", gperl_format_variable_for_output (sv), package); return event; } #if !GTK_CHECK_VERSION (2, 2, 0) # define gdk_event_new gtk2perl_gdk_event_new static GdkEvent * gtk2perl_gdk_event_new (GdkEventType type) { GdkEvent ev; memset (&ev, 0, sizeof (GdkEvent)); ev.any.type = type; return gdk_event_copy (&ev); } #endif static void gtk2perl_event_func (GdkEvent *event, gpointer data) { gperl_callback_invoke ((GPerlCallback *) data, NULL, event); } MODULE = Gtk2::Gdk::Event PACKAGE = Gtk2::Gdk PREFIX = gdk_ ## gboolean gdk_events_pending (void) gboolean gdk_events_pending (class) C_ARGS: /*void*/ MODULE = Gtk2::Gdk::Event PACKAGE = Gtk2::Gdk::Event PREFIX = gdk_event_ =head1 EVENT TYPES =over =item * L =item * L =item * L =item * L =item * L =item * L =item * L =item * L =item * L =item * L =item * L =item * L =item * L =item * L =item * L =item * L =item * L =item * L (since gtk+ 2.6) =item * L (since gtk+ 2.8) =back =cut =for enum GdkEventType =cut BOOT: /* GdkEvent is a polymorphic structure, whose actual package * depends on the type member's value. instead of trying to make * a perl developer know about this, we'll bless it into the proper * subclass by overriding the default wrapper behavior. * * note that we expressly wish to keep the GdkEvent as an opaque * type in gtk2-perl for efficiency; converting an event to a * hash is an expensive operation that is usually wasted (based on * experience with gtk-perl). */ default_wrapper_class = gperl_default_boxed_wrapper_class (); gdk_event_wrapper_class = * default_wrapper_class; gdk_event_wrapper_class.wrap = (GPerlBoxedWrapFunc)gdk_event_wrap; gdk_event_wrapper_class.unwrap = (GPerlBoxedUnwrapFunc)gdk_event_unwrap; gperl_register_boxed (GDK_TYPE_EVENT, "Gtk2::Gdk::Event", &gdk_event_wrapper_class); ## GdkEvent* gdk_event_get (void) ## GdkEvent* gdk_event_peek (void) ## caller must free GdkEvent_own_ornull* gdk_event_get (class) ALIAS: peek = 1 C_ARGS: /*void*/ CLEANUP: PERL_UNUSED_VAR (ix); ## GdkEvent* gdk_event_get_graphics_expose (GdkWindow *window) GdkEvent_own_ornull* gdk_event_get_graphics_expose (class, window) GdkWindow *window C_ARGS: window ## void gdk_event_put (GdkEvent *event) ## call as Gtk2::Gdk::Event->put ($event) void gdk_event_put (class, event) GdkEvent *event C_ARGS: event # this didn't actually exist until 2.2.0, when there were some private # things added in Gdk; we provide a custom one on 2.0.x, because we're # nice guys. ## GdkEvent* gdk_event_new (GdkEventType type) ## caller must free GdkEvent_own* gdk_event_new (class, type) GdkEventType type C_ARGS: type ## GdkEvent* gdk_event_copy (GdkEvent *event) GdkEvent_own* gdk_event_copy (event) GdkEvent *event # automatic ## void gdk_event_free (GdkEvent *event) ## guint32 gdk_event_get_time (GdkEvent *event) =for apidoc Gtk2::Gdk::Event::set_time =for signature $event->set_time ($newtime) =for arg ... (hide) =for arg newtime (integer) timestamp =cut # we'll doc this one below with get_time =for apidoc Gtk2::Gdk::Event::time __hide__ =cut =for apidoc =for signature $timestamp = $event->get_time =for signature $timestamp = $event->time =for arg ... (hide) Get I<$event>'s time. If that event type doesn't have a time, or if I<$event> is undef, returns GDK_CURRENT_TIME, which is 0. =cut guint gdk_event_get_time (event, ...) GdkEvent_ornull *event ALIAS: Gtk2::Gdk::Event::time = 1 Gtk2::Gdk::Event::set_time = 2 CODE: if (ix == 0 && items != 1) croak ("Usage: Gtk2::Gdk::Event::get_time (event)"); if (ix == 2 && items != 2) croak ("Usage: Gtk2::Gdk::Event::set_time (event, newtime)"); RETVAL = gdk_event_get_time (event); if (items == 2 || ix == 2) { /* set */ gtk2perl_gdk_event_set_time (event, SvIV (ST (1))); } OUTPUT: RETVAL ## gboolean gdk_event_get_state (GdkEvent *event, GdkModifierType *state) =for apidoc Gtk2::Gdk::Event::set_state =for signature $event->set_state ($newstate) =for arg ... (hide) =for arg newstate (GdkModifierType) =cut # we'll doc this one below with get_state =for apidoc Gtk2::Gdk::Event::state __hide__ =cut =for apidoc =for signature $modifiertype = $event->get_state =for signature $modifiertype = $event->state =for arg ... (hide) Get I<$event>'s state. Croaks if that event type doesn't have a state. =cut GdkModifierType gdk_event_get_state (event, ...) GdkEvent *event ALIAS: Gtk2::Gdk::Event::state = 1 Gtk2::Gdk::Event::set_state = 2 CODE: if (ix == 0 && items != 1) croak ("Usage: Gtk2::Gdk::Event::get_state (event)"); if (ix == 2 && items != 2) croak ("Usage: Gtk2::Gdk::Event::set_state (event, newstate)"); if (items == 2 || ix == 2) { /* set; return old value. */ if (!gdk_event_get_state (event, &RETVAL)) { /* Use pass_unknown to prevent getting the rather * unhelpful "invalid enum value" exception here for * events added in newer gdks than that for which we * were built. If we're going to throw an exception, * it should at least be somewhat meaningful. */ SV * s = gperl_convert_back_enum_pass_unknown (GDK_TYPE_EVENT_TYPE, event->type); croak ("events of type %s have no state member", SvPV_nolen (s)); } gtk2perl_gdk_event_set_state (event, SvGdkModifierType (ST (1))); } else { /* just get */ if (!gdk_event_get_state (event, &RETVAL)) XSRETURN_UNDEF; } OUTPUT: RETVAL =for apidoc Gtk2::Gdk::Event::get_coords =for signature ($x, $y) = $event->get_coords =cut =for apidoc Gtk2::Gdk::Event::coords =for signature ($x, $y) = $event->coords =cut ## gboolean gdk_event_get_coords (GdkEvent *event, gdouble *x_win, gdouble *y_win) void gdk_event_get_coords (event) GdkEvent *event ALIAS: Gtk2::Gdk::Event::coords = 1 PREINIT: gdouble x; gdouble y; PPCODE: if (!gdk_event_get_coords (event, &x, &y)) XSRETURN_EMPTY; PERL_UNUSED_VAR (ix); EXTEND (SP, 2); PUSHs (sv_2mortal (newSVnv (x))); PUSHs (sv_2mortal (newSVnv (y))); =for apidoc Gtk2::Gdk::Event::get_root_coords =for signature ($x_root, $y_root) = $event->get_root_coords =cut =for apidoc Gtk2::Gdk::Event::root_coords =for signature ($x_root, $y_root) = $event->root_coords =cut =for apidoc Gtk2::Gdk::Event::x_root =for signature integer = $event->x_root =cut =for apidoc Gtk2::Gdk::Event::y_root =for signature integer = $event->y_root =cut ## gboolean gdk_event_get_root_coords (GdkEvent *event, gdouble *x_root, gdouble *y_root) void gdk_event_get_root_coords (event) GdkEvent *event ALIAS: Gtk2::Gdk::Event::root_coords = 1 Gtk2::Gdk::Event::x_root = 2 Gtk2::Gdk::Event::y_root = 3 PREINIT: gdouble x_root; gdouble y_root; PPCODE: if (!gdk_event_get_root_coords (event, &x_root, &y_root)) XSRETURN_EMPTY; switch (ix) { case 2: /* x */ PUSHs (sv_2mortal (newSVnv (x_root))); break; case 3: /* y */ PUSHs (sv_2mortal (newSVnv (y_root))); break; default: EXTEND (SP, 2); PUSHs (sv_2mortal (newSVnv (x_root))); PUSHs (sv_2mortal (newSVnv (y_root))); } ## gboolean gdk_event_get_axis (GdkEvent *event, GdkAxisUse axis_use, gdouble *value) gdouble gdk_event_get_axis (event, axis_use) GdkEvent *event GdkAxisUse axis_use ALIAS: Gtk2::Gdk::Event::axis = 1 CODE: PERL_UNUSED_VAR (ix); if (!gdk_event_get_axis (event, axis_use, &RETVAL)) XSRETURN_UNDEF; OUTPUT: RETVAL ## void gdk_event_handler_set (GdkEventFunc func, gpointer data, GDestroyNotify notify) =for apidoc =for arg func (subroutine) function to get called for each event. Set the function that handles all events from GDK. GTK+ uses this to dispatch events, and as such this is rarely of use to applications, unless you are implementing completely custom event dispatching (unlikely) or preprocess events somehow and then pass them on to C. As a special case, if I is undef, we "reset" the handler by passing the actual C function gtk_main_do_event to GDK, to bypass the Perl marshaling (and take things back up to full speed). =cut void gdk_event_handler_set (class, func, data=NULL) SV * func SV * data PREINIT: GPerlCallback *callback; GType params[1]; CODE: params[0] = GDK_TYPE_EVENT; if (gperl_sv_is_defined (func)) { callback = gperl_callback_new (func, data, G_N_ELEMENTS (params), params, 0); gdk_event_handler_set (gtk2perl_event_func, callback, (GDestroyNotify) gperl_callback_destroy); } else { /* reset to gtk+'s event handler. */ gdk_event_handler_set ((GdkEventFunc) gtk_main_do_event, NULL, NULL); } #if GTK_CHECK_VERSION (2,2,0) void gdk_event_set_screen (event, screen) GdkEvent * event GdkScreen * screen GdkScreen * gdk_event_get_screen (event) GdkEvent * event #endif /* have GdkScreen */ ## since we're overriding the package names, Glib::Boxed::DESTROY won't ## be able to find the right destructor, because these new names don't ## correspond to GTypes, and Glib::Boxed::DESTROY tries to find the GType ## from the package into which the SV is blessed. we'll have to explicitly ## tell perl what destructor to use. void DESTROY (sv) SV * sv ALIAS: Gtk2::Gdk::Event::Expose::DESTROY = 1 Gtk2::Gdk::Event::NoExpose::DESTROY = 2 Gtk2::Gdk::Event::Visibility::DESTROY = 3 Gtk2::Gdk::Event::Motion::DESTROY = 4 Gtk2::Gdk::Event::Button::DESTROY = 5 Gtk2::Gdk::Event::Scroll::DESTROY = 6 Gtk2::Gdk::Event::Key::DESTROY = 7 Gtk2::Gdk::Event::Crossing::DESTROY = 8 Gtk2::Gdk::Event::Focus::DESTROY = 9 Gtk2::Gdk::Event::Configure::DESTROY = 10 Gtk2::Gdk::Event::Property::DESTROY = 11 Gtk2::Gdk::Event::Selection::DESTROY = 12 Gtk2::Gdk::Event::Proximity::DESTROY = 13 Gtk2::Gdk::Event::Client::DESTROY = 14 Gtk2::Gdk::Event::Setting::DESTROY = 15 Gtk2::Gdk::Event::WindowState::DESTROY = 16 Gtk2::Gdk::Event::DND::DESTROY = 17 Gtk2::Gdk::Event::OwnerChange::DESTROY = 18 Gtk2::Gdk::Event::GrabBroken::DESTROY = 19 CODE: PERL_UNUSED_VAR (ix); default_wrapper_class->destroy (sv); ## Event types. ## Nothing: No event occurred. ## Delete: A window delete event was sent by the window manager. ## The specified window should be deleted. ## Destroy: A window has been destroyed. ## Expose: Part of a window has been uncovered. ## NoExpose: Same as expose, but no expose event was generated. ## VisibilityNotify: A window has become fully/partially/not obscured. ## MotionNotify: The mouse has moved. ## ButtonPress: A mouse button was pressed. ## ButtonRelease: A mouse button was release. ## KeyPress: A key was pressed. ## KeyRelease: A key was released. ## EnterNotify: A window was entered. ## LeaveNotify: A window was exited. ## FocusChange: The focus window has changed. (The focus window gets ## keyboard events). ## Resize: A window has been resized. ## Map: A window has been mapped. (It is now visible on the screen). ## Unmap: A window has been unmapped. (It is no longer visible on ## the screen). ## Scroll: A mouse wheel was scrolled either up or down. ## OwnerChange: The owner of a clipboard/selection changed. # struct _GdkEventAny # { # GdkEventType type; # GdkWindow *window; # gint8 send_event; # }; GdkEventType type (event) GdkEvent * event CODE: RETVAL = event->any.type; OUTPUT: RETVAL GdkWindow_ornull * window (GdkEvent * event, GdkWindow_ornull * newvalue=NULL) CODE: RETVAL = event->any.window; if (RETVAL) g_object_ref (event->any.window); if (items == 2 && newvalue != event->any.window) { if (event->any.window) g_object_unref (event->any.window); if (newvalue) g_object_ref (newvalue); event->any.window = newvalue; } OUTPUT: RETVAL CLEANUP: if (RETVAL) g_object_unref (RETVAL); gint8 send_event (GdkEvent * event, gint8 newvalue=0) CODE: RETVAL = event->any.send_event; if (items == 2) event->any.send_event = newvalue; OUTPUT: RETVAL MODULE = Gtk2::Gdk::Event PACKAGE = Gtk2::Gdk::Event::Expose =for position post_hierarchy =head1 HIERARCHY Gtk2::Gdk::Event +----Gtk2::Gdk::Event::Expose =cut BOOT: gperl_set_isa ("Gtk2::Gdk::Event::Expose", "Gtk2::Gdk::Event"); #struct _GdkEventExpose #{ #// GdkEventType type; <- GdkEventAny #// GdkWindow *window; <- GdkEventAny #// gint8 send_event; <- GdkEventAny # GdkRectangle area; # GdkRegion *region; # gint count; /* If non-zero, how many more events follow. */ #}; GdkRectangle* area (GdkEvent * eventexpose, GdkRectangle * newvalue=NULL) CODE: RETVAL = &(eventexpose->expose.area); if (items == 2) { eventexpose->expose.area.x = newvalue->x; eventexpose->expose.area.y = newvalue->y; eventexpose->expose.area.width = newvalue->width; eventexpose->expose.area.height = newvalue->height; } OUTPUT: RETVAL GdkRegion_own_ornull * region (GdkEvent * eventexpose, GdkRegion_ornull * newvalue=NULL) CODE: RETVAL = NULL; if (eventexpose->expose.region) RETVAL = gdk_region_copy (eventexpose->expose.region); if (items == 2 && newvalue != eventexpose->expose.region) { if (eventexpose->expose.region) gdk_region_destroy (eventexpose->expose.region); if (newvalue) eventexpose->expose.region = gdk_region_copy (newvalue); else eventexpose->expose.region = NULL; } OUTPUT: RETVAL gint count (GdkEvent * eventexpose, guint newvalue=0) CODE: RETVAL = eventexpose->expose.count; if (items == 2) eventexpose->expose.count = newvalue; OUTPUT: RETVAL MODULE = Gtk2::Gdk::Event PACKAGE = Gtk2::Gdk::Event::NoExpose =for position post_hierarchy =head1 HIERARCHY Gtk2::Gdk::Event +----Gtk2::Gdk::Event::NoExpose =cut BOOT: gperl_set_isa ("Gtk2::Gdk::Event::NoExpose", "Gtk2::Gdk::Event"); #struct _GdkEventNoExpose #{ #// GdkEventType type; <- GdkEventAny #// GdkWindow *window; <- GdkEventAny #// gint8 send_event; <- GdkEventAny #}; MODULE = Gtk2::Gdk::Event PACKAGE = Gtk2::Gdk::Event::Visibility =for position post_hierarchy =head1 HIERARCHY Gtk2::Gdk::Event +----Gtk2::Gdk::Event::Visibility =cut BOOT: gperl_set_isa ("Gtk2::Gdk::Event::Visibility", "Gtk2::Gdk::Event"); #struct _GdkEventVisibility #{ #// GdkEventType type; <- GdkEventAny #// GdkWindow *window; <- GdkEventAny #// gint8 send_event; <- GdkEventAny # GdkVisibilityState state; #}; # different return type, override Gtk2::Gdk::Event::state GdkVisibilityState state (GdkEvent * eventvisibility, GdkVisibilityState newvalue=0) CODE: RETVAL = eventvisibility->visibility.state; if (items == 2) eventvisibility->visibility.state = newvalue; OUTPUT: RETVAL MODULE = Gtk2::Gdk::Event PACKAGE = Gtk2::Gdk::Event::Motion =for position post_hierarchy =head1 HIERARCHY Gtk2::Gdk::Event +----Gtk2::Gdk::Event::Motion =cut BOOT: gperl_set_isa ("Gtk2::Gdk::Event::Motion", "Gtk2::Gdk::Event"); #struct _GdkEventMotion #{ #// GdkEventType type; <- GdkEventAny #// GdkWindow *window; <- GdkEventAny #// gint8 send_event; <- GdkEventAny #// guint32 time; <- gdk_event_get_time # gdouble x; # gdouble y; #// gdouble *axes; <- get_axes #// guint state; <- get_state # gint16 is_hint; # GdkDevice *device; #// gdouble x_root, y_root; <- get_root_coords #}; guint is_hint (GdkEvent * eventmotion, guint newvalue=0) CODE: RETVAL = eventmotion->motion.is_hint; if (items == 2) eventmotion->motion.is_hint = newvalue; OUTPUT: RETVAL GdkDevice_ornull * device (GdkEvent * eventmotion, GdkDevice_ornull * newvalue=NULL) CODE: RETVAL = eventmotion->motion.device; if (items == 2) eventmotion->motion.device = newvalue; OUTPUT: RETVAL gdouble x (GdkEvent * event, gdouble newvalue=0.0) CODE: RETVAL = event->motion.x; if (items == 2) event->motion.x = newvalue; OUTPUT: RETVAL gdouble y (GdkEvent * event, gdouble newvalue=0.0) CODE: RETVAL = event->motion.y; if (items == 2) event->motion.y = newvalue; OUTPUT: RETVAL #if GTK_CHECK_VERSION (2, 12, 0) # void gdk_event_request_motions (GdkEventMotion *event); void request_motions (GdkEvent *event) CODE: gdk_event_request_motions ((GdkEventMotion *) event); #endif MODULE = Gtk2::Gdk::Event PACKAGE = Gtk2::Gdk::Event::Button =for position post_hierarchy =head1 HIERARCHY Gtk2::Gdk::Event +----Gtk2::Gdk::Event::Button =cut BOOT: gperl_set_isa ("Gtk2::Gdk::Event::Button", "Gtk2::Gdk::Event"); #struct _GdkEventButton #{ #// GdkEventType type; <- GdkEventAny #// GdkWindow *window; <- GdkEventAny #// gint8 send_event; <- GdkEventAny #// guint32 time; <- gdk_event_get_time # gdouble x; # gdouble y; #// gdouble *axes; <- get_axes #// guint state; <- get_state # guint button; # GdkDevice *device; #// gdouble x_root, y_root; <- get_root_coords #}; guint button (GdkEvent * eventbutton, guint newvalue=0) CODE: RETVAL = eventbutton->button.button; if (items == 2) eventbutton->button.button = newvalue; OUTPUT: RETVAL GdkDevice_ornull * device (GdkEvent * eventbutton, GdkDevice_ornull * newvalue=NULL) CODE: RETVAL = eventbutton->button.device; if (items == 2) eventbutton->button.device = newvalue; OUTPUT: RETVAL gdouble x (GdkEvent * event, gdouble newvalue=0.0) CODE: RETVAL = event->button.x; if (items == 2) event->button.x = newvalue; OUTPUT: RETVAL gdouble y (GdkEvent * event, gdouble newvalue=0.0) CODE: RETVAL = event->button.y; if (items == 2) event->button.y = newvalue; OUTPUT: RETVAL MODULE = Gtk2::Gdk::Event PACKAGE = Gtk2::Gdk::Event::Scroll =for position post_hierarchy =head1 HIERARCHY Gtk2::Gdk::Event +----Gtk2::Gdk::Event::Scroll =cut BOOT: gperl_set_isa ("Gtk2::Gdk::Event::Scroll", "Gtk2::Gdk::Event"); #struct _GdkEventScroll #{ #// GdkEventType type; <- GdkEventAny #// GdkWindow *window; <- GdkEventAny #// gint8 send_event; <- GdkEventAny #// guint32 time; <- gdk_event_get_time # gdouble x; # gdouble y; #// guint state; <- get_state # GdkScrollDirection direction; # GdkDevice *device; #// gdouble x_root, y_root; <- get_root_coords #}; GdkScrollDirection direction (GdkEvent * eventscroll, GdkScrollDirection newvalue=0) CODE: RETVAL = eventscroll->scroll.direction; if (items == 2) eventscroll->scroll.direction = newvalue; OUTPUT: RETVAL GdkDevice_ornull * device (GdkEvent * eventscroll, GdkDevice_ornull * newvalue=NULL) CODE: RETVAL = eventscroll->scroll.device; if (items == 2) eventscroll->scroll.device = newvalue; OUTPUT: RETVAL gdouble x (GdkEvent * event, gdouble newvalue=0.0) CODE: RETVAL = event->scroll.x; if (items == 2) event->scroll.x = newvalue; OUTPUT: RETVAL gdouble y (GdkEvent * event, gdouble newvalue=0.0) CODE: RETVAL = event->scroll.y; if (items == 2) event->scroll.y = newvalue; OUTPUT: RETVAL MODULE = Gtk2::Gdk::Event PACKAGE = Gtk2::Gdk::Event::Key =for position post_hierarchy =head1 HIERARCHY Gtk2::Gdk::Event +----Gtk2::Gdk::Event::Key =cut BOOT: gperl_set_isa ("Gtk2::Gdk::Event::Key", "Gtk2::Gdk::Event"); #struct _GdkEventKey #{ #// GdkEventType type; <- GdkEventAny #// GdkWindow *window; <- GdkEventAny #// gint8 send_event; <- GdkEventAny #// guint32 time; <- gdk_event_get_time #// guint state; <- get_state # guint keyval; #// gint length; deprecated #// gchar *string; deprecated # guint16 hardware_keycode; # guint8 group; #}; guint keyval (GdkEvent * eventkey, guint newvalue=0) CODE: RETVAL = eventkey->key.keyval; if (items == 2) eventkey->key.keyval = newvalue; OUTPUT: RETVAL guint16 hardware_keycode (GdkEvent * eventkey, guint16 newvalue=0) CODE: RETVAL = eventkey->key.hardware_keycode; if (items == 2) eventkey->key.hardware_keycode = newvalue; OUTPUT: RETVAL guint8 group (GdkEvent * eventkey, guint8 newvalue=0) CODE: RETVAL = eventkey->key.group; if (items == 2) eventkey->key.group = newvalue; OUTPUT: RETVAL MODULE = Gtk2::Gdk::Event PACKAGE = Gtk2::Gdk::Event::Crossing =for position post_hierarchy =head1 HIERARCHY Gtk2::Gdk::Event +----Gtk2::Gdk::Event::Crossing =cut BOOT: gperl_set_isa ("Gtk2::Gdk::Event::Crossing", "Gtk2::Gdk::Event"); #struct _GdkEventCrossing #{ #// GdkEventType type; <- GdkEventAny #// GdkWindow *window; <- GdkEventAny #// gint8 send_event; <- GdkEventAny # GdkWindow *subwindow; #// guint32 time; <- gdk_event_get_time # gdouble x; # gdouble y; #// gdouble x_root; <- get_root_coords #// gdouble y_root; <- get_root_coords # GdkCrossingMode mode; # GdkNotifyType detail; # gboolean focus; #// guint state; <- get_state #}; GdkWindow_ornull * subwindow (GdkEvent * event, GdkWindow_ornull * newvalue=NULL) CODE: RETVAL = event->crossing.subwindow; if (RETVAL) g_object_ref (RETVAL); if (items == 2 && newvalue != event->crossing.subwindow) { if (event->crossing.subwindow) g_object_unref (event->crossing.subwindow); if (newvalue) g_object_ref (newvalue); event->crossing.subwindow = newvalue; } OUTPUT: RETVAL CLEANUP: if (RETVAL) g_object_unref (RETVAL); GdkCrossingMode mode (GdkEvent * eventcrossing, GdkCrossingMode newvalue=0) CODE: RETVAL = eventcrossing->crossing.mode; if (items == 2) eventcrossing->crossing.mode = newvalue; OUTPUT: RETVAL GdkNotifyType detail (GdkEvent * eventcrossing, GdkNotifyType newvalue=0) CODE: RETVAL = eventcrossing->crossing.detail; if (items == 2) eventcrossing->crossing.detail = newvalue; OUTPUT: RETVAL gboolean focus (GdkEvent * eventcrossing, gboolean newvalue=0) CODE: RETVAL = eventcrossing->crossing.focus; if (items == 2) eventcrossing->crossing.focus = newvalue; OUTPUT: RETVAL gdouble x (GdkEvent * event, gdouble newvalue=0.0) CODE: RETVAL = event->crossing.x; if (items == 2) event->crossing.x = newvalue; OUTPUT: RETVAL gdouble y (GdkEvent * event, gdouble newvalue=0.0) CODE: RETVAL = event->crossing.y; if (items == 2) event->crossing.y = newvalue; OUTPUT: RETVAL MODULE = Gtk2::Gdk::Event PACKAGE = Gtk2::Gdk::Event::Focus =for position post_hierarchy =head1 HIERARCHY Gtk2::Gdk::Event +----Gtk2::Gdk::Event::Focus =cut BOOT: gperl_set_isa ("Gtk2::Gdk::Event::Focus", "Gtk2::Gdk::Event"); #struct _GdkEventFocus #{ #// GdkEventType type; <- GdkEventAny #// GdkWindow *window; <- GdkEventAny #// gint8 send_event; <- GdkEventAny # gint16 in; #}; gint16 in (GdkEvent * eventfocus, gint16 newvalue=0) CODE: RETVAL = eventfocus->focus_change.in; if (items == 2) eventfocus->focus_change.in = newvalue; OUTPUT: RETVAL MODULE = Gtk2::Gdk::Event PACKAGE = Gtk2::Gdk::Event::Configure =for position post_hierarchy =head1 HIERARCHY Gtk2::Gdk::Event +----Gtk2::Gdk::Event::Configure =cut BOOT: gperl_set_isa ("Gtk2::Gdk::Event::Configure", "Gtk2::Gdk::Event"); #struct _GdkEventConfigure #{ #// GdkEventType type; <- GdkEventAny #// GdkWindow *window; <- GdkEventAny #// gint8 send_event; <- GdkEventAny # gint x, y; # gint width; # gint height; #}; gint width (GdkEvent * eventconfigure, gint newvalue=0) ALIAS: Gtk2::Gdk::Event::Configure::height = 1 CODE: switch (ix) { case 0: RETVAL = eventconfigure->configure.width; break; case 1: RETVAL = eventconfigure->configure.height; break; default: RETVAL = 0; g_assert_not_reached (); } if (items == 2) { switch (ix) { case 0: eventconfigure->configure.width = newvalue; break; case 1: eventconfigure->configure.height = newvalue; break; default: g_assert_not_reached (); } } OUTPUT: RETVAL gint x (GdkEvent * event, gint newvalue=0) CODE: RETVAL = event->configure.x; if (items == 2) event->configure.x = newvalue; OUTPUT: RETVAL gint y (GdkEvent * event, gint newvalue=0) CODE: RETVAL = event->configure.y; if (items == 2) event->configure.y = newvalue; OUTPUT: RETVAL MODULE = Gtk2::Gdk::Event PACKAGE = Gtk2::Gdk::Event::Property =for position post_hierarchy =head1 HIERARCHY Gtk2::Gdk::Event +----Gtk2::Gdk::Event::Property =cut BOOT: gperl_set_isa ("Gtk2::Gdk::Event::Property", "Gtk2::Gdk::Event"); #struct _GdkEventProperty #{ #// GdkEventType type; <- GdkEventAny #// GdkWindow *window; <- GdkEventAny #// gint8 send_event; <- GdkEventAny # GdkAtom atom; #// guint32 time; <- gdk_event_get_time # guint state; #}; GdkAtom atom (GdkEvent * eventproperty, GdkAtom newvalue=0) CODE: RETVAL = eventproperty->property.atom; if (items == 2) eventproperty->property.atom = newvalue; OUTPUT: RETVAL guint state (GdkEvent * eventproperty, guint newvalue=0) CODE: RETVAL = eventproperty->property.state; if (items == 2) eventproperty->property.state = newvalue; OUTPUT: RETVAL MODULE = Gtk2::Gdk::Event PACKAGE = Gtk2::Gdk::Event::Selection =for position post_hierarchy =head1 HIERARCHY Gtk2::Gdk::Event +----Gtk2::Gdk::Event::Selection =cut BOOT: gperl_set_isa ("Gtk2::Gdk::Event::Selection", "Gtk2::Gdk::Event"); #struct _GdkEventSelection #{ #// GdkEventType type; <- GdkEventAny #// GdkWindow *window; <- GdkEventAny #// gint8 send_event; <- GdkEventAny # GdkAtom selection; # GdkAtom target; # GdkAtom property; #// guint32 time; <- gdk_event_get_time # GdkNativeWindow requestor; #}; GdkAtom selection (GdkEvent * eventselection, GdkAtom newvalue=0) CODE: RETVAL = eventselection->selection.selection; if (items == 2) eventselection->selection.selection = newvalue; OUTPUT: RETVAL GdkAtom target (GdkEvent * eventselection, GdkAtom newvalue=0) CODE: RETVAL = eventselection->selection.target; if (items == 2) eventselection->selection.target = newvalue; OUTPUT: RETVAL GdkAtom property (GdkEvent * eventselection, GdkAtom newvalue=0) CODE: RETVAL = eventselection->selection.property; if (items == 2) eventselection->selection.property = newvalue; OUTPUT: RETVAL GdkNativeWindow requestor (GdkEvent * eventselection, GdkNativeWindow newvalue=0) CODE: RETVAL = eventselection->selection.requestor; if (items == 2) eventselection->selection.requestor = newvalue; OUTPUT: RETVAL MODULE = Gtk2::Gdk::Event PACKAGE = Gtk2::Gdk::Event::Proximity =for position post_hierarchy =head1 HIERARCHY Gtk2::Gdk::Event +----Gtk2::Gdk::Event::Proximity =cut BOOT: gperl_set_isa ("Gtk2::Gdk::Event::Proximity", "Gtk2::Gdk::Event"); #/* This event type will be used pretty rarely. It only is important # for XInput aware programs that are drawing their own cursor */ #struct _GdkEventProximity #{ #// GdkEventType type; <- GdkEventAny #// GdkWindow *window; <- GdkEventAny #// gint8 send_event; <- GdkEventAny #// guint32 time; <- gdk_event_get_time # GdkDevice *device; #}; GdkDevice_ornull * device (GdkEvent * eventproximity, GdkDevice_ornull * newvalue=NULL) CODE: RETVAL = eventproximity->motion.device; if (items == 2) eventproximity->motion.device = newvalue; OUTPUT: RETVAL MODULE = Gtk2::Gdk::Event PACKAGE = Gtk2::Gdk::Event::Client =for position post_hierarchy =head1 HIERARCHY Gtk2::Gdk::Event +----Gtk2::Gdk::Event::Client =cut BOOT: gperl_set_isa ("Gtk2::Gdk::Event::Client", "Gtk2::Gdk::Event"); #struct _GdkEventClient #{ #// GdkEventType type; <- GdkEventAny #// GdkWindow *window; <- GdkEventAny #// gint8 send_event; <- GdkEventAny # GdkAtom message_type; # gushort data_format; # union { # char b[20]; # short s[10]; # long l[5]; # } data; #}; GdkAtom message_type (GdkEvent * eventclient, GdkAtom newvalue=0) CODE: RETVAL = eventclient->client.message_type; if (items == 2) eventclient->client.message_type = newvalue; OUTPUT: RETVAL =for apidoc This should be set to either $Gtk2::Gdk::CHARS, $Gtk2::Gdk::SHORTS, or $Gtk2::Gdk::LONGS. See I for a full explanation. =cut gushort data_format (GdkEvent * eventclient, gushort newvalue=0) CODE: RETVAL = eventclient->client.data_format; if (items == 2) eventclient->client.data_format = newvalue; OUTPUT: RETVAL =for apidoc =for signature old_string = $eventclient->data (string) =for signature old_list = $eventclient->data (list of ten shorts) =for signature old_list = $eventclient->data (list of five longs) Depending on the value of I, I takes one of three different kinds of values: +-------------------+-----------------------+ | data_format | data | +-------------------+-----------------------+ | Gtk2::Gdk::CHARS | a string of length 20 | | Gtk2::Gdk::SHORTS | a list of ten shorts | | Gtk2::Gdk::LONGS | a list of five longs | +-------------------+-----------------------+ =cut void data (GdkEvent * eventclient, ...) PREINIT: int i, first_index = 1; PPCODE: switch (eventclient->client.data_format) { case 8: { if (items == first_index + 1) { char *data = SvPV_nolen (ST (first_index)); char old[20]; for (i = 0; i < 20; i++) { old[i] = eventclient->client.data.b[i]; eventclient->client.data.b[i] = data[i]; } XPUSHs (sv_2mortal (newSVpv (old, 20))); } else { XPUSHs (sv_2mortal (newSVpv (eventclient->client.data.b, 20))); } break; } case 16: { if (items == first_index + 10) { short old[10]; for (i = first_index; i < items; i++) { old[i - first_index] = eventclient->client.data.s[i - first_index]; eventclient->client.data.s[i - first_index] = (gint16) SvIV (ST (i)); } for (i = 0; i < 10; i++) XPUSHs (sv_2mortal (newSViv (old[i]))); } else { for (i = 0; i < 10; i++) XPUSHs (sv_2mortal (newSViv (eventclient->client.data.s[i]))); } break; } case 32: { if (items == first_index + 5) { long old[5]; for (i = first_index; i < items; i++) { old[i - first_index] = eventclient->client.data.l[i - first_index]; eventclient->client.data.l[i - first_index] = SvIV (ST (i)); } for (i = 0; i < 5; i++) XPUSHs (sv_2mortal (newSViv (old[i]))); } else { for (i = 0; i < 5; i++) XPUSHs (sv_2mortal (newSViv (eventclient->client.data.l[i]))); } break; } default: croak ("Illegal format value %d used; should be either 8, 16 or 32", eventclient->client.data_format); } MODULE = Gtk2::Gdk::Event PACKAGE = Gtk2::Gdk::Event::Setting =for position post_hierarchy =head1 HIERARCHY Gtk2::Gdk::Event +----Gtk2::Gdk::Event::Setting =cut BOOT: gperl_set_isa ("Gtk2::Gdk::Event::Setting", "Gtk2::Gdk::Event"); #struct _GdkEventSetting #{ #// GdkEventType type; <- GdkEventAny #// GdkWindow *window; <- GdkEventAny #// gint8 send_event; <- GdkEventAny # GdkSettingAction action; # char *name; #}; GdkSettingAction action (GdkEvent * eventsetting, GdkSettingAction newvalue=0) CODE: RETVAL = eventsetting->setting.action; if (items == 2) eventsetting->setting.action = newvalue; OUTPUT: RETVAL char_ornull * name (GdkEvent * eventsetting, char_ornull * newvalue=NULL) CODE: RETVAL = eventsetting->setting.name; if (items == 2) { if (eventsetting->setting.name) g_free (eventsetting->setting.name); if (newvalue) eventsetting->setting.name = g_strdup (newvalue); else eventsetting->setting.name = NULL; } OUTPUT: RETVAL MODULE = Gtk2::Gdk::Event PACKAGE = Gtk2::Gdk::Event::WindowState =for position post_hierarchy =head1 HIERARCHY Gtk2::Gdk::Event +----Gtk2::Gdk::Event::WindowState =cut BOOT: gperl_set_isa ("Gtk2::Gdk::Event::WindowState", "Gtk2::Gdk::Event"); #struct _GdkEventWindowState #{ #// GdkEventType type; <- GdkEventAny #// GdkWindow *window; <- GdkEventAny #// gint8 send_event; <- GdkEventAny # GdkWindowState changed_mask; # GdkWindowState new_window_state; #}; GdkWindowState changed_mask (GdkEvent * eventwindowstate, GdkWindowState newvalue=0) CODE: RETVAL = eventwindowstate->window_state.changed_mask; if (items == 2) eventwindowstate->window_state.changed_mask = newvalue; OUTPUT: RETVAL GdkWindowState new_window_state (GdkEvent * eventwindowstate, GdkWindowState newvalue=0) CODE: RETVAL = eventwindowstate->window_state.new_window_state; if (items == 2) eventwindowstate->window_state.new_window_state = newvalue; OUTPUT: RETVAL MODULE = Gtk2::Gdk::Event PACKAGE = Gtk2::Gdk::Event::DND =for position post_hierarchy =head1 HIERARCHY Gtk2::Gdk::Event +----Gtk2::Gdk::Event::DND =cut BOOT: gperl_set_isa ("Gtk2::Gdk::Event::DND", "Gtk2::Gdk::Event"); #/* Event types for DND */ #struct _GdkEventDND { #// GdkEventType type; <- GdkEventAny #// GdkWindow *window; <- GdkEventAny #// gint8 send_event; <- GdkEventAny # GdkDragContext *context; #// guint32 time; <- gdk_event_get_time #// gshort x_root, y_root; <- get_root_coords #}; GdkDragContext_ornull * context (GdkEvent * eventdnd, GdkDragContext_ornull * newvalue=NULL) CODE: RETVAL = eventdnd->dnd.context; if (RETVAL) g_object_ref (RETVAL); if (items == 2 && newvalue != eventdnd->dnd.context) { if (eventdnd->dnd.context) g_object_unref (eventdnd->dnd.context); if (newvalue) g_object_ref (newvalue); eventdnd->dnd.context = newvalue; } OUTPUT: RETVAL CLEANUP: if (RETVAL) g_object_unref (RETVAL); #if GTK_CHECK_VERSION (2, 6, 0) MODULE = Gtk2::Gdk::Event PACKAGE = Gtk2::Gdk::Event::OwnerChange =for position post_hierarchy =head1 HIERARCHY Gtk2::Gdk::Event +----Gtk2::Gdk::Event::OwnerChange =cut BOOT: gperl_set_isa ("Gtk2::Gdk::Event::OwnerChange", "Gtk2::Gdk::Event"); # struct _GdkEventOwnerChange # { # GdkEventType type; <- GdkEventAny # GdkWindow *window; <- GdkEventAny # gint8 send_event; <- GdkEventAny # GdkNativeWindow owner; # GdkOwnerChange reason; # GdkAtom selection; # guint32 time; <- gdk_event_get_time # guint32 selection_time; # }; GdkNativeWindow owner (GdkEvent * event, GdkNativeWindow newvalue=0) CODE: RETVAL = event->owner_change.owner; if (items == 2 && newvalue != RETVAL) { event->owner_change.owner = newvalue; } OUTPUT: RETVAL GdkOwnerChange reason (GdkEvent * event, GdkOwnerChange newvalue=0) CODE: RETVAL = event->owner_change.reason; if (items == 2 && newvalue != RETVAL) { event->owner_change.reason = newvalue; } OUTPUT: RETVAL GdkAtom selection (GdkEvent * event, GdkAtom newvalue=0) CODE: RETVAL = event->owner_change.selection; if (items == 2 && newvalue != RETVAL) { event->owner_change.selection = newvalue; } OUTPUT: RETVAL guint32 selection_time (GdkEvent * event, guint32 newvalue=0) CODE: RETVAL = event->owner_change.selection_time; if (items == 2 && newvalue != RETVAL) { event->owner_change.selection_time = newvalue; } OUTPUT: RETVAL #endif # --------------------------------------------------------------------------- # #if GTK_CHECK_VERSION (2, 8, 0) MODULE = Gtk2::Gdk::Event PACKAGE = Gtk2::Gdk::Event::GrabBroken =for position post_hierarchy =head1 HIERARCHY Gtk2::Gdk::Event +----Gtk2::Gdk::Event::GrabBroken =cut BOOT: gperl_set_isa ("Gtk2::Gdk::Event::GrabBroken", "Gtk2::Gdk::Event"); gboolean keyboard (GdkEvent * event, gboolean newvalue=0) CODE: RETVAL = event->grab_broken.keyboard; if (items == 2 && newvalue != RETVAL) event->grab_broken.keyboard = newvalue; OUTPUT: RETVAL gboolean implicit (GdkEvent * event, gboolean newvalue=0) CODE: RETVAL = event->grab_broken.implicit; if (items == 2 && newvalue != RETVAL) event->grab_broken.implicit = newvalue; OUTPUT: RETVAL =for apidoc When you set a window into a GrabBroken event make sure you keep a reference to it for as long as that event object or any copies exist, because the event doesn't add its own reference. =cut GdkWindow_ornull * grab_window (GdkEvent * event, GdkWindow_ornull * newvalue=NULL) CODE: RETVAL = event->grab_broken.grab_window; /* GdkEventGrabBroken doesn't hold a ref on grab_window, so * just plonk the new value in, unlike for any.window above. */ if (items == 2 && newvalue != RETVAL) event->grab_broken.grab_window = newvalue; OUTPUT: RETVAL #endif # --------------------------------------------------------------------------- # MODULE = Gtk2::Gdk::Event PACKAGE = Gtk2::Gdk PREFIX = gdk_ # these are of limited usefulness, as you must have compiled GTK+ # with debugging turned on. void gdk_set_show_events (class, show_events) gboolean show_events C_ARGS: show_events gboolean gdk_get_show_events (class) C_ARGS: /*void*/ # FIXME needs a callback ## void gdk_add_client_message_filter (GdkAtom message_type, GdkFilterFunc func, gpointer data) ##void ##gdk_add_client_message_filter (message_type, func, data) ## GdkAtom message_type ## GdkFilterFunc func ## gpointer data ## gboolean gdk_setting_get (const gchar *name, GValue *value) SV * gdk_setting_get (class, name) const gchar *name PREINIT: GValue value = {0,}; CODE: g_value_init (&value, G_TYPE_INT); if (!gdk_setting_get (name, &value)) XSRETURN_UNDEF; RETVAL = gperl_sv_from_value (&value); g_value_unset (&value); OUTPUT: RETVAL Gtk2-1.2498/xs/GdkGC.xs000644 001750 000024 00000030271 11664366546 015474 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" /* * GdkGCValues code ported from Gtk-Perl 0.7009. There's no boxed type * support for this structure, but since it's only used in a couple of * functions in this file, we can scrape by without typemaps. */ SV * newSVGdkGCValues (GdkGCValues * v) { HV * h; SV * r; if (!v) return newSVsv (&PL_sv_undef); h = newHV (); r = newRV_noinc ((SV*)h); gperl_hv_take_sv_s (h, "foreground", newSVGdkColor_copy (&v->foreground)); gperl_hv_take_sv_s (h, "background", newSVGdkColor_copy (&v->background)); if (v->font) gperl_hv_take_sv_s (h, "font", newSVGdkFont (v->font)); gperl_hv_take_sv_s (h, "function", newSVGdkFunction (v->function)); gperl_hv_take_sv_s (h, "fill", newSVGdkFill (v->fill)); if (v->tile) gperl_hv_take_sv_s (h, "tile", newSVGdkPixmap (v->tile)); if (v->stipple) gperl_hv_take_sv_s (h, "stipple", newSVGdkPixmap (v->stipple)); if (v->clip_mask) gperl_hv_take_sv_s (h, "clip_mask", newSVGdkPixmap (v->clip_mask)); gperl_hv_take_sv_s (h, "subwindow_mode", newSVGdkSubwindowMode (v->subwindow_mode)); gperl_hv_take_sv_s (h, "ts_x_origin", newSViv (v->ts_x_origin)); gperl_hv_take_sv_s (h, "ts_y_origin", newSViv (v->ts_y_origin)); gperl_hv_take_sv_s (h, "clip_x_origin", newSViv (v->clip_x_origin)); gperl_hv_take_sv_s (h, "clip_y_origin", newSViv (v->clip_y_origin)); gperl_hv_take_sv_s (h, "graphics_exposures", newSViv (v->graphics_exposures)); gperl_hv_take_sv_s (h, "line_width", newSViv (v->line_width)); gperl_hv_take_sv_s (h, "line_style", newSVGdkLineStyle (v->line_style)); gperl_hv_take_sv_s (h, "cap_style", newSVGdkCapStyle (v->cap_style)); gperl_hv_take_sv_s (h, "join_style", newSVGdkJoinStyle (v->join_style)); return r; } void SvGdkGCValues (SV * data, GdkGCValues * v, GdkGCValuesMask * m) { HV * h; SV ** s; GdkGCValuesMask mask = 0; if (!gperl_sv_is_hash_ref (data)) return; h = (HV*) SvRV (data); if (!v) v = gperl_alloc_temp (sizeof(GdkGCValues)); if ((s=hv_fetch (h, "foreground", 10, 0)) && gperl_sv_is_defined (*s)) { v->foreground = *((GdkColor*) SvGdkColor (*s)); mask |= GDK_GC_FOREGROUND; } if ((s=hv_fetch (h, "background", 10, 0)) && gperl_sv_is_defined (*s)) { v->background = *((GdkColor*) SvGdkColor (*s)); mask |= GDK_GC_BACKGROUND; } if ((s=hv_fetch (h, "font", 4, 0)) && gperl_sv_is_defined (*s)) { v->font = SvGdkFont (*s); mask |= GDK_GC_FONT; } if ((s=hv_fetch (h, "function", 8, 0)) && gperl_sv_is_defined (*s)) { v->function = SvGdkFunction (*s); mask |= GDK_GC_FUNCTION; } if ((s=hv_fetch (h, "fill", 4, 0)) && gperl_sv_is_defined (*s)) { v->fill = SvGdkFill (*s); mask |= GDK_GC_FILL; } if ((s=hv_fetch (h, "tile", 4, 0)) && gperl_sv_is_defined (*s)) { v->tile = SvGdkPixmap (*s); mask |= GDK_GC_TILE; } if ((s=hv_fetch (h, "stipple", 7, 0)) && gperl_sv_is_defined (*s)) { v->stipple = SvGdkPixmap (*s); mask |= GDK_GC_STIPPLE; } if ((s=hv_fetch (h, "clip_mask", 9, 0)) && gperl_sv_is_defined (*s)) { v->clip_mask = SvGdkPixmap (*s); mask |= GDK_GC_CLIP_MASK; } if ((s=hv_fetch (h, "subwindow_mode", 14, 0)) && gperl_sv_is_defined (*s)) { v->subwindow_mode = SvGdkSubwindowMode (*s); mask |= GDK_GC_SUBWINDOW; } if ((s=hv_fetch (h, "ts_x_origin", 11, 0)) && gperl_sv_is_defined (*s)) { v->ts_x_origin = SvIV (*s); mask |= GDK_GC_TS_X_ORIGIN; } if ((s=hv_fetch (h, "ts_y_origin", 11, 0)) && gperl_sv_is_defined (*s)) { v->ts_y_origin = SvIV (*s); mask |= GDK_GC_TS_Y_ORIGIN; } if ((s=hv_fetch (h, "clip_x_origin", 13, 0)) && gperl_sv_is_defined (*s)) { v->clip_x_origin = SvIV (*s); mask |= GDK_GC_CLIP_X_ORIGIN; } if ((s=hv_fetch (h, "clip_y_origin", 13, 0)) && gperl_sv_is_defined (*s)) { v->clip_y_origin = SvIV (*s); mask |= GDK_GC_CLIP_Y_ORIGIN; } if ((s=hv_fetch (h, "graphics_exposures", 18, 0)) && gperl_sv_is_defined (*s)) { v->graphics_exposures = SvIV (*s); mask |= GDK_GC_EXPOSURES; } if ((s=hv_fetch (h, "line_width", 10, 0)) && gperl_sv_is_defined (*s)) { v->line_width= SvIV (*s); mask |= GDK_GC_LINE_WIDTH; } if ((s=hv_fetch (h, "line_style", 10, 0)) && gperl_sv_is_defined (*s)) { v->line_style= SvGdkLineStyle (*s); mask |= GDK_GC_LINE_STYLE; } if ((s=hv_fetch (h, "cap_style", 9, 0)) && gperl_sv_is_defined (*s)) { v->cap_style = SvGdkCapStyle (*s); mask |= GDK_GC_CAP_STYLE; } if ((s=hv_fetch (h, "join_style", 10, 0)) && gperl_sv_is_defined (*s)) { v->join_style = SvGdkJoinStyle (*s); mask |= GDK_GC_JOIN_STYLE; } if (m) *m = mask; } MODULE = Gtk2::Gdk::GC PACKAGE = Gtk2::Gdk::GC PREFIX = gdk_gc_ BOOT: /* the gdk backends override the public GdkGC with private, * back-end-specific types. tell gperl_get_object not to * complain about them. */ gperl_object_set_no_warn_unreg_subclass (GDK_TYPE_GC, TRUE); ## taken care of by typemaps ## void gdk_gc_unref (GdkGC *gc) ##GdkGC * gdk_gc_new (GdkDrawable * drawable); ##GdkGC * gdk_gc_new_with_values (GdkDrawable * drawable, GdkGCValues * values); =for apidoc Create and return a new GC. C<$drawable> is used for the depth and the display (C) for the GC. The GC can then be used with any drawable of the same depth on that display. C<$values> is a hashref containing some of the following keys, foreground Gtk2::Gdk::Color background Gtk2::Gdk::Color font Gtk2::Gdk::Font function Gtk2::Gdk::Function enum fill Gtk2::Gdk::Fill enum tile Gtk2::Gdk::Pixmap stipple Gtk2::Gdk::Pixmap clip_mask Gtk2::Gdk::Pixmap subwindow_mode Gtk2::Gdk::SubwindowMode enum ts_x_origin integer ts_y_origin integer clip_x_origin integer clip_y_origin integer graphics_exposures boolean integer 1 or 0 line_width integer line_style Gtk2::Gdk::LineStyle enum cap_style Gtk2::Gdk::CapStyle enum join_style Gtk2::Gdk::JoinStyle enum Keys not given get default values. For the C and C colour objects only the C field is used; the red, green and blue are ignored. For example my $pixel = 0x123456; my $color = Gtk2::Gdk::Color->new (0,0,0, $pixel); my $gc = Gtk2::Gdk::GC->new_with_values ($win, { foreground => $color, line_style => 'on_off_dash' }); =cut GdkGC_noinc* gdk_gc_new (class, GdkDrawable * drawable, SV * values=NULL) ALIAS: new_with_values = 1 CODE: if (gperl_sv_is_defined (values)) { GdkGCValuesMask m; GdkGCValues v; SvGdkGCValues (values, &v, &m); RETVAL = gdk_gc_new_with_values (drawable, &v, m); } else { if (ix == 1) warn ("passed empty values to new_with_values"); RETVAL = gdk_gc_new (drawable); } OUTPUT: RETVAL # ## void gdk_gc_get_values (GdkGC *gc, GdkGCValues *values) =for apidoc Return the attributes of C<$gc> in the form of a hashref with keys and values as described with C above. In the C and C colour objects returned only the C fields are set; the red, green and blue fields are garbage. =cut SV * gdk_gc_get_values (gc) GdkGC *gc PREINIT: GdkGCValues values; CODE: gdk_gc_get_values (gc, &values); RETVAL = newSVGdkGCValues (&values); OUTPUT: RETVAL ## void gdk_gc_set_values (GdkGC *gc, GdkGCValues *values, GdkGCValuesMask values_mask) =for apidoc Set some of the attributes of C<$gc>. C<$values> is a hashref of keys and values as described for C and C above. Fields not present in C<$values> are left unchanged. =cut void gdk_gc_set_values (gc, values) GdkGC *gc SV *values PREINIT: GdkGCValues v; GdkGCValuesMask m; CODE: SvGdkGCValues (values, &v, &m); gdk_gc_set_values (gc, &v, m); ## void gdk_gc_set_foreground (GdkGC *gc, GdkColor *color) void gdk_gc_set_foreground (gc, color) GdkGC *gc GdkColor *color ## void gdk_gc_set_background (GdkGC *gc, GdkColor *color) void gdk_gc_set_background (gc, color) GdkGC *gc GdkColor *color ## void gdk_gc_set_font (GdkGC *gc, GdkFont *font) void gdk_gc_set_font (gc, font) GdkGC *gc GdkFont *font ## void gdk_gc_set_function (GdkGC *gc, GdkFunction function) void gdk_gc_set_function (gc, function) GdkGC *gc GdkFunction function ## void gdk_gc_set_fill (GdkGC *gc, GdkFill fill) void gdk_gc_set_fill (gc, fill) GdkGC *gc GdkFill fill ## void gdk_gc_set_tile (GdkGC *gc, GdkPixmap *tile) void gdk_gc_set_tile (gc, tile) GdkGC *gc GdkPixmap *tile ## void gdk_gc_set_stipple (GdkGC *gc, GdkPixmap *stipple) void gdk_gc_set_stipple (gc, stipple) GdkGC *gc GdkPixmap *stipple ## void gdk_gc_set_ts_origin (GdkGC *gc, gint x, gint y) void gdk_gc_set_ts_origin (gc, x, y) GdkGC *gc gint x gint y ## void gdk_gc_set_clip_origin (GdkGC *gc, gint x, gint y) void gdk_gc_set_clip_origin (gc, x, y) GdkGC *gc gint x gint y ## void gdk_gc_set_clip_mask (GdkGC *gc, GdkBitmap *mask) void gdk_gc_set_clip_mask (gc, mask) GdkGC *gc SV *mask CODE: gdk_gc_set_clip_mask (gc, SvGdkBitmap_ornull (mask)); ## void gdk_gc_set_clip_rectangle (GdkGC *gc, GdkRectangle *rectangle) void gdk_gc_set_clip_rectangle (gc, rectangle) GdkGC *gc GdkRectangle_ornull *rectangle ## void gdk_gc_set_clip_region (GdkGC *gc, GdkRegion *region) void gdk_gc_set_clip_region (gc, region) GdkGC *gc GdkRegion_ornull *region ## void gdk_gc_set_subwindow (GdkGC *gc, GdkSubwindowMode mode) void gdk_gc_set_subwindow (gc, mode) GdkGC *gc GdkSubwindowMode mode ## void gdk_gc_set_exposures (GdkGC *gc, gboolean exposures) void gdk_gc_set_exposures (gc, exposures) GdkGC *gc gboolean exposures ## void gdk_gc_set_line_attributes (GdkGC *gc, gint line_width, GdkLineStyle line_style, GdkCapStyle cap_style, GdkJoinStyle join_style) void gdk_gc_set_line_attributes (gc, line_width, line_style, cap_style, join_style) GdkGC *gc gint line_width GdkLineStyle line_style GdkCapStyle cap_style GdkJoinStyle join_style ## void gdk_gc_set_dashes (GdkGC *gc, gint dash_offset, gint8 dash_list[], gint n) =for apidoc =for arg ... of integers, the length of the dash segments Sets the way dashed-lines are drawn. Lines will be drawn with alternating on and off segments of the lengths specified in list of dashes. The manner in which the on and off segments are drawn is determined by the line_style value of the GC. =cut void gdk_gc_set_dashes (gc, dash_offset, ...) GdkGC * gc gint dash_offset PREINIT: gint8 * dash_list; gint n; CODE: n = --items-1; dash_list = g_new(gint8, n); for( ; items > 1; items-- ) dash_list[items-2] = (gint8) SvIV(ST(items)); gdk_gc_set_dashes(gc, dash_offset, dash_list, n); g_free(dash_list); ## void gdk_gc_offset (GdkGC *gc, gint x_offset, gint y_offset) void gdk_gc_offset (gc, x_offset, y_offset) GdkGC *gc gint x_offset gint y_offset ## void gdk_gc_copy (GdkGC *dst_gc, GdkGC *src_gc) void gdk_gc_copy (dst_gc, src_gc) GdkGC *dst_gc GdkGC *src_gc ## void gdk_gc_set_colormap (GdkGC *gc, GdkColormap *colormap) void gdk_gc_set_colormap (gc, colormap) GdkGC *gc GdkColormap *colormap ## GdkColormap *colormap gdk_gc_get_colormap (GdkGC *gc) GdkColormap * gdk_gc_get_colormap (gc) GdkGC *gc ## void gdk_gc_set_rgb_fg_color (GdkGC *gc, GdkColor *color) void gdk_gc_set_rgb_fg_color (gc, color) GdkGC *gc GdkColor *color ## void gdk_gc_set_rgb_bg_color (GdkGC *gc, GdkColor *color) void gdk_gc_set_rgb_bg_color (gc, color) GdkGC *gc GdkColor *color #if GTK_CHECK_VERSION(2,2,0) ## GdkScreen * gdk_gc_get_screen (GdkGC *gc) GdkScreen * gdk_gc_get_screen (gc) GdkGC *gc #endif /* have GdkScreen */ Gtk2-1.2498/xs/GdkImage.xs000644 001750 000024 00000015627 11664366546 016235 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2010 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. */ #include "gtk2perl.h" #if ! GTK_CHECK_VERSION (2, 22, 0) /* plain fields before the accessor funcs of course the plain fields are better :-( */ #define gdk_image_get_bits_per_pixel(image) ((image)->bits_per_pixel) #define gdk_image_get_bytes_per_pixel(image) ((image)->bpp) #define gdk_image_get_bytes_per_line(image) ((image)->bpl) #define gdk_image_get_byte_order(image) ((image)->byte_order) #define gdk_image_get_depth(image) ((image)->depth) #define gdk_image_get_height(image) ((image)->height) #define gdk_image_get_image_type(image) ((image)->type) #define gdk_image_get_visual(image) ((image)->visual) #define gdk_image_get_width(image) ((image)->width) #define gdk_image_get_pixels(image) ((image)->mem) #endif MODULE = Gtk2::Gdk::Image PACKAGE = Gtk2::Gdk::Image PREFIX = gdk_image_ =for position DESCRIPTION =head1 DESCRIPTION A C is a 2-D array of pixel values in client-side memory. It can optionally use shared memory with the X server for fast copying to or from a window or pixmap. If you're thinking of using this then look at C first. GdkPixbuf has many more features, in particular file read and write (PNG, JPEG, etc). But a GdkImage lets you work directly in pixel values instead of expanding to RGB components. See L for C, C and C methods to draw or fetch images to or from a window or pixmap. The various C methods are Gtk 2.22 style. For previous versions they're direct field access. =cut GdkImage_noinc_ornull * gdk_image_new (class, type, visual, width, height) GdkImageType type GdkVisual *visual gint width gint height C_ARGS: type, visual, width, height # #ifndef GDK_DISABLE_DEPRECATED ## now called gdk_drawable_get_image(), for no discernible reason # GdkImage* gdk_image_get (GdkDrawable *drawable, # gint x, # gint y, # gint width, # gint height); ## not needed # GdkImage * gdk_image_ref (GdkImage *image); # void gdk_image_unref (GdkImage *image); # #endif /* GDK_DISABLE_DEPRECATED */ void gdk_image_put_pixel (image, x, y, pixel) GdkImage *image gint x gint y guint32 pixel guint32 gdk_image_get_pixel (image, x, y) GdkImage *image gint x gint y void gdk_image_set_colormap (image, colormap) GdkImage *image GdkColormap *colormap GdkColormap* gdk_image_get_colormap (image) GdkImage *image ## This looks like a perfectly good function, and a good way to get ## bitmap or whatever data into an image. It seems to be declared ## "broken" because it happens to have used malloc() instead of ## g_malloc(), and/or takes over the block of memory it was handed, ## which are pretty minor matters really ... :-( #ifdef GDK_ENABLE_BROKEN ## Untested, probably should look at the visual bytes-per-whatever for ## the SV length check. ## ## =for arg data (string) ## =cut ## GdkImage_noinc * ## gdk_image_new_bitmap (class, visual, data, width, height) ## GdkVisual *visual ## SV *data ## gint width ## gint height ## PREINIT: ## char *malloced_data, *data_ptr; ## size_t want_len; ## STRLEN data_len; ## CODE: ## want_len = (height * (int) ((width + 7) / 8)); ## data_ptr = SvPVbyte (data, data_len); ## if (data_len != want_len) { ## croak ("Bitmap data length %u should be %u", ## data_len, want_len); ## } ## malloced_data = malloc (want_len); ## if (malloced_data == NULL) { ## croak ("Cannot malloc memory"); ## } ## RETVAL = gdk_image_new_bitmap (visual, data, width, height); #endif /* GDK_ENABLE_BROKEN */ ## not needed # #ifndef GDK_DISABLE_DEPRECATED # #define gdk_image_destroy g_object_unref # #endif /* GDK_DISABLE_DEPRECATED */ ##----------------------------------------------------------------------------- ## Field accessors GdkImageType gdk_image_get_image_type (image) GdkImage *image GdkVisual * gdk_image_get_visual (image) GdkImage *image GdkByteOrder gdk_image_get_byte_order (image) GdkImage *image gint gdk_image_get_bytes_per_pixel (image) GdkImage *image ALIAS: get_bytes_per_line = 1 get_bits_per_pixel = 2 get_depth = 3 get_width = 4 get_height = 5 CODE: /* the guint16 fields expand to gint for RETVAL */ switch (ix) { case 0: RETVAL = gdk_image_get_bytes_per_pixel(image); break; case 1: RETVAL = gdk_image_get_bytes_per_line(image); break; case 2: RETVAL = gdk_image_get_bits_per_pixel(image); break; case 3: RETVAL = gdk_image_get_depth(image); break; case 4: RETVAL = gdk_image_get_width(image); break; default: /* case 5 */ RETVAL = gdk_image_get_height(image); break; } OUTPUT: RETVAL =for signature string = $image->get_pixels() =for apidoc Return a copy of the raw pixel data memory from C<$image>. This is C many bytes. =cut ## This is a copy similar to the way C C ## copies. Perhaps in the future some sort of C could ## get just part of it, or C or 4-arg substr write to part of it, ## as an alternative to individual C / C. ## ## A magic sv which could be read and written to modify the image data ## might be cute, but is probably more trouble than its worth. substr ## fetch/store funcs would make it clearer what's being done. ## ## If a magic scalar held a reference then there's a gremlin in Perl ## 5.10 lvalue C where such an sv gets kept alive in the ## function scratchpad, risking the underlying GdkImage kept alive ## longer than it should be. Or if it didn't hold a reference you'd ## have to rely on the application to keep the GdkImage alive while ## the raw memory was being manipulated. ## SV * gdk_image_get_pixels (image) GdkImage *image CODE: /* Crib note: memory block size is "bytes_per_line * height" per the shmget() or malloc() in _gdk_image_new_for_depth() of gdkimage-x11.c */ RETVAL = newSVpv ((char *) image->mem, image->bpl * image->height); OUTPUT: RETVAL Gtk2-1.2498/xs/GdkInput.xs000644 001750 000024 00000014141 11664366546 016300 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003 by the gtk2-perl team (see the file AUTHORS) * * Licensed under the LGPL, see LICENSE file for more information. * * $Id$ */ #include "gtk2perl.h" MODULE = Gtk2::Gdk::Device PACKAGE = Gtk2::Gdk PREFIX = gdk_ #ifndef GDK_MULTIHEAD_SAFE =for apidoc Returns a list of Is. =cut ## GList * gdk_devices_list (void) void gdk_devices_list (class) PREINIT: GList *i, *list = NULL; PPCODE: PERL_UNUSED_VAR (ax); list = gdk_devices_list (); for (i = list; i != NULL; i = i->next) XPUSHs (sv_2mortal (newSVGdkDevice (i->data))); #endif /* ! GDK_MULTIHEAD_SAFE */ MODULE = Gtk2::Gdk::Device PACKAGE = Gtk2::Gdk::Device PREFIX = gdk_device_ gchar * name (device) GdkDevice *device CODE: RETVAL = device->name; OUTPUT: RETVAL GdkInputSource source (device) GdkDevice *device CODE: RETVAL = device->source; OUTPUT: RETVAL GdkInputMode mode (device) GdkDevice *device CODE: RETVAL = device->mode; OUTPUT: RETVAL gboolean has_cursor (device) GdkDevice *device CODE: RETVAL = device->has_cursor; OUTPUT: RETVAL =for apidoc Returns a list of hash references that resemble the I structure, i.e. that have three keys: "use", "min", and "max". =cut void axes (device) GdkDevice *device PREINIT: int i; PPCODE: EXTEND (sp, device->num_axes); for (i = 0; i < device->num_axes; i++) { HV *axis = newHV (); gperl_hv_take_sv_s (axis, "use", newSVGdkAxisUse (device->axes[i].use)); gperl_hv_take_sv_s (axis, "min", newSVnv (device->axes[i].min)); gperl_hv_take_sv_s (axis, "max", newSVnv (device->axes[i].max)); PUSHs (sv_2mortal (newRV_noinc ((SV *) axis))); } =for apidoc Returns a list of hash references that resemble the I structure, i.e. that have two keys: "keyval" and "modifiers". =cut void keys (device) GdkDevice *device PREINIT: int i; PPCODE: EXTEND (sp, device->num_keys); for (i = 0; i < device->num_keys; i++) { HV *key = newHV (); gperl_hv_take_sv_s (key, "keyval", newSVuv (device->keys[i].keyval)); gperl_hv_take_sv_s (key, "modifiers", newSVGdkModifierType (device->keys[i].modifiers)); PUSHs (sv_2mortal (newRV_noinc ((SV *) key))); } ## void gdk_device_set_source (GdkDevice *device, GdkInputSource source) void gdk_device_set_source (device, source) GdkDevice *device GdkInputSource source ## gboolean gdk_device_set_mode (GdkDevice *device, GdkInputMode mode) gboolean gdk_device_set_mode (device, mode) GdkDevice *device GdkInputMode mode ## void gdk_device_set_key (GdkDevice *device, guint index_, guint keyval, GdkModifierType modifiers) void gdk_device_set_key (device, index_, keyval, modifiers) GdkDevice *device guint index_ guint keyval GdkModifierType modifiers ## void gdk_device_set_axis_use (GdkDevice *device, guint index_, GdkAxisUse use) void gdk_device_set_axis_use (device, index_, use) GdkDevice *device guint index_ GdkAxisUse use =for apidoc Returns the modifier mask and a list of values of the axes. =cut ## void gdk_device_get_state (GdkDevice *device, GdkWindow *window, gdouble *axes, GdkModifierType *mask) void gdk_device_get_state (device, window) GdkDevice *device GdkWindow *window PREINIT: gdouble *axes = NULL; GdkModifierType mask; int i; PPCODE: axes = g_new0 (gdouble, device->num_axes); gdk_device_get_state (device, window, axes, &mask); EXTEND (sp, device->num_axes + 1); PUSHs (sv_2mortal (newSVGdkModifierType (mask))); for (i = 0; i < device->num_axes; i++) PUSHs (sv_2mortal (newSVnv (axes[i]))); g_free (axes); =for apidoc Returns a list of hash references that resemble the I structure, i.e. that have two keys: "time" and "axes". =cut ## gboolean gdk_device_get_history (GdkDevice *device, GdkWindow *window, guint32 start, guint32 stop, GdkTimeCoord ***events, gint *n_events) void gdk_device_get_history (device, window, start, stop) GdkDevice *device GdkWindow *window guint32 start guint32 stop PREINIT: GdkTimeCoord **events = NULL; gint i, j, n_events = 0; PPCODE: if (! gdk_device_get_history (device, window, start, stop, &events, &n_events)) XSRETURN_EMPTY; EXTEND (sp, n_events); for (i = 0; i < n_events; i++) { HV *event; AV *axes; axes = newAV (); for (j = 0; j < device->num_axes; j++) av_store (axes, j, newSVnv (events[i]->axes[j])); event = newHV (); gperl_hv_take_sv_s (event, "axes", newRV_noinc ((SV *) axes)); gperl_hv_take_sv_s (event, "time", newSVuv (events[i]->time)); PUSHs (sv_2mortal (newRV_noinc ((SV *) event))); } gdk_device_free_history (events, n_events); =for apidoc =for arg ... of axis values such as the one returned by L =cut ## gboolean gdk_device_get_axis (GdkDevice *device, gdouble *axes, GdkAxisUse use, gdouble *value) gdouble gdk_device_get_axis (device, use, ...) GdkDevice *device GdkAxisUse use PREINIT: gdouble *real_axes = NULL; gdouble value = 0; int i; CODE: #define FIRST 2 real_axes = g_new0 (double, items - FIRST); for (i = FIRST; i < items; i++) real_axes[i - FIRST] = SvNV (ST (i)); if (! gdk_device_get_axis (device, real_axes, use, &value)) XSRETURN_UNDEF; RETVAL = value; g_free (real_axes); #undef FIRST OUTPUT: RETVAL #ifndef GDK_MULTIHEAD_SAFE ## GdkDevice *gdk_device_get_core_pointer (void) GdkDevice * gdk_device_get_core_pointer (class) C_ARGS: /* void */ #endif /* ! GDK_MULTIHEAD_SAFE */ #if GTK_CHECK_VERSION (2, 22, 0) GdkAxisUse gdk_device_get_axis_use (GdkDevice *device, guint index); void gdk_device_get_key (GdkDevice *device, guint index, OUTLIST guint keyval, OUTLIST GdkModifierType modifiers); GdkInputMode gdk_device_get_mode (GdkDevice *device); const gchar * gdk_device_get_name (GdkDevice *device); gint gdk_device_get_n_axes (GdkDevice *device); GdkInputSource gdk_device_get_source (GdkDevice *device); #endif /* 2.22 */ MODULE = Gtk2::Gdk::Device PACKAGE = Gtk2::Gdk::Input PREFIX = gdk_input_ ## void gdk_input_set_extension_events (GdkWindow *window, gint mask, GdkExtensionMode mode) void gdk_input_set_extension_events (class, window, mask, mode) GdkWindow *window GdkEventMask mask GdkExtensionMode mode C_ARGS: window, mask, mode Gtk2-1.2498/xs/GdkKeys.xs000644 001750 000024 00000020657 11664366546 016125 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003, 2009 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" /* the _orclass type effectively allows a class name and silently maps it to NULL. used as the first argument this allows a method to be invoked in two ways: as an object method and as a class static method. */ typedef GdkKeymap GdkKeymap_orclass; #define SvGdkKeymap_orclass(sv) ((gperl_sv_is_defined (sv) && SvROK (sv)) ? SvGdkKeymap (sv) : NULL) static GdkKeymapKey * SvGdkKeymapKey (SV *sv) { HV *hv; SV **value; GdkKeymapKey *key; if (!gperl_sv_is_hash_ref (sv)) croak ("GdkKeymapKey must be a hash reference"); key = gperl_alloc_temp (sizeof (GdkKeymapKey)); hv = (HV *) SvRV (sv); if ((value = hv_fetch (hv, "keycode", 7, 0)) && gperl_sv_is_defined (*value)) key->keycode = SvUV (*value); if ((value = hv_fetch (hv, "group", 5, 0)) && gperl_sv_is_defined (*value)) key->group = SvIV (*value); if ((value = hv_fetch (hv, "level", 5, 0)) && gperl_sv_is_defined (*value)) key->level = SvIV (*value); return key; } static SV * newSVGdkKeymapKey (GdkKeymapKey *key) { HV *hv; hv = newHV (); gperl_hv_take_sv_s (hv, "keycode", newSVuv (key->keycode)); gperl_hv_take_sv_s (hv, "group", newSViv (key->group)); gperl_hv_take_sv_s (hv, "level", newSViv (key->level)); return newRV_noinc ((SV *) hv); } MODULE = Gtk2::Gdk::Keys PACKAGE = Gtk2::Gdk::Keymap PREFIX = gdk_keymap_ BOOT: gperl_object_set_no_warn_unreg_subclass (GDK_TYPE_KEYMAP, TRUE); ## GdkKeymap* gdk_keymap_get_default (void) GdkKeymap* gdk_keymap_get_default (class) C_ARGS: /* (void) */ #if GTK_CHECK_VERSION(2,2,0) ## GdkKeymap* gdk_keymap_get_for_display (GdkDisplay *display) GdkKeymap* gdk_keymap_get_for_display (class, display) GdkDisplay *display C_ARGS: display #endif ## guint gdk_keymap_lookup_key (GdkKeymap * keymap, const GdkKeymapKey * key) guint gdk_keymap_lookup_key (keymap, key) GdkKeymap_orclass * keymap SV * key PREINIT: GdkKeymapKey * real_key = NULL; CODE: real_key = SvGdkKeymapKey (key); RETVAL = gdk_keymap_lookup_key (keymap, real_key); OUTPUT: RETVAL ## gboolean gdk_keymap_translate_keyboard_state (GdkKeymap *keymap, guint hardware_keycode, GdkModifierType state, gint group, guint *keyval, gint *effective_group, gint *level, GdkModifierType *consumed_modifiers) =for apidoc =for signature (keyval, effective_group, level, consumed_modifiers) = $keymap->translate_keyboard_state (hardware_keycode, state, group) =cut void gdk_keymap_translate_keyboard_state (keymap, hardware_keycode, state, group) GdkKeymap_orclass * keymap guint hardware_keycode GdkModifierType state gint group PREINIT: guint keyval; gint effective_group; gint level; GdkModifierType consumed_modifiers; PPCODE: if (!gdk_keymap_translate_keyboard_state (keymap, hardware_keycode, state, group, &keyval, &effective_group, &level, &consumed_modifiers)) XSRETURN_EMPTY; EXTEND (SP, 4); PUSHs (sv_2mortal (newSViv (keyval))); PUSHs (sv_2mortal (newSViv (effective_group))); PUSHs (sv_2mortal (newSViv (level))); PUSHs (sv_2mortal (newSVGdkModifierType (consumed_modifiers))); =for apidoc =for signature keys = $keymap->get_entries_for_keyval (keyval) Returns a list of Is. Obtains a list of keycode/group/level combinations that will generate I<$keyval>. Groups and levels are two kinds of keyboard mode; in general, the level determines whether the top or bottom symbol on a key is used, and the group determines whether the left or right symbol is used. On US keyboards, the shift key changes the keyboard level, and there are no groups. A group switch key might convert a keyboard between Hebrew to English modes, for example. Gtk2::Gdk::Event::Key contains a group field that indicates the active keyboard group. The level is computed from the modifier mask. =cut ## gboolean gdk_keymap_get_entries_for_keyval (GdkKeymap *keymap, guint keyval, GdkKeymapKey **keys, gint *n_keys) void gdk_keymap_get_entries_for_keyval (keymap, keyval) GdkKeymap_orclass * keymap guint keyval PREINIT: GdkKeymapKey * keys = NULL; gint n_keys; int i; PPCODE: if (!gdk_keymap_get_entries_for_keyval (keymap, keyval, &keys, &n_keys)) XSRETURN_EMPTY; EXTEND (SP, n_keys); for (i = 0; i < n_keys; i++) PUSHs (sv_2mortal (newSVGdkKeymapKey (&keys[i]))); g_free (keys); =for apidoc =for signature ({ key1, keyval1 }, { ... }) = $keymap->get_entries_for_keycode (hardware_keycode) Returns a list of hash references, each with two keys: "key" pointing to a I and "keyval" pointing to the corresponding key value. =cut ## gboolean gdk_keymap_get_entries_for_keycode (GdkKeymap *keymap, guint hardware_keycode, GdkKeymapKey **keys, guint **keyvals, gint *n_entries) void gdk_keymap_get_entries_for_keycode (keymap, hardware_keycode) GdkKeymap_orclass * keymap guint hardware_keycode PREINIT: GdkKeymapKey * keys = NULL; guint * keyvals = NULL; gint n_entries; int i; HV * hv; PPCODE: if (!gdk_keymap_get_entries_for_keycode (keymap, hardware_keycode, &keys, &keyvals, &n_entries)) XSRETURN_EMPTY; EXTEND (SP, n_entries); for (i = 0; i < n_entries; i++) { hv = newHV (); gperl_hv_take_sv_s (hv, "key", newSVGdkKeymapKey (&keys[i])); gperl_hv_take_sv_s (hv, "keyval", newSVuv (keyvals[i])); PUSHs (sv_2mortal (newRV_noinc ((SV*) hv))); } PangoDirection gdk_keymap_get_direction (keymap) GdkKeymap_orclass *keymap #if GTK_CHECK_VERSION (2, 12, 0) gboolean gdk_keymap_have_bidi_layouts (GdkKeymap *keymap); #endif #if GTK_CHECK_VERSION (2, 16, 0) gboolean gdk_keymap_get_caps_lock_state (GdkKeymap *keymap); #endif #if GTK_CHECK_VERSION (2, 20, 0) GdkModifierType gdk_keymap_add_virtual_modifiers (GdkKeymap *keymap, GdkModifierType state) CODE: gdk_keymap_add_virtual_modifiers (keymap, &state); RETVAL = state; OUTPUT: RETVAL =for apidoc =for signature (bool, new_state) = $keymap->map_virtual_modifiers (keymap, state) =cut void gdk_keymap_map_virtual_modifiers (GdkKeymap *keymap, GdkModifierType state) PREINIT: gboolean result; PPCODE: result = gdk_keymap_map_virtual_modifiers (keymap, &state); EXTEND (SP, 2); PUSHs (sv_2mortal (boolSV (result))); PUSHs (sv_2mortal (newSVGdkModifierType (state))); #endif /* 2.20 */ MODULE = Gtk2::Gdk::Keys PACKAGE = Gtk2::Gdk PREFIX = gdk_ gchar * gdk_keyval_name (class, keyval) guint keyval C_ARGS: keyval ## guint gdk_keyval_from_name (const gchar *keyval_name) guint gdk_keyval_from_name (class, keyval_name) const gchar * keyval_name C_ARGS: keyval_name ## void gdk_keyval_convert_case (guint symbol, guint *lower, guint *upper) =for apidoc =for signature (lower, upper) = Gtk2::Gdk->keyval_convert_case ($symbol) =cut void gdk_keyval_convert_case (class, symbol) guint symbol PREINIT: guint lower; guint upper; PPCODE: gdk_keyval_convert_case (symbol, &lower, &upper); EXTEND (SP, 2); PUSHs (sv_2mortal (newSViv (lower))); PUSHs (sv_2mortal (newSViv (upper))); ## guint gdk_keyval_to_upper (guint keyval) G_GNUC_CONST guint gdk_keyval_to_upper (class, keyval) guint keyval C_ARGS: keyval ## guint gdk_keyval_to_lower (guint keyval) G_GNUC_CONST guint gdk_keyval_to_lower (class, keyval) guint keyval C_ARGS: keyval ## gboolean gdk_keyval_is_upper (guint keyval) G_GNUC_CONST gboolean gdk_keyval_is_upper (class, keyval) guint keyval C_ARGS: keyval ## gboolean gdk_keyval_is_lower (guint keyval) G_GNUC_CONST gboolean gdk_keyval_is_lower (class, keyval) guint keyval C_ARGS: keyval ## guint32 gdk_keyval_to_unicode (guint keyval) G_GNUC_CONST guint32 gdk_keyval_to_unicode (class, keyval) guint keyval C_ARGS: keyval ## guint gdk_unicode_to_keyval (guint32 wc) G_GNUC_CONST guint gdk_unicode_to_keyval (class, wc) guint32 wc C_ARGS: wc Gtk2-1.2498/xs/GdkPango.xs000644 001750 000024 00000010616 11664366546 016250 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2005-2006 by the gtk2-perl team (see the file AUTHORS) * * Licensed under the LGPL, see LICENSE file for more information. * * $Id$ */ #include "gtk2perl.h" #define GTK2PERL_PANGO_ATTR_REGISTER_CUSTOM_TYPE(attr, package) \ { \ static gboolean type_registered_already = FALSE; \ if (!type_registered_already) { \ gtk2perl_pango_attribute_register_custom_type \ ((attr)->klass->type, package); \ type_registered_already = TRUE; \ } \ } #define GTK2PERL_PANGO_ATTR_STORE_INDICES(offset, attr) \ if (items == offset + 2) { \ guint start = SvUV (ST (offset)); \ guint end = SvUV (ST (offset + 1)); \ attr->start_index = start; \ attr->end_index = end; \ } MODULE = Gtk2::Gdk::Pango PACKAGE = Gtk2::Gdk::PangoRenderer PREFIX = gdk_pango_renderer_ # We own the reference. # PangoRenderer *gdk_pango_renderer_new (GdkScreen *screen); PangoRenderer_noinc * gdk_pango_renderer_new (class, screen) GdkScreen *screen C_ARGS: screen # gtk+ owns the reference. # PangoRenderer *gdk_pango_renderer_get_default (GdkScreen *screen); PangoRenderer * gdk_pango_renderer_get_default (class, screen) GdkScreen *screen C_ARGS: screen void gdk_pango_renderer_set_drawable (GdkPangoRenderer *gdk_renderer, GdkDrawable_ornull *drawable); void gdk_pango_renderer_set_gc (GdkPangoRenderer *gdk_renderer, GdkGC_ornull *gc); void gdk_pango_renderer_set_stipple (GdkPangoRenderer *gdk_renderer, PangoRenderPart part, GdkBitmap_ornull *stipple); void gdk_pango_renderer_set_override_color (GdkPangoRenderer *gdk_renderer, PangoRenderPart part, const GdkColor_ornull *color); # FIXME: Do we need this? The docs say to use gtk_widget_get_pango_context() # instead. # PangoContext *gdk_pango_context_get_for_screen (GdkScreen *screen); # FIXME: How to bind these? Class static method or function? # GdkRegion *gdk_pango_layout_line_get_clip_region (PangoLayoutLine *line, gint x_origin, gint y_origin, gint *index_ranges, gint n_ranges); # GdkRegion *gdk_pango_layout_get_clip_region (PangoLayout *layout, gint x_origin, gint y_origin, gint *index_ranges, gint n_ranges); # --------------------------------------------------------------------------- # MODULE = Gtk2::Gdk::Pango PACKAGE = Gtk2::Gdk::Pango::AttrStipple PREFIX = gdk_pango_attr_stipple_ BOOT: gperl_set_isa ("Gtk2::Gdk::Pango::AttrStipple", "Gtk2::Pango::Attribute"); PangoAttribute_own * gdk_pango_attr_stipple_new (class, GdkBitmap_ornull *stipple, ...); C_ARGS: stipple POSTCALL: GTK2PERL_PANGO_ATTR_REGISTER_CUSTOM_TYPE (RETVAL, "Gtk2::Gdk::Pango::AttrStipple"); GTK2PERL_PANGO_ATTR_STORE_INDICES (2, RETVAL); GdkBitmap_noinc * stipple (PangoAttribute * attr, ...) CODE: RETVAL = ((GdkPangoAttrStipple*) attr)->stipple; if (items > 1) ((GdkPangoAttrStipple*) attr)->stipple = g_object_ref (SvGdkBitmap_ornull (ST (1))); OUTPUT: RETVAL # --------------------------------------------------------------------------- # MODULE = Gtk2::Gdk::Pango PACKAGE = Gtk2::Gdk::Pango::AttrEmbossed PREFIX = gdk_pango_attr_embossed_ BOOT: gperl_set_isa ("Gtk2::Gdk::Pango::AttrEmbossed", "Gtk2::Pango::Attribute"); PangoAttribute_own * gdk_pango_attr_embossed_new (class, gboolean embossed, ...); C_ARGS: embossed POSTCALL: GTK2PERL_PANGO_ATTR_REGISTER_CUSTOM_TYPE (RETVAL, "Gtk2::Gdk::Pango::AttrEmbossed"); GTK2PERL_PANGO_ATTR_STORE_INDICES (2, RETVAL); gboolean embossed (PangoAttribute * attr, ...) CODE: RETVAL = ((GdkPangoAttrEmbossed*) attr)->embossed; if (items > 1) ((GdkPangoAttrEmbossed*) attr)->embossed = SvTRUE (ST (1)); OUTPUT: RETVAL # --------------------------------------------------------------------------- # #if GTK_CHECK_VERSION (2, 12, 0) MODULE = Gtk2::Gdk::Pango PACKAGE = Gtk2::Gdk::Pango::AttrEmbossColor PREFIX = gdk_pango_attr_emboss_color_ BOOT: gperl_set_isa ("Gtk2::Gdk::Pango::AttrEmbossColor", "Gtk2::Pango::Attribute"); PangoAttribute_own * gdk_pango_attr_emboss_color_new (class, const GdkColor *color, ...); C_ARGS: color POSTCALL: GTK2PERL_PANGO_ATTR_REGISTER_CUSTOM_TYPE (RETVAL, "Gtk2::Gdk::Pango::AttrEmbossColor"); GTK2PERL_PANGO_ATTR_STORE_INDICES (2, RETVAL); PangoColor * color (PangoAttribute * attr, ...) PREINIT: PangoColor color; CODE: color = ((GdkPangoAttrEmbossColor*) attr)->color; RETVAL = &color; if (items > 1) ((GdkPangoAttrEmbossColor*) attr)->color = *((PangoColor *) SvPangoColor (ST (1))); OUTPUT: RETVAL #endif Gtk2-1.2498/xs/GdkPixbuf.xs000644 001750 000024 00000104457 12104044234 016421 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003-2008, 2010-2013 by the gtk2-perl team (see the file * AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #define GDK_PIXBUF_ENABLE_BACKEND 1 /* for gdk_pixbuf_set_option() prototype */ #include "gtk2perl.h" /* for backwards-compatibility: */ #ifndef Newx # define Newx(v,n,t) New(0,v,n,t) #endif static void gtk2perl_pixbuf_destroy_notify (guchar * pixels, gpointer data) { PERL_UNUSED_VAR (data); Safefree (pixels); } #if GTK_CHECK_VERSION (2, 2, 0) SV * newSVGdkPixbufFormat (GdkPixbufFormat * format) { gchar * s; gchar ** strv; int j; AV * av; HV * stash, * hv = newHV (); s = gdk_pixbuf_format_get_name (format); gperl_hv_take_sv_s (hv, "name", newSVGChar (s)); g_free (s); s = gdk_pixbuf_format_get_description (format); gperl_hv_take_sv_s (hv, "description", newSVGChar (s)); g_free (s); strv = gdk_pixbuf_format_get_mime_types (format); av = newAV (); for (j = 0 ; strv && strv[j] ; j++) av_store (av, j, newSVGChar (strv[j])); gperl_hv_take_sv_s (hv, "mime_types", newRV_noinc ((SV*) av)); g_strfreev (strv); strv = gdk_pixbuf_format_get_extensions (format); av = newAV (); for (j = 0 ; strv && strv[j] ; j++) av_store (av, j, newSVGChar (strv[j])); gperl_hv_take_sv_s (hv, "extensions", newRV_noinc ((SV*) av)); g_strfreev (strv); gperl_hv_take_sv_s (hv, "is_writable", newSVuv (gdk_pixbuf_format_is_writable (format))); #if GTK_CHECK_VERSION (2,6,0) { gboolean b; b = gdk_pixbuf_format_is_scalable (format); gperl_hv_take_sv_s (hv, "is_scalable", newSVuv (b)); b = gdk_pixbuf_format_is_disabled (format); gperl_hv_take_sv_s (hv, "is_disabled", newSVuv (b)); s = gdk_pixbuf_format_get_license (format); gperl_hv_take_sv_s (hv, "license", newSVGChar (s)); g_free (s); } #endif /* Store the original format pointer in the hash so that SvGdkPixbufFormat can retrieve and return it. */ _gperl_attach_mg ((SV*) hv, format); stash = gv_stashpv ("Gtk2::Gdk::PixbufFormat", TRUE); return sv_bless ((SV*) newRV_noinc ((SV*) hv), stash); } GdkPixbufFormat * SvGdkPixbufFormat (SV * sv) { MAGIC *mg; if (!gperl_sv_is_defined (sv) || !SvROK (sv) || !(mg = _gperl_find_mg (SvRV (sv)))) return NULL; return (GdkPixbufFormat *) mg->mg_ptr; } #endif /* 2.2.0 */ #if GTK_CHECK_VERSION(2, 4, 0) static gboolean save_to_sv_callback (const gchar * data, gsize count, GError ** error, gpointer user_data) { SV * sv = user_data; sv_catpvn_nomg (sv, data, count); /* XXX no way to find out if that failed. */ PERL_UNUSED_VAR (error); return TRUE; } #endif /* 2.4.0 */ MODULE = Gtk2::Gdk::Pixbuf PACKAGE = Gtk2::Gdk::Pixbuf PREFIX = gdk_pixbuf_ =for enum GdkPixbufError =cut =for enum GdkPixbufAlphaMode =cut =for enum GdkColorspace =cut ## void gdk_pixbuf_render_threshold_alpha (GdkPixbuf * pixbuf, GdkBitmap * bitmap, int src_x, int src_y, int dest_x, int dest_y, int width, int height, int alpha_threshold); void gdk_pixbuf_render_threshold_alpha (pixbuf, bitmap, src_x, src_y, dest_x, dest_y, width, height, alpha_threshold) GdkPixbuf * pixbuf GdkBitmap * bitmap int src_x int src_y int dest_x int dest_y int width int height int alpha_threshold ## void gdk_pixbuf_render_to_drawable (GdkPixbuf *pixbuf, GdkDrawable *drawable, GdkGC *gc, int src_x, int src_y, int dest_x, int dest_y, int width, int height, GdkRgbDither dither, int x_dither, int y_dither) void gdk_pixbuf_render_to_drawable (pixbuf, drawable, gc, src_x, src_y, dest_x, dest_y, width, height, dither, x_dither, y_dither) GdkPixbuf *pixbuf GdkDrawable *drawable GdkGC *gc int src_x int src_y int dest_x int dest_y int width int height GdkRgbDither dither int x_dither int y_dither ## void gdk_pixbuf_render_to_drawable_alpha (GdkPixbuf *pixbuf, GdkDrawable *drawable, int src_x, int src_y, int dest_x, int dest_y, int width, int height, GdkPixbufAlphaMode alpha_mode, int alpha_threshold, GdkRgbDither dither, int x_dither, int y_dither) void gdk_pixbuf_render_to_drawable_alpha (pixbuf, drawable, src_x, src_y, dest_x, dest_y, width, height, alpha_mode, alpha_threshold, dither, x_dither, y_dither) GdkPixbuf *pixbuf GdkDrawable *drawable int src_x int src_y int dest_x int dest_y int width int height GdkPixbufAlphaMode alpha_mode int alpha_threshold GdkRgbDither dither int x_dither int y_dither =for apidoc =for signature pixmap = $pixbuf->render_pixmap_and_mask_for_colormap ($colormap, $alpha_threshold) =for signature (pixmap, mask) = $pixbuf->render_pixmap_and_mask_for_colormap ($colormap, $alpha_threshold) =cut void gdk_pixbuf_render_pixmap_and_mask_for_colormap (pixbuf, colormap, alpha_threshold) GdkPixbuf *pixbuf GdkColormap *colormap int alpha_threshold PPCODE: { GdkPixmap *pm; GdkBitmap *bm; gdk_pixbuf_render_pixmap_and_mask_for_colormap (pixbuf, colormap, &pm, GIMME_V == G_ARRAY ? &bm : 0, alpha_threshold); XPUSHs (sv_2mortal (newSVGdkPixmap_noinc (pm))); if (GIMME_V == G_ARRAY) XPUSHs (sv_2mortal (newSVGdkBitmap_noinc (bm))); } =for apidoc =for signature pixmap = $pixbuf->render_pixmap_and_mask ($alpha_threshold) =for signature (pixmap, mask) = $pixbuf->render_pixmap_and_mask ($alpha_threshold) =cut void gdk_pixbuf_render_pixmap_and_mask (pixbuf, alpha_threshold) GdkPixbuf *pixbuf int alpha_threshold PPCODE: { GdkPixmap *pm; GdkBitmap *bm; gdk_pixbuf_render_pixmap_and_mask (pixbuf, &pm, GIMME_V == G_ARRAY ? &bm : 0, alpha_threshold); XPUSHs (sv_2mortal (newSVGdkPixmap_noinc (pm))); if (GIMME_V == G_ARRAY) XPUSHs (sv_2mortal (newSVGdkBitmap_noinc (bm))); } =for apidoc get_from_image =for signature pixbuf = Gtk2::Gdk::Pixbuf->get_from_image ($src, $cmap, $src_x, $src_y, $dest_x, $dest_y, $width, $height) =for signature pixbuf = $pixbuf->get_from_image ($src, $cmap, $src_x, $src_y, $dest_x, $dest_y, $width, $height) =for arg src (GdkImage) Fetch pixels from a Gtk2::Gdk::Image as a Gtk2::Gdk::Pixbuf. Returns a new Gtk2::Gdk::Pixbuf if you use the class form, or I<$pixbuf> if you call it on an existing pixbuf. =cut =for apidoc =for signature pixbuf = Gtk2::Gdk::Pixbuf->get_from_drawable ($src, $cmap, $src_x, $src_y, $dest_x, $dest_y, $width, $height) =for signature pixbuf = $pixbuf->get_from_drawable ($src, $cmap, $src_x, $src_y, $dest_x, $dest_y, $width, $height) =for arg src (GdkDrawable) Fetch pixels from a Gtk2::Gdk::Drawable as a Gtk2::Gdk::Pixbuf. Returns a new Gtk2::Gdk::Pixbuf if you use the class form, or I<$pixbuf> if you call it on an existing pixbuf. =cut ## GdkPixbuf *gdk_pixbuf_get_from_drawable (GdkPixbuf *dest, GdkDrawable *src, GdkColormap *cmap, int src_x, int src_y, int dest_x, int dest_y, int width, int height); SV * gdk_pixbuf_get_from_drawable (dest_or_class, src, cmap, src_x, src_y, dest_x, dest_y, width, height) SV * dest_or_class SV * src GdkColormap_ornull *cmap int src_x int src_y int dest_x int dest_y int width int height ALIAS: get_from_image = 1 PREINIT: GdkPixbuf * pixbuf, * dest; CODE: dest = (gperl_sv_is_defined (dest_or_class) && SvROK (dest_or_class)) ? SvGdkPixbuf (dest_or_class) : NULL; if (ix == 1) pixbuf = gdk_pixbuf_get_from_image (dest, SvGdkImage (src), cmap, src_x, src_y, dest_x, dest_y, width, height); else pixbuf = gdk_pixbuf_get_from_drawable (dest, SvGdkDrawable (src), cmap, src_x, src_y, dest_x, dest_y, width, height); if (!pixbuf) XSRETURN_UNDEF; /* we own the output pixbuf if there was no destination supplied. */ RETVAL = gperl_new_object (G_OBJECT (pixbuf), dest != pixbuf); OUTPUT: RETVAL ## GQuark gdk_pixbuf_error_quark (void) G_GNUC_CONST ### handled by Glib::Object ## GdkPixbuf *gdk_pixbuf_ref (GdkPixbuf *pixbuf) ## void gdk_pixbuf_unref (GdkPixbuf *pixbuf) ## GdkColorspace gdk_pixbuf_get_colorspace (const GdkPixbuf *pixbuf) GdkColorspace gdk_pixbuf_get_colorspace (pixbuf) GdkPixbuf *pixbuf ## int gdk_pixbuf_get_n_channels (const GdkPixbuf *pixbuf) int gdk_pixbuf_get_n_channels (pixbuf) GdkPixbuf *pixbuf ## gboolean gdk_pixbuf_get_has_alpha (const GdkPixbuf *pixbuf) gboolean gdk_pixbuf_get_has_alpha (pixbuf) GdkPixbuf *pixbuf ## int gdk_pixbuf_get_bits_per_sample (const GdkPixbuf *pixbuf) int gdk_pixbuf_get_bits_per_sample (pixbuf) GdkPixbuf *pixbuf ## guchar *gdk_pixbuf_get_pixels (const GdkPixbuf *pixbuf) =for apidoc Return a copy of the bytes comprising the pixel data of C<$pixbuf>. As described in the Gdk Pixbuf reference manual (the "Note" section of "The GdkPixbuf Structure"), the last row does not extend to the rowstride, but ends with the last byte of the last pixel. The length of the C return reflects this. =cut SV * gdk_pixbuf_get_pixels (pixbuf) GdkPixbuf *pixbuf PREINIT: guchar * pixels; STRLEN size; CODE: /* For reference, most pixbuf mallocs are height*rowstride, for example gdk_pixbuf_new() does that. But gdk_pixbuf_copy() mallocs only the lesser "last row unpadded" size. If the code here used height*rowstride it would read past the end of such a block. Most of the time rowstride is the next multiple of 4, and a malloced block is the next multiple of 4 too, so it's ok, but for a bigger rowstride it's not. The following calculation adapted from gdk_pixbuf_copy() circa Gtk 2.16. bits_per_sample is only ever 8 currently, making it simply n_channels many bytes-per-pixel, but the calculation anticipates bits not a multiple of 8. */ size = ((gdk_pixbuf_get_height(pixbuf) - 1) * gdk_pixbuf_get_rowstride(pixbuf) + gdk_pixbuf_get_width(pixbuf) * ((gdk_pixbuf_get_n_channels(pixbuf) * gdk_pixbuf_get_bits_per_sample(pixbuf) + 7) / 8)); pixels = gdk_pixbuf_get_pixels (pixbuf); RETVAL = newSVpv ((gchar *) pixels, size); OUTPUT: RETVAL ## int gdk_pixbuf_get_width (const GdkPixbuf *pixbuf) int gdk_pixbuf_get_width (pixbuf) GdkPixbuf *pixbuf ## int gdk_pixbuf_get_height (const GdkPixbuf *pixbuf) int gdk_pixbuf_get_height (pixbuf) GdkPixbuf *pixbuf ## int gdk_pixbuf_get_rowstride (const GdkPixbuf *pixbuf) int gdk_pixbuf_get_rowstride (pixbuf) GdkPixbuf *pixbuf ## G_CONST_RETURN gchar * gdk_pixbuf_get_option (GdkPixbuf *pixbuf, const gchar *key) const gchar_ornull * gdk_pixbuf_get_option (pixbuf, key) GdkPixbuf * pixbuf const gchar * key #if GTK_CHECK_VERSION (2, 2, 0) gboolean gdk_pixbuf_set_option (GdkPixbuf *pixbuf, const gchar *key, const gchar *value); #endif /* 2.2 */ ## GdkPixbuf *gdk_pixbuf_new (GdkColorspace colorspace, gboolean has_alpha, int bits_per_sample, int width, int height) GdkPixbuf_noinc * gdk_pixbuf_new (class, colorspace, has_alpha, bits_per_sample, width, height) GdkColorspace colorspace gboolean has_alpha int bits_per_sample int width int height C_ARGS: colorspace, has_alpha, bits_per_sample, width, height ## GdkPixbuf *gdk_pixbuf_copy (const GdkPixbuf *pixbuf) GdkPixbuf_noinc * gdk_pixbuf_copy (pixbuf) GdkPixbuf *pixbuf ## GdkPixbuf *gdk_pixbuf_new_subpixbuf (GdkPixbuf *src_pixbuf, int src_x, int src_y, int width, int height) GdkPixbuf_noinc * gdk_pixbuf_new_subpixbuf (src_pixbuf, src_x, src_y, width, height) GdkPixbuf *src_pixbuf int src_x int src_y int width int height ## GdkPixbuf *gdk_pixbuf_new_from_file (const char *filename, GError **error) =for apidoc __gerror__ =cut GdkPixbuf_noinc * gdk_pixbuf_new_from_file (class, filename) GPerlFilename filename PREINIT: GError *error = NULL; CODE: RETVAL = gdk_pixbuf_new_from_file (filename, &error); if (!RETVAL) gperl_croak_gerror (filename, error); OUTPUT: RETVAL #if GTK_CHECK_VERSION(2,4,0) ## GdkPixbuf *gdk_pixbuf_new_from_file_at_size (const char *filename, int width, int height, GError **error); =for apidoc __gerror__ =cut GdkPixbuf_noinc * gdk_pixbuf_new_from_file_at_size (class, GPerlFilename filename, int width, int height) PREINIT: GError *error = NULL; CODE: RETVAL = gdk_pixbuf_new_from_file_at_size (filename, width, height, &error); if (!RETVAL) gperl_croak_gerror (filename, error); OUTPUT: RETVAL #endif #if GTK_CHECK_VERSION(2,6,0) ## GdkPixbuf * gdk_pixbuf_new_from_file_at_scale (const char *filename, int width, int height, gboolean preserve_aspect_ratio, GError **error) =for apidoc __gerror__ =cut GdkPixbuf_noinc * gdk_pixbuf_new_from_file_at_scale (class, GPerlFilename filename, int width, int height, gboolean preserve_aspect_ratio) PREINIT: GError *error = NULL; CODE: RETVAL = gdk_pixbuf_new_from_file_at_scale (filename, width, height, preserve_aspect_ratio, &error); if (!RETVAL) gperl_croak_gerror (filename, error); OUTPUT: RETVAL #endif ### GdkPixbuf *gdk_pixbuf_new_from_data (const guchar *data, GdkColorspace colorspace, gboolean has_alpha, int bits_per_sample, int width, int height, int rowstride, GdkPixbufDestroyNotify destroy_fn, gpointer destroy_fn_data) =for apidoc =for arg data (scalar) packed binary pixel data, usually made with pack() =for arg has_alpha true if the image data includes an alpha channel (opacity information). =for arg width in pixels. =for arg height in pixels. =for arg rowstride distance in bytes between row starts; usually 3*width for rgb data, 4*width if I<$has_alpha> is true. Creates a new Gtk2::Gdk::Pixbuf out of in-memory image data. Currently only RGB images with 8 bits per sample are supported. In C this function allows you to wrap a GdkPixbuf structure around existing pixel data. In Perl, we have to use C to generate a scalar containing the pixel data, and pass that scalar to C, which copies the scalar to keep it around. It also manages the memory automagically, so there's no need for a destruction notifier function. This all means that if you change your copy of the data scalar later, the pixbuf will I reflect that, but because of the way perl manages string data and scalars, it would be pretty fragile to do that in the first place. If you need to modify a pixbuf's data after it has been created, you can create new pixbufs for the changed regions and use C<< $pixbuf->composite >>, or try a different approach (possibly use a server-side pixmap and gdk drawing primitives, or something like libart). =cut GdkPixbuf_noinc * gdk_pixbuf_new_from_data (class, data, colorspace, has_alpha, bits_per_sample, width, height, rowstride) SV * data GdkColorspace colorspace gboolean has_alpha int bits_per_sample int width int height int rowstride PREINIT: char *data_ptr, *pix_ptr; STRLEN len; CODE: data_ptr = SvPV (data, len); Newx (pix_ptr, len, char); Copy (data_ptr, pix_ptr, len, char); RETVAL = gdk_pixbuf_new_from_data ((const guchar *) pix_ptr, colorspace, has_alpha, bits_per_sample, width, height, rowstride, gtk2perl_pixbuf_destroy_notify, NULL); OUTPUT: RETVAL ## GdkPixbuf *gdk_pixbuf_new_from_xpm_data (const char **data) =for apidoc =for arg ... xpm data as a list of strings (see discussion) X Pixel Map (XPM) files are designed to be easy to edit and easy to include directly into C programs. The file format is the C syntax of the declaration and initialization of a variable containing an array of strings. C allows you to create an image from such data included directly in your program source. Since XPM files are C syntax, you must mangle that source a bit to work in a Perl program. For example, this is a valid xpm, but it is not valid Perl code: /* XPM */ static char * test_xpm[] = { "4 4 3 1", " c None", ". c red", "+ c blue", ".. +", ". ++", " ++.", "++.."}; You'll need to change the array declaration format, and change the double-quoted strings to single-quoted to avoid Perl interpreting any chars in the strings as special. my @test_xpm = ( '4 4 3 1', ' c None', '. c red', '+ c blue', '.. +', '. ++', ' ++.', '++..'); $pixbuf = Gtk2::Gdk::Pixbuf->new_from_xpm_data (@test_xpm); [It's only two or three regexes... Perhaps we should distribute a script to convert XPM files to the proper format?] =cut GdkPixbuf_noinc * gdk_pixbuf_new_from_xpm_data (class, ...) PREINIT: char ** lines; int i; CODE: /* Add a NULL terminator to protect against a segv if too few lines * are supplied. GdkPixbuf's io-xpm.c's mem_buffer() recognizes that * as an end of data. (Not documented, so far as i can tell, but * still a pretty good idea.) */ lines = g_new (char *, items - 1 + 1); for (i = 1; i < items; i++) lines[i-1] = SvPV_nolen (ST (i)); lines[i-1] = NULL; RETVAL = gdk_pixbuf_new_from_xpm_data((const char**)lines); g_free(lines); OUTPUT: RETVAL ## croaks on error ## GdkPixbuf* gdk_pixbuf_new_from_inline (gint data_length, const guint8 *data, gboolean copy_pixels, GError **error) =for apidoc __gerror__ =for arg data (scalar) packed binary data, the format is special, see discussion =for arg copy_pixels whether I<$data> should be copied, defaults to true Gtk+ ships with a tool called C, which turns any image understood by gdk-pixbuf into the C syntax of the declaration of a static data structure containing that image data, to be #included directly into your source code. C creates a new GdkPixbuf from that data structure. Currently, this is not very easy to do from Perl. The output of C must be mangled rather ruthlessly to create valid Perl code using pack and translation from C string escapes to valid Perl string escapes (for encoding and interpretation isses). Because Perl scalars are garbage collected, it's rather rare to have the ability to use static data, so I<$copy_pixels> defaults to true; if you can guarantee the image data will outlive the pixbuf you can pass false here and save some memory. For more information, see the description of C in the C API reference at http://gtk.org/api/ . =cut GdkPixbuf_noinc * gdk_pixbuf_new_from_inline (class, data, copy_pixels=TRUE) SV *data gboolean copy_pixels PREINIT: GError * error = NULL; STRLEN data_length; const guchar * raw_data; CODE: raw_data = (const guchar *) SvPV (data, data_length); RETVAL = gdk_pixbuf_new_from_inline (data_length, raw_data, copy_pixels, &error); if (!RETVAL) gperl_croak_gerror (NULL, error); OUTPUT: RETVAL ### croaks on error ## gboolean gdk_pixbuf_save (GdkPixbuf *pixbuf, const char *filename, const char *type, GError **error, ...) =for apidoc __gerror__ =for arg type name of file format (e.g. "jpeg", "png") =for arg ... list of key-value save options Save I<$pixbuf> to a file named I<$filename>, in the format I<$type>, which is currently "jpeg" or "png". The function will croak if there is an error, which may arise from file- or image format-related issues. Any values in I<...> should be key/value string pairs that modify the saving parameters. For example: $pixbuf->save ($filename, 'jpeg', quality => '100'); Currently only a few parameters exist. JPEG images can be saved with a "quality" parameter; its value should be in the range [0,100]. Text chunks can be attached to PNG images by specifying parameters of the form "tEXt::key", where key is an ASCII string of length 1-79. The values are UTF-8 encoded strings. (This is a quote from the C API reference; note that the C API reference is the canonical source for this information.) =cut void gdk_pixbuf_save (pixbuf, filename, type, ...) GdkPixbuf *pixbuf GPerlFilename filename gchar *type PREINIT: GError * error = NULL; char ** option_keys = NULL; char ** option_vals = NULL; int i, nkeys; gboolean worked; CODE: /* collect key/val pairs from the argument stack and * call gdk_pixbuf_savev */ #define FIRST_KEY 3 nkeys = items - FIRST_KEY; if (nkeys % 2) croak ("gdk_pixbuf_save expects options as key => value pairs " "(odd number of arguments detected)"); nkeys /= 2; /* always allocate them. doesn't hurt. always one longer for the * null-terminator, which is set by g_new0. */ option_keys = g_new0 (char *, nkeys + 1); option_vals = g_new0 (char *, nkeys + 1); for (i = 0 ; i < nkeys ; i++) { /* NOT copies of the strings. option_vals[] are utf8 for png format "tEXt::Foo" etc. option_keys[] are ascii-only circa gtk 2.18, but presume any non-ascii there would be utf8 too. */ option_keys[i] = SvGChar (ST (FIRST_KEY + i*2 + 0)); option_vals[i] = SvGChar (ST (FIRST_KEY + i*2 + 1)); } worked = gdk_pixbuf_savev (pixbuf, filename, type, option_keys, option_vals, &error); /* don't free the strings themselves! */ g_free (option_keys); g_free (option_vals); if (!worked) gperl_croak_gerror (filename, error); #undef FIRST_KEY #if GTK_CHECK_VERSION(2, 4, 0) ### croaks on error ## gboolean gdk_pixbuf_save_to_buffer (GdkPixbuf *pixbuf, gchar ** buffer, gsize *buffer_size, const char *type, GError **error, ...) =for apidoc __gerror__ =for arg type name of file format (e.g. "jpeg", "png") =for arg ... list of key-value save options Save I<$pixbuf> to a scalar buffer, in the format I<$type>, which is currently "jpeg" or "png". The function will croak if there is an error, which may arise from image format-related issues. The returned string contains binary data, which may have embedded nuls. Don't try to C it. See C for more details. =cut SV * gdk_pixbuf_save_to_buffer (pixbuf, type, ...) GdkPixbuf *pixbuf gchar *type PREINIT: GError * error = NULL; char ** option_keys = NULL; char ** option_vals = NULL; int i, nkeys; CODE: /* collect key/val pairs from the argument stack and * call gdk_pixbuf_save_to_bufferv */ #define FIRST_KEY 2 nkeys = (items - FIRST_KEY) / 2; /* always allocate them. doesn't hurt. always one longer for the * null-terminator, which is set by g_new0. */ option_keys = g_new0 (char *, nkeys + 1); option_vals = g_new0 (char *, nkeys + 1); for (i = 0 ; i < nkeys ; i++) { /* NOT copies */ option_keys[i] = SvPV_nolen (ST (FIRST_KEY + i*2 + 0)); option_vals[i] = SvPV_nolen (ST (FIRST_KEY + i*2 + 1)); } #undef FIRST_KEY RETVAL = newSV (1024); sv_setpvn (RETVAL, "", 0); if (! gdk_pixbuf_save_to_callbackv (pixbuf, save_to_sv_callback, RETVAL, type, option_keys, option_vals, &error)) { SvREFCNT_dec (RETVAL); gperl_croak_gerror (NULL, error); } /* don't free the strings themselves! */ g_free (option_keys); g_free (option_vals); OUTPUT: RETVAL #endif /* 2.4 */ ## GdkPixbuf *gdk_pixbuf_add_alpha (const GdkPixbuf *pixbuf, gboolean substitute_color, guchar r, guchar g, guchar b) GdkPixbuf_noinc * gdk_pixbuf_add_alpha (pixbuf, substitute_color, r, g, b) GdkPixbuf *pixbuf gboolean substitute_color guchar r guchar g guchar b ## void gdk_pixbuf_copy_area (const GdkPixbuf *src_pixbuf, int src_x, int src_y, int width, int height, GdkPixbuf *dest_pixbuf, int dest_x, int dest_y) void gdk_pixbuf_copy_area (src_pixbuf, src_x, src_y, width, height, dest_pixbuf, dest_x, dest_y) GdkPixbuf *src_pixbuf int src_x int src_y int width int height GdkPixbuf *dest_pixbuf int dest_x int dest_y ## void gdk_pixbuf_saturate_and_pixelate (const GdkPixbuf *src, GdkPixbuf *dest, gfloat saturation, gboolean pixelate) void gdk_pixbuf_saturate_and_pixelate (src, dest, saturation, pixelate) GdkPixbuf *src GdkPixbuf *dest gfloat saturation gboolean pixelate ## void gdk_pixbuf_fill (GdkPixbuf *pixbuf, guint32 pixel) =for apidoc =for arg pixel a packed RGBA value. Clear I<$pixbuf> to contain only the value given in I<$pixel>. =cut void gdk_pixbuf_fill (pixbuf, pixel) GdkPixbuf *pixbuf guint32 pixel #if GTK_CHECK_VERSION (2, 6, 0) GdkPixbuf_noinc * gdk_pixbuf_rotate_simple (const GdkPixbuf *src, GdkPixbufRotation angle); GdkPixbuf_noinc * gdk_pixbuf_flip (const GdkPixbuf *src, gboolean horizontal); #endif ## void gdk_pixbuf_scale (const GdkPixbuf *src, GdkPixbuf *dest, int dest_x, int dest_y, int dest_width, int dest_height, double offset_x, double offset_y, double scale_x, double scale_y, GdkInterpType interp_type) void gdk_pixbuf_scale (src, dest, dest_x, dest_y, dest_width, dest_height, offset_x, offset_y, scale_x, scale_y, interp_type) GdkPixbuf *src GdkPixbuf *dest int dest_x int dest_y int dest_width int dest_height double offset_x double offset_y double scale_x double scale_y GdkInterpType interp_type ## void gdk_pixbuf_composite (const GdkPixbuf *src, GdkPixbuf *dest, int dest_x, int dest_y, int dest_width, int dest_height, double offset_x, double offset_y, double scale_x, double scale_y, GdkInterpType interp_type, int overall_alpha) void gdk_pixbuf_composite (src, dest, dest_x, dest_y, dest_width, dest_height, offset_x, offset_y, scale_x, scale_y, interp_type, overall_alpha) GdkPixbuf *src GdkPixbuf *dest int dest_x int dest_y int dest_width int dest_height double offset_x double offset_y double scale_x double scale_y GdkInterpType interp_type int overall_alpha ## void gdk_pixbuf_composite_color (const GdkPixbuf *src, GdkPixbuf *dest, int dest_x, int dest_y, int dest_width, int dest_height, double offset_x, double offset_y, double scale_x, double scale_y, GdkInterpType interp_type, int overall_alpha, int check_x, int check_y, int check_size, guint32 color1, guint32 color2) void gdk_pixbuf_composite_color (src, dest, dest_x, dest_y, dest_width, dest_height, offset_x, offset_y, scale_x, scale_y, interp_type, overall_alpha, check_x, check_y, check_size, color1, color2) GdkPixbuf *src GdkPixbuf *dest int dest_x int dest_y int dest_width int dest_height double offset_x double offset_y double scale_x double scale_y GdkInterpType interp_type int overall_alpha int check_x int check_y int check_size guint32 color1 guint32 color2 ## GdkPixbuf *gdk_pixbuf_scale_simple (const GdkPixbuf *src, int dest_width, int dest_height, GdkInterpType interp_type) GdkPixbuf_noinc_ornull * gdk_pixbuf_scale_simple (src, dest_width, dest_height, interp_type) GdkPixbuf *src int dest_width int dest_height GdkInterpType interp_type ## GdkPixbuf *gdk_pixbuf_composite_color_simple (const GdkPixbuf *src, int dest_width, int dest_height, GdkInterpType interp_type, int overall_alpha, int check_size, guint32 color1, guint32 color2) GdkPixbuf_noinc_ornull * gdk_pixbuf_composite_color_simple (src, dest_width, dest_height, interp_type, overall_alpha, check_size, color1, color2) GdkPixbuf *src int dest_width int dest_height GdkInterpType interp_type int overall_alpha int check_size guint32 color1 guint32 color2 #if GTK_CHECK_VERSION (2, 11, 0) GdkPixbuf_noinc * gdk_pixbuf_apply_embedded_orientation (GdkPixbuf *src); #endif MODULE = Gtk2::Gdk::Pixbuf PACKAGE = Gtk2::Gdk::PixbufAnimation PREFIX = gdk_pixbuf_animation_ BOOT: /* types like GdkPixbufGifAnim are unknown to us. */ gperl_object_set_no_warn_unreg_subclass (GDK_TYPE_PIXBUF_ANIMATION, TRUE); ## GdkPixbufAnimation *gdk_pixbuf_animation_new_from_file (const char *filename, GError **error) =for apidoc __gerror__ =cut GdkPixbufAnimation_noinc * gdk_pixbuf_animation_new_from_file (class, filename) GPerlFilename filename PREINIT: GError * error = NULL; CODE: RETVAL = gdk_pixbuf_animation_new_from_file (filename, &error); if (!RETVAL) gperl_croak_gerror (filename, error); OUTPUT: RETVAL ### handled by Glib::Object ### GdkPixbufAnimation *gdk_pixbuf_animation_ref (GdkPixbufAnimation *animation) ### void gdk_pixbuf_animation_unref (GdkPixbufAnimation *animation) ## int gdk_pixbuf_animation_get_width (GdkPixbufAnimation *animation) int gdk_pixbuf_animation_get_width (animation) GdkPixbufAnimation *animation ## int gdk_pixbuf_animation_get_height (GdkPixbufAnimation *animation) int gdk_pixbuf_animation_get_height (animation) GdkPixbufAnimation *animation ## gboolean gdk_pixbuf_animation_is_static_image (GdkPixbufAnimation *animation) gboolean gdk_pixbuf_animation_is_static_image (animation) GdkPixbufAnimation *animation ## GdkPixbuf *gdk_pixbuf_animation_get_static_image (GdkPixbufAnimation *animation) GdkPixbuf * gdk_pixbuf_animation_get_static_image (animation) GdkPixbufAnimation *animation ## there's no typemap for GTimeVal. ## GTimeVal is in GLib, same as unix' struct timeval. ## timeval is seconds and microseconds, which we can get from Time::HiRes. ## so, we'll take seconds and microseconds. if neither is available, ## pass NULL to the wrapped function to get the current time. ### GdkPixbufAnimationIter *gdk_pixbuf_animation_get_iter (GdkPixbufAnimation *animation, const GTimeVal *start_time) =for apidoc The seconds and microseconds values are available from Time::HiRes, which is standard since perl 5.8.0. If both are undef or omitted, the function uses the current time. =cut GdkPixbufAnimationIter_noinc * gdk_pixbuf_animation_get_iter (animation, start_time_seconds=0, start_time_microseconds=0) GdkPixbufAnimation *animation guint start_time_seconds guint start_time_microseconds CODE: if (start_time_microseconds) { GTimeVal start_time; start_time.tv_sec = start_time_seconds; start_time.tv_usec = start_time_microseconds; RETVAL = gdk_pixbuf_animation_get_iter (animation, &start_time); } else RETVAL = gdk_pixbuf_animation_get_iter (animation, NULL); OUTPUT: RETVAL MODULE = Gtk2::Gdk::Pixbuf PACKAGE = Gtk2::Gdk::PixbufAnimationIter PREFIX = gdk_pixbuf_animation_iter_ BOOT: gperl_object_set_no_warn_unreg_subclass (GDK_TYPE_PIXBUF_ANIMATION_ITER, TRUE); int gdk_pixbuf_animation_iter_get_delay_time (GdkPixbufAnimationIter *iter) GdkPixbuf *gdk_pixbuf_animation_iter_get_pixbuf (GdkPixbufAnimationIter *iter) gboolean gdk_pixbuf_animation_iter_on_currently_loading_frame (GdkPixbufAnimationIter *iter) ### gboolean gdk_pixbuf_animation_iter_advance (GdkPixbufAnimationIter *iter, const GTimeVal *current_time) gboolean gdk_pixbuf_animation_iter_advance (iter, current_time_seconds=0, current_time_microseconds=0) GdkPixbufAnimationIter *iter guint current_time_seconds guint current_time_microseconds CODE: if (current_time_microseconds) { GTimeVal current_time; current_time.tv_sec = current_time_seconds; current_time.tv_usec = current_time_microseconds; RETVAL = gdk_pixbuf_animation_iter_advance (iter, ¤t_time); } else RETVAL = gdk_pixbuf_animation_iter_advance (iter, NULL); OUTPUT: RETVAL MODULE = Gtk2::Gdk::Pixbuf PACKAGE = Gtk2::Gdk::Pixbuf PREFIX = gdk_pixbuf_ #if GTK_CHECK_VERSION(2,2,0) ## GdkPixbufFormat is an information structure, so we'll just hashify it so you ## can use Data::Dumper on it. # returned strings should be freed ### gchar *gdk_pixbuf_format_get_name (GdkPixbufFormat *format) ### gchar *gdk_pixbuf_format_get_description (GdkPixbufFormat *format) ### gchar ** gdk_pixbuf_format_get_mime_types (GdkPixbufFormat *format) ### gchar ** gdk_pixbuf_format_get_extensions (GdkPixbufFormat *format) ### gboolean gdk_pixbuf_format_is_writable (GdkPixbufFormat *format) ### gboolean gdk_pixbuf_format_is_scalable (GdkPixbufFormat *format) ### gboolean gdk_pixbuf_format_is_disabled (GdkPixbufFormat *format) ### gchar *gdk_pixbuf_format_get_license (GdkPixbufFormat *format) ### GSList *gdk_pixbuf_get_formats (void) ## list should be freed, but not formats =for apidoc Returns a list of hashes with information about the formats supported by Gtk2::Gdk::Pixbuf. =cut void gdk_pixbuf_get_formats (class=NULL) PREINIT: GSList * formats, * i; PPCODE: formats = gdk_pixbuf_get_formats (); for (i = formats ; i != NULL ; i = i->next) { XPUSHs (sv_2mortal (newSVGdkPixbufFormat (i->data))); } g_slist_free (formats); PERL_UNUSED_VAR (ax); #endif /* >= 2.2.0 */ #if GTK_CHECK_VERSION(2,4,0) ### GdkPixbufFormat *gdk_pixbuf_get_file_info (const gchar *filename, gint *width, gint *height) =for apidoc =for signature (format, width, height) = $pixbuf->get_file_info ($filename) Parses enough of I<$filename> to determine and return the format and size. If the format is unknown or the file can't be opened, returns an empty list. =cut void gdk_pixbuf_get_file_info (class, filename) GPerlFilename filename PREINIT: GdkPixbufFormat *format; gint width = -1; gint height = -1; PPCODE: format = gdk_pixbuf_get_file_info (filename, &width, &height); if (format) { EXTEND (sp, 3); PUSHs (sv_2mortal (newSVGdkPixbufFormat (format))); PUSHs (sv_2mortal (newSViv (width))); PUSHs (sv_2mortal (newSViv (height))); } #endif MODULE = Gtk2::Gdk::Pixbuf PACKAGE = Gtk2::Gdk::PixbufFormat PREFIX = gdk_pixbuf_format_ =for position DESCRIPTION =head1 DESCRIPTION A C has the following format information fields, eg. C<< $format->{'name'} >>, name string description string mime_types arrayref of strings extensions arrayref of strings, eg. ['jpg','jpeg'] is_writable 0 or 1 is_scalable 0 or 1 # in Gtk 2.6 up is_disabled 0 or 1 # in Gtk 2.6 up license string # in Gtk 2.6 up =cut #if GTK_CHECK_VERSION(2, 2, 0) void DESTROY (sv) SV *sv CODE: _gperl_remove_mg (SvRV (sv)); #endif /* 2.2.0 */ #if GTK_CHECK_VERSION(2, 6, 0) =for apidoc Note that any change caused by this method will not immediately affect I<$format-E{is_disabled}>. You need to refetch the format in order to see the new value. =cut void gdk_pixbuf_format_set_disabled (GdkPixbufFormat *format, gboolean disabled); #endif /* 2.6.0 */ Gtk2-1.2498/xs/GdkPixbufLoader.xs000644 001750 000024 00000007745 11664366546 017601 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" MODULE = Gtk2::Gdk::PixbufLoader PACKAGE = Gtk2::Gdk::PixbufLoader PREFIX = gdk_pixbuf_loader_ ## GdkPixbufLoader * gdk_pixbuf_loader_new (void) GdkPixbufLoader_noinc * gdk_pixbuf_loader_new (class) C_ARGS: /* void */ ## GdkPixbufLoader * gdk_pixbuf_loader_new_with_type (const char *image_type, GError **error) =for apidoc __gerror__ =for signature pixbufloader = Gtk2::Gdk::PixbufLoader->new_with_type ($image_type) =cut GdkPixbufLoader_noinc * gdk_pixbuf_loader_new_with_type (...) PREINIT: const char *image_type; GError * error = NULL; CODE: if (items == 1) image_type = SvPV_nolen (ST (0)); else if (items == 2) image_type = SvPV_nolen (ST (1)); else croak ("Usage: Gtk2::Gdk::PixbufLoader::new_with_type (class, image_type)"); RETVAL = gdk_pixbuf_loader_new_with_type (image_type, &error); if (!RETVAL) gperl_croak_gerror (NULL, error); OUTPUT: RETVAL #if GTK_CHECK_VERSION(2,4,0) ## GdkPixbufLoader * gdk_pixbuf_loader_new_with_mime_type (const char *mime_type, GError **error); =for apidoc __gerror__ =for signature pixbufloader = Gtk2::Gdk::PixbufLoader->new_with_mime_type ($mime_type) =cut GdkPixbufLoader_noinc * gdk_pixbuf_loader_new_with_mime_type (...) PREINIT: const char *mime_type; GError * error = NULL; CODE: if (items == 1) mime_type = SvPV_nolen (ST (0)); else if (items == 2) mime_type = SvPV_nolen (ST (1)); else croak ("Usage: Gtk2::Gdk::PixbufLoader::new_with_mime_type (class, mime_type)"); RETVAL = gdk_pixbuf_loader_new_with_mime_type (mime_type, &error); if (!RETVAL) gperl_croak_gerror (NULL, error); OUTPUT: RETVAL #endif #if GTK_CHECK_VERSION(2,2,0) ## void gdk_pixbuf_loader_set_size (GdkPixbufLoader *loader, int width, int height) void gdk_pixbuf_loader_set_size (loader, width, height) GdkPixbufLoader *loader int width int height #endif /* >= 2.2.0 */ ## gboolean gdk_pixbuf_loader_write (GdkPixbufLoader *loader, const guchar *buf, gsize count, GError **error) =for apidoc __gerror__ =cut gboolean gdk_pixbuf_loader_write (loader, buf) GdkPixbufLoader *loader SV * buf PREINIT: GError * error = NULL; STRLEN length; const guchar *data = (const guchar *) SvPVbyte (buf, length); CODE: RETVAL = gdk_pixbuf_loader_write (loader, data, length, &error); if (!RETVAL) gperl_croak_gerror (NULL, error); OUTPUT: RETVAL ## GdkPixbuf * gdk_pixbuf_loader_get_pixbuf (GdkPixbufLoader *loader) GdkPixbuf * gdk_pixbuf_loader_get_pixbuf (loader) GdkPixbufLoader *loader ## GdkPixbufAnimation * gdk_pixbuf_loader_get_animation (GdkPixbufLoader *loader) GdkPixbufAnimation_ornull * gdk_pixbuf_loader_get_animation (loader) GdkPixbufLoader *loader ## gboolean gdk_pixbuf_loader_close (GdkPixbufLoader *loader, GError **error) =for apidoc __gerror__ =cut void gdk_pixbuf_loader_close (loader) GdkPixbufLoader *loader PREINIT: GError * error = NULL; CODE: if (!gdk_pixbuf_loader_close (loader, &error)) gperl_croak_gerror (NULL, error); #if GTK_CHECK_VERSION(2,2,0) ## GdkPixbufFormat *gdk_pixbuf_loader_get_format (GdkPixbufLoader *loader) GdkPixbufFormat * gdk_pixbuf_loader_get_format (loader) GdkPixbufLoader *loader #endif /* >= 2.2.0 */ Gtk2-1.2498/xs/GdkPixbufSimpleAnim.xs000644 001750 000024 00000002610 11664366546 020413 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2005 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" MODULE = Gtk2::Gdk::PixbufSimpleAnim PACKAGE = Gtk2::Gdk::PixbufSimpleAnim PREFIX = gdk_pixbuf_simple_anim_ GdkPixbufSimpleAnim_noinc * gdk_pixbuf_simple_anim_new (class, gint width, gint height, gfloat rate) C_ARGS: width, height, rate void gdk_pixbuf_simple_anim_add_frame (GdkPixbufSimpleAnim *animation, GdkPixbuf *pixbuf) #if GTK_CHECK_VERSION (2, 18, 0) void gdk_pixbuf_simple_anim_set_loop (GdkPixbufSimpleAnim *animation, gboolean loop); gboolean gdk_pixbuf_simple_anim_get_loop (GdkPixbufSimpleAnim *animation); #endif /* 2.18 */ Gtk2-1.2498/xs/GdkPixmap.xs000644 001750 000024 00000021450 11664366546 016440 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" static SV * new_gdk_bitmap (GdkBitmap * bitmap, gboolean noinc) { if (!bitmap) return &PL_sv_undef; return sv_bless (gperl_new_object (G_OBJECT (bitmap), noinc), gv_stashpv ("Gtk2::Gdk::Bitmap", TRUE)); } SV * newSVGdkBitmap (GdkBitmap * bitmap) { return new_gdk_bitmap (bitmap, FALSE); } SV * newSVGdkBitmap_noinc (GdkBitmap * bitmap) { return new_gdk_bitmap (bitmap, TRUE); } MODULE = Gtk2::Gdk::Pixmap PACKAGE = Gtk2::Gdk::Bitmap PREFIX = gdk_bitmap_ BOOT: /* a GdkBitmap is a GdkPixmap with depth one. they are all * typedef'd to GdkDrawable, but GdkBitmap doesn't get a type * wrapper. since it's a GdkPixmap, i'll put Gtk2::Gdk::Pixmap * in its isa so that bitmaps can be used wherever pixmaps are * wanted. otherwise, apps need to bless by hand. */ gperl_set_isa ("Gtk2::Gdk::Bitmap", "Gtk2::Gdk::Pixmap"); =for position post_hierarchy =head1 HIERARCHY Glib::Object +----Gtk2::Gdk::Drawable +----Gtk2::Gdk::Pixmap +----Gtk2::Gdk::Bitmap =cut ## GdkBitmap* gdk_bitmap_create_from_data (class, GdkDrawable *drawable, const gchar *data, gint width, gint height) ### intentionally switched to char instead of gchar GdkBitmap_noinc * gdk_bitmap_create_from_data (class, drawable, data, width, height) GdkDrawable_ornull *drawable const char *data gint width gint height C_ARGS: drawable, data, width, height MODULE = Gtk2::Gdk::Pixmap PACKAGE = Gtk2::Gdk::Pixmap PREFIX = gdk_pixmap_ GdkPixmap_noinc * gdk_pixmap_new (class, drawable, width, height, depth) GdkDrawable_ornull * drawable gint width gint height gint depth C_ARGS: drawable, width, height, depth ## GdkPixmap* gdk_pixmap_create_from_data (GdkDrawable *drawable, const gchar *data, gint width, gint height, gint depth, GdkColor *fg, GdkColor *bg) ### intentionally switched to char instead of gchar GdkPixmap_noinc * gdk_pixmap_create_from_data (class, drawable, data, width, height, depth, fg, bg) GdkDrawable *drawable const char *data gint width gint height gint depth GdkColor *fg GdkColor *bg C_ARGS: drawable, data, width, height, depth, fg, bg ## GdkPixmap* gdk_pixmap_create_from_xpm (GdkDrawable *drawable, GdkBitmap **mask, GdkColor *transparent_color, const gchar *filename) =for apidoc =for signature (pixmap, mask) = Gtk2::Gdk::Pixmap->create_from_xpm ($drawable, $transparent_color, $filename) =cut void gdk_pixmap_create_from_xpm (class, drawable, transparent_color, filename) GdkDrawable *drawable GdkColor_ornull *transparent_color GPerlFilename filename PREINIT: GdkPixmap * pixmap; GdkBitmap * mask; PPCODE: pixmap = gdk_pixmap_create_from_xpm (drawable, &mask, transparent_color, filename); if (!pixmap) /* this keeps us from segfaulting, but there's no error * reporting for the caller or user. the docs don't * mention the failure mode. we choose to fail in kind. */ XSRETURN_EMPTY; EXTEND (SP, 2); PUSHs (sv_2mortal (newSVGdkPixmap_noinc (pixmap))); PUSHs (sv_2mortal (newSVGdkBitmap_noinc (mask))); ## GdkPixmap* gdk_pixmap_colormap_create_from_xpm (GdkDrawable *drawable, GdkColormap *colormap, GdkBitmap **mask, GdkColor *transparent_color, const gchar *filename) =for apidoc =for signature (pixmap, mask) = Gtk2::Gdk::Pixmap->colormap_create_from_xpm ($drawable, $colormap, $transparent_color, $filename) =for arg drawable may be undef if I<$colormap> is given =for arg colormap GdkColormap to use for the new image; may be undef if I<$drawable> is given. =for arg transparent_color color of pixels that are transparent in the input file. if undef, a default is used. =cut void gdk_pixmap_colormap_create_from_xpm (class, drawable, colormap, transparent_color, filename) GdkDrawable_ornull *drawable GdkColormap_ornull *colormap GdkColor_ornull *transparent_color GPerlFilename filename PREINIT: GdkPixmap * pixmap; GdkBitmap * mask; PPCODE: pixmap = gdk_pixmap_colormap_create_from_xpm (drawable, colormap, &mask, transparent_color, filename); EXTEND (SP, 2); PUSHs (sv_2mortal (newSVGdkPixmap_noinc (pixmap))); PUSHs (sv_2mortal (newSVGdkBitmap_noinc (mask))); ## ## GdkPixmap* gdk_pixmap_create_from_xpm_d (GdkDrawable *drawable, GdkBitmap **mask, GdkColor *transparent_color, gchar **data) =for apidoc =for signature ($pixmap, $mask) = Gtk2::Gdk::Pixmap->create_from_xpm_d ($drawable, $transparent_color, @xpm_data) =for arg drawable used to determine the colormap and visual of the image. =for arg transparent_color color of pixels that are transparent in the input file. if undef, a default is used. =for arg data (__hide__) =for arg ... of strings, xpm data Create a pixmap from the provided xpm data, usually included in the program as an inline image. See C in L for a description of the format of this data. =cut void gdk_pixmap_create_from_xpm_d (class, drawable, transparent_color, data, ...) GdkDrawable *drawable GdkColor_ornull *transparent_color PREINIT: GdkBitmap * mask = NULL; GdkPixmap * pixmap = NULL; char ** lines; int i; PPCODE: lines = g_new (char*, items - 3); for (i = 3 ; i < items ; i++) lines[i-3] = SvPV_nolen (ST (i)); pixmap = gdk_pixmap_create_from_xpm_d (drawable, GIMME == G_ARRAY ? &mask : NULL, transparent_color, lines); g_free (lines); if (pixmap) XPUSHs (sv_2mortal (newSVGdkPixmap_noinc (pixmap))); if (mask) XPUSHs (sv_2mortal (newSVGdkBitmap_noinc (mask))); ## ## GdkPixmap* gdk_pixmap_colormap_create_from_xpm_d (GdkDrawable *drawable, GdkColormap *colormap, GdkBitmap **mask, GdkColor *transparent_color, gchar **data) =for apidoc =for signature ($pixmap, $mask) = Gtk2::Gdk::Pixmap->colormap_create_from_xpm_d ($drawable, $colormap, $transparent_color, @xpm_data) =for arg drawable may be undef if I<$colormap> is given =for arg colormap GdkColormap to use for the new image; may be undef if I<$drawable> is given. =for arg transparent_color color of pixels that are transparent in the input file. if undef, a default is used. =for arg data (__hide__) =for arg ... of strings, xpm data Create a pixmap from the provided xpm data, using a specific colormap. See C. =cut void gdk_pixmap_colormap_create_from_xpm_d (class, drawable, colormap, transparent_color, data, ...) GdkDrawable_ornull *drawable GdkColormap_ornull *colormap GdkColor_ornull *transparent_color PREINIT: GdkBitmap * mask = NULL; GdkPixmap * pixmap = NULL; char ** lines; int i; PPCODE: lines = g_new (char*, items - 4); for (i = 4 ; i < items ; i++) lines[i-4] = SvPV_nolen (ST (i)); pixmap = gdk_pixmap_colormap_create_from_xpm_d (drawable, colormap, GIMME == G_ARRAY ? &mask : NULL, transparent_color, lines); g_free (lines); if (pixmap) XPUSHs (sv_2mortal (newSVGdkPixmap_noinc (pixmap))); if (mask) XPUSHs (sv_2mortal (newSVGdkBitmap_noinc (mask))); ## GdkPixmap* gdk_pixmap_lookup (GdkNativeWindow anid) GdkPixmap * gdk_pixmap_lookup (class, anid) GdkNativeWindow anid C_ARGS: anid #if GTK_CHECK_VERSION(2, 2, 0) ## GdkPixmap* gdk_pixmap_lookup_for_display (GdkDisplay *display, GdkNativeWindow anid) GdkPixmap * gdk_pixmap_lookup_for_display (class, display, anid) GdkDisplay *display GdkNativeWindow anid C_ARGS: display, anid #endif ## GdkPixmap* gdk_pixmap_foreign_new (GdkNativeWindow anid) GdkPixmap * gdk_pixmap_foreign_new (class, anid) GdkNativeWindow anid C_ARGS: anid #if GTK_CHECK_VERSION(2, 2, 0) ## GdkPixmap* gdk_pixmap_foreign_new_for_display (GdkDisplay *display, GdkNativeWindow anid) GdkPixmap * gdk_pixmap_foreign_new_for_display (class, display, anid) GdkDisplay *display GdkNativeWindow anid C_ARGS: display, anid #endif #if GTK_CHECK_VERSION(2, 10, 0) ## GdkPixmap* gdk_pixmap_foreign_new_for_screen (GdkScreen *screen, GdkNativeWindow anid, gint width, gint height, gint depth); GdkPixmap * gdk_pixmap_foreign_new_for_screen (class, GdkScreen *screen, GdkNativeWindow anid, gint width, gint height, gint depth) C_ARGS: screen, anid, width, height, depth #endif Gtk2-1.2498/xs/GdkProperty.xs000644 001750 000024 00000026236 12222205272 017010 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003, 2013 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" /* ------------------------------------------------------------------------- */ #define GDK2PERL_TEXT_LIST_DECLARE \ guchar *real_text = NULL; \ STRLEN length; \ gchar **list = NULL; \ int i, elements = 0; #define GDK2PERL_TEXT_LIST_FETCH \ real_text = (guchar *) SvPV (text, length); #define GDK2PERL_TEXT_LIST_STORE \ if (elements == 0) \ XSRETURN_EMPTY; \ \ EXTEND (sp, elements); \ \ for (i = 0; i < elements; i++) \ PUSHs (sv_2mortal (newSVpv (list[i], 0))); /* ------------------------------------------------------------------------- */ #define GDK2PERL_TEXT_CONVERSION_DECALRE \ GdkAtom encoding; \ gint format; \ guchar *ctext = NULL; \ gint length; #define GDK2PERL_TEXT_CONVERSION_STORE \ EXTEND (sp, 3); \ PUSHs (sv_2mortal (newSVGdkAtom (encoding))); \ PUSHs (sv_2mortal (newSViv (format))); \ PUSHs (sv_2mortal (newSVpv ((gchar *) ctext, length))); /* ------------------------------------------------------------------------- */ MODULE = Gtk2::Gdk::Property PACKAGE = Gtk2::Gdk::Atom PREFIX = gdk_atom_ =for apidoc ne __hide__ =cut ## for easy comparisons of atoms =for apidoc __hide__ =cut gboolean eq (left, right, swap=FALSE) GdkAtom left GdkAtom right ALIAS: ne = 1 CODE: switch (ix) { case 0: RETVAL = left == right; break; case 1: RETVAL = left != right; break; default: croak ("incorrect alias value encountered"); RETVAL = FALSE; } OUTPUT: RETVAL ## GdkAtom gdk_atom_intern (const gchar *atom_name, gboolean only_if_exists) GdkAtom gdk_atom_intern (class, atom_name, only_if_exists=FALSE) const gchar *atom_name gboolean only_if_exists ALIAS: Gtk2::Gdk::Atom::new = 1 C_ARGS: atom_name, only_if_exists CLEANUP: PERL_UNUSED_VAR (ix); ## 2.10 adds gdk_atom_intern_static_string(). This isn't useful from perl. ## gchar* gdk_atom_name (GdkAtom atom) gchar_own * gdk_atom_name (atom) GdkAtom atom # --------------------------------------------------------------------------- # MODULE = Gtk2::Gdk::Property PACKAGE = Gtk2::Gdk::Window PREFIX = gdk_ ### the docs warn us not to use this one, but don't say it's deprecated. ## gboolean gdk_property_get (GdkWindow *window, GdkAtom property, GdkAtom type, gulong offset, gulong length, gint pdelete, GdkAtom *actual_property_type, gint *actual_format, gint *actual_length, guchar **data) =for apidoc =for signature (property_type, format, data) = $window->property_get ($property, $type, $offset, $length, $pdelete) See I for an explanation of the meaning of I. =cut void gdk_property_get (window, property, type, offset, length, pdelete) GdkWindow *window GdkAtom property GdkAtom type gulong offset gulong length gint pdelete PREINIT: GdkAtom actual_property_type; gint actual_format; gint actual_length; guchar *data; guint i; PPCODE: if (! gdk_property_get (window, property, type, offset, length, pdelete, &actual_property_type, &actual_format, &actual_length, &data)) XSRETURN_EMPTY; EXTEND (SP, 2); PUSHs (sv_2mortal (newSVGdkAtom (actual_property_type))); PUSHs (sv_2mortal (newSViv (actual_format))); if (data) { switch (actual_format) { case 8: { gchar *char_data = (gchar *) data; XPUSHs (sv_2mortal (newSVpv (char_data, actual_length))); break; } case 16: { gushort *short_data = (gushort *) data; for (i = 0; i < (actual_length / sizeof (gushort)); i++) XPUSHs (sv_2mortal (newSVuv (short_data[i]))); break; } case 32: { gulong *long_data = (gulong *) data; for (i = 0; i < (actual_length / sizeof (gulong)); i++) XPUSHs (sv_2mortal (newSVuv (long_data[i]))); break; } default: warn ("Unhandled format value %d in gdk_property_get, should not happen", actual_format); } g_free (data); } ### nelements is the number of elements in the data, not the number of bytes. ## void gdk_property_change (GdkWindow *window, GdkAtom property, GdkAtom type, gint format, GdkPropMode mode, const guchar *data, gint nelements) =for apidoc =for arg ... property value(s) Depending on the value of I, the property value(s) can be: +--------------------+------------------------------------+ | format | value | +--------------------+------------------------------------+ | Gtk2::Gdk::CHARS | a string | | Gtk2::Gdk::USHORTS | one or more unsigned short numbers | | Gtk2::Gdk::ULONGS | one or more unsigned long numbers | +--------------------+------------------------------------+ =cut void gdk_property_change (window, property, type, format, mode, ...) GdkWindow *window GdkAtom property GdkAtom type gint format GdkPropMode mode PREINIT: guchar *data = NULL; int i; int first_index = 5; STRLEN nelements; CODE: switch (format) { case 8: { SV *sv = ST (first_index); /* need to use sv_len here because \0's are allowed. */ data = (guchar *) SvPV (sv, nelements); break; } case 16: { gushort *short_data = gperl_alloc_temp (sizeof (gushort) * (items - first_index)); for (i = first_index; i < items; i++) short_data[i - first_index] = (gushort) SvUV (ST (i)); data = (guchar *) short_data; nelements = items - first_index; break; } case 32: { gulong *long_data = gperl_alloc_temp (sizeof (gulong) * (items - first_index)); for (i = first_index; i < items; i++) long_data[i - first_index] = (gulong) SvUV (ST (i)); data = (guchar *) long_data; nelements = items - first_index; break; } default: croak ("Illegal format value %d used; should be either 8, 16 or 32", format); } gdk_property_change (window, property, type, format, mode, data, nelements); ## void gdk_property_delete (GdkWindow *window, GdkAtom property) void gdk_property_delete (window, property) GdkWindow *window GdkAtom property # --------------------------------------------------------------------------- # MODULE = Gtk2::Gdk::Property PACKAGE = Gtk2::Gdk PREFIX = gdk_ =for apidoc Returns a list of strings. =cut ## gint gdk_text_property_to_text_list (GdkAtom encoding, gint format, const guchar *text, gint length, gchar ***list) void gdk_text_property_to_text_list (class, encoding, format, text) GdkAtom encoding gint format SV *text PREINIT: GDK2PERL_TEXT_LIST_DECLARE; PPCODE: GDK2PERL_TEXT_LIST_FETCH; elements = gdk_text_property_to_text_list (encoding, format, real_text, length, &list); GDK2PERL_TEXT_LIST_STORE; gdk_free_text_list (list); =for apidoc Returns a list of strings. =cut ## gint gdk_text_property_to_utf8_list (GdkAtom encoding, gint format, const guchar *text, gint length, gchar ***list) void gdk_text_property_to_utf8_list (class, encoding, format, text) GdkAtom encoding gint format SV *text PREINIT: GDK2PERL_TEXT_LIST_DECLARE; PPCODE: GDK2PERL_TEXT_LIST_FETCH; elements = gdk_text_property_to_utf8_list (encoding, format, real_text, length, &list); GDK2PERL_TEXT_LIST_STORE; g_strfreev (list); =for apidoc Returns a list of strings. =cut ## gint gdk_string_to_compound_text (const gchar *str, GdkAtom *encoding, gint *format, guchar **ctext, gint *length) void gdk_string_to_compound_text (class, str) const gchar *str PREINIT: GDK2PERL_TEXT_CONVERSION_DECALRE; PPCODE: if (0 != gdk_string_to_compound_text (str, &encoding, &format, &ctext, &length)) XSRETURN_EMPTY; GDK2PERL_TEXT_CONVERSION_STORE; gdk_free_compound_text (ctext); =for apidoc Returns a list of strings. =cut ## gboolean gdk_utf8_to_compound_text (const gchar *str, GdkAtom *encoding, gint *format, guchar **ctext, gint *length) void gdk_utf8_to_compound_text (class, str) const gchar *str PREINIT: GDK2PERL_TEXT_CONVERSION_DECALRE; PPCODE: if (! gdk_utf8_to_compound_text (str, &encoding, &format, &ctext, &length)) XSRETURN_EMPTY; GDK2PERL_TEXT_CONVERSION_STORE; gdk_free_compound_text (ctext); #if GTK_CHECK_VERSION (2, 2, 0) =for apidoc Returns a list of strings. =cut ## gint gdk_text_property_to_text_list_for_display (GdkDisplay *display, GdkAtom encoding, gint format, const guchar *text, gint length, gchar ***list) void gdk_text_property_to_text_list_for_display (class, display, encoding, format, text) GdkDisplay *display GdkAtom encoding gint format SV *text PREINIT: GDK2PERL_TEXT_LIST_DECLARE; PPCODE: GDK2PERL_TEXT_LIST_FETCH; elements = gdk_text_property_to_text_list_for_display (display, encoding, format, real_text, length, &list); GDK2PERL_TEXT_LIST_STORE; gdk_free_text_list (list); =for apidoc Returns a list of strings. =cut ## gint gdk_text_property_to_utf8_list_for_display (GdkDisplay *display, GdkAtom encoding, gint format, const guchar *text, gint length, gchar ***list) void gdk_text_property_to_utf8_list_for_display (class, display, encoding, format, text) GdkDisplay *display GdkAtom encoding gint format SV *text PREINIT: GDK2PERL_TEXT_LIST_DECLARE; PPCODE: GDK2PERL_TEXT_LIST_FETCH; elements = gdk_text_property_to_utf8_list_for_display (display, encoding, format, real_text, length, &list); GDK2PERL_TEXT_LIST_STORE; g_strfreev (list); =for apidoc Returns a list of strings. =cut ## gint gdk_string_to_compound_text_for_display (GdkDisplay *display, const gchar *str, GdkAtom *encoding, gint *format, guchar **ctext, gint *length) void gdk_string_to_compound_text_for_display (class, display, str) GdkDisplay *display const gchar *str PREINIT: GDK2PERL_TEXT_CONVERSION_DECALRE; PPCODE: if (0 != gdk_string_to_compound_text_for_display (display, str, &encoding, &format, &ctext, &length)) XSRETURN_EMPTY; GDK2PERL_TEXT_CONVERSION_STORE; gdk_free_compound_text (ctext); =for apidoc Returns a list of strings. =cut ## gboolean gdk_utf8_to_compound_text_for_display (GdkDisplay *display, const gchar *str, GdkAtom *encoding, gint *format, guchar **ctext, gint *length) void gdk_utf8_to_compound_text_for_display (class, display, str) GdkDisplay *display const gchar *str PREINIT: GDK2PERL_TEXT_CONVERSION_DECALRE; PPCODE: if (! gdk_utf8_to_compound_text_for_display (display, str, &encoding, &format, &ctext, &length)) XSRETURN_EMPTY; GDK2PERL_TEXT_CONVERSION_STORE; gdk_free_compound_text (ctext); #endif /* 2.2.0 */ =for apidoc Returns a list of strings. =cut ## gchar *gdk_utf8_to_string_target (const gchar *str) gchar_ornull * gdk_utf8_to_string_target (class, str) const gchar *str C_ARGS: str Gtk2-1.2498/xs/GdkRegion.xs000644 001750 000024 00000020437 11664366546 016431 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003, 2010 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" #include "gperl_marshal.h" /* ------------------------------------------------------------------------- */ GType gtk2perl_gdk_region_get_type (void) { static GType t = 0; if (!t) t = g_boxed_type_register_static ("GdkRegion", (GBoxedCopyFunc) gdk_region_copy, (GBoxedFreeFunc) gdk_region_destroy); return t; } /* ------------------------------------------------------------------------- */ static void gtk2perl_gdk_span_func (GdkSpan *span, GPerlCallback *callback) { dGPERL_CALLBACK_MARSHAL_SP; GPERL_CALLBACK_MARSHAL_INIT (callback); ENTER; SAVETMPS; PUSHMARK (SP); EXTEND (SP, 3); PUSHs (sv_2mortal (newSViv (span->x))); PUSHs (sv_2mortal (newSViv (span->y))); PUSHs (sv_2mortal (newSViv (span->width))); if (callback->data) XPUSHs (sv_2mortal (newSVsv (callback->data))); PUTBACK; call_sv (callback->func, G_DISCARD); FREETMPS; LEAVE; } /* ------------------------------------------------------------------------- */ MODULE = Gtk2::Gdk::Region PACKAGE = Gtk2::Gdk::Region PREFIX = gdk_region_ ## GdkRegion *gdk_region_new (void) GdkRegion_own * gdk_region_new (class) C_ARGS: /* void */ ## GdkRegion *gdk_region_polygon (GdkPoint *points, gint npoints, GdkFillRule fill_rule) GdkRegion_own * gdk_region_polygon (class, points_ref, fill_rule) SV * points_ref GdkFillRule fill_rule PREINIT: GdkPoint *points = NULL; gint npoints, i; AV *array; SV **value; CODE: if (!gperl_sv_is_array_ref (points_ref)) croak ("point list has to be a reference to an array"); array = (AV *) SvRV (points_ref); npoints = (av_len (array) + 1) / 2; points = g_new0 (GdkPoint, npoints); for (i = 0; i < npoints; i++) { if ((value = av_fetch (array, 2*i, 0)) && gperl_sv_is_defined (*value)) points[i].x = SvIV (*value); if ((value = av_fetch (array, 2*i + 1, 0)) && gperl_sv_is_defined (*value)) points[i].y = SvIV (*value); } RETVAL = gdk_region_polygon (points, npoints, fill_rule); g_free (points); OUTPUT: RETVAL ## GdkRegion *gdk_region_copy (GdkRegion *region) ## GdkRegion *gdk_region_rectangle (GdkRectangle *rectangle) GdkRegion_own * gdk_region_rectangle (class, rectangle) GdkRectangle *rectangle C_ARGS: rectangle ## void gdk_region_destroy (GdkRegion *region) ## void gdk_region_get_clipbox (GdkRegion *region, GdkRectangle *rectangle) GdkRectangle_copy * gdk_region_get_clipbox (region) GdkRegion *region PREINIT: GdkRectangle rectangle; CODE: gdk_region_get_clipbox (region, &rectangle); RETVAL = &rectangle; OUTPUT: RETVAL ## void gdk_region_get_rectangles (GdkRegion *region, GdkRectangle **rectangles, gint *n_rectangles) =for apidoc Returns a list of rectangles (Gtk2::Gdk::Rectangle's), the area covered by the region. =cut void gdk_region_get_rectangles (region) GdkRegion *region PREINIT: GdkRectangle *rectangles = NULL; gint n_rectangles; int i; PPCODE: gdk_region_get_rectangles (region, &rectangles, &n_rectangles); EXTEND (SP, n_rectangles); for (i = 0 ; i < n_rectangles ; i++) PUSHs (sv_2mortal (newSVGdkRectangle_copy (rectangles + i))); g_free (rectangles); ## gboolean gdk_region_empty (GdkRegion *region) gboolean gdk_region_empty (region) GdkRegion *region ## gboolean gdk_region_equal (GdkRegion *region1, GdkRegion *region2) gboolean gdk_region_equal (region1, region2) GdkRegion *region1 GdkRegion *region2 ## gboolean gdk_region_point_in (GdkRegion *region, int x, int y) gboolean gdk_region_point_in (region, x, y) GdkRegion *region int x int y ## GdkOverlapType gdk_region_rect_in (GdkRegion *region, GdkRectangle *rect) GdkOverlapType gdk_region_rect_in (region, rect) GdkRegion *region GdkRectangle *rect ## void gdk_region_offset (GdkRegion *region, gint dx, gint dy) void gdk_region_offset (region, dx, dy) GdkRegion *region gint dx gint dy ## void gdk_region_shrink (GdkRegion *region, gint dx, gint dy) void gdk_region_shrink (region, dx, dy) GdkRegion *region gint dx gint dy ## void gdk_region_union_with_rect (GdkRegion *region, GdkRectangle *rect) void gdk_region_union_with_rect (region, rect) GdkRegion *region GdkRectangle *rect ## void gdk_region_intersect (GdkRegion *source1, GdkRegion *source2) void gdk_region_intersect (source1, source2) GdkRegion *source1 GdkRegion *source2 ## void gdk_region_union (GdkRegion *source1, GdkRegion *source2) void gdk_region_union (source1, source2) GdkRegion *source1 GdkRegion *source2 ## void gdk_region_subtract (GdkRegion *source1, GdkRegion *source2) void gdk_region_subtract (source1, source2) GdkRegion *source1 GdkRegion *source2 ## void gdk_region_xor (GdkRegion *source1, GdkRegion *source2) void gdk_region_xor (source1, source2) GdkRegion *source1 GdkRegion *source2 ## void gdk_region_spans_intersect_foreach (GdkRegion *region, GdkSpan *spans, int n_spans, gboolean sorted, GdkSpanFunc function, gpointer data) =for arg spans_ref (scalar) arrayref of triples [$x1,$y1,$width1, $x2,$y2,$width2, ...] =for apidoc Call C<$function> for horizontal lines which intersect C<$region>. C<$spans_ref> is an arrayref of x,y,width horizontal lines. If C<$sorted> is true then they're assumed to be sorted by increasing y coordinate (allowing a single pass across the region rectangles). C<$function> is called &$function ($x, $y, $width, $data) for each portion of a span which intersects C<$region>. C<$function> must not change C<$region>. $region->spans_intersect_foreach ([ 0,0,50, 20,20,100, 0,10,50 ], 0, # spans not sorted by y \&my_callback, 'hello'); # userdata sub my_callback { my ($x, $y, $width, $userdata) = @_; print "$userdata: $x, $y, $width\n"; } =cut void gdk_region_spans_intersect_foreach (region, spans_ref, sorted, func, data=NULL) GdkRegion *region SV * spans_ref gboolean sorted SV * func SV * data PREINIT: GdkSpan *spans = NULL; int n_spans, i; AV *array; SV **value; GPerlCallback * callback; CODE: if (!gperl_sv_is_array_ref (spans_ref)) croak ("span list must be an arrayref of triples [ $x,$y,$width,$x,$y,$width,...]"); array = (AV *) SvRV (spans_ref); n_spans = av_len (array) + 1; if ((n_spans % 3) != 0) croak ("span list not a multiple of 3"); n_spans /= 3; /* gdk_region_spans_intersect_foreach() is happy to take n_spans==0 and do nothing, but it doesn't like spans==NULL (as of Gtk 2.20), and NULL is what g_new0() gives for a count of 0. So explicit skip if n_spans==0. */ if (n_spans != 0) { spans = g_new0 (GdkSpan, n_spans); for (i = 0; i < n_spans; i++) { if ((value = av_fetch (array, 3*i, 0)) && gperl_sv_is_defined (*value)) spans[i].x = SvIV (*value); if ((value = av_fetch (array, 3*i + 1, 0)) && gperl_sv_is_defined (*value)) spans[i].y = SvIV (*value); if ((value = av_fetch (array, 3*i + 2, 0)) && gperl_sv_is_defined (*value)) spans[i].width = SvIV (*value); } callback = gperl_callback_new (func, data, 0, NULL, 0); gdk_region_spans_intersect_foreach (region, spans, n_spans, sorted, (GdkSpanFunc) gtk2perl_gdk_span_func, callback); gperl_callback_destroy (callback); g_free (spans); } #if GTK_CHECK_VERSION (2, 18, 0) gboolean gdk_region_rect_equal (const GdkRegion *region, const GdkRectangle *rectangle); #endif Gtk2-1.2498/xs/GdkRgb.xs000644 001750 000024 00000015343 11664366546 015720 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" /* ####MODULE = Gtk2::Gdk::Rgb PACKAGE = Gtk2::Gdk::Drawable PREFIX = gdk_ ## no longer does anything, no need to bind it ## void gdk_rgb_init (void) ## deprecated ## gulong gdk_rgb_xpixel_from_rgb (guint32 rgb) G_GNUC_CONST */ static guchar * SvImageDataPointer (SV * sv) { if (gperl_sv_is_defined (sv)) { if (SvIOK (sv)) return INT2PTR (guchar*, SvUV (sv)); else if (SvPOK (sv)) return (guchar *) SvPV_nolen (sv); } croak ("expecting either a string containing pixel data or " "an integer pointing to the underlying C image data " "buffer"); return NULL; /* not reached */ } static GdkRgbCmap * SvGdkRgbCmap (SV *sv) { GdkRgbCmap *cmap = NULL; AV *av; int length, i; if (!gperl_sv_is_array_ref (sv)) croak ("cmap must be an array reference"); av = (AV *) SvRV (sv); length = av_len (av); if (length > 255) croak ("a cmap may not consist of more than 256 colors"); cmap = gperl_alloc_temp (sizeof (GdkRgbCmap)); cmap->n_colors = length + 1; for (i = 0; i <= length; i++) { SV **color = av_fetch (av, i, 0); if (color && gperl_sv_is_defined (*color)) cmap->colors[i] = SvIV (*color); } return cmap; } MODULE = Gtk2::Gdk::Rgb PACKAGE = Gtk2::Gdk::GC PREFIX = gdk_ ## void gdk_rgb_gc_set_foreground (GdkGC *gc, guint32 rgb) void gdk_rgb_gc_set_foreground (GdkGC * gc, guint32 rgb) ALIAS: Gtk2::Gdk::GC::set_rgb_foreground = 1 CLEANUP: PERL_UNUSED_VAR (ix); ## void gdk_rgb_gc_set_background (GdkGC *gc, guint32 rgb) void gdk_rgb_gc_set_background (GdkGC * gc, guint32 rgb) ALIAS: Gtk2::Gdk::GC::set_rgb_background = 1 CLEANUP: PERL_UNUSED_VAR (ix); MODULE = Gtk2::Gdk::Rgb PACKAGE = Gtk2::Gdk::Colormap PREFIX = gdk_ ## void gdk_rgb_find_color (GdkColormap *colormap, GdkColor *color) void gdk_rgb_find_color (GdkColormap *colormap, GdkColor *color) MODULE = Gtk2::Gdk::Rgb PACKAGE = Gtk2::Gdk::Drawable PREFIX = gdk_ ## void gdk_draw_rgb_image (GdkDrawable *drawable, GdkGC *gc, gint x, gint y, gint width, gint height, GdkRgbDither dith, guchar *rgb_buf, gint rowstride) ## void gdk_draw_rgb_32_image (GdkDrawable *drawable, GdkGC *gc, gint x, gint y, gint width, gint height, GdkRgbDither dith, guchar *buf, gint rowstride) ## void gdk_draw_gray_image (GdkDrawable *drawable, GdkGC *gc, gint x, gint y, gint width, gint height, GdkRgbDither dith, guchar *buf, gint rowstride) void gdk_draw_rgb_image (drawable, gc, x, y, width, height, dith, buf, rowstride) GdkDrawable *drawable GdkGC *gc gint x gint y gint width gint height GdkRgbDither dith SV * buf gint rowstride ALIAS: draw_rgb_32_image = 1 draw_gray_image = 2 CODE: switch (ix) { case 0: gdk_draw_rgb_image (drawable, gc, x, y, width, height, dith, SvImageDataPointer(buf), rowstride); break; case 1: gdk_draw_rgb_32_image (drawable, gc, x, y, width, height, dith, SvImageDataPointer(buf), rowstride); break; case 2: gdk_draw_gray_image (drawable, gc, x, y, width, height, dith, SvImageDataPointer(buf), rowstride); break; default: g_assert_not_reached (); } ## void gdk_draw_rgb_image_dithalign (GdkDrawable *drawable, GdkGC *gc, gint x, gint y, gint width, gint height, GdkRgbDither dith, guchar *rgb_buf, gint rowstride, gint xdith, gint ydith) ## void gdk_draw_rgb_32_image_dithalign (GdkDrawable *drawable, GdkGC *gc, gint x, gint y, gint width, gint height, GdkRgbDither dith, guchar *buf, gint rowstride, gint xdith, gint ydith) void gdk_draw_rgb_image_dithalign (drawable, gc, x, y, width, height, dith, rgb_buf, rowstride, xdith, ydith) GdkDrawable *drawable GdkGC *gc gint x gint y gint width gint height GdkRgbDither dith SV *rgb_buf gint rowstride gint xdith gint ydith ALIAS: draw_rgb_32_image_dithalign = 1 CODE: if (ix == 1) gdk_draw_rgb_32_image_dithalign (drawable, gc, x, y, width, height, dith, SvImageDataPointer (rgb_buf), rowstride, xdith, ydith); else gdk_draw_rgb_image_dithalign (drawable, gc, x, y, width, height, dith, SvImageDataPointer(rgb_buf), rowstride, xdith, ydith); ## void gdk_draw_indexed_image (GdkDrawable *drawable, GdkGC *gc, gint x, gint y, gint width, gint height, GdkRgbDither dith, guchar *buf, gint rowstride, GdkRgbCmap *cmap) void gdk_draw_indexed_image (drawable, gc, x, y, width, height, dith, buf, rowstride, cmap) GdkDrawable *drawable GdkGC *gc gint x gint y gint width gint height GdkRgbDither dith SV *buf gint rowstride SV *cmap CODE: gdk_draw_indexed_image (drawable, gc, x, y, width, height, dith, SvImageDataPointer (buf), rowstride, SvGdkRgbCmap (cmap)); MODULE = Gtk2::Gdk::Rgb PACKAGE = Gtk2::Gdk::Rgb PREFIX = gdk_rgb_ ## void gdk_rgb_set_verbose (gboolean verbose) void gdk_rgb_set_verbose (class, verbose) gboolean verbose C_ARGS: verbose ## void gdk_rgb_set_install (gboolean install) void gdk_rgb_set_install (class, install) gboolean install C_ARGS: install ## void gdk_rgb_set_min_colors (gint min_colors) void gdk_rgb_set_min_colors (class, min_colors) gint min_colors C_ARGS: min_colors ## no longer needed ## GdkColormap *gdk_rgb_get_colormap (void) ## GdkVisual * gdk_rgb_get_visual (void) ## gboolean gdk_rgb_ditherable (void) gboolean gdk_rgb_ditherable (class) C_ARGS: /*void*/ #if GTK_CHECK_VERSION (2, 6, 0) ## gboolean gdk_rgb_colormap_ditherable (GdkColormap *cmap); gboolean gdk_rgb_colormap_ditherable (class, cmap) GdkColormap *cmap C_ARGS: cmap #endif Gtk2-1.2498/xs/GdkScreen.xs000644 001750 000024 00000014726 11664366546 016431 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003-2005 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" MODULE = Gtk2::Gdk::Screen PACKAGE = Gtk2::Gdk::Screen PREFIX = gdk_screen_ BOOT: /* the gdk backends override the public GdkScreen with private, * back-end-specific types. tell gperl_get_object not to * complain about them. */ gperl_object_set_no_warn_unreg_subclass (GDK_TYPE_SCREEN, TRUE); ## GdkColormap *gdk_screen_get_default_colormap (GdkScreen *screen) GdkColormap * gdk_screen_get_default_colormap (screen) GdkScreen *screen ## void gdk_screen_set_default_colormap (GdkScreen *screen, GdkColormap *colormap) void gdk_screen_set_default_colormap (screen, colormap) GdkScreen *screen GdkColormap *colormap ## GdkColormap* gdk_screen_get_system_colormap (GdkScreen *screen) GdkColormap* gdk_screen_get_system_colormap (screen) GdkScreen *screen ## GdkVisual* gdk_screen_get_system_visual (GdkScreen *screen) GdkVisual* gdk_screen_get_system_visual (screen) GdkScreen *screen ## GdkColormap *gdk_screen_get_rgb_colormap (GdkScreen *screen) GdkColormap * gdk_screen_get_rgb_colormap (screen) GdkScreen *screen ## GdkVisual * gdk_screen_get_rgb_visual (GdkScreen *screen) GdkVisual * gdk_screen_get_rgb_visual (screen) GdkScreen *screen ## GdkWindow * gdk_screen_get_root_window (GdkScreen *screen) GdkWindow * gdk_screen_get_root_window (screen) GdkScreen *screen ## GdkDisplay * gdk_screen_get_display (GdkScreen *screen) GdkDisplay * gdk_screen_get_display (screen) GdkScreen *screen ## gint gdk_screen_get_number (GdkScreen *screen) gint gdk_screen_get_number (screen) GdkScreen *screen ## gint gdk_screen_get_width (GdkScreen *screen) gint gdk_screen_get_width (screen) GdkScreen *screen ## gint gdk_screen_get_height (GdkScreen *screen) gint gdk_screen_get_height (screen) GdkScreen *screen ## gint gdk_screen_get_width_mm (GdkScreen *screen) gint gdk_screen_get_width_mm (screen) GdkScreen *screen ## gint gdk_screen_get_height_mm (GdkScreen *screen) gint gdk_screen_get_height_mm (screen) GdkScreen *screen ## GList * gdk_screen_list_visuals (GdkScreen *screen) =for apidoc Returns a list of Gtk2::Gdk::Visual's. =cut void gdk_screen_list_visuals (screen) GdkScreen *screen PREINIT: GList * list, * i; PPCODE: list = gdk_screen_list_visuals (screen); for (i = list ; i != NULL ; i = i->next) XPUSHs (sv_2mortal (newSVGdkVisual (i->data))); g_list_free (list); ## GList * gdk_screen_get_toplevel_windows (GdkScreen *screen) =for apidoc Returns a list of Gtk2::Gdk::Window's. =cut void gdk_screen_get_toplevel_windows (screen) GdkScreen *screen PREINIT: GList * list, * i; PPCODE: list = gdk_screen_get_toplevel_windows (screen); for (i = list ; i != NULL ; i = i->next) XPUSHs (sv_2mortal (newSVGdkWindow (i->data))); g_list_free (list); ## gchar * gdk_screen_make_display_name (GdkScreen *screen) gchar_own * gdk_screen_make_display_name (screen) GdkScreen *screen ## gint gdk_screen_get_n_monitors (GdkScreen *screen) gint gdk_screen_get_n_monitors (screen) GdkScreen *screen ## void gdk_screen_get_monitor_geometry (GdkScreen *screen, gint monitor_num, GdkRectangle *dest) GdkRectangle_copy * gdk_screen_get_monitor_geometry (screen, monitor_num) GdkScreen *screen gint monitor_num PREINIT: GdkRectangle dest; CODE: gdk_screen_get_monitor_geometry (screen, monitor_num, &dest); RETVAL = &dest; OUTPUT: RETVAL ## gint gdk_screen_get_monitor_at_point (GdkScreen *screen, gint x, gint y) gint gdk_screen_get_monitor_at_point (screen, x, y) GdkScreen *screen gint x gint y ## gint gdk_screen_get_monitor_at_window (GdkScreen *screen, GdkWindow *window) gint gdk_screen_get_monitor_at_window (screen, window) GdkScreen *screen GdkWindow *window ## void gdk_screen_broadcast_client_message (GdkScreen *screen, GdkEvent *event) void gdk_screen_broadcast_client_message (screen, event) GdkScreen *screen GdkEvent *event ## Gdk owns this object, so no _noinc ## GdkScreen *gdk_screen_get_default (void) GdkScreen_ornull * gdk_screen_get_default (class) C_ARGS: /* void */ ## gboolean gdk_screen_get_setting (GdkScreen *screen, const gchar *name, GValue *value) SV * gdk_screen_get_setting (screen, name) GdkScreen *screen const gchar *name PREINIT: GValue value = {0,}; CODE: if (!gdk_screen_get_setting (screen, name, &value)) XSRETURN_UNDEF; RETVAL = gperl_sv_from_value (&value); g_value_unset (&value); OUTPUT: RETVAL #if GTK_CHECK_VERSION (2, 8, 0) GdkColormap_ornull * gdk_screen_get_rgba_colormap (GdkScreen *screen); GdkVisual_ornull * gdk_screen_get_rgba_visual (GdkScreen *screen); #endif #if GTK_CHECK_VERSION (2, 10, 0) # gdk_screen_get_font_options and gdk_screen_set_font_options are wrapped in # GdkCairo.xs. void gdk_screen_set_resolution (GdkScreen *screen, gdouble dpi); gdouble gdk_screen_get_resolution (GdkScreen *screen); GdkWindow * gdk_screen_get_active_window (GdkScreen * screen); ##GList * gdk_screen_get_window_stack (GdkScreen *screen) void gdk_screen_get_window_stack (GdkScreen *screen) PREINIT: GList *list, *i; PPCODE: list = gdk_screen_get_window_stack (screen); for (i = list; i != NULL; i = i->next) /* The list owns a reference to the windows. */ XPUSHs (sv_2mortal (newSVGdkWindow_noinc (i->data))); g_list_free (list); gboolean gdk_screen_is_composited (GdkScreen *screen); #endif /* 2.10 */ #if GTK_CHECK_VERSION (2, 14, 0) gint gdk_screen_get_monitor_height_mm (GdkScreen *screen, gint monitor_num); gint gdk_screen_get_monitor_width_mm (GdkScreen *screen, gint monitor_num); gchar_own_ornull * gdk_screen_get_monitor_plug_name (GdkScreen *screen, gint monitor_num); #endif /* 2.14 */ #if GTK_CHECK_VERSION (2, 20, 0) gint gdk_screen_get_primary_monitor (GdkScreen *screen); #endif /* 2.20 */ Gtk2-1.2498/xs/GdkSelection.xs000644 001750 000024 00000013352 11664366546 017131 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" MODULE = Gtk2::Gdk::Selection PACKAGE = Gtk2::Gdk GdkAtom SELECTION_PRIMARY (class) ALIAS: Gtk2::Gdk::SELECTION_SECONDARY = 1 Gtk2::Gdk::SELECTION_CLIPBOARD = 2 Gtk2::Gdk::TARGET_BITMAP = 3 Gtk2::Gdk::TARGET_COLORMAP = 4 Gtk2::Gdk::TARGET_DRAWABLE = 5 Gtk2::Gdk::TARGET_PIXMAP = 6 Gtk2::Gdk::TARGET_STRING = 7 Gtk2::Gdk::SELECTION_TYPE_ATOM = 8 Gtk2::Gdk::SELECTION_TYPE_BITMAP = 9 Gtk2::Gdk::SELECTION_TYPE_COLORMAP = 10 Gtk2::Gdk::SELECTION_TYPE_DRAWABLE = 11 Gtk2::Gdk::SELECTION_TYPE_INTEGER = 12 Gtk2::Gdk::SELECTION_TYPE_PIXMAP = 13 Gtk2::Gdk::SELECTION_TYPE_WINDOW = 14 Gtk2::Gdk::SELECTION_TYPE_STRING = 15 CODE: switch (ix) { case 0: RETVAL = GDK_SELECTION_PRIMARY; break; case 1: RETVAL = GDK_SELECTION_SECONDARY; break; case 2: RETVAL = GDK_SELECTION_CLIPBOARD; break; case 3: RETVAL = GDK_TARGET_BITMAP; break; case 4: RETVAL = GDK_TARGET_COLORMAP; break; case 5: RETVAL = GDK_TARGET_DRAWABLE; break; case 6: RETVAL = GDK_TARGET_PIXMAP; break; case 7: RETVAL = GDK_TARGET_STRING; break; case 8: RETVAL = GDK_SELECTION_TYPE_ATOM; break; case 9: RETVAL = GDK_SELECTION_TYPE_BITMAP; break; case 10: RETVAL = GDK_SELECTION_TYPE_COLORMAP; break; case 11: RETVAL = GDK_SELECTION_TYPE_DRAWABLE; break; case 12: RETVAL = GDK_SELECTION_TYPE_INTEGER; break; case 13: RETVAL = GDK_SELECTION_TYPE_PIXMAP; break; case 14: RETVAL = GDK_SELECTION_TYPE_WINDOW; break; case 15: RETVAL = GDK_SELECTION_TYPE_STRING; break; default: RETVAL = 0; g_assert_not_reached (); } OUTPUT: RETVAL MODULE = Gtk2::Gdk::Selection PACKAGE = Gtk2::Gdk::Selection PREFIX = gdk_selection_ ## since owner can be NULL, i interpret this to be a class method rather ## than an object method. ## gboolean gdk_selection_owner_set (GdkWindow *owner, GdkAtom selection, guint32 time_, gboolean send_event) gboolean gdk_selection_owner_set (class, owner, selection, time_, send_event) GdkWindow_ornull *owner GdkAtom selection guint32 time_ gboolean send_event C_ARGS: owner, selection, time_, send_event ## GdkWindow* gdk_selection_owner_get (GdkAtom selection) GdkWindow_ornull* gdk_selection_owner_get (class, selection) GdkAtom selection C_ARGS: selection #if GTK_CHECK_VERSION(2,2,0) ## gboolean gdk_selection_owner_set_for_display (GdkDisplay *display, GdkWindow *owner, GdkAtom selection, guint32 time_, gboolean send_event) gboolean gdk_selection_owner_set_for_display (class, display, owner, selection, time_, send_event) GdkDisplay *display GdkWindow *owner GdkAtom selection guint32 time_ gboolean send_event C_ARGS: display, owner, selection, time_, send_event ## GdkWindow *gdk_selection_owner_get_for_display (GdkDisplay *display, GdkAtom selection) GdkWindow_ornull * gdk_selection_owner_get_for_display (class, display, selection) GdkDisplay *display GdkAtom selection C_ARGS: display, selection #endif /* >=2.2.0 */ ## void gdk_selection_convert (GdkWindow *requestor, GdkAtom selection, GdkAtom target, guint32 time_) void gdk_selection_convert (class, requestor, selection, target, time_) GdkWindow *requestor GdkAtom selection GdkAtom target guint32 time_ C_ARGS: requestor, selection, target, time_ ## docs do not say deprecated, but recommend the use of GtkClipboard instead ## gboolean gdk_selection_property_get (GdkWindow *requestor, guchar **data, GdkAtom *prop_type, gint *prop_format) =for apidoc =for signature (data, prop_type, prop_format) = Gtk2::Gdk::Selection->property_get ($requestor) Use Gtk2::Clipboard instead. =cut void gdk_selection_property_get (class, requestor) GdkWindow *requestor PREINIT: guchar * data; GdkAtom prop_type; gint prop_format; PPCODE: if (!gdk_selection_property_get (requestor, &data, &prop_type, &prop_format)) XSRETURN_EMPTY; EXTEND (SP, 3); PUSHs (sv_2mortal (newSVpv ((gchar *) data, 0))); PUSHs (sv_2mortal (newSVGdkAtom (prop_type))); PUSHs (sv_2mortal (newSViv (prop_format))); g_free (data); ## void gdk_selection_send_notify (guint32 requestor, GdkAtom selection, GdkAtom target, GdkAtom property, guint32 time_) void gdk_selection_send_notify (class, requestor, selection, target, property, time_) guint32 requestor GdkAtom selection GdkAtom target GdkAtom property guint32 time_ C_ARGS: requestor, selection, target, property, time_ #if GTK_CHECK_VERSION(2,2,0) ## void gdk_selection_send_notify_for_display (GdkDisplay *display, guint32 requestor, GdkAtom selection, GdkAtom target, GdkAtom property, guint32 time_) void gdk_selection_send_notify_for_display (class, display, requestor, selection, target, property, time_) GdkDisplay *display guint32 requestor GdkAtom selection GdkAtom target GdkAtom property guint32 time_ C_ARGS: display, requestor, selection, target, property, time_ #endif /* >=2.2.0 */ Gtk2-1.2498/xs/GdkTypes.xs000644 001750 000024 00000024261 11664366546 016311 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" /* ------------------------------------------------------------------------- */ SV * newSVGdkGeometry (GdkGeometry *geometry) { HV *object = newHV (); if (geometry) { gperl_hv_take_sv_s (object, "min_width", newSViv (geometry->min_width)); gperl_hv_take_sv_s (object, "min_height", newSViv (geometry->min_height)); gperl_hv_take_sv_s (object, "max_width", newSViv (geometry->max_width)); gperl_hv_take_sv_s (object, "max_height", newSViv (geometry->max_height)); gperl_hv_take_sv_s (object, "base_width", newSViv (geometry->base_width)); gperl_hv_take_sv_s (object, "base_height", newSViv (geometry->base_height)); gperl_hv_take_sv_s (object, "width_inc", newSViv (geometry->width_inc)); gperl_hv_take_sv_s (object, "height_inc", newSViv (geometry->height_inc)); gperl_hv_take_sv_s (object, "min_aspect", newSVnv (geometry->min_aspect)); gperl_hv_take_sv_s (object, "max_aspect", newSVnv (geometry->max_aspect)); gperl_hv_take_sv_s (object, "win_gravity", newSVGdkGravity (geometry->win_gravity)); } return sv_bless (newRV_noinc ((SV *) object), gv_stashpv ("Gtk2::Gdk::Geometry", 1)); } #define GTK2PERL_GEOMETRY_FETCH(member, key, type) \ member = hv_fetch (hv, key, strlen (key), FALSE); \ if (member) geometry->member = type (*member); GdkGeometry * SvGdkGeometryReal (SV *object, GdkWindowHints *hints) { HV *hv = (HV *) SvRV (object); SV **min_width, **min_height, **max_width, **max_height, **base_width, **base_height, **width_inc, **height_inc, **min_aspect, **max_aspect, **win_gravity; GdkGeometry *geometry = gperl_alloc_temp (sizeof (GdkGeometry)); if (hints) *hints = 0; if (gperl_sv_is_hash_ref (object)) { GTK2PERL_GEOMETRY_FETCH (min_width, "min_width", SvIV); GTK2PERL_GEOMETRY_FETCH (min_height, "min_height", SvIV); GTK2PERL_GEOMETRY_FETCH (max_width, "max_width", SvIV); GTK2PERL_GEOMETRY_FETCH (max_height, "max_height", SvIV); GTK2PERL_GEOMETRY_FETCH (base_width, "base_width", SvIV); GTK2PERL_GEOMETRY_FETCH (base_height, "base_height", SvIV); GTK2PERL_GEOMETRY_FETCH (width_inc, "width_inc", SvIV); GTK2PERL_GEOMETRY_FETCH (height_inc, "height_inc", SvIV); GTK2PERL_GEOMETRY_FETCH (min_aspect, "min_aspect", SvNV); GTK2PERL_GEOMETRY_FETCH (max_aspect, "max_aspect", SvNV); GTK2PERL_GEOMETRY_FETCH (win_gravity, "win_gravity", SvGdkGravity); if (hints) { if (min_width && min_height) *hints |= GDK_HINT_MIN_SIZE; if (max_width && max_height) *hints |= GDK_HINT_MAX_SIZE; if (base_width && base_height) *hints |= GDK_HINT_BASE_SIZE; if (min_aspect && max_aspect) *hints |= GDK_HINT_ASPECT; if (width_inc && height_inc) *hints |= GDK_HINT_RESIZE_INC; if (win_gravity) *hints |= GDK_HINT_WIN_GRAVITY; } } return geometry; } GdkGeometry * SvGdkGeometry (SV *object) { return SvGdkGeometryReal (object, NULL); } /* ------------------------------------------------------------------------- */ SV * newSVGdkAtom (GdkAtom atom) { SV * sv = newSV(0); sv_setref_pv (sv, "Gtk2::Gdk::Atom", (void*)atom); return sv; } GdkAtom SvGdkAtom (SV * sv) { if (!gperl_sv_is_defined (sv)) return (GdkAtom)NULL; else if (sv_derived_from (sv, "Gtk2::Gdk::Atom")) return INT2PTR (GdkAtom, SvIV ((SV*)SvRV (sv))); else croak ("variable is not of type Gtk2::Gdk::Atom"); return (GdkAtom)NULL; /* not reached */ } MODULE = Gtk2::Gdk::Types PACKAGE = Gtk2::Gdk::Rectangle GdkRectangle_copy * new (class, x, y, width, height) gint x gint y gint width gint height PREINIT: GdkRectangle rect; CODE: rect.x = x; rect.y = y; rect.width = width; rect.height = height; RETVAL = ▭ OUTPUT: RETVAL =for apidoc Gtk2::Gdk::Rectangle::x =for signature integer = $rectangle->x =for signature oldvalue = $rectangle->x ($newvalue) =for arg newvalue (integer) =cut =for apidoc y =for signature integer = $rectangle->y =for signature oldvalue = $rectangle->y ($newvalue) =for arg newvalue (integer) =cut =for apidoc width =for signature integer = $rectangle->width =for signature oldvalue = $rectangle->width ($newvalue) =for arg newvalue (integer) =cut =for apidoc height =for signature integer = $rectangle->height =for signature oldvalue = $rectangle->height ($newvalue) =for arg newvalue (integer) =cut gint x (GdkRectangle *rectangle, SV *newvalue = 0) ALIAS: y = 1 width = 2 height = 3 CODE: switch (ix) { case 0: RETVAL = rectangle->x; break; case 1: RETVAL = rectangle->y; break; case 2: RETVAL = rectangle->width; break; case 3: RETVAL = rectangle->height; break; default: RETVAL = 0; g_assert_not_reached (); } if (newvalue) { switch (ix) { case 0: rectangle->x = SvIV (newvalue); break; case 1: rectangle->y = SvIV (newvalue); break; case 2: rectangle->width = SvIV (newvalue); break; case 3: rectangle->height = SvIV (newvalue); break; default: g_assert_not_reached (); } } OUTPUT: RETVAL =for apidoc =for signature (x, y, width, height) = $rectangle->values =cut void values (rectangle) GdkRectangle * rectangle PPCODE: EXTEND (SP, 4); PUSHs (sv_2mortal (newSViv (rectangle->x))); PUSHs (sv_2mortal (newSViv (rectangle->y))); PUSHs (sv_2mortal (newSViv (rectangle->width))); PUSHs (sv_2mortal (newSViv (rectangle->height))); MODULE = Gtk2::Gdk::Types PACKAGE = Gtk2::Gdk::Geometry GdkGeometry * new (class) PREINIT: GdkGeometry geometry; CODE: memset (&geometry, 0, sizeof (GdkGeometry)); geometry.win_gravity = GDK_GRAVITY_NORTH_WEST; RETVAL = &geometry; OUTPUT: RETVAL SV * min_width (SV *object, SV *newvalue=NULL) ALIAS: min_height = 1 max_width = 2 max_height = 3 base_width = 4 base_height = 5 width_inc = 6 height_inc = 7 min_aspect = 8 max_aspect = 9 win_gravity = 10 gravity = 11 PREINIT: SV **value = NULL; HV *geometry; CODE: geometry = (HV *) SvRV (object); RETVAL = &PL_sv_undef; switch (ix) { case 0: value = hv_fetch (geometry, "min_width", 9, 0); break; case 1: value = hv_fetch (geometry, "min_height", 10, 0); break; case 2: value = hv_fetch (geometry, "max_width", 9, 0); break; case 3: value = hv_fetch (geometry, "max_height", 10, 0); break; case 4: value = hv_fetch (geometry, "base_width", 10, 0); break; case 5: value = hv_fetch (geometry, "base_height", 11, 0); break; case 6: value = hv_fetch (geometry, "width_inc", 9, 0); break; case 7: value = hv_fetch (geometry, "height_inc", 10, 0); break; case 8: value = hv_fetch (geometry, "min_aspect", 10, 0); break; case 9: value = hv_fetch (geometry, "max_aspect", 10, 0); break; case 10: /* fall-through */ case 11: value = hv_fetch (geometry, "win_gravity", 11, 0); break; default: g_assert_not_reached (); } if (value && gperl_sv_is_defined (*value)) RETVAL = newSVsv (*value); if (items > 1) { newvalue = newSVsv (newvalue); switch (ix) { case 0: gperl_hv_take_sv_s (geometry, "min_width", newvalue); break; case 1: gperl_hv_take_sv_s (geometry, "min_height", newvalue); break; case 2: gperl_hv_take_sv_s (geometry, "max_width", newvalue); break; case 3: gperl_hv_take_sv_s (geometry, "max_height", newvalue); break; case 4: gperl_hv_take_sv_s (geometry, "base_width", newvalue); break; case 5: gperl_hv_take_sv_s (geometry, "base_height", newvalue); break; case 6: gperl_hv_take_sv_s (geometry, "width_inc", newvalue); break; case 7: gperl_hv_take_sv_s (geometry, "height_inc", newvalue); break; case 8: gperl_hv_take_sv_s (geometry, "min_aspect", newvalue); break; case 9: gperl_hv_take_sv_s (geometry, "max_aspect", newvalue); break; case 10: /* fall-through */ case 11: gperl_hv_take_sv_s (geometry, "win_gravity", newvalue); break; default: g_assert_not_reached (); } } OUTPUT: RETVAL ## moved here because it makes plain sense =for apidoc =for signature (new_width, new_height) = $geometry->constrain_size ($width, $height) =for signature (new_width, new_height) = $geometry->constrain_size ($flags, $width, $height) =for arg flags (Gtk2::Gdk::WindowHints) optional, usually inferred from I<$geometry> The $flags argument, describing which fields in the geometry are valid, is optional. If omitted it will be inferred from the geometry itself. =cut ## void gdk_window_constrain_size (GdkGeometry *geometry, guint flags, gint width, gint height, gint *new_width, gint *new_height) void constrain_size (geometry_ref, ...) SV *geometry_ref PREINIT: GdkGeometry *geometry; GdkWindowHints flags; gint width; gint height; gint new_width; gint new_height; PPCODE: if (items == 4) { if (!gperl_sv_is_defined (ST (1))) warn ("Warning: You passed undef for the flags parameter. Consider simply omitting it instead."); geometry = SvGdkGeometry (geometry_ref); flags = SvGdkWindowHints (ST (1)); width = SvIV (ST (2)); height = SvIV (ST (3)); } else if (items == 3) { geometry = SvGdkGeometryReal (geometry_ref, &flags); width = SvIV (ST (1)); height = SvIV (ST (2)); } else { croak ("Usage: Gtk2::Gdk::Geometry::constrain_size(geometry, width, height) or Gtk2::Gdk::Geometry::constrain_size(geometry, flags, width, height)"); } gdk_window_constrain_size (geometry, flags, width, height, &new_width, &new_height); EXTEND (SP, 2); PUSHs (sv_2mortal (newSViv (new_width))); PUSHs (sv_2mortal (newSViv (new_height))); Gtk2-1.2498/xs/GdkVisual.xs000644 001750 000024 00000011016 11664366546 016442 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2004 by the gtk2-perl team (see the file AUTHORS) * * Licensed under the LGPL, see LICENSE file for more information. * * $Id$ */ #include "gtk2perl.h" MODULE = Gtk2::Gdk::Visual PACKAGE = Gtk2::Gdk PREFIX = gdk_ =for apidoc Returns a list of depths. =cut ## void gdk_query_depths (gint **depths, gint *count) void gdk_query_depths (class) PREINIT: gint *depths = NULL; gint i, count = 0; PPCODE: gdk_query_depths (&depths, &count); if (count <= 0 || depths == NULL) XSRETURN_EMPTY; EXTEND (sp, count); for (i = 0; i < count; i++) PUSHs (sv_2mortal (newSViv (depths[i]))); ## void gdk_query_visual_types (GdkVisualType **visual_types, gint *count) void gdk_query_visual_types (class) PREINIT: GdkVisualType *visual_types = NULL; gint i, count = 0; PPCODE: gdk_query_visual_types (&visual_types, &count); if (count <= 0 || visual_types == NULL) XSRETURN_EMPTY; EXTEND (sp, count); for (i = 0; i < count; i++) PUSHs (sv_2mortal (newSVGdkVisualType (visual_types[i]))); ## GList* gdk_list_visuals (void) void gdk_list_visuals (class) PREINIT: GList *i, *visuals = NULL; PPCODE: PERL_UNUSED_VAR (ax); visuals = gdk_list_visuals (); for (i = visuals; i != NULL; i = i->next) XPUSHs (sv_2mortal (newSVGdkVisual (i->data))); g_list_free (visuals); MODULE = Gtk2::Gdk::Visual PACKAGE = Gtk2::Gdk::Visual PREFIX = gdk_visual_ ## gint gdk_visual_get_best_depth (void) gint gdk_visual_get_best_depth (class) C_ARGS: /* void */ ## GdkVisualType gdk_visual_get_best_type (void) GdkVisualType gdk_visual_get_best_type (class) C_ARGS: /* void */ ## GdkVisual* gdk_visual_get_system (void) GdkVisual* gdk_visual_get_system (class) C_ARGS: /* void */ ## GdkVisual* gdk_visual_get_best (void) GdkVisual* gdk_visual_get_best (class) C_ARGS: /* void */ ## GdkVisual* gdk_visual_get_best_with_depth (gint depth) GdkVisual_ornull* gdk_visual_get_best_with_depth (class, depth) gint depth C_ARGS: depth ## GdkVisual* gdk_visual_get_best_with_type (GdkVisualType visual_type) GdkVisual_ornull* gdk_visual_get_best_with_type (class, visual_type) GdkVisualType visual_type C_ARGS: visual_type ## GdkVisual* gdk_visual_get_best_with_both (gint depth, GdkVisualType visual_type) GdkVisual_ornull* gdk_visual_get_best_with_both (class, depth, visual_type) gint depth GdkVisualType visual_type C_ARGS: depth, visual_type #if GTK_CHECK_VERSION(2, 2, 0) ## GdkScreen* gdk_visual_get_screen (GdkVisual *visual) GdkScreen* gdk_visual_get_screen (visual) GdkVisual *visual #endif # --------------------------------------------------------------------------- # GdkVisualType type (visual) GdkVisual *visual CODE: RETVAL = visual->type; OUTPUT: RETVAL GdkByteOrder byte_order (visual) GdkVisual *visual CODE: RETVAL = visual->byte_order; OUTPUT: RETVAL gint depth (visual) GdkVisual *visual ALIAS: colormap_size = 1 bits_per_rgb = 2 red_shift = 3 red_prec = 4 green_shift = 5 green_prec = 6 blue_shift = 7 blue_prec = 8 CODE: RETVAL = 0; /* -W */ switch (ix) { case 0: RETVAL = visual->depth; break; case 1: RETVAL = visual->colormap_size; break; case 2: RETVAL = visual->bits_per_rgb; break; case 3: RETVAL = visual->red_shift; break; case 4: RETVAL = visual->red_prec; break; case 5: RETVAL = visual->green_shift; break; case 6: RETVAL = visual->green_prec; break; case 7: RETVAL = visual->blue_shift; break; case 8: RETVAL = visual->blue_prec; break; default: g_assert_not_reached (); } OUTPUT: RETVAL guint32 red_mask (visual) GdkVisual *visual ALIAS: green_mask = 1 blue_mask = 2 CODE: RETVAL = 0; /* -W */ switch (ix) { case 0: RETVAL = visual->red_mask; break; case 1: RETVAL = visual->green_mask; break; case 2: RETVAL = visual->blue_mask; break; default: g_assert_not_reached(); } OUTPUT: RETVAL #if GTK_CHECK_VERSION (2, 22, 0) void gdk_visual_get_blue_pixel_details (GdkVisual *visual, OUTLIST guint32 mask, OUTLIST gint shift, OUTLIST gint precision); void gdk_visual_get_green_pixel_details (GdkVisual *visual, OUTLIST guint32 mask, OUTLIST gint shift, OUTLIST gint precision); void gdk_visual_get_red_pixel_details (GdkVisual *visual, OUTLIST guint32 mask, OUTLIST gint shift, OUTLIST gint precision); gint gdk_visual_get_bits_per_rgb (GdkVisual *visual); GdkByteOrder gdk_visual_get_byte_order (GdkVisual *visual); gint gdk_visual_get_colormap_size (GdkVisual *visual); gint gdk_visual_get_depth (GdkVisual *visual); GdkVisualType gdk_visual_get_visual_type (GdkVisual *visual); #endif /* 2.22 */ Gtk2-1.2498/xs/GdkWindow.xs000644 001750 000024 00000101655 11664366546 016457 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003-2005, 2009 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" #include /* ------------------------------------------------------------------------- */ #if 0 /* not used at the moment */ static SV * newSVGdkWindowAttr (GdkWindowAttr *attr) { HV *object = newHV (); if (attr && attr->x && attr->y) { gperl_hv_take_sv_s (object, "title", newSVGChar (attr->title)); gperl_hv_take_sv_s (object, "event_mask", newSVGdkEventMask (attr->event_mask)); gperl_hv_take_sv_s (object, "x", newSViv (attr->x)); gperl_hv_take_sv_s (object, "y", newSViv (attr->y)); gperl_hv_take_sv_s (object, "width", newSViv (attr->width)); gperl_hv_take_sv_s (object, "height", newSViv (attr->height)); gperl_hv_take_sv_s (object, "wclass", newSVGdkWindowClass (attr->wclass)); gperl_hv_take_sv_s (object, "visual", newSVGdkVisual (attr->visual)); gperl_hv_take_sv_s (object, "colormap", newSVGdkColormap (attr->colormap)); gperl_hv_take_sv_s (object, "window_type", newSVGdkWindowType (attr->window_type)); gperl_hv_take_sv_s (object, "cursor", newSVGdkCursor (attr->cursor)); gperl_hv_take_sv_s (object, "wmclass_name", newSVGChar (attr->wmclass_name)); gperl_hv_take_sv_s (object, "wmclass_class", newSVGChar (attr->wmclass_class)); gperl_hv_take_sv_s (object, "override_redirect", boolSV (attr->override_redirect)); } return sv_bless (newRV_noinc ((SV *) object), gv_stashpv ("Gtk2::Gdk::Window::Attr", 1)); } #endif #define GTK2PERL_WINDOW_ATTR_FETCH(member, key, type) \ member = hv_fetch (hv, key, strlen (key), FALSE); \ if (member) attr->member = type (*member); static GdkWindowAttr * SvGdkWindowAttrReal (SV *object, GdkWindowAttributesType *mask) { HV *hv = (HV *) SvRV (object); SV **title, **event_mask, **x, **y, **width, **height, **wclass, **visual, **colormap, **window_type, **cursor, **wmclass_name, **wmclass_class, **override_redirect; GdkWindowAttr *attr = gperl_alloc_temp (sizeof (GdkWindowAttr)); /* better start with an empty mask */ if (mask) *mask = 0; if (gperl_sv_is_hash_ref (object)) { GTK2PERL_WINDOW_ATTR_FETCH (title, "title", SvGChar); GTK2PERL_WINDOW_ATTR_FETCH (event_mask, "event_mask", SvGdkEventMask); GTK2PERL_WINDOW_ATTR_FETCH (x, "x", SvIV); GTK2PERL_WINDOW_ATTR_FETCH (y, "y", SvIV); GTK2PERL_WINDOW_ATTR_FETCH (width, "width", SvIV); GTK2PERL_WINDOW_ATTR_FETCH (height, "height", SvIV); GTK2PERL_WINDOW_ATTR_FETCH (wclass, "wclass", SvGdkWindowClass); GTK2PERL_WINDOW_ATTR_FETCH (visual, "visual", SvGdkVisual); GTK2PERL_WINDOW_ATTR_FETCH (colormap, "colormap", SvGdkColormap); GTK2PERL_WINDOW_ATTR_FETCH (window_type, "window_type", SvGdkWindowType); GTK2PERL_WINDOW_ATTR_FETCH (cursor, "cursor", SvGdkCursor); GTK2PERL_WINDOW_ATTR_FETCH (wmclass_name, "wmclass_name", SvGChar); GTK2PERL_WINDOW_ATTR_FETCH (wmclass_class, "wmclass_class", SvGChar); GTK2PERL_WINDOW_ATTR_FETCH (override_redirect, "override_redirect", sv_2bool); if (mask) { if (title) *mask |= GDK_WA_TITLE; if (x) *mask |= GDK_WA_X; if (y) *mask |= GDK_WA_Y; if (wmclass_name && wmclass_class) *mask |= GDK_WA_WMCLASS; if (visual) *mask |= GDK_WA_VISUAL; if (colormap) *mask |= GDK_WA_COLORMAP; if (cursor) *mask |= GDK_WA_CURSOR; if (override_redirect) *mask |= GDK_WA_NOREDIR; } } return attr; } #if GTK_CHECK_VERSION (2, 18, 0) static void gtk2perl_offscreen_coord_translate_marshal (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) { gdouble * return_x, * return_y; dGPERL_CLOSURE_MARSHAL_ARGS; GPERL_CLOSURE_MARSHAL_INIT (closure, marshal_data); PERL_UNUSED_VAR (return_value); PERL_UNUSED_VAR (n_param_values); PERL_UNUSED_VAR (invocation_hint); ENTER; SAVETMPS; PUSHMARK (SP); GPERL_CLOSURE_MARSHAL_PUSH_INSTANCE (param_values); XPUSHs (sv_2mortal (newSVnv (g_value_get_double (param_values+1)))); XPUSHs (sv_2mortal (newSVnv (g_value_get_double (param_values+2)))); return_x = g_value_get_pointer (param_values+3); return_y = g_value_get_pointer (param_values+4); GPERL_CLOSURE_MARSHAL_PUSH_DATA; PUTBACK; GPERL_CLOSURE_MARSHAL_CALL (G_ARRAY); if (count == 2) { *return_y = POPn; *return_x = POPn; } else { /* NOTE: croaking here can cause bad things to happen to the * app, because croaking in signal handlers is bad juju. */ croak ("callback must return 2 values : x and y"); } PUTBACK; FREETMPS; LEAVE; } #endif #if 0 /* not used at the moment */ static GdkWindowAttr * SvGdkWindowAttr (SV *object) { return SvGdkWindowAttrReal (object, NULL); } #endif /* ------------------------------------------------------------------------- */ static GPerlCallback * gtk2perl_gdk_window_invalidate_maybe_recurse_func_create (SV * func, SV * data) { GType param_types [1]; param_types[0] = GDK_TYPE_WINDOW; return gperl_callback_new (func, data, G_N_ELEMENTS (param_types), param_types, G_TYPE_BOOLEAN); } static gboolean gtk2perl_gdk_window_invalidate_maybe_recurse_func (GdkWindow *window, gpointer data) { GPerlCallback * callback = (GPerlCallback*)data; GValue value = {0,}; gboolean retval; g_value_init (&value, callback->return_type); gperl_callback_invoke (callback, &value, window); retval = g_value_get_boolean (&value); g_value_unset (&value); return retval; } /* ------------------------------------------------------------------------- */ MODULE = Gtk2::Gdk::Window PACKAGE = Gtk2::Gdk::Window PREFIX = gdk_window_ =for position DESCRIPTION =head1 DESCRIPTION C is a low-level window-system window. One of these is created when a widget is "realized". As of Gtk 2.22 a window can only be created by C<< Gtk2::Gdk::Window->new() >>, C, etc. C doesn't work (segfaults on using the resulting window object). It's not possible to subclass C with L and the C system, since only C does the actual window creation, and that function always makes a C. (The Perl-Gtk C<< Gtk2::Gdk::Window->new() >> wrapper ignores the class name argument.) It may work to create a Perl level subclass and re-bless a C<< Gtk2::Gdk::Window->new() >> into that. But like any such re-blessing it's not preserved when the object is returned from a Gtk function etc (that just gives the base Gtk class). =cut BOOT: #if GTK_CHECK_VERSION (2, 18, 0) gperl_signal_set_marshaller_for (GDK_TYPE_WINDOW, "from-embedder", gtk2perl_offscreen_coord_translate_marshal); gperl_signal_set_marshaller_for (GDK_TYPE_WINDOW, "to-embedder", gtk2perl_offscreen_coord_translate_marshal); #endif =for position post_signals from-embedder, to-embedder and pick-embedded-child signals are for offscreen windows only. from-embedder and to-embedder receive the x and y coordinates to translate, and must return the translated x and y coordinate. =cut ## GdkWindow* gdk_window_new (GdkWindow *parent, GdkWindowAttr *attributes, gint attributes_mask) =for apidoc Create and return a new window. parent can be undef to mean the root window of the default screen. attributes_ref is a hashref containing some of the following keys, title string event_mask Gtk2::Gdk::EventMask flags x integer y integer width integer height integer wclass Gtk2::Gdk::WindowClass enum visual Gtk2::Gdk::Visual colormap Gtk2::Gdk::Colormap window_type Gtk2::Gdk::WindowType enum cursor Gtk2::Gdk::Cursor wmclass_name string wmclass_class string override_redirect boolean (integer 0 or 1) window_type is mandatory because it defaults to "root" but of course it's not possible to create a new root window. The other fields get default values zero, empty, unset, etc. my $win = Gtk2::Gdk::Window->new (undef, { window_type => 'toplevel, wclass => 'GDK_INPUT_OUTPUT', x => 0, y => 0, width => 200, height => 100 }); Incidentally, the nicknames for wclass Gtk2::Gdk::WindowClass really are "output" for input-output and "only" for input-only. Those names are a bit odd, but that's what Gtk has. You can, as for any enum, give the full names like "GDK_INPUT_OUTPUT" if desired, for some clarity. =cut # Note: no _noinc here, as we dot own the returned window. GdkWindow * gdk_window_new (class, parent, attributes_ref) GdkWindow_ornull *parent SV *attributes_ref PREINIT: GdkWindowAttr *attributes; GdkWindowAttributesType attributes_mask; CODE: attributes = SvGdkWindowAttrReal (attributes_ref, &attributes_mask); RETVAL = gdk_window_new (parent, attributes, attributes_mask); OUTPUT: RETVAL ## void gdk_window_destroy (GdkWindow *window) void gdk_window_destroy (window) GdkWindow *window ## GdkWindowType gdk_window_get_window_type (GdkWindow *window) GdkWindowType gdk_window_get_window_type (window) GdkWindow *window ## GdkWindow* gdk_window_at_pointer (gint *win_x, gint *win_y) =for apidoc =for signature (window, win_x, win_y) = Gtk2::Gdk::Window->at_pointer Returns window, a Gtk2::Gdk::Window and win_x and win_y, integers. =cut void gdk_window_at_pointer (class) PREINIT: GdkWindow * window; gint win_x, win_y; PPCODE: window = gdk_window_at_pointer (&win_x, &win_y); EXTEND (SP, 3); PUSHs (sv_2mortal (newSVGdkWindow (window))); PUSHs (sv_2mortal (newSViv (win_x))); PUSHs (sv_2mortal (newSViv (win_y))); PERL_UNUSED_VAR (ax); ## void gdk_window_show (GdkWindow *window) void gdk_window_show (window) GdkWindow *window ## void gdk_window_hide (GdkWindow *window) void gdk_window_hide (window) GdkWindow *window ## void gdk_window_withdraw (GdkWindow *window) void gdk_window_withdraw (window) GdkWindow *window ## void gdk_window_show_unraised (GdkWindow *window) void gdk_window_show_unraised (window) GdkWindow *window ## void gdk_window_move (GdkWindow *window, gint x, gint y) void gdk_window_move (window, x, y) GdkWindow *window gint x gint y ## void gdk_window_resize (GdkWindow *window, gint width, gint height) void gdk_window_resize (window, width, height) GdkWindow *window gint width gint height ## void gdk_window_move_resize (GdkWindow *window, gint x, gint y, gint width, gint height) void gdk_window_move_resize (window, x, y, width, height) GdkWindow *window gint x gint y gint width gint height ## void gdk_window_reparent (GdkWindow *window, GdkWindow *new_parent, gint x, gint y) void gdk_window_reparent (window, new_parent, x, y) GdkWindow *window GdkWindow *new_parent gint x gint y ## void gdk_window_clear (GdkWindow *window) void gdk_window_clear (window) GdkWindow *window ## void gdk_window_clear_area (GdkWindow *window, gint x, gint y, gint width, gint height) void gdk_window_clear_area (window, x, y, width, height) GdkWindow *window gint x gint y gint width gint height ## void gdk_window_clear_area_e (GdkWindow *window, gint x, gint y, gint width, gint height) void gdk_window_clear_area_e (window, x, y, width, height) GdkWindow *window gint x gint y gint width gint height ## void gdk_window_raise (GdkWindow *window) void gdk_window_raise (window) GdkWindow *window ## void gdk_window_lower (GdkWindow *window) void gdk_window_lower (window) GdkWindow *window ## void gdk_window_focus (GdkWindow *window, guint32 timestamp) void gdk_window_focus (window, timestamp) GdkWindow *window guint32 timestamp ## use object data instead ## void gdk_window_set_user_data (GdkWindow *window, gpointer user_data) void gdk_window_set_user_data (window, user_data) GdkWindow *window gulong user_data C_ARGS: window, (gpointer) user_data ## void gdk_window_set_override_redirect (GdkWindow *window, gboolean override_redirect) void gdk_window_set_override_redirect (window, override_redirect) GdkWindow *window gboolean override_redirect # FIXME needs a callback ## void gdk_window_add_filter (GdkWindow *window, GdkFilterFunc function, gpointer data) ##void ##gdk_window_add_filter (window, function, data) ## GdkWindow_ornull *window ## GdkFilterFunc function ## gpointer data # FIXME whoa! we'd have to cache the callbacks to do this. ## void gdk_window_remove_filter (GdkWindow *window, GdkFilterFunc function, gpointer data) ##void ##gdk_window_remove_filter (window, function, data) ## GdkWindow_ornull *window ## GdkFilterFunc function ## gpointer data ## void gdk_window_scroll (GdkWindow *window, gint dx, gint dy) void gdk_window_scroll (window, dx, dy) GdkWindow *window gint dx gint dy void gdk_window_shape_combine_mask (GdkWindow * window, GdkBitmap_ornull * mask, gint x, gint y); ## void gdk_window_shape_combine_region (GdkWindow *window, GdkRegion *shape_region, gint offset_x, gint offset_y) void gdk_window_shape_combine_region (window, shape_region, offset_x, offset_y) GdkWindow *window GdkRegion_ornull *shape_region gint offset_x gint offset_y ## void gdk_window_set_child_shapes (GdkWindow *window) void gdk_window_set_child_shapes (window) GdkWindow *window ## void gdk_window_merge_child_shapes (GdkWindow *window) void gdk_window_merge_child_shapes (window) GdkWindow *window ## gboolean gdk_window_set_static_gravities (GdkWindow *window, gboolean use_static) gboolean gdk_window_set_static_gravities (window, use_static) GdkWindow *window gboolean use_static ## gboolean gdk_window_is_visible (GdkWindow *window) gboolean gdk_window_is_visible (window) GdkWindow *window ## gboolean gdk_window_is_viewable (GdkWindow *window) gboolean gdk_window_is_viewable (window) GdkWindow *window ## GdkWindowState gdk_window_get_state (GdkWindow *window) GdkWindowState gdk_window_get_state (window) GdkWindow *window #ifndef GDK_MULTIHEAD_SAFE GdkWindow* gdk_window_foreign_new (class, GdkNativeWindow anid); C_ARGS: anid GdkWindow* gdk_window_lookup (class, GdkNativeWindow anid); C_ARGS: anid #endif #if GTK_CHECK_VERSION(2,2,0) GdkWindow *gdk_window_foreign_new_for_display (class, GdkDisplay *display, GdkNativeWindow anid); C_ARGS: display, anid GdkWindow* gdk_window_lookup_for_display (class, GdkDisplay *display, GdkNativeWindow anid) C_ARGS: display, anid #endif /* have GdkDisplay */ ## void gdk_window_set_type_hint (GdkWindow *window, GdkWindowTypeHint hint) void gdk_window_set_type_hint (window, hint) GdkWindow *window GdkWindowTypeHint hint ## void gdk_window_set_modal_hint (GdkWindow *window, gboolean modal) void gdk_window_set_modal_hint (window, modal) GdkWindow *window gboolean modal #if GTK_CHECK_VERSION(2,2,0) ## void gdk_window_set_skip_taskbar_hint (GdkWindow *window, gboolean skips_taskbar) void gdk_window_set_skip_taskbar_hint (window, skips_taskbar) GdkWindow *window gboolean skips_taskbar ## void gdk_window_set_skip_pager_hint (GdkWindow *window, gboolean skips_pager) void gdk_window_set_skip_pager_hint (window, skips_pager) GdkWindow *window gboolean skips_pager #endif # The hash fields of SvGdkGeometryReal() are described here because # this and Gtk2::Window::set_geometry_hints are the only places it # arises. Otherwise probably the description could go at the start of # Gtk2::Gdk::Geometry itself. # =for apidoc =for signature $window->set_geometry_hints ($geometry) =for signature $window->set_geometry_hints ($geometry, $geom_mask) =for arg geometry_ref (__hide__) =for arg geom_mask_sv (__hide__) =for arg geometry (scalar) Gtk2::Gdk::Geometry or hashref =for arg geom_mask (Gtk2::Gdk::WindowHints) optional, usually inferred from I<$geometry> $geometry is either a L|Gtk2::Gdk::Geometry> object, or a hashref with the following keys and values, min_width integer \ 'min-size' mask min_height integer / max_width integer \ 'max-size' mask max_height integer / base_width integer \ 'base-size' mask base_height integer / width_inc integer \ 'resize-inc' mask height_inc integer / min_aspect float \ 'aspect' mask max_aspect float / win_gravity Gtk2::Gdk::Gravity enum, 'win-gravity' mask Optional $geom_mask is which fields of $geometry are used. If $geometry is a hashref then $geom_mask defaults to the keys supplied in the hash, so for example $win->set_geometry_hints ({ min_width => 20, min_height => 10}); If $geometry is a C object then you must give $geom_mask explicitly. The 'pos', 'user-pos' and 'user-size' flags in $geom_mask have no data fields, so cannot be inferred from a $geometry hashref. If you want those flags you must pass $geom_mask explicitly. =cut ## void gdk_window_set_geometry_hints (GdkWindow *window, GdkGeometry *geometry, GdkWindowHints geom_mask) void gdk_window_set_geometry_hints (window, geometry_ref, geom_mask_sv=NULL) GdkWindow *window SV *geometry_ref SV *geom_mask_sv PREINIT: GdkGeometry *geometry; GdkWindowHints geom_mask; CODE: if (!gperl_sv_is_defined (geom_mask_sv)) { geometry = SvGdkGeometryReal (geometry_ref, &geom_mask); } else { geometry = SvGdkGeometry (geometry_ref); geom_mask = SvGdkWindowHints (geom_mask_sv); } gdk_window_set_geometry_hints (window, geometry, geom_mask); ## void gdk_set_sm_client_id (const gchar *sm_client_id) void gdk_set_sm_client_id (sm_client_id) const gchar *sm_client_id ## void gdk_window_begin_paint_rect (GdkWindow *window, GdkRectangle *rectangle) void gdk_window_begin_paint_rect (window, rectangle) GdkWindow *window GdkRectangle *rectangle ## void gdk_window_begin_paint_region (GdkWindow *window, GdkRegion *region) void gdk_window_begin_paint_region (window, region) GdkWindow *window GdkRegion *region ## void gdk_window_end_paint (GdkWindow *window) void gdk_window_end_paint (window) GdkWindow *window ## void gdk_window_set_title (GdkWindow *window, const gchar *title) void gdk_window_set_title (window, title) GdkWindow *window const gchar *title ## void gdk_window_set_role (GdkWindow *window, const gchar *role) void gdk_window_set_role (window, role) GdkWindow *window const gchar *role ## void gdk_window_set_transient_for (GdkWindow *window, GdkWindow *parent) void gdk_window_set_transient_for (window, parent) GdkWindow *window GdkWindow *parent ## void gdk_window_set_background (GdkWindow *window, GdkColor *color) void gdk_window_set_background (window, color) GdkWindow *window GdkColor *color ## void gdk_window_set_back_pixmap (GdkWindow *window, GdkPixmap *pixmap, gboolean parent_relative) void gdk_window_set_back_pixmap (window, pixmap, parent_relative = 0) GdkWindow *window GdkPixmap_ornull *pixmap gboolean parent_relative ## void gdk_window_set_cursor (GdkWindow *window, GdkCursor *cursor) void gdk_window_set_cursor (window, cursor) GdkWindow * window GdkCursor_ornull * cursor ## void gdk_window_get_user_data (GdkWindow *window, gpointer *data) gulong gdk_window_get_user_data (window) GdkWindow * window CODE: gdk_window_get_user_data (window, (gpointer*)&RETVAL); if( !RETVAL ) XSRETURN_UNDEF; OUTPUT: RETVAL ## void gdk_window_get_geometry (GdkWindow *window, gint *x, gint *y, gint *width, gint *height, gint *depth) void gdk_window_get_geometry (GdkWindow *window, OUTLIST gint x, OUTLIST gint y, OUTLIST gint width, OUTLIST gint height, OUTLIST gint depth) ## void gdk_window_get_position (GdkWindow *window, gint *x, gint *y) void gdk_window_get_position (GdkWindow *window, OUTLIST gint x, OUTLIST gint y) ## docs say return type is not meaningful, ignore ## gint gdk_window_get_origin (GdkWindow *window, gint *x, gint *y) void gdk_window_get_origin (GdkWindow *window, OUTLIST gint x, OUTLIST gint y) ## void gdk_window_get_root_origin (GdkWindow *window, gint *x, gint *y) void gdk_window_get_root_origin (GdkWindow *window, OUTLIST gint x, OUTLIST gint y) ## void gdk_window_get_frame_extents (GdkWindow *window, GdkRectangle *rect) GdkRectangle_copy * gdk_window_get_frame_extents (window) GdkWindow *window PREINIT: GdkRectangle rect; CODE: gdk_window_get_frame_extents (window, &rect); RETVAL = ▭ OUTPUT: RETVAL =for apidoc =for signature (window_at_pointer, x, y, mask) = $window->get_pointer Returns window_at_pointer, a Gtk2::Gdk::Window or undef, x and y, integers, and mask, a Gtk2::Gdk::ModifierType. =cut ## GdkWindow * gdk_window_get_pointer (GdkWindow *window, gint *x, gint *y, GdkModifierType *mask) void gdk_window_get_pointer (GdkWindow *window) PREINIT: GdkWindow * win; gint x; gint y; GdkModifierType mask; PPCODE: win = gdk_window_get_pointer (window, &x, &y, &mask); EXTEND (SP, 4); PUSHs (sv_2mortal (newSVGdkWindow_ornull (win))); PUSHs (sv_2mortal (newSViv (x))); PUSHs (sv_2mortal (newSViv (y))); PUSHs (sv_2mortal (newSVGdkModifierType (mask))); ## GdkWindow * gdk_window_get_parent (GdkWindow *window) GdkWindow * gdk_window_get_parent (window) GdkWindow *window ## GdkWindow * gdk_window_get_toplevel (GdkWindow *window) GdkWindow * gdk_window_get_toplevel (window) GdkWindow *window ## GList * gdk_window_get_children (GdkWindow *window) ## GList * gdk_window_peek_children (GdkWindow *window) ## we use ALIAS here b/c we're cheating and using peek_children all of the time ## since we're going to make a copy of the list anyway there's no need for gdk to =for apidoc Gtk2::Gdk::Window::peek_children An alias for get_children =cut =for apidoc Returns the list of children (Gtk2::Gdk::Window's) known to gdk. =cut void gdk_window_get_children (window) GdkWindow *window ALIAS: Gtk2::Gdk::Window::peek_children = 1 PREINIT: GList *windows = NULL, *i; PPCODE: PERL_UNUSED_VAR (ix); windows = gdk_window_peek_children (window); for (i = windows; i != NULL; i = i->next) XPUSHs (sv_2mortal (newSVGdkWindow (i->data))); ## GdkEventMask gdk_window_get_events (GdkWindow *window) GdkEventMask gdk_window_get_events (window) GdkWindow *window ## void gdk_window_set_events (GdkWindow *window, GdkEventMask event_mask) void gdk_window_set_events (window, event_mask) GdkWindow *window GdkEventMask event_mask =for apidoc =for arg ... of GdkPixbuf's =cut ## void gdk_window_set_icon_list (GdkWindow *window, GList *pixbufs) void gdk_window_set_icon_list (window, ...) GdkWindow *window PREINIT: int i; GList *pixbufs = NULL; CODE: for (i = 1; i < items; i++) pixbufs = g_list_append (pixbufs, SvGdkPixbuf (ST (i))); gdk_window_set_icon_list (window, pixbufs); g_list_free (pixbufs); ## void gdk_window_set_icon (GdkWindow *window, GdkWindow *icon_window, GdkPixmap *pixmap, GdkBitmap *mask) void gdk_window_set_icon (window, icon_window, pixmap, mask) GdkWindow *window GdkWindow_ornull *icon_window GdkPixmap_ornull *pixmap GdkBitmap_ornull *mask ## void gdk_window_set_icon_name (GdkWindow *window, const gchar *name) void gdk_window_set_icon_name (window, name) GdkWindow *window const gchar_ornull *name #if GTK_CHECK_VERSION (2, 4, 0) void gdk_window_set_accept_focus (GdkWindow *window, gboolean accept_focus) void gdk_window_set_keep_above (GdkWindow *window, gboolean setting) void gdk_window_set_keep_below (GdkWindow *window, gboolean setting) GdkWindow * gdk_window_get_group (GdkWindow * window) #endif ## void gdk_window_set_group (GdkWindow *window, GdkWindow *leader) void gdk_window_set_group (window, leader) GdkWindow *window GdkWindow_ornull *leader ## void gdk_window_set_decorations (GdkWindow *window, GdkWMDecoration decorations) void gdk_window_set_decorations (window, decorations) GdkWindow *window GdkWMDecoration decorations ## gboolean gdk_window_get_decorations (GdkWindow *window, GdkWMDecoration *decorations) void gdk_window_get_decorations (GdkWindow *window) PREINIT: gboolean result; GdkWMDecoration decorations; PPCODE: result = gdk_window_get_decorations (window, &decorations); EXTEND (SP, 2); PUSHs (sv_2mortal (boolSV (result))); PUSHs (sv_2mortal (newSVGdkWMDecoration (decorations))); ## void gdk_window_set_functions (GdkWindow *window, GdkWMFunction functions) void gdk_window_set_functions (window, functions) GdkWindow *window GdkWMFunction functions ## GList * gdk_window_get_toplevels (void) =for apidoc Returns a list of top level windows (Gtk2::Gdk::Window's) known to gdk, on the default screen. A toplevel window is a child of the root window. =cut void gdk_window_get_toplevels (class) PREINIT: GList *windows = NULL, *i; PPCODE: windows = gdk_window_get_toplevels (); for (i = windows; i != NULL; i = i->next) XPUSHs (sv_2mortal (newSVGdkWindow (i->data))); g_list_free (windows); PERL_UNUSED_VAR (ax); ## void gdk_window_iconify (GdkWindow *window) void gdk_window_iconify (window) GdkWindow *window ## void gdk_window_deiconify (GdkWindow *window) void gdk_window_deiconify (window) GdkWindow *window ## void gdk_window_stick (GdkWindow *window) void gdk_window_stick (window) GdkWindow *window ## void gdk_window_unstick (GdkWindow *window) void gdk_window_unstick (window) GdkWindow *window ## void gdk_window_maximize (GdkWindow *window) void gdk_window_maximize (window) GdkWindow *window ## void gdk_window_unmaximize (GdkWindow *window) void gdk_window_unmaximize (window) GdkWindow *window #if GTK_CHECK_VERSION(2,2,0) ## void gdk_window_fullscreen (GdkWindow *window) void gdk_window_fullscreen (window) GdkWindow *window ## void gdk_window_unfullscreen (GdkWindow *window) void gdk_window_unfullscreen (window) GdkWindow *window #endif ## void gdk_window_register_dnd (GdkWindow *window) void gdk_window_register_dnd (window) GdkWindow *window ## void gdk_window_begin_resize_drag (GdkWindow *window, GdkWindowEdge edge, gint button, gint root_x, gint root_y, guint32 timestamp) void gdk_window_begin_resize_drag (window, edge, button, root_x, root_y, timestamp) GdkWindow *window GdkWindowEdge edge gint button gint root_x gint root_y guint32 timestamp ## void gdk_window_begin_move_drag (GdkWindow *window, gint button, gint root_x, gint root_y, guint32 timestamp) void gdk_window_begin_move_drag (window, button, root_x, root_y, timestamp) GdkWindow *window gint button gint root_x gint root_y guint32 timestamp void gdk_window_invalidate_rect (window, rectangle, invalidate_children) GdkWindow * window GdkRectangle_ornull * rectangle gboolean invalidate_children ## void gdk_window_invalidate_region (GdkWindow *window, GdkRegion *region, gboolean invalidate_children) void gdk_window_invalidate_region (window, region, invalidate_children) GdkWindow *window GdkRegion *region gboolean invalidate_children ## void gdk_window_invalidate_maybe_recurse (GdkWindow *window, GdkRegion *region, gboolean (*child_func) (GdkWindow *, gpointer), gpointer user_data) void gdk_window_invalidate_maybe_recurse (window, region, func, data=NULL) GdkWindow *window GdkRegion *region SV *func SV *data PREINIT: GPerlCallback *callback; CODE: callback = gtk2perl_gdk_window_invalidate_maybe_recurse_func_create (func, data); gdk_window_invalidate_maybe_recurse (window, region, gtk2perl_gdk_window_invalidate_maybe_recurse_func, callback); gperl_callback_destroy (callback); ## GdkRegion* gdk_window_get_update_area (GdkWindow *window) GdkRegion_own_ornull * gdk_window_get_update_area (window) GdkWindow *window ## void gdk_window_freeze_updates (GdkWindow *window) void gdk_window_freeze_updates (window) GdkWindow * window ## void gdk_window_thaw_updates (GdkWindow *window) void gdk_window_thaw_updates (window) GdkWindow * window =for apidoc =for signature Gtk2::Gdk::Window->process_all_updates =for signature $window->process_all_updates =cut void gdk_window_process_all_updates (class_or_instance) C_ARGS: /*void*/ =for apidoc =for signature Gtk2::Gdk::Window->set_debug_updates ($enable) =for signature $window->set_debug_updates ($enable) =cut void gdk_window_set_debug_updates (class_or_instance, gboolean enable) C_ARGS: enable ## void gdk_window_process_updates (GdkWindow *window, gboolean update_children) void gdk_window_process_updates (GdkWindow * window, gboolean update_children) ## void gdk_window_get_internal_paint_info (GdkWindow *window, GdkDrawable **real_drawable, gint *x_offset, gint *y_offset) void gdk_window_get_internal_paint_info (GdkWindow *window) PREINIT: GdkDrawable *real_drawable = NULL; gint x_offset; gint y_offset; PPCODE: gdk_window_get_internal_paint_info (window, &real_drawable, &x_offset, &y_offset); EXTEND (SP, 3); PUSHs (sv_2mortal (newSVGdkDrawable (real_drawable))); PUSHs (sv_2mortal (newSViv (x_offset))); PUSHs (sv_2mortal (newSViv (y_offset))); #if GTK_CHECK_VERSION (2, 6, 0) void gdk_window_enable_synchronized_configure (GdkWindow *window); void gdk_window_configure_finished (GdkWindow *window); void gdk_window_set_focus_on_map (GdkWindow *window, gboolean focus_on_map); #endif #if GTK_CHECK_VERSION (2, 8, 0) void gdk_window_set_urgency_hint (GdkWindow *window, gboolean urgent); void gdk_window_move_region (GdkWindow *window, GdkRegion *region, gint dx, gint dy); #endif #if GTK_CHECK_VERSION (2, 10, 0) GdkWindowTypeHint gdk_window_get_type_hint (GdkWindow *window); void gdk_window_input_shape_combine_mask (GdkWindow * window, GdkBitmap_ornull *mask, gint x, gint y); void gdk_window_input_shape_combine_region (GdkWindow * window, GdkRegion_ornull *shape, gint offset_x, gint offset_y); void gdk_window_set_child_input_shapes (GdkWindow *window); void gdk_window_merge_child_input_shapes (GdkWindow *window); #endif #if GTK_CHECK_VERSION (2, 12, 0) void gdk_window_beep (GdkWindow *window); void gdk_window_set_startup_id (GdkWindow *window, const gchar *startup_id); void gdk_window_set_opacity (GdkWindow *window, gdouble opacity); void gdk_window_set_composited (GdkWindow *window, gboolean composited); #endif #if GTK_CHECK_VERSION (2, 14, 0) void gdk_window_redirect_to_drawable (GdkWindow *window, GdkDrawable *drawable, gint src_x, gint src_y, gint dest_x, gint dest_y, gint width, gint height); void gdk_window_remove_redirection (GdkWindow *window) #endif /* 2.14 */ #if GTK_CHECK_VERSION (2, 18, 0) void gdk_window_flush (GdkWindow *window); gboolean gdk_window_ensure_native (GdkWindow *window); GdkCursor_ornull * gdk_window_get_cursor (GdkWindow *window); void gdk_window_restack (GdkWindow *window, GdkWindow_ornull *sibling, gboolean above); =for apidoc Only useful for offscreen C. =cut void gdk_window_geometry_changed (GdkWindow *window); void gdk_window_get_root_coords (GdkWindow *window, gint x, gint y, OUTLIST gint root_x, OUTLIST gint root_y); gboolean gdk_window_is_destroyed (GdkWindow *window); #endif /* 2.18 */ #if GTK_CHECK_VERSION (2, 22, 0) void gdk_window_coords_from_parent (GdkWindow *window, gdouble parent_x, gdouble parent_y, OUTLIST gdouble x, OUTLIST gdouble y); void gdk_window_coords_to_parent (GdkWindow *window, gdouble x, gdouble y, OUTLIST gdouble parent_x, OUTLIST gdouble parent_y); gboolean gdk_window_get_accept_focus (GdkWindow *window); gboolean gdk_window_get_composited (GdkWindow *window); GdkWindow * gdk_window_get_effective_parent (GdkWindow *window); GdkWindow * gdk_window_get_effective_toplevel (GdkWindow *window); gboolean gdk_window_get_focus_on_map (GdkWindow *window); gboolean gdk_window_get_modal_hint (GdkWindow *window); gboolean gdk_window_has_native (GdkWindow *window); gboolean gdk_window_is_input_only (GdkWindow *window); gboolean gdk_window_is_shaped (GdkWindow *window); #endif /* 2.22 */ #if GTK_CHECK_VERSION (2, 18, 0) MODULE = Gtk2::Gdk::Window PACKAGE = Gtk2::Gdk::Window PREFIX = gdk_offscreen_window_ =for apidoc Only for offscreen C. =cut GdkPixmap_ornull * gdk_offscreen_window_get_pixmap (GdkWindow *offscreen_window); =for apidoc Only for offscreen C. =cut void gdk_offscreen_window_set_embedder (GdkWindow *offscreen_window, GdkWindow *embedder); =for apidoc Only for offscreen C. =cut GdkWindow_ornull * gdk_offscreen_window_get_embedder (GdkWindow *offscreen_window); #endif /* 2.18 */ MODULE = Gtk2::Gdk::Window PACKAGE = Gtk2::Gdk PREFIX = gdk_ GdkWindow *gdk_get_default_root_window (class) C_ARGS: /*void*/ Gtk2-1.2498/xs/GdkX11.xs000644 001750 000024 00000012767 11664366546 015566 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003-2005, 2009 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" #ifdef GDK_WINDOWING_X11 # include #endif /* GDK_WINDOWING_X11 */ /* * there is no typemap for Display*, Screen*, etc, and indeed no perl-side * functions to manipulate them, so they are out for the time being. * * XID/XWINDOW/XATOM is treated as UV. * * all XS blocks are wrapped in #ifdef GDK_WINDOWING_X11 to make sure this * stuff doesn't exist when wrapping gdk compiled for other backends. */ /* ------------------------------------------------------------------------- */ MODULE = Gtk2::Gdk::X11 PACKAGE = Gtk2::Gdk::Drawable PREFIX = gdk_x11_drawable_ #ifdef GDK_WINDOWING_X11 ###define GDK_WINDOW_XID(win) (gdk_x11_drawable_get_xid (win)) ###define GDK_WINDOW_XWINDOW(win) (gdk_x11_drawable_get_xid (win)) ###define GDK_PIXMAP_XID(win) (gdk_x11_drawable_get_xid (win)) ###define GDK_DRAWABLE_XID(win) (gdk_x11_drawable_get_xid (win)) ##XID gdk_x11_drawable_get_xid (GdkDrawable *drawable); UV gdk_x11_drawable_get_xid (GdkDrawable *drawable) ALIAS: XID = 1 XWINDOW = 2 CLEANUP: PERL_UNUSED_VAR (ix); #endif /* GDK_WINDOWING_X11 */ # --------------------------------------------------------------------------- # MODULE = Gtk2::Gdk::X11 PACKAGE = Gtk2::Gdk::X11 PREFIX = gdk_x11_ #ifdef GDK_WINDOWING_X11 guint32 gdk_x11_get_server_time (class, GdkWindow *window) C_ARGS: window #ifndef GDK_MULTIHEAD_SAFE gboolean net_wm_supports (class, GdkAtom property) CODE: RETVAL = gdk_net_wm_supports (property); OUTPUT: RETVAL void gdk_x11_grab_server (class) C_ARGS: /* void */ void gdk_x11_ungrab_server (class) C_ARGS: /* void */ gint gdk_x11_get_default_screen (class) C_ARGS: /* void */ # FIXME? ## GdkVisual* gdkx_visual_get (VisualID xvisualid); #endif /* GDK_MULTIHEAD_SAFE */ #endif /* GDK_WINDOWING_X11 */ # --------------------------------------------------------------------------- # MODULE = Gtk2::Gdk::X11 PACKAGE = Gtk2::Gdk::Display PREFIX = gdk_x11_display_ #### GdkDisplay didn't exist before 2.2.x #if defined(GDK_WINDOWING_X11) && defined(GDK_TYPE_DISPLAY) void gdk_x11_display_grab (GdkDisplay *display); void gdk_x11_display_ungrab (GdkDisplay *display); #if GTK_CHECK_VERSION (2, 4, 0) # Even though the naming doesn't suggest it, this seems to be a GdkDisplay # method. ##void gdk_x11_register_standard_event_type (GdkDisplay *display, gint event_base, gint n_events); void register_standard_event_type (GdkDisplay *display, gint event_base, gint n_events) CODE: gdk_x11_register_standard_event_type (display, event_base, n_events); #endif /* 2.4.0 */ #if GTK_CHECK_VERSION (2, 8, 0) void gdk_x11_display_set_cursor_theme (GdkDisplay *display, const gchar *theme, gint size); guint32 gdk_x11_display_get_user_time (GdkDisplay *display); #endif /* 2.8.0 */ #if GTK_CHECK_VERSION (2, 12, 0) # FIXME: gdk_x11_display_broadcast_startup_message const gchar *gdk_x11_display_get_startup_notification_id (GdkDisplay *display); #endif #endif /* GDK_WINDOWING_X11, GDK_TYPE_DISPLAY */ # --------------------------------------------------------------------------- # MODULE = Gtk2::Gdk::X11 PACKAGE = Gtk2::Gdk::Window PREFIX = gdk_x11_window_ #ifdef GDK_WINDOWING_X11 #if GTK_CHECK_VERSION (2, 6, 0) void gdk_x11_window_set_user_time (GdkWindow *window, guint32 timestamp); #endif /* 2.6.0 */ #if GTK_CHECK_VERSION (2, 8, 0) void gdk_x11_window_move_to_current_desktop (GdkWindow *window); #endif /* 2.8.0 */ #endif /* GDK_WINDOWING_X11 */ # --------------------------------------------------------------------------- # MODULE = Gtk2::Gdk::X11 PACKAGE = Gtk2::Gdk::Screen PREFIX = gdk_x11_screen_ #ifdef GDK_WINDOWING_X11 #if GTK_CHECK_VERSION (2, 2, 0) int gdk_x11_screen_get_screen_number (GdkScreen *screen); const char* gdk_x11_screen_get_window_manager_name (GdkScreen *screen); # FIXME? ##GdkVisual* gdk_x11_screen_lookup_visual (GdkScreen *screen, VisualID xvisualid); gboolean gdk_x11_screen_supports_net_wm_hint (GdkScreen *screen, GdkAtom property); #endif /* 2.2.0 */ #if GTK_CHECK_VERSION (2, 14, 0) UV gdk_x11_screen_get_monitor_output (GdkScreen *screen, gint monitor_num); #endif /* 2.14.0 */ #endif /* GDK_WINDOWING_X11 */ # --------------------------------------------------------------------------- # MODULE = Gtk2::Gdk::X11 PACKAGE = Gtk2::Gdk::Atom PREFIX = gdk_x11_atom_ #ifdef GDK_WINDOWING_X11 #if GTK_CHECK_VERSION (2, 2, 0) UV to_xatom_for_display (GdkAtom atom, GdkDisplay *display) CODE: RETVAL = gdk_x11_atom_to_xatom_for_display(display, atom); OUTPUT: RETVAL #endif /* 2.2.0 */ #ifndef GDK_MULTIHEAD_SAFE UV gdk_x11_atom_to_xatom (GdkAtom atom); #endif /* GDK_MULTIHEAD_SAFE */ #endif /* GDK_WINDOWING_X11 */ Gtk2-1.2498/xs/Gtk2.xs000644 001750 000024 00000112651 12631316621 015347 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003-2004 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" static gboolean gtk2perl_init_add_callback_invoke (GPerlCallback * callback) { GValue return_value = {0,}; gboolean retval; g_value_init (&return_value, callback->return_type); gperl_callback_invoke (callback, &return_value); retval = g_value_get_boolean (&return_value); g_value_unset (&return_value); /* according to the gtk source, init callbacks are forgotten * immediately after use; thus, we need to destroy the callback * object to avoid a leak. */ gperl_callback_destroy(callback); return retval; } static guint gtk2perl_quit_add_callback_invoke (GPerlCallback * callback) { GValue return_value = {0,}; guint retval; g_value_init (&return_value, callback->return_type); gperl_callback_invoke (callback, &return_value); retval = g_value_get_uint (&return_value); g_value_unset (&return_value); return retval; } static gint gtk2perl_key_snoop_func (GtkWidget *grab_widget, GdkEventKey *event, gpointer func_data) { gint ret; GValue retval = {0,}; g_value_init (&retval, G_TYPE_INT); gperl_callback_invoke ((GPerlCallback*)func_data, &retval, grab_widget, event); ret = g_value_get_int (&retval); g_value_unset (&retval); return ret; } /* * we must track the key snoopers ourselves so we can destroy * the callback objects properly. */ static GHashTable * key_snoopers = NULL; static guint install_key_snooper (SV * func, SV * data) { guint id; GPerlCallback * callback; GType param_types[2]; param_types[0] = GTK_TYPE_WIDGET; param_types[1] = GDK_TYPE_EVENT; if (!key_snoopers) key_snoopers = g_hash_table_new_full (g_direct_hash, g_direct_equal, NULL, (GDestroyNotify) gperl_callback_destroy); callback = gperl_callback_new (func, data, 2, param_types, G_TYPE_INT); id = gtk_key_snooper_install (gtk2perl_key_snoop_func, callback); g_hash_table_insert (key_snoopers, GUINT_TO_POINTER (id), callback); return id; } static void remove_key_snooper (guint id) { g_return_if_fail (key_snoopers != NULL); gtk_key_snooper_remove (id); g_hash_table_remove (key_snoopers, GUINT_TO_POINTER (id)); } MODULE = Gtk2 PACKAGE = Gtk2 PREFIX = gtk_ ## ## don't allow any unhidden autogenerated pods to fall into the Gtk2 ## namespace, or the pod from Gtk2.pm will be overridden. ## BOOT: { /* include some files autogenerated by Makefile.PL. */ /* register Gtk/Gdk/Atk/Pango classes as perl packages. * be sure to include this autogenerated set first, so that the * hand-written boot code functions called by the next include * can override the registrations if necessary. */ #include "register.xsh" /* call the boot code for all the various other modules */ #include "boot.xsh" /* route Gtk+ log messages through perl's warn() and croak() */ gperl_handle_logs_for ("Gtk"); gperl_handle_logs_for ("Gdk"); gperl_handle_logs_for ("GdkPixbuf"); /* make sure that we're running/linked against a version at least as * new as we built against, otherwise bad things can happen. */ if ((((int)gtk_major_version) < GTK_MAJOR_VERSION) || (gtk_major_version == GTK_MAJOR_VERSION && ((int)gtk_minor_version) < GTK_MINOR_VERSION) || (gtk_major_version == GTK_MAJOR_VERSION && gtk_minor_version == GTK_MINOR_VERSION && ((int)gtk_micro_version) < GTK_MICRO_VERSION)) warn ("*** This build of Gtk2 was compiled with gtk+ %d.%d.%d," " but is currently running with %d.%d.%d, which is too" " old. We'll continue, but expect problems!\n", GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION, gtk_major_version, gtk_minor_version, gtk_micro_version); } ############################################################################# ############################################################################# =for object Gtk2::version Library Version Information =cut =head1 SYNOPSIS use Gtk2 '1.023'; # require at least version 1.023 of the bindings if ($Gtk2::VERSION >= 1.040 and Gtk2->CHECK_VERSION (2, 4, 0)) { # the GtkFileChooser, new in gtk+ 2.4.0 and first supported in # Gtk2-Perl at 1.040, is available } else { # GtkFileChooser is not available, fall back to GtkFileSelection } =head1 DESCRIPTION Since the Gtk2 Perl module is a bridge to an external library with its own versions and API revisions, we have three different versions available for inspection. Which one you need to use at which time depends entirely on the situation. Gtk2 uses the same scheme as Glib and the underlying gtk+ C library; that is, the standard C<$Gtk2::VERSION> for the version of the bindings, all-caps (MAJOR|MINOR|MICRO)_VERSION functions for the bound version, and lower-case (major|minor|micro)_version functions for the runtime version. See L and L for more information. Note also that gtk_check_version() and GTK_CHECK_VERSION() have different semantics in C, and we have preserved those faithfully. =cut =for see_also Glib::version =cut # we have no use for these in perl. ##GTKMAIN_C_VAR const guint gtk_binary_age; ##GTKMAIN_C_VAR const guint gtk_interface_age; =for apidoc =for signature (major, minor, micro) = Gtk2->get_version_info Shorthand to fetch as a list the gtk+ version against which Gtk2 is linked. See C, etc. =cut void gtk_get_version_info (class) PPCODE: EXTEND(SP,3); PUSHs(sv_2mortal(newSViv(gtk_major_version))); PUSHs(sv_2mortal(newSViv(gtk_minor_version))); PUSHs(sv_2mortal(newSViv(gtk_micro_version))); PERL_UNUSED_VAR (ax); =for apidoc Returns undef if the version of gtk+ currently in use is compatible with the given version, otherwise returns a string describing the mismatch. Note that this is not the same logic as C. This check is not terribly reliable, and should not be used to test for availability of widgets or functions in the Gtk2 module --- use C for that. See L for a more detailed description of when you'd want to do a runtime-version test. =cut gchar * gtk_check_version (class, required_major, required_minor, required_micro) guint required_major guint required_minor guint required_micro CODE: RETVAL = (gchar *) gtk_check_version (required_major, required_minor, required_micro); OUTPUT: RETVAL =for apidoc Gtk2::MAJOR_VERSION __function__ The major version of the gtk+ library against which Gtk2 was compiled. Equivalent to gtk+'s GTK_MAJOR_VERSION. =cut =for apidoc Gtk2::MINOR_VERSION __function__ The minor version of the gtk+ library against which Gtk2 was compiled. Equivalent to gtk+'s GTK_MINOR_VERSION. =cut =for apidoc Gtk2::MICRO_VERSION __function__ The micro version of the gtk+ library against which Gtk2 was compiled. Equivalent to gtk+'s GTK_MICRO_VERSION. =cut =for apidoc Gtk2::major_version __function__ The major version of the gtk+ library current in use at runtime. Equivalent to gtk+'s global variable gtk_major_version. =cut =for apidoc Gtk2::minor_version __function__ The minor version of the gtk+ library current in use at runtime. Equivalent to gtk+'s global variable gtk_minor_version. =cut =for apidoc Gtk2::micro_version __function__ The micro version of the gtk+ library current in use at runtime. Equivalent to gtk+'s global variable gtk_micro_version. =cut guint MAJOR_VERSION () ALIAS: Gtk2::MINOR_VERSION = 1 Gtk2::MICRO_VERSION = 2 Gtk2::major_version = 3 Gtk2::minor_version = 4 Gtk2::micro_version = 5 CODE: switch (ix) { case 0: RETVAL = GTK_MAJOR_VERSION; break; case 1: RETVAL = GTK_MINOR_VERSION; break; case 2: RETVAL = GTK_MICRO_VERSION; break; case 3: RETVAL = gtk_major_version; break; case 4: RETVAL = gtk_minor_version; break; case 5: RETVAL = gtk_micro_version; break; default: RETVAL = -1; g_assert_not_reached (); } OUTPUT: RETVAL =for apidoc =for signature (MAJOR, MINOR, MICRO) = Gtk2->GET_VERSION_INFO Shorthand to fetch as a list the gtk+ version for which Gtk2 was compiled. See C, etc. =cut void GET_VERSION_INFO (class) PPCODE: EXTEND (SP, 3); PUSHs (sv_2mortal (newSViv (GTK_MAJOR_VERSION))); PUSHs (sv_2mortal (newSViv (GTK_MINOR_VERSION))); PUSHs (sv_2mortal (newSViv (GTK_MICRO_VERSION))); PERL_UNUSED_VAR (ax); =for apidoc Provides a mechanism for checking the version information that Gtk2 was compiled against. Essentially equvilent to the macro GTK_CHECK_VERSION. In most cases this function should be used rather than LB ($required_major, $required_minor, $required_micro)">. =cut gboolean CHECK_VERSION (class, guint required_major, guint required_minor, guint required_micro) CODE: RETVAL = GTK_CHECK_VERSION (required_major, required_minor, required_micro); OUTPUT: RETVAL ############################################################################# ############################################################################# =for object Gtk2::main =cut =for apidoc Gtk2::init_check This is the non-fatal version of C<< Gtk2->init >>; instead of calling C if Gtk+ initialization fails, C<< Gtk2->init_check >> returns false. This allows your application to fall back on some other means of communication with the user - for example a curses or command-line interface. =cut =for apidoc Initialize Gtk+. This must be called before any other Gtk2 functions in a GUI application; the Gtk2 module's import method allows you to pass C<-init> in the C statement to do this automatically. This function also scans I<@ARGV> for any options it knows, and will remove them automagically. Note: this function will terminate your program if it is unable to initialize the gui for any reason. If you want your program to fall back to some other interface, you want to use C<< Gtk2->init_check >> instead. =cut gboolean gtk_init (class=NULL) ALIAS: Gtk2::init_check = 2 PREINIT: GPerlArgv *pargv; CODE: pargv = gperl_argv_new (); if (ix == 2) { RETVAL = gtk_init_check (&pargv->argc, &pargv->argv); } else if (PL_minus_c) { /* When in syntax check mode, we need to avoid calling gtk_init * even if asked to because it might abort the program (e.g. if * DISPLAY is not set). */ RETVAL = gtk_init_check (&pargv->argc, &pargv->argv); } else { gtk_init (&pargv->argc, &pargv->argv); /* gtk_init() either succeeds or does not return. */ RETVAL = TRUE; } gperl_argv_update (pargv); gperl_argv_free (pargv); OUTPUT: RETVAL #if GTK_CHECK_VERSION(2, 4, 5) ## gboolean gtk_parse_args (int *argc, char ***argv) gboolean gtk_parse_args (class=NULL) PREINIT: GPerlArgv *pargv; CODE: pargv = gperl_argv_new (); RETVAL = gtk_parse_args (&pargv->argc, &pargv->argv); gperl_argv_update (pargv); gperl_argv_free (pargv); OUTPUT: RETVAL #endif #if GTK_CHECK_VERSION(2, 6, 0) # I see no way to wrap this. Bare GOptionEntries don't carry enough context to # let us setup the SV synchronization. We would need to be able to pass in a # whole GOptionGroup. ## gboolean gtk_init_with_args (int *argc, char ***argv, char *parameter_string, GOptionEntry *entries, char *translation_domain, GError **error); ## GOptionGroup *gtk_get_option_group (gboolean open_default_display); GOptionGroup_own * gtk_get_option_group (class, open_default_display) gboolean open_default_display C_ARGS: open_default_display #endif ##void gtk_disable_setlocale (void); void gtk_disable_setlocale (class) C_ARGS: /*void*/ ##gchar * gtk_set_locale (void); const gchar * gtk_set_locale (class) C_ARGS: /*void*/ ##PangoLanguage *gtk_get_default_language (void); PangoLanguage * gtk_get_default_language (class) C_ARGS: /*void*/ gint gtk_events_pending (class) C_ARGS: /*void*/ ## void gtk_main_do_event (GdkEvent *event); =for apidoc This is the event handler that GTK+ registers with GDK. GTK+ exposes it to allow filtering of events between GDK and GTK+; it is rare that you would need this, except if you are using C. =cut void gtk_main_do_event (class, GdkEvent *event); C_ARGS: event void gtk_main (class) C_ARGS: /*void*/ guint gtk_main_level (class) C_ARGS: /*void*/ void gtk_main_quit (class=NULL) C_ARGS: /*void*/ gboolean gtk_main_iteration (class) C_ARGS: /*void*/ gboolean gtk_main_iteration_do (class, blocking) gboolean blocking C_ARGS: blocking ### gtk-perl implemented these as widget methods, but they are not widget ### methods. they deal with the global grab setting. this is bound to ### be a FAQ. ## Gtk2->grab_add (widget) void gtk_grab_add (class, widget) GtkWidget * widget C_ARGS: widget GtkWidget_ornull * gtk_grab_get_current (class) C_ARGS: /*void*/ ## Gtk2->grab_remove (widget) void gtk_grab_remove (class, widget) GtkWidget * widget C_ARGS: widget void gtk_init_add (class, function, data=NULL) SV * function SV * data PREINIT: GPerlCallback * real_callback; CODE: real_callback = gperl_callback_new(function, data, 0, NULL, G_TYPE_BOOLEAN); gtk_init_add((GtkFunction)gtk2perl_init_add_callback_invoke, real_callback); ## guint gtk_quit_add ## guint gtk_quit_add_full guint gtk_quit_add (class, main_level, function, data=NULL) guint main_level SV * function SV * data PREINIT: GPerlCallback * real_callback; CODE: real_callback = gperl_callback_new(function, data, 0, NULL, G_TYPE_UINT); RETVAL = gtk_quit_add_full(main_level, (GtkFunction)gtk2perl_quit_add_callback_invoke, NULL, real_callback, (GtkDestroyNotify)gperl_callback_destroy); OUTPUT: RETVAL void gtk_quit_remove (class, quit_handler_id) guint quit_handler_id C_ARGS: quit_handler_id ## void gtk_quit_add_destroy (guint main_level, GtkObject *object); void gtk_quit_add_destroy (class, guint main_level, GtkObject *object) C_ARGS: main_level, object ##void gtk_quit_remove_by_data (gpointer data); # these (timeout, idle, and input) are all deprecated in favor of the # corresponding glib functions. ##guint gtk_timeout_add (guint32 interval, ## GtkFunction function, ## gpointer data); ##guint gtk_timeout_add_full (guint32 interval, ## GtkFunction function, ## GtkCallbackMarshal marshal, ## gpointer data, ## GtkDestroyNotify destroy); ##void gtk_timeout_remove (guint timeout_handler_id); ## ##guint gtk_idle_add (GtkFunction function, ## gpointer data); ##guint gtk_idle_add_priority (gint priority, ## GtkFunction function, ## gpointer data); ##guint gtk_idle_add_full (gint priority, ## GtkFunction function, ## GtkCallbackMarshal marshal, ## gpointer data, ## GtkDestroyNotify destroy); ##void gtk_idle_remove (guint idle_handler_id); ##void gtk_idle_remove_by_data (gpointer data); ##guint gtk_input_add_full (gint source, ## GdkInputCondition condition, ## GdkInputFunction function, ## GtkCallbackMarshal marshal, ## gpointer data, ## GtkDestroyNotify destroy); ##void gtk_input_remove (guint input_handler_id); ##guint gtk_key_snooper_install (GtkKeySnoopFunc snooper, gpointer func_data); =for apidoc =for arg snooper (subroutine) function to call on every event Install a key "snooper" function which will get called on all key events before those events are delivered normally. These snoopers can be used to implement custom key event handling. C returns an id that may be used with C (below). I is called as stopbool = &snooper ($widget, $event, $func_data); It should return true to stop event propagation, the same as C event signal handlers. The C and C constants can be used for the return (see L). =cut guint gtk_key_snooper_install (class, SV * snooper, SV * func_data=NULL) CODE: RETVAL = install_key_snooper (snooper, func_data); OUTPUT: RETVAL ##void gtk_key_snooper_remove (guint snooper_handler_id); void gtk_key_snooper_remove (class, guint snooper_handler_id) CODE: remove_key_snooper (snooper_handler_id); ##GdkEvent* gtk_get_current_event (void); GdkEvent_own_ornull* gtk_get_current_event (class) C_ARGS: /*void*/ ##guint32 gtk_get_current_event_time (void); guint32 gtk_get_current_event_time (class); C_ARGS: /*void*/ ##gboolean gtk_get_current_event_state (GdkModifierType *state); GdkModifierType gtk_get_current_event_state (class) CODE: if (!gtk_get_current_event_state (&RETVAL)) XSRETURN_UNDEF; OUTPUT: RETVAL ##GtkWidget* gtk_get_event_widget (GdkEvent *event); GtkWidget_ornull * gtk_get_event_widget (class, GdkEvent_ornull * event) C_ARGS: event # this stuff is only here to generate pod pages for abstract and functionless # object, that is the objects exist only as parents and have no functions of # their own =for object Gtk2::Separator =cut =for object Gtk2::Scrollbar =cut MODULE = Gtk2 PACKAGE = Gtk2::Widget PREFIX = gtk_ =for apidoc From gtk+'s API documentation: You most likely don't want to use any of these functions; synthesizing events is rarely needed. Consider asking on the mailing list for better ways to achieve your goals. For example, use Gtk2::Gdk::invalidate_rect or Gtk2::Widget::queue_draw instead of making up expose events. =cut ##void gtk_propagate_event (GtkWidget * widget, GdkEvent * event); void gtk_propagate_event (widget, event) GtkWidget * widget GdkEvent * event # --------------------------------------------------------------------------- # MODULE = Gtk2 PACKAGE = Gtk2::Pango # All the stuff below is to create POD stubs for Gtk2::Pango::* that link to # the new Pango::* POD pages. =for object Gtk2::Pango::AttrBackground - backwards compatibility wrapper for Pango::AttrBackground =cut =for position DESCRIPTION =head1 DESCRIPTION As of Gtk2 1.220, pango bindings are provided by the standalone Pango module. This namespace is provided for backwards compatibility. The relevant documentation moved to Pango and is linked to below. =cut =for see_also Pango::AttrBackground =cut =for object Gtk2::Pango::AttrColor - backwards compatibility wrapper for Pango::AttrColor =cut =for position DESCRIPTION =head1 DESCRIPTION As of Gtk2 1.220, pango bindings are provided by the standalone Pango module. This namespace is provided for backwards compatibility. The relevant documentation moved to Pango and is linked to below. =cut =for see_also Pango::AttrColor =cut =for object Gtk2::Pango::AttrFallback - backwards compatibility wrapper for Pango::AttrFallback =cut =for position DESCRIPTION =head1 DESCRIPTION As of Gtk2 1.220, pango bindings are provided by the standalone Pango module. This namespace is provided for backwards compatibility. The relevant documentation moved to Pango and is linked to below. =cut =for see_also Pango::AttrFallback =cut =for object Gtk2::Pango::AttrFamily - backwards compatibility wrapper for Pango::AttrFamily =cut =for position DESCRIPTION =head1 DESCRIPTION As of Gtk2 1.220, pango bindings are provided by the standalone Pango module. This namespace is provided for backwards compatibility. The relevant documentation moved to Pango and is linked to below. =cut =for see_also Pango::AttrFamily =cut =for object Gtk2::Pango::AttrFontDesc - backwards compatibility wrapper for Pango::AttrFontDesc =cut =for position DESCRIPTION =head1 DESCRIPTION As of Gtk2 1.220, pango bindings are provided by the standalone Pango module. This namespace is provided for backwards compatibility. The relevant documentation moved to Pango and is linked to below. =cut =for see_also Pango::AttrFontDesc =cut =for object Gtk2::Pango::AttrForeground - backwards compatibility wrapper for Pango::AttrForeground =cut =for position DESCRIPTION =head1 DESCRIPTION As of Gtk2 1.220, pango bindings are provided by the standalone Pango module. This namespace is provided for backwards compatibility. The relevant documentation moved to Pango and is linked to below. =cut =for see_also Pango::AttrForeground =cut =for object Gtk2::Pango::AttrGravity - backwards compatibility wrapper for Pango::AttrGravity =cut =for position DESCRIPTION =head1 DESCRIPTION As of Gtk2 1.220, pango bindings are provided by the standalone Pango module. This namespace is provided for backwards compatibility. The relevant documentation moved to Pango and is linked to below. =cut =for see_also Pango::AttrGravity =cut =for object Gtk2::Pango::AttrGravityHint - backwards compatibility wrapper for Pango::AttrGravityHint =cut =for position DESCRIPTION =head1 DESCRIPTION As of Gtk2 1.220, pango bindings are provided by the standalone Pango module. This namespace is provided for backwards compatibility. The relevant documentation moved to Pango and is linked to below. =cut =for see_also Pango::AttrGravityHint =cut =for object Gtk2::Pango::Attribute - backwards compatibility wrapper for Pango::Attribute =cut =for position DESCRIPTION =head1 DESCRIPTION As of Gtk2 1.220, pango bindings are provided by the standalone Pango module. This namespace is provided for backwards compatibility. The relevant documentation moved to Pango and is linked to below. =cut =for see_also Pango::Attribute =cut =for object Gtk2::Pango::AttrInt - backwards compatibility wrapper for Pango::AttrInt =cut =for position DESCRIPTION =head1 DESCRIPTION As of Gtk2 1.220, pango bindings are provided by the standalone Pango module. This namespace is provided for backwards compatibility. The relevant documentation moved to Pango and is linked to below. =cut =for see_also Pango::AttrInt =cut =for object Gtk2::Pango::AttrIterator - backwards compatibility wrapper for Pango::AttrIterator =cut =for position DESCRIPTION =head1 DESCRIPTION As of Gtk2 1.220, pango bindings are provided by the standalone Pango module. This namespace is provided for backwards compatibility. The relevant documentation moved to Pango and is linked to below. =cut =for see_also Pango::AttrIterator =cut =for object Gtk2::Pango::AttrLanguage - backwards compatibility wrapper for Pango::AttrLanguage =cut =for position DESCRIPTION =head1 DESCRIPTION As of Gtk2 1.220, pango bindings are provided by the standalone Pango module. This namespace is provided for backwards compatibility. The relevant documentation moved to Pango and is linked to below. =cut =for see_also Pango::AttrLanguage =cut =for object Gtk2::Pango::AttrLetterSpacing - backwards compatibility wrapper for Pango::AttrLetterSpacing =cut =for position DESCRIPTION =head1 DESCRIPTION As of Gtk2 1.220, pango bindings are provided by the standalone Pango module. This namespace is provided for backwards compatibility. The relevant documentation moved to Pango and is linked to below. =cut =for see_also Pango::AttrLetterSpacing =cut =for object Gtk2::Pango::AttrList - backwards compatibility wrapper for Pango::AttrList =cut =for position DESCRIPTION =head1 DESCRIPTION As of Gtk2 1.220, pango bindings are provided by the standalone Pango module. This namespace is provided for backwards compatibility. The relevant documentation moved to Pango and is linked to below. =cut =for see_also Pango::AttrList =cut =for object Gtk2::Pango::AttrRise - backwards compatibility wrapper for Pango::AttrRise =cut =for position DESCRIPTION =head1 DESCRIPTION As of Gtk2 1.220, pango bindings are provided by the standalone Pango module. This namespace is provided for backwards compatibility. The relevant documentation moved to Pango and is linked to below. =cut =for see_also Pango::AttrRise =cut =for object Gtk2::Pango::AttrScale - backwards compatibility wrapper for Pango::AttrScale =cut =for position DESCRIPTION =head1 DESCRIPTION As of Gtk2 1.220, pango bindings are provided by the standalone Pango module. This namespace is provided for backwards compatibility. The relevant documentation moved to Pango and is linked to below. =cut =for see_also Pango::AttrScale =cut =for object Gtk2::Pango::AttrShape - backwards compatibility wrapper for Pango::AttrShape =cut =for position DESCRIPTION =head1 DESCRIPTION As of Gtk2 1.220, pango bindings are provided by the standalone Pango module. This namespace is provided for backwards compatibility. The relevant documentation moved to Pango and is linked to below. =cut =for see_also Pango::AttrShape =cut =for object Gtk2::Pango::AttrSize - backwards compatibility wrapper for Pango::AttrSize =cut =for position DESCRIPTION =head1 DESCRIPTION As of Gtk2 1.220, pango bindings are provided by the standalone Pango module. This namespace is provided for backwards compatibility. The relevant documentation moved to Pango and is linked to below. =cut =for see_also Pango::AttrSize =cut =for object Gtk2::Pango::AttrStretch - backwards compatibility wrapper for Pango::AttrStretch =cut =for position DESCRIPTION =head1 DESCRIPTION As of Gtk2 1.220, pango bindings are provided by the standalone Pango module. This namespace is provided for backwards compatibility. The relevant documentation moved to Pango and is linked to below. =cut =for see_also Pango::AttrStretch =cut =for object Gtk2::Pango::AttrStrikethrough - backwards compatibility wrapper for Pango::AttrStrikethrough =cut =for position DESCRIPTION =head1 DESCRIPTION As of Gtk2 1.220, pango bindings are provided by the standalone Pango module. This namespace is provided for backwards compatibility. The relevant documentation moved to Pango and is linked to below. =cut =for see_also Pango::AttrStrikethrough =cut =for object Gtk2::Pango::AttrStrikethroughColor - backwards compatibility wrapper for Pango::AttrStrikethroughColor =cut =for position DESCRIPTION =head1 DESCRIPTION As of Gtk2 1.220, pango bindings are provided by the standalone Pango module. This namespace is provided for backwards compatibility. The relevant documentation moved to Pango and is linked to below. =cut =for see_also Pango::AttrStrikethroughColor =cut =for object Gtk2::Pango::AttrString - backwards compatibility wrapper for Pango::AttrString =cut =for position DESCRIPTION =head1 DESCRIPTION As of Gtk2 1.220, pango bindings are provided by the standalone Pango module. This namespace is provided for backwards compatibility. The relevant documentation moved to Pango and is linked to below. =cut =for see_also Pango::AttrString =cut =for object Gtk2::Pango::AttrStyle - backwards compatibility wrapper for Pango::AttrStyle =cut =for position DESCRIPTION =head1 DESCRIPTION As of Gtk2 1.220, pango bindings are provided by the standalone Pango module. This namespace is provided for backwards compatibility. The relevant documentation moved to Pango and is linked to below. =cut =for see_also Pango::AttrStyle =cut =for object Gtk2::Pango::AttrUnderline - backwards compatibility wrapper for Pango::AttrUnderline =cut =for position DESCRIPTION =head1 DESCRIPTION As of Gtk2 1.220, pango bindings are provided by the standalone Pango module. This namespace is provided for backwards compatibility. The relevant documentation moved to Pango and is linked to below. =cut =for see_also Pango::AttrUnderline =cut =for object Gtk2::Pango::AttrUnderlineColor - backwards compatibility wrapper for Pango::AttrUnderlineColor =cut =for position DESCRIPTION =head1 DESCRIPTION As of Gtk2 1.220, pango bindings are provided by the standalone Pango module. This namespace is provided for backwards compatibility. The relevant documentation moved to Pango and is linked to below. =cut =for see_also Pango::AttrUnderlineColor =cut =for object Gtk2::Pango::AttrVariant - backwards compatibility wrapper for Pango::AttrVariant =cut =for position DESCRIPTION =head1 DESCRIPTION As of Gtk2 1.220, pango bindings are provided by the standalone Pango module. This namespace is provided for backwards compatibility. The relevant documentation moved to Pango and is linked to below. =cut =for see_also Pango::AttrVariant =cut =for object Gtk2::Pango::AttrWeight - backwards compatibility wrapper for Pango::AttrWeight =cut =for position DESCRIPTION =head1 DESCRIPTION As of Gtk2 1.220, pango bindings are provided by the standalone Pango module. This namespace is provided for backwards compatibility. The relevant documentation moved to Pango and is linked to below. =cut =for see_also Pango::AttrWeight =cut =for object Gtk2::Pango::Cairo - backwards compatibility wrapper for Pango::Cairo =cut =for position DESCRIPTION =head1 DESCRIPTION As of Gtk2 1.220, pango bindings are provided by the standalone Pango module. This namespace is provided for backwards compatibility. The relevant documentation moved to Pango and is linked to below. =cut =for see_also Pango::Cairo =cut =for object Gtk2::Pango::Cairo::Context - backwards compatibility wrapper for Pango::Cairo::Context =cut =for object Gtk2::Pango::Cairo::Font - backwards compatibility wrapper for Pango::Cairo::Font =cut =for object Gtk2::Pango::Cairo::FontMap - backwards compatibility wrapper for Pango::Cairo::FontMap =cut =for object Gtk2::Pango::Color - backwards compatibility wrapper for Pango::Color =cut =for position DESCRIPTION =head1 DESCRIPTION As of Gtk2 1.220, pango bindings are provided by the standalone Pango module. This namespace is provided for backwards compatibility. The relevant documentation moved to Pango and is linked to below. =cut =for see_also Pango::Color =cut =for object Gtk2::Pango::Context - backwards compatibility wrapper for Pango::Context =cut =for position DESCRIPTION =head1 DESCRIPTION As of Gtk2 1.220, pango bindings are provided by the standalone Pango module. This namespace is provided for backwards compatibility. The relevant documentation moved to Pango and is linked to below. =cut =for see_also Pango::Context =cut =for object Gtk2::Pango::Font - backwards compatibility wrapper for Pango::Font =cut =for position DESCRIPTION =head1 DESCRIPTION As of Gtk2 1.220, pango bindings are provided by the standalone Pango module. This namespace is provided for backwards compatibility. The relevant documentation moved to Pango and is linked to below. =cut =for see_also Pango::Font =cut =for object Gtk2::Pango::FontDescription - backwards compatibility wrapper for Pango::FontDescription =cut =for position DESCRIPTION =head1 DESCRIPTION As of Gtk2 1.220, pango bindings are provided by the standalone Pango module. This namespace is provided for backwards compatibility. The relevant documentation moved to Pango and is linked to below. =cut =for see_also Pango::FontDescription =cut =for object Gtk2::Pango::FontFace - backwards compatibility wrapper for Pango::FontFace =cut =for position DESCRIPTION =head1 DESCRIPTION As of Gtk2 1.220, pango bindings are provided by the standalone Pango module. This namespace is provided for backwards compatibility. The relevant documentation moved to Pango and is linked to below. =cut =for see_also Pango::FontFace =cut =for object Gtk2::Pango::FontFamily - backwards compatibility wrapper for Pango::FontFamily =cut =for position DESCRIPTION =head1 DESCRIPTION As of Gtk2 1.220, pango bindings are provided by the standalone Pango module. This namespace is provided for backwards compatibility. The relevant documentation moved to Pango and is linked to below. =cut =for see_also Pango::FontFamily =cut =for object Gtk2::Pango::FontMap - backwards compatibility wrapper for Pango::FontMap =cut =for position DESCRIPTION =head1 DESCRIPTION As of Gtk2 1.220, pango bindings are provided by the standalone Pango module. This namespace is provided for backwards compatibility. The relevant documentation moved to Pango and is linked to below. =cut =for see_also Pango::FontMap =cut =for object Gtk2::Pango::FontMetrics - backwards compatibility wrapper for Pango::FontMetrics =cut =for position DESCRIPTION =head1 DESCRIPTION As of Gtk2 1.220, pango bindings are provided by the standalone Pango module. This namespace is provided for backwards compatibility. The relevant documentation moved to Pango and is linked to below. =cut =for see_also Pango::FontMetrics =cut =for object Gtk2::Pango::Fontset - backwards compatibility wrapper for Pango::Fontset =cut =for position DESCRIPTION =head1 DESCRIPTION As of Gtk2 1.220, pango bindings are provided by the standalone Pango module. This namespace is provided for backwards compatibility. The relevant documentation moved to Pango and is linked to below. =cut =for see_also Pango::Fontset =cut =for object Gtk2::Pango::Gravity - backwards compatibility wrapper for Pango::Gravity =cut =for position DESCRIPTION =head1 DESCRIPTION As of Gtk2 1.220, pango bindings are provided by the standalone Pango module. This namespace is provided for backwards compatibility. The relevant documentation moved to Pango and is linked to below. =cut =for see_also Pango::Gravity =cut =for object Gtk2::Pango::Language - backwards compatibility wrapper for Pango::Language =cut =for position DESCRIPTION =head1 DESCRIPTION As of Gtk2 1.220, pango bindings are provided by the standalone Pango module. This namespace is provided for backwards compatibility. The relevant documentation moved to Pango and is linked to below. =cut =for see_also Pango::Language =cut =for object Gtk2::Pango::Layout - backwards compatibility wrapper for Pango::Layout =cut =for position DESCRIPTION =head1 DESCRIPTION As of Gtk2 1.220, pango bindings are provided by the standalone Pango module. This namespace is provided for backwards compatibility. The relevant documentation moved to Pango and is linked to below. =cut =for see_also Pango::Layout =cut =for object Gtk2::Pango::LayoutIter - backwards compatibility wrapper for Pango::LayoutIter =cut =for position DESCRIPTION =head1 DESCRIPTION As of Gtk2 1.220, pango bindings are provided by the standalone Pango module. This namespace is provided for backwards compatibility. The relevant documentation moved to Pango and is linked to below. =cut =for see_also Pango::LayoutIter =cut =for object Gtk2::Pango::LayoutLine - backwards compatibility wrapper for Pango::LayoutLine =cut =for position DESCRIPTION =head1 DESCRIPTION As of Gtk2 1.220, pango bindings are provided by the standalone Pango module. This namespace is provided for backwards compatibility. The relevant documentation moved to Pango and is linked to below. =cut =for see_also Pango::LayoutLine =cut =for object Gtk2::Pango::Matrix - backwards compatibility wrapper for Pango::Matrix =cut =for position DESCRIPTION =head1 DESCRIPTION As of Gtk2 1.220, pango bindings are provided by the standalone Pango module. This namespace is provided for backwards compatibility. The relevant documentation moved to Pango and is linked to below. =cut =for see_also Pango::Matrix =cut =for object Gtk2::Pango::Renderer - backwards compatibility wrapper for Pango::Renderer =cut =for position DESCRIPTION =head1 DESCRIPTION As of Gtk2 1.220, pango bindings are provided by the standalone Pango module. This namespace is provided for backwards compatibility. The relevant documentation moved to Pango and is linked to below. =cut =for see_also Pango::Renderer =cut =for object Gtk2::Pango::Script - backwards compatibility wrapper for Pango::Script =cut =for position DESCRIPTION =head1 DESCRIPTION As of Gtk2 1.220, pango bindings are provided by the standalone Pango module. This namespace is provided for backwards compatibility. The relevant documentation moved to Pango and is linked to below. =cut =for see_also Pango::Script =cut =for object Gtk2::Pango::ScriptIter - backwards compatibility wrapper for Pango::ScriptIter =cut =for position DESCRIPTION =head1 DESCRIPTION As of Gtk2 1.220, pango bindings are provided by the standalone Pango module. This namespace is provided for backwards compatibility. The relevant documentation moved to Pango and is linked to below. =cut =for see_also Pango::ScriptIter =cut =for object Gtk2::Pango::TabArray - backwards compatibility wrapper for Pango::TabArray =cut =for position DESCRIPTION =head1 DESCRIPTION As of Gtk2 1.220, pango bindings are provided by the standalone Pango module. This namespace is provided for backwards compatibility. The relevant documentation moved to Pango and is linked to below. =cut =for see_also Pango::TabArray =cut =for object Gtk2::Pango::version - backwards compatibility wrapper for Pango::version =cut =for position DESCRIPTION =head1 DESCRIPTION As of Gtk2 1.220, pango bindings are provided by the standalone Pango module. This namespace is provided for backwards compatibility. The relevant documentation moved to Pango and is linked to below. =cut =for see_also Pango::version =cut Gtk2-1.2498/xs/GtkAboutDialog.xs000644 001750 000024 00000024224 11664366546 017416 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2004-2005, 2010 by the gtk2-perl team (see the file AUTHORS) * * Licensed under the LGPL, see LICENSE file for more information. * * $Id$ */ #include "gtk2perl.h" #define GETTER(into) \ { \ if (!(into)) \ XSRETURN_EMPTY; \ for (i = 0; (into)[i] != NULL; i++) \ XPUSHs (sv_2mortal (newSVGChar ((into)[i]))); \ } #define SETTER(outof) \ { \ gint num = items - 1; \ (outof) = g_new0 (gchar *, num + 1); \ for (i = 0; i < num; i++) \ (outof)[i] = SvGChar (ST (1 + i)); \ } static GPerlCallback * gtk2perl_about_dialog_activate_link_func_create (SV * func, SV * data) { GType param_types [2]; param_types[0] = GTK_TYPE_ABOUT_DIALOG; param_types[1] = G_TYPE_STRING; return gperl_callback_new (func, data, G_N_ELEMENTS (param_types), param_types, 0); } static void gtk2perl_about_dialog_activate_link_func (GtkAboutDialog *about, const gchar *link, gpointer data) { gperl_callback_invoke ((GPerlCallback*)data, NULL, about, link); } MODULE = Gtk2::AboutDialog PACKAGE = Gtk2 PREFIX = gtk_ =for object Gtk2::AboutDialog =cut =for position post_methods =head1 URL AND EMAIL HOOKS When setting the website and email hooks for the Gtk2::AboutDialog widget, you should remember that the order is important: you should set the hook functions B setting the website and email URL properties, like this: $about_dialog->set_url_hook(\&launch_web_browser); $about_dialog->set_website($app_website); otherwise the AboutDialog will not display the website and the email addresses as clickable. =cut =for apidoc =for arg first_property_name (string) =for arg ... the rest of a list of name=>property value pairs. A convenience function for showing an application's about box. The constructed dialog is "transient for" C<$parent> and associated with that widget so it's reused for future invocations. The dialog is non-modal and hidden by any response. (This is implemented as a rewrite of C since it's not easy to construct a varargs call to that actual function. The intention is to behave the same though.) =cut void gtk_show_about_dialog (class, GtkWindow_ornull * parent, first_property_name, ...); PREINIT: static GtkWidget * global_about_dialog = NULL; GtkWidget * dialog = NULL; CODE: if (parent) dialog = g_object_get_data (G_OBJECT (parent), "gtk-about-dialog"); else dialog = global_about_dialog; if (!dialog) { int i; dialog = gtk_about_dialog_new (); g_object_ref (dialog); gtk_object_sink (GTK_OBJECT (dialog)); g_signal_connect (dialog, "delete_event", G_CALLBACK (gtk_widget_hide_on_delete), NULL); /* See http://svn.gnome.org/viewcvs/gtk%2B?revision=14919&view=revision . * We can't actually do this fully correctly, because the * license and credits subdialogs are private. */ g_signal_connect (dialog, "response", G_CALLBACK (gtk_widget_hide), NULL); for (i = 2; i < items ; i+=2) { GParamSpec * pspec; char * name = SvPV_nolen (ST (i)); SV * sv = ST (i + 1); /* Evil swizzling for #345822 */ if (gtk_major_version > 2 || (gtk_major_version == 2 && gtk_minor_version >= 12)) { /* map name to program-name. */ if (strEQ (name, "name")) { warn ("Deprecation warning: Use the " "\"program-name\" property instead " "of \"name\""); name = "program-name"; } } else { /* older gtk+; allow modern code. */ if (gperl_str_eq (name, "program-name")) name = "name"; } pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (dialog), name); if (! pspec) { const char * classname = gperl_object_package_from_type (G_OBJECT_TYPE (dialog)); croak ("type %s does not support property '%s'", classname, name); } else { GValue value = {0, }; g_value_init (&value, G_PARAM_SPEC_VALUE_TYPE (pspec)); gperl_value_from_sv (&value, sv); g_object_set_property (G_OBJECT (dialog), name, &value); g_value_unset (&value); } } if (parent) { gtk_window_set_transient_for ( GTK_WINDOW (dialog), parent); gtk_window_set_destroy_with_parent ( GTK_WINDOW (dialog), TRUE); g_object_set_data_full (G_OBJECT (parent), "gtk-about-dialog", dialog, g_object_unref); } else { global_about_dialog = dialog; } } gtk_window_present (GTK_WINDOW (dialog)); MODULE = Gtk2::AboutDialog PACKAGE = Gtk2::AboutDialog PREFIX = gtk_about_dialog_ GtkWidget * gtk_about_dialog_new (class) C_ARGS: /* void */ =for apidoc get_name __hide__ =cut const gchar_ornull * gtk_about_dialog_get_program_name (GtkAboutDialog * about) ALIAS: get_name = 1 CODE: if (ix == 1) { warn ("Deprecation warning: use " "Gtk2::AboutDialog::get_program_name instead of " "get_name"); } #if GTK_CHECK_VERSION (2, 12, 0) RETVAL = gtk_about_dialog_get_program_name (about); #else RETVAL = gtk_about_dialog_get_name (about); #endif OUTPUT: RETVAL =for apidoc set_name __hide__ =cut void gtk_about_dialog_set_program_name (GtkAboutDialog * about, const gchar_ornull * name) ALIAS: set_name = 1 CODE: if (ix == 1) { warn ("Deprecation warning: use " "Gtk2::AboutDialog::set_program_name instead of " "set_name"); } #if GTK_CHECK_VERSION (2, 12, 0) gtk_about_dialog_set_program_name (about, name); #else gtk_about_dialog_set_name (about, name); #endif const gchar_ornull * gtk_about_dialog_get_version (GtkAboutDialog * about); void gtk_about_dialog_set_version (GtkAboutDialog * about, const gchar_ornull * version); const gchar_ornull * gtk_about_dialog_get_copyright (GtkAboutDialog * about); void gtk_about_dialog_set_copyright (GtkAboutDialog * about, const gchar_ornull * copyright); const gchar_ornull * gtk_about_dialog_get_comments (GtkAboutDialog * about); void gtk_about_dialog_set_comments (GtkAboutDialog * about, const gchar_ornull * comments); const gchar_ornull * gtk_about_dialog_get_license (GtkAboutDialog * about); void gtk_about_dialog_set_license (GtkAboutDialog * about, const gchar_ornull * license); #if GTK_CHECK_VERSION (2, 8, 0) gboolean gtk_about_dialog_get_wrap_license (GtkAboutDialog *about); void gtk_about_dialog_set_wrap_license (GtkAboutDialog *about, gboolean wrap_license); #endif const gchar_ornull * gtk_about_dialog_get_website (GtkAboutDialog * about); void gtk_about_dialog_set_website (GtkAboutDialog * about, const gchar_ornull * website); const gchar_ornull * gtk_about_dialog_get_website_label (GtkAboutDialog * about); void gtk_about_dialog_set_website_label (GtkAboutDialog * about, const gchar_ornull * website_label); ##const gchar * const * gtk_about_dialog_get_authors (GtkAboutDialog * about); void gtk_about_dialog_get_authors (GtkAboutDialog * about) PREINIT: gint i; const gchar * const * authors = NULL; PPCODE: authors = gtk_about_dialog_get_authors (about); GETTER (authors); ##void gtk_about_dialog_set_authors (GtkAboutDialog * about, gchar ** authors); =for apidoc =arg author1 (string) =cut void gtk_about_dialog_set_authors (about, author1, ...) GtkAboutDialog * about PREINIT: gint i; gchar ** authors; CODE: SETTER (authors); gtk_about_dialog_set_authors (about, (const gchar **) authors); g_free (authors); ##const gchar * const * gtk_about_dialog_get_documenters (GtkAboutDialog * about); void gtk_about_dialog_get_documenters (GtkAboutDialog * about) PREINIT: gint i; const gchar * const * documenters = NULL; PPCODE: documenters = gtk_about_dialog_get_documenters (about); GETTER (documenters); ##void gtk_about_dialog_set_documenters (GtkAboutDialog * about, gchar ** documenters); =for apidoc =arg documenter1 (string) =cut void gtk_about_dialog_set_documenters (about, documenter1, ...) GtkAboutDialog * about PREINIT: gint i; gchar ** documenters; CODE: SETTER (documenters); gtk_about_dialog_set_documenters (about, (const gchar **) documenters); g_free (documenters); ##const gchar * const * gtk_about_dialog_get_artists (GtkAboutDialog * about); void gtk_about_dialog_get_artists (GtkAboutDialog * about) PREINIT: gint i; const gchar * const * artists = NULL; PPCODE: artists = gtk_about_dialog_get_artists (about); GETTER (artists); ##void gtk_about_dialog_set_artists (GtkAboutDialog * about, gchar ** artists); =for apidoc =arg artist1 (string) =cut void gtk_about_dialog_set_artists (about, artist1, ...); GtkAboutDialog * about PREINIT: gint i; gchar ** artists; CODE: SETTER (artists); gtk_about_dialog_set_artists (about, (const gchar **) artists); g_free (artists); const gchar_ornull * gtk_about_dialog_get_translator_credits (GtkAboutDialog * about); void gtk_about_dialog_set_translator_credits (GtkAboutDialog * about, const gchar_ornull *translator_credits); GdkPixbuf_ornull * gtk_about_dialog_get_logo (GtkAboutDialog * about); void gtk_about_dialog_set_logo (GtkAboutDialog * about, GdkPixbuf_ornull * logo); const gchar_ornull * gtk_about_dialog_get_logo_icon_name (GtkAboutDialog * about); void gtk_about_dialog_set_logo_icon_name (GtkAboutDialog * about, const gchar_ornull * icon_name); ##GtkAboutDialogActivateLinkFunc gtk_about_dialog_set_email_hook (GtkAboutDialogActivateLinkFunc func, gpointer data, GDestroyNotify destroy); void gtk_about_dialog_set_email_hook (class, func, data = NULL) SV * func SV * data PREINIT: GPerlCallback *callback; CODE: callback = gtk2perl_about_dialog_activate_link_func_create (func, data); gtk_about_dialog_set_email_hook ( (GtkAboutDialogActivateLinkFunc) gtk2perl_about_dialog_activate_link_func, callback, (GDestroyNotify) gperl_callback_destroy); ##GtkAboutDialogActivateLinkFunc gtk_about_dialog_set_url_hook (GtkAboutDialogActivateLinkFunc func, gpointer data, GDestroyNotify destroy); void gtk_about_dialog_set_url_hook (class, func, data = NULL) SV * func SV * data PREINIT: GPerlCallback *callback; CODE: callback = gtk2perl_about_dialog_activate_link_func_create (func, data); gtk_about_dialog_set_url_hook ( (GtkAboutDialogActivateLinkFunc) gtk2perl_about_dialog_activate_link_func, callback, (GDestroyNotify) gperl_callback_destroy); Gtk2-1.2498/xs/GtkAccelGroup.xs000644 001750 000024 00000022324 11664366546 017247 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003, 2009 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" typedef struct { GClosure * closure; const char * sv_str; } FindClosureData; static gboolean find_closure (GtkAccelKey * key, GClosure * closure, gpointer data) { GPerlClosure * gpc = (GPerlClosure*) closure; FindClosureData * cd = (FindClosureData*) data; PERL_UNUSED_VAR (key); if (strEQ (cd->sv_str, SvPV_nolen (gpc->callback))) { cd->closure = closure; return TRUE; } else return FALSE; } MODULE = Gtk2::AccelGroup PACKAGE = Gtk2::AccelGroup PREFIX = gtk_accel_group_ =for position SYNOPSIS =head1 SYNOPSIS my $win = Gtk2::Window->new; my $accel = Gtk2::AccelGroup->new; $accel->connect (42, ['control-mask'], ['visible'], sub { # do something }); $win->add_accel_group ($accel); =cut ## GtkAccelGroup* gtk_accel_group_new (void) GtkAccelGroup_noinc * gtk_accel_group_new (class) C_ARGS: /*void*/ ## void gtk_accel_group_lock (GtkAccelGroup *accel_group) void gtk_accel_group_lock (accel_group) GtkAccelGroup * accel_group ## void gtk_accel_group_unlock (GtkAccelGroup *accel_group) void gtk_accel_group_unlock (accel_group) GtkAccelGroup * accel_group ## void gtk_accel_group_connect (GtkAccelGroup *accel_group, guint accel_key, GdkModifierType accel_mods, GtkAccelFlags accel_flags, GClosure *closure) void gtk_accel_group_connect (accel_group, accel_key, accel_mods, accel_flags, func) GtkAccelGroup * accel_group guint accel_key GdkModifierType accel_mods GtkAccelFlags accel_flags SV * func PREINIT: GClosure * closure; CODE: /* gtk_accel_group_connect() sinks the floating ref from creation in * gperl_closure_new() */ closure = gperl_closure_new (func, NULL, FALSE); gtk_accel_group_connect (accel_group, accel_key, accel_mods, accel_flags, closure); ## void gtk_accel_group_connect_by_path (GtkAccelGroup *accel_group, const gchar *accel_path, GClosure *closure) void gtk_accel_group_connect_by_path (accel_group, accel_path, func) GtkAccelGroup * accel_group const gchar * accel_path SV * func PREINIT: GClosure * closure; CODE: /* gtk_accel_group_connect_by_path() sinks the floating ref from * creation in gperl_closure_new() */ closure = gperl_closure_new (func, NULL, FALSE); gtk_accel_group_connect_by_path (accel_group, accel_path, closure); # this will not work quite as advertised --- a GClosure can be # attached to only one GtkAccelGroup, but we'll be creating a new # closure on each call to connect, so we can have many closures # on the same perl func. we'll just disconnect the first one, # and you can call this in a loop until it stops returning true. ## gboolean gtk_accel_group_disconnect (GtkAccelGroup *accel_group, GClosure *closure) gboolean gtk_accel_group_disconnect (accel_group, func) GtkAccelGroup * accel_group SV * func PREINIT: FindClosureData data; CODE: data.closure = NULL; data.sv_str = SvPV_nolen (func); if (gtk_accel_group_find (accel_group, find_closure, &data)) { RETVAL = gtk_accel_group_disconnect (accel_group, data.closure); } else RETVAL = 0; OUTPUT: RETVAL ## gboolean gtk_accel_group_disconnect_key (GtkAccelGroup *accel_group, guint accel_key, GdkModifierType accel_mods) gboolean gtk_accel_group_disconnect_key (accel_group, accel_key, accel_mods) GtkAccelGroup * accel_group guint accel_key GdkModifierType accel_mods # no typemap for GtkAccelKey, no boxed support, either ## GtkAccelKey* gtk_accel_group_find (GtkAccelGroup *accel_group, gboolean (*find_func) (GtkAccelKey *key, GClosure *closure, gpointer data), gpointer data) #GtkAccelKey * #gtk_accel_group_find (accel_group, key, closure, *, data) # GtkAccelGroup * accel_group # gboolean (*find_func) (GtkAccelKey *key, GClosure *closure, gpointer data) # gpointer data # this will not work as advertised; implementation details of the C version # guarantee that a single closure can be connected to only one accel group, # but we will create a new closure for each function we connect --- # potentially many closures for one perl function. thus, there is not a # one to one mapping that would return a certain accel group for a given # closure. ... which means this function would be rather pointless at # the perl level. ## GtkAccelGroup* gtk_accel_group_from_accel_closure (GClosure *closure) #if GTK_CHECK_VERSION (2, 14, 0) gboolean gtk_accel_group_get_is_locked (GtkAccelGroup *accel_group); GdkModifierType gtk_accel_group_get_modifier_mask (GtkAccelGroup *accel_group); #endif MODULE = Gtk2::AccelGroup PACKAGE = Gtk2::Accelerator PREFIX = gtk_accelerator_ ## void gtk_accelerator_parse (const gchar *accelerator, guint *accelerator_key, GdkModifierType *accelerator_mods) =for apidoc =for signature (accelerator_key, accelerator_mods) = Gtk2::Accelerator->parse ($accelerator) Returns accelerator_key, an unsigned interger and accelerator_mods, a Gtk2::Gdk::ModifierType. =cut void gtk_accelerator_parse (class, accelerator) const gchar * accelerator PREINIT: guint accelerator_key; GdkModifierType accelerator_mods; PPCODE: gtk_accelerator_parse (accelerator, &accelerator_key, &accelerator_mods); XPUSHs (sv_2mortal (newSVuv (accelerator_key))); XPUSHs (sv_2mortal (newSVGdkModifierType (accelerator_mods))); ## gchar* gtk_accelerator_name (guint accelerator_key, GdkModifierType accelerator_mods) gchar_own * gtk_accelerator_name (class, accelerator_key, accelerator_mods) guint accelerator_key GdkModifierType accelerator_mods C_ARGS: accelerator_key, accelerator_mods ## void gtk_accelerator_set_default_mod_mask (GdkModifierType default_mod_mask) ## call as Gtk2::Accelerator->set_default_mod_mask void gtk_accelerator_set_default_mod_mask (class, default_mod_mask) GdkModifierType default_mod_mask C_ARGS: default_mod_mask ## guint gtk_accelerator_get_default_mod_mask (void) ## call as Gtk2::Accelerator->get_default_mod_mask GdkModifierType gtk_accelerator_get_default_mod_mask (class) C_ARGS: /* void */ # no private functions ## void _gtk_accel_group_attach (GtkAccelGroup *accel_group, GObject *object) ## void _gtk_accel_group_detach (GtkAccelGroup *accel_group, GObject *object) ## void _gtk_accel_group_reconnect (GtkAccelGroup *accel_group, GQuark accel_path_quark) # no get_type functions ##GType gtk_accel_group_get_type (void) ##gboolean gtk_accelerator_valid (guint keyval, GdkModifierType modifiers) G_GNUC_CONST gboolean gtk_accelerator_valid (class, keyval, modifiers) guint keyval GdkModifierType modifiers C_ARGS: keyval, modifiers # internal ##GtkAccelGroupEntry* gtk_accel_group_query (GtkAccelGroup *accel_group, guint accel_key, GdkModifierType accel_mods, guint *n_entries) #void #gtk_accel_group_query (accel_group, accel_key, accel_mods) # GtkAccelGroup * accel_group # guint accel_key # GdkModifierType accel_mods # PREINIT: # gint i; # gint n_entries; # GtkAccelGroupEntry * entries; # PPCODE: # entries = gtk_accel_group_query(accel_group, accel_key, # accel_mods, &n_entries); ## if( !entries ) # XSRETURN_EMPTY; # EXTEND(SP,n_entries); # for( i = 0; i < n_entries; i++ ) # PUSHs(sv_2mortal(newSVGtkAccelGroupEntry(entries[i]))); #if GTK_CHECK_VERSION (2, 6, 0) ## gchar * gtk_accelerator_get_label (guint accelerator_key, GdkModifierType accelerator_mods) gchar_own * gtk_accelerator_get_label (class, accelerator_key, accelerator_mods) guint accelerator_key GdkModifierType accelerator_mods C_ARGS: accelerator_key, accelerator_mods #endif MODULE = Gtk2::AccelGroup PACKAGE = Gtk2::AccelGroups PREFIX = gtk_accel_groups_ =for object Gtk2::AccelGroup =cut ## gboolean gtk_accel_groups_activate (GObject *object, guint accel_key, GdkModifierType accel_mods) gboolean gtk_accel_groups_activate (class, object, accel_key, accel_mods) GObject * object guint accel_key GdkModifierType accel_mods C_ARGS: object, accel_key, accel_mods ## GSList* gtk_accel_groups_from_object (GObject *object) =for apidoc Returns a list of Gtk2::AccelGroup's. =cut void gtk_accel_groups_from_object (class, object) GObject * object PREINIT: GSList * groups, * i; PPCODE: groups = gtk_accel_groups_from_object (object); for (i = groups ; i != NULL ; i = i->next) XPUSHs (sv_2mortal (newSVGtkAccelGroup (i->data))); /* according to the source, we should not free the list */ Gtk2-1.2498/xs/GtkAccelLabel.xs000644 001750 000024 00000005051 11664366546 017170 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" MODULE = Gtk2::AccelLabel PACKAGE = Gtk2::AccelLabel PREFIX = gtk_accel_label_ =for position DESCRIPTION =head1 DESCRIPTION Note that the C property is a hard reference to the target widget. If it's a container parent of the AccelLabel then it will be a circular reference and will have to be unset by an explicit C when no longer wanted, as usual for such things. See L for how this affects the common case of a MenuItem containing a AccelLabel. =cut ## GtkWidget* gtk_accel_label_new (const gchar *string) GtkWidget * gtk_accel_label_new (class, string) const gchar * string C_ARGS: string ## GtkWidget* gtk_accel_label_get_accel_widget (GtkAccelLabel *accel_label) GtkWidget_ornull * gtk_accel_label_get_accel_widget (accel_label) GtkAccelLabel * accel_label ## guint gtk_accel_label_get_accel_width (GtkAccelLabel *accel_label) guint gtk_accel_label_get_accel_width (accel_label) GtkAccelLabel * accel_label ## void gtk_accel_label_set_accel_widget (GtkAccelLabel *accel_label, GtkWidget *accel_widget) void gtk_accel_label_set_accel_widget (accel_label, accel_widget) GtkAccelLabel * accel_label GtkWidget_ornull * accel_widget # TODO: The docs say that the "closure must be connected to an accelerator # group", but how do we find the GClosure that was created in the xsub for # gtk_accel_group_connect()? ## void gtk_accel_label_set_accel_closure (GtkAccelLabel *accel_label, GClosure *accel_closure) #void #gtk_accel_label_set_accel_closure (accel_label, accel_closure) # GtkAccelLabel * accel_label # GClosure * accel_closure ## gboolean gtk_accel_label_refetch (GtkAccelLabel *accel_label) gboolean gtk_accel_label_refetch (accel_label) GtkAccelLabel * accel_label Gtk2-1.2498/xs/GtkAccelMap.xs000644 001750 000024 00000012026 11664366546 016666 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003-2005 by the gtk2-perl team (see the file AUTHORS) * * Licensed under the LGPL, see LICENSE file for more information. * * $Id$ */ #include "gtk2perl.h" static void gtk2perl_gtk_accel_map_foreach (GPerlCallback *callback, const gchar *accel_path, guint accel_key, GdkModifierType accel_mods, gboolean changed) { gperl_callback_invoke (callback, NULL, accel_path, accel_key, accel_mods, changed); } MODULE = Gtk2::AccelMap PACKAGE = Gtk2::AccelMap PREFIX = gtk_accel_map_ =for position post_methods =head1 FOREACH CALLBACK The foreach callbacks ignore any returned values and the following parameters are passed to the callback any modifications are ignored. accel_path (string) accel_key (integer) GdkModifierType accel_mods (Gtk2::Gdk::ModifierType) changed (boolean) user_date (scalar) =cut ## void gtk_accel_map_add_entry (const gchar *accel_path, guint accel_key, GdkModifierType accel_mods) void gtk_accel_map_add_entry (class, accel_path, accel_key, accel_mods) const gchar * accel_path guint accel_key GdkModifierType accel_mods C_ARGS: accel_path, accel_key, accel_mods ## gboolean gtk_accel_map_lookup_entry (const gchar *accel_path, GtkAccelKey *key) =for apidoc =for signature (accel_key, accel_mods, accel_flags) = Gtk2::AccelMap->lookup_entry ($accel_path) Returns empty if no accelerator is found for the given path, accel_key (integer), accel_mods (Gtk2::Gdk::ModifierType), and accel_flags (integer) otherwise. =cut void gtk_accel_map_lookup_entry (class, accel_path) const gchar * accel_path PREINIT: GtkAccelKey key; PPCODE: if (gtk_accel_map_lookup_entry (accel_path, &key)) { EXTEND (SP, 3); PUSHs (sv_2mortal (newSViv (key.accel_key))); PUSHs (sv_2mortal (newSVGdkModifierType (key.accel_mods))); PUSHs (sv_2mortal (newSViv (key.accel_flags))); } else XSRETURN_EMPTY; ## gboolean gtk_accel_map_change_entry (const gchar *accel_path, guint accel_key, GdkModifierType accel_mods, gboolean replace) gboolean gtk_accel_map_change_entry (class, accel_path, accel_key, accel_mods, replace) const gchar * accel_path guint accel_key GdkModifierType accel_mods gboolean replace C_ARGS: accel_path, accel_key, accel_mods, replace ## void gtk_accel_map_load (const gchar *file_name) void gtk_accel_map_load (class, file_name) const gchar * file_name C_ARGS: file_name ## void gtk_accel_map_save (const gchar *file_name) void gtk_accel_map_save (class, file_name) const gchar * file_name C_ARGS: file_name ## void gtk_accel_map_load_fd (gint fd) void gtk_accel_map_load_fd (class, fd) gint fd C_ARGS: fd ## TODO: GScanner ... ## void gtk_accel_map_load_scanner (GScanner *scanner) ##void ##gtk_accel_map_load_scanner (scanner) ## GScanner *scanner ## void gtk_accel_map_save_fd (gint fd) void gtk_accel_map_save_fd (class, fd) gint fd C_ARGS: fd ## void gtk_accel_map_add_filter (const gchar *filter_pattern) void gtk_accel_map_add_filter (class, filter_pattern) const gchar * filter_pattern C_ARGS: filter_pattern ##void (*GtkAccelMapForeach) (gpointer data, ## const gchar *accel_path, ## guint accel_key, ## GdkModifierType accel_mods, ## gboolean changed); ## void gtk_accel_map_foreach (gpointer data, GtkAccelMapForeach foreach_func) void gtk_accel_map_foreach (class, data, foreach_func) SV * data SV * foreach_func PREINIT: GPerlCallback * callback = NULL; GType types[4]; CODE: types[0] = G_TYPE_STRING; types[1] = G_TYPE_UINT; types[2] = GDK_TYPE_MODIFIER_TYPE; types[3] = G_TYPE_BOOLEAN; callback = gperl_callback_new (foreach_func, data, 4, types, G_TYPE_NONE); gtk_accel_map_foreach (callback, (GtkAccelMapForeach)gtk2perl_gtk_accel_map_foreach); gperl_callback_destroy (callback); ## void gtk_accel_map_foreach_unfiltered (gpointer data, GtkAccelMapForeach foreach_func) void gtk_accel_map_foreach_unfiltered (class, data, foreach_func) SV * data SV * foreach_func PREINIT: GPerlCallback * callback = NULL; GType types[4]; CODE: types[0] = G_TYPE_STRING; types[1] = G_TYPE_UINT; types[2] = GDK_TYPE_MODIFIER_TYPE; types[3] = G_TYPE_BOOLEAN; callback = gperl_callback_new (foreach_func, data, 4, types, G_TYPE_NONE); gtk_accel_map_foreach_unfiltered (callback, (GtkAccelMapForeach)gtk2perl_gtk_accel_map_foreach); gperl_callback_destroy (callback); #if GTK_CHECK_VERSION (2, 4, 0) ## GtkAccelMap* gtk_accel_map_get (void); GtkAccelMap * gtk_accel_map_get (class) C_ARGS: /* void */ ## void gtk_accel_map_lock_path (const gchar *accel_path); void gtk_accel_map_lock_path (class, accel_path) const gchar *accel_path C_ARGS: accel_path ## void gtk_accel_map_unlock_path (const gchar *accel_path); void gtk_accel_map_unlock_path (class, accel_path) const gchar *accel_path C_ARGS: accel_path #endif Gtk2-1.2498/xs/GtkAction.xs000644 001750 000024 00000011153 11664366546 016436 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003-2006, 2009 by the gtk2-perl team (see the file AUTHORS) * * Licensed under the LGPL, see LICENSE file for more information. * * $Id$ */ #include "gtk2perl.h" MODULE = Gtk2::Action PACKAGE = Gtk2::Action PREFIX = gtk_action_ =for position post_interfaces =head1 CONSTRUCTOR =head2 action = Gtk2::Action->B (key=>value,...) Create and return a new action object. Note that this is the C of L, not C. Eg. Gtk2::Action->new (name => 'open-foo', stock_id => 'gtk-open', tooltip => 'Start a foo'); The keyword/value style is more flexible and a little clearer than the four direct arguments of C (and also works better for subclasses). =cut const gchar* gtk_action_get_name (GtkAction *action); void gtk_action_activate (GtkAction *action); gboolean gtk_action_is_sensitive (GtkAction *action); gboolean gtk_action_get_sensitive (GtkAction *action); gboolean gtk_action_is_visible (GtkAction *action); gboolean gtk_action_get_visible (GtkAction *action); GtkWidget* gtk_action_create_icon (GtkAction *action, GtkIconSize icon_size); GtkWidget* gtk_action_create_menu_item (GtkAction *action); #if GTK_CHECK_VERSION (2, 12, 0) GtkWidget* gtk_action_create_menu (GtkAction *action); #endif GtkWidget* gtk_action_create_tool_item (GtkAction *action); void gtk_action_connect_proxy (GtkAction *action, GtkWidget *proxy); void gtk_action_disconnect_proxy (GtkAction *action, GtkWidget *proxy); void gtk_action_get_proxies (GtkAction *action); PREINIT: GSList * i; PPCODE: for (i = gtk_action_get_proxies (action) ; i != NULL ; i = i->next) /* We can't use newSVGtkWidget here because it always sinks the * widget. gtk_action_get_proxies might return floating * widgets though, and with newSVGtkWidget we would end up * owning them. When the SV wrapper then goes out of scope, * the widgets would be destroyed -- and GtkAction would hold * on to dangling pointers. */ XPUSHs (sv_2mortal (gperl_new_object (G_OBJECT (i->data), FALSE))); void gtk_action_connect_accelerator (GtkAction *action); void gtk_action_disconnect_accelerator (GtkAction *action); ## /* protected ... for use by child actions */ void gtk_action_block_activate_from (GtkAction *action, GtkWidget *proxy); void gtk_action_unblock_activate_from (GtkAction *action, GtkWidget *proxy); ## /* protected ... for use by action groups */ void gtk_action_set_accel_path (GtkAction *action, const gchar *accel_path); void gtk_action_set_accel_group (GtkAction *action, GtkAccelGroup_ornull *accel_group); #if GTK_CHECK_VERSION (2, 6, 0) void gtk_action_set_sensitive (GtkAction *action, gboolean sensitive); void gtk_action_set_visible (GtkAction *action, gboolean visible); const gchar* gtk_action_get_accel_path (GtkAction *action); #endif #if GTK_CHECK_VERSION (2, 16, 0) void gtk_action_set_label (GtkAction *action, const gchar *label); const gchar_ornull * gtk_action_get_label (GtkAction *action); void gtk_action_set_short_label (GtkAction *action, const gchar *short_label); const gchar_ornull * gtk_action_get_short_label (GtkAction *action); void gtk_action_set_tooltip (GtkAction *action, const gchar_ornull *tooltip); const gchar_ornull * gtk_action_get_tooltip (GtkAction *action); void gtk_action_set_stock_id (GtkAction *action,const gchar_ornull *stock_id); const gchar_ornull * gtk_action_get_stock_id (GtkAction *action); void gtk_action_set_icon_name (GtkAction *action, const gchar_ornull *icon_name); const gchar_ornull * gtk_action_get_icon_name (GtkAction *action); void gtk_action_set_visible_horizontal (GtkAction *action, gboolean visible_horizontal); gboolean gtk_action_get_visible_horizontal (GtkAction *action); void gtk_action_set_visible_vertical (GtkAction *action, gboolean visible_vertical); gboolean gtk_action_get_visible_vertical (GtkAction *action); void gtk_action_set_is_important (GtkAction *action, gboolean is_important); gboolean gtk_action_get_is_important (GtkAction *action); # FIXME GIcon not in typemap # void gtk_action_set_gicon (GtkAction *action, GIcon *icon); # # GIcon * gtk_action_get_gicon (GtkAction *action); void gtk_action_block_activate (GtkAction *action); void gtk_action_unblock_activate (GtkAction *action); #endif #if GTK_CHECK_VERSION (2, 20, 0) gboolean gtk_action_get_always_show_image (GtkAction *action); void gtk_action_set_always_show_image (GtkAction *action, gboolean always_show); #endif /* 2.20 */ #if GTK_CHECK_VERSION (2, 10, 0) MODULE = Gtk2::Action PACKAGE = Gtk2::Widget PREFIX = gtk_widget_ GtkAction_ornull * gtk_widget_get_action (GtkWidget *widget); #endif Gtk2-1.2498/xs/GtkActionGroup.xs000644 001750 000024 00000043377 11664366546 017470 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003-2005, 2010 by the gtk2-perl team (see the file AUTHORS) * * Licensed under the LGPL, see LICENSE file for more information. * * $Id$ */ #include "gtk2perl.h" #include "gtk2perl-private.h" /* For the translate callback. */ /* helper for using gperl_signal_connect when you don't have the SV of * the instance... */ #define WRAPINSTANCE(object) (sv_2mortal (newSVGObject (G_OBJECT (object)))) /* these macros expect there to exist an SV** named svp */ #define HFETCHPV(hv, key) \ (((svp = hv_fetch ((hv), (key), strlen ((key)), FALSE)) \ && gperl_sv_is_defined (*svp)) \ ? SvPV_nolen (*svp) \ : NULL) #define HFETCHCV(hv, key) \ (((svp = hv_fetch ((hv), (key), strlen ((key)), FALSE)) \ && gperl_sv_is_defined (*svp)) \ ? (gpointer)(*svp) \ : NULL) #define HFETCHIV(hv, key) \ (((svp = hv_fetch ((hv), (key), strlen ((key)), FALSE)) \ && gperl_sv_is_defined (*svp)) \ ? SvIV (*svp) \ : 0) #define AFETCHPV(av, index) \ (((svp = av_fetch ((av), (index), FALSE)) && gperl_sv_is_defined (*svp)) \ ? SvPV_nolen (*svp) \ : NULL) #define AFETCHCV(av, index) \ (((svp = av_fetch ((av), (index), FALSE)) && gperl_sv_is_defined (*svp)) \ ? (gpointer)(*svp) \ : NULL) #define AFETCHIV(av, index) \ (((svp = av_fetch ((av), (index), FALSE)) && gperl_sv_is_defined (*svp)) \ ? SvIV (*svp) \ : 0) /* struct _GtkActionEntry { gchar *name; gchar *stock_id; gchar *label; gchar *accelerator; gchar *tooltip; GCallback callback; }; */ static void read_action_entry_from_sv (SV * sv, GtkActionEntry * action) { SV ** svp; if (!gperl_sv_is_defined (sv) || !SvROK (sv)) croak ("invalid action entry"); switch (SvTYPE (SvRV (sv))) { case SVt_PVHV: { HV * hv = (HV*) SvRV (sv); action->name = HFETCHPV (hv, "name"); action->stock_id = HFETCHPV (hv, "stock_id"); action->label = HFETCHPV (hv, "label"); action->accelerator = HFETCHPV (hv, "accelerator"); action->tooltip = HFETCHPV (hv, "tooltip"); action->callback = HFETCHCV (hv, "callback"); } break; case SVt_PVAV: { AV * av = (AV*) SvRV (sv); action->name = AFETCHPV (av, 0); action->stock_id = AFETCHPV (av, 1); action->label = AFETCHPV (av, 2); action->accelerator = AFETCHPV (av, 3); action->tooltip = AFETCHPV (av, 4); action->callback = AFETCHCV (av, 5); } break; default: croak ("action entry must be a hash or an array"); } } /* struct _GtkToggleActionEntry { gchar *name; gchar *stock_id; gchar *label; gchar *accelerator; gchar *tooltip; GCallback callback; gboolean is_active; }; */ static void read_toggle_action_entry_from_sv (SV * sv, GtkToggleActionEntry * action) { SV ** svp; if (!gperl_sv_is_defined (sv) || !SvROK (sv)) croak ("invalid toggle action entry"); switch (SvTYPE (SvRV (sv))) { case SVt_PVHV: { HV * hv = (HV*) SvRV (sv); action->name = HFETCHPV (hv, "name"); action->stock_id = HFETCHPV (hv, "stock_id"); action->label = HFETCHPV (hv, "label"); action->accelerator = HFETCHPV (hv, "accelerator"); action->tooltip = HFETCHPV (hv, "tooltip"); action->callback = HFETCHCV (hv, "callback"); action->is_active = HFETCHIV (hv, "is_active"); } break; case SVt_PVAV: { AV * av = (AV*) SvRV (sv); if (av_len (av) < 5) croak ("not enough items in array form of toggle action entry; expecting:\n" " [ name, stock_id, label, accelerator, tooltip, value]\n" " "); action->name = AFETCHPV (av, 0); action->stock_id = AFETCHPV (av, 1); action->label = AFETCHPV (av, 2); action->accelerator = AFETCHPV (av, 3); action->tooltip = AFETCHPV (av, 4); action->callback = AFETCHCV (av, 5); action->is_active = AFETCHIV (av, 6); } break; default: croak ("action entry must be a hash or an array"); } } /* struct _GtkRadioActionEntry { gchar *name; gchar *stock_id; gchar *label; gchar *accelerator; gchar *tooltip; gint value; }; */ static void read_radio_action_entry_from_sv (SV * sv, GtkRadioActionEntry * action) { SV ** svp; if (!gperl_sv_is_defined (sv) || !SvROK (sv)) croak ("invalid radio action entry"); switch (SvTYPE (SvRV (sv))) { case SVt_PVHV: { HV * hv = (HV*) SvRV (sv); action->name = HFETCHPV (hv, "name"); action->stock_id = HFETCHPV (hv, "stock_id"); action->label = HFETCHPV (hv, "label"); action->accelerator = HFETCHPV (hv, "accelerator"); action->tooltip = HFETCHPV (hv, "tooltip"); action->value = HFETCHIV (hv, "value"); } break; case SVt_PVAV: { AV * av = (AV*) SvRV (sv); if (av_len (av) < 5) croak ("not enough items in array form of radio action entry; expecting:\n" " [ name, stock_id, label, accelerator, tooltip, value]\n" " "); action->name = AFETCHPV (av, 0); action->stock_id = AFETCHPV (av, 1); action->label = AFETCHPV (av, 2); action->accelerator = AFETCHPV (av, 3); action->tooltip = AFETCHPV (av, 4); action->value = AFETCHIV (av, 5); } break; default: croak ("action entry must be a hash or an array"); } } MODULE = Gtk2::ActionGroup PACKAGE = Gtk2::ActionGroup PREFIX = gtk_action_group_ =for position DESCRIPTION =head2 NOTE: Translation In C, gtk+'s action groups can use the translation domain to ensure that action labels and tooltips are translated along with the rest of the app. However, the translation function was not available for calling B the Perl bindings until gtk+ 2.6; that is, setting the translation domain had no effect. Translation of action groups is supported in Perl as of Gtk2 1.080 using gtk+ 2.6.0 or later. =cut GtkActionGroup_noinc *gtk_action_group_new (class, const gchar *name); C_ARGS: name const gchar *gtk_action_group_get_name (GtkActionGroup *action_group); void gtk_action_group_set_sensitive (GtkActionGroup *action_group, gboolean sensitive); gboolean gtk_action_group_get_sensitive (GtkActionGroup *action_group); void gtk_action_group_set_visible (GtkActionGroup *action_group, gboolean sensitive); gboolean gtk_action_group_get_visible (GtkActionGroup *action_group); GtkAction *gtk_action_group_get_action (GtkActionGroup *action_group, const gchar *action_name); void gtk_action_group_list_actions (GtkActionGroup *action_group); PREINIT: GList * actions, * i; PPCODE: actions = gtk_action_group_list_actions (action_group); for (i = actions ; i != NULL ; i = i->next) XPUSHs (sv_2mortal (newSVGtkAction (i->data))); g_list_free (actions); void gtk_action_group_add_action (GtkActionGroup *action_group, GtkAction *action); void gtk_action_group_add_action_with_accel (GtkActionGroup *action_group, GtkAction *action, const gchar_ornull *accelerator); void gtk_action_group_remove_action (GtkActionGroup *action_group, GtkAction *action); ##void gtk_action_group_add_actions (GtkActionGroup *action_group, GtkActionEntry *entries, guint n_entries, gpointer user_data); ##void gtk_action_group_add_actions_full (GtkActionGroup *action_group, GtkActionEntry *entries, guint n_entries, gpointer user_data, GDestroyNotify destroy); void gtk_action_group_add_actions (action_group, action_entries, user_data=NULL) GtkActionGroup * action_group SV * action_entries SV * user_data PREINIT: AV * av; GtkActionEntry * entries; gint n_actions, i; CODE: if (!gperl_sv_is_array_ref (action_entries)) croak ("actions must be a reference to an array of action entries"); av = (AV*) SvRV (action_entries); n_actions = av_len (av) + 1; if (n_actions < 1) croak ("action array is empty"); entries = gperl_alloc_temp (sizeof (GtkActionEntry) * n_actions); for (i = 0 ; i < n_actions ; i++) { SV ** svp = av_fetch (av, i, 0); read_action_entry_from_sv (*svp, entries+i); } for (i = 0 ; i < n_actions ; i++) { GtkAction * action; gchar * accel_path; const gchar * label; const gchar * tooltip; #if GTK_CHECK_VERSION (2, 6, 0) label = gtk_action_group_translate_string (action_group, entries[i].label); tooltip = gtk_action_group_translate_string (action_group, entries[i].tooltip); #else label = entries[i].label; tooltip = entries[i].tooltip; #endif action = gtk_action_new (entries[i].name, label, tooltip, entries[i].stock_id); if (entries[i].callback) gperl_signal_connect (WRAPINSTANCE (action), "activate", (SV*)(entries[i].callback), user_data, 0); /* set the accel path for the menu item */ accel_path = g_strconcat ("/", gtk_action_group_get_name (action_group), "/", entries[i].name, NULL); if (entries[i].accelerator) { guint accel_key = 0; GdkModifierType accel_mods; gtk_accelerator_parse (entries[i].accelerator, &accel_key, &accel_mods); if (accel_key) gtk_accel_map_add_entry (accel_path, accel_key, accel_mods); } gtk_action_set_accel_path (action, accel_path); g_free (accel_path); gtk_action_group_add_action (action_group, action); g_object_unref (action); } ##void gtk_action_group_add_toggle_actions (GtkActionGroup *action_group, GtkToggleActionEntry *entries, guint n_entries, gpointer user_data); ##void gtk_action_group_add_toggle_actions_full (GtkActionGroup *action_group, GtkToggleActionEntry *entries, guint n_entries, gpointer user_data, GDestroyNotify destroy); void gtk_action_group_add_toggle_actions (action_group, toggle_action_entries, user_data=NULL) GtkActionGroup * action_group SV * toggle_action_entries SV * user_data PREINIT: AV * av; GtkToggleActionEntry * entries; gint n_actions, i; CODE: if (!gperl_sv_is_array_ref (toggle_action_entries)) croak ("entries must be a reference to an array of toggle action entries"); av = (AV*) SvRV (toggle_action_entries); n_actions = av_len (av) + 1; if (n_actions < 1) croak ("toggle action array is empty"); entries = gperl_alloc_temp (sizeof (GtkToggleActionEntry) * n_actions); for (i = 0 ; i < n_actions ; i++) { SV ** svp = av_fetch (av, i, 0); read_toggle_action_entry_from_sv (*svp, entries+i); } for (i = 0 ; i < n_actions ; i++) { GtkAction * action; gchar * accel_path; const gchar * label; const gchar * tooltip; #if GTK_CHECK_VERSION (2, 6, 0) label = gtk_action_group_translate_string (action_group, entries[i].label); tooltip = gtk_action_group_translate_string (action_group, entries[i].tooltip); #else label = entries[i].label; tooltip = entries[i].tooltip; #endif action = g_object_new (GTK_TYPE_TOGGLE_ACTION, "name", entries[i].name, "label", label, "tooltip", tooltip, "stock_id", entries[i].stock_id, NULL); gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), entries[i].is_active); if (entries[i].callback) gperl_signal_connect (WRAPINSTANCE (action), "activate", (SV*)(entries[i].callback), user_data, 0); /* set the accel path for the menu item */ accel_path = g_strconcat ("/", gtk_action_group_get_name (action_group), "/", entries[i].name, NULL); if (entries[i].accelerator) { guint accel_key = 0; GdkModifierType accel_mods; gtk_accelerator_parse (entries[i].accelerator, &accel_key, &accel_mods); if (accel_key) gtk_accel_map_add_entry (accel_path, accel_key, accel_mods); } gtk_action_set_accel_path (action, accel_path); g_free (accel_path); gtk_action_group_add_action (action_group, action); g_object_unref (action); } =for apidoc Create and add a set of C actions to C<$action_group>. For example $action_group->add_radio_actions ([ [ "Red", undef, "_Red", "R", "Blood", 1 ], [ "Green", undef, "_Green", "G", "Grass", 2 ], [ "Blue", undef, "_Blue", "B", "Sky", 3 ], ], 2, # initial, or -1 for no initial sub { my ($first_action, $selected_action, $userdata) = @_; print "now: ", $selected_action->get_name, "\n"; }, $userdata); C is an arrayref, each element of which is either a ref to a 6-element array [ $name, # string $stock_id, # string, or undef $label, # string, or undef to use stock label $accelerator, # string key name, or undef for no accel $tooltip, # string, or undef for no tooltip $value # integer, for $action->set_current_value etc ] or a ref to a hash of named fields similarly. A C is mandatory, the rest are optional. C defaults to 0 if absent or C. { name => $name, stock_id => $stock_id, label => $label, accelerator => $accelerator, tooltip => $tooltip, value => $value } If C<$on_change> is not C then it's a signal handler function which is connected to the C signal on the first action created. See L for that signal. =cut ##void gtk_action_group_add_radio_actions (GtkActionGroup *action_group, GtkRadioActionEntry *entries, guint n_entries, gint value, GCallback on_change, gpointer user_data); ##void gtk_action_group_add_radio_actions_full (GtkActionGroup *action_group, GtkRadioActionEntry *entries, guint n_entries, gint value, GCallback on_change, gpointer user_data, GDestroyNotify destroy); void gtk_action_group_add_radio_actions (action_group, radio_action_entries, value, on_change, user_data=NULL) GtkActionGroup * action_group SV * radio_action_entries gint value SV * on_change SV * user_data PREINIT: AV * av; GtkRadioActionEntry * entries; GtkAction * first_action = NULL; GSList * group = NULL; gint n_actions, i; CODE: if (!gperl_sv_is_array_ref (radio_action_entries)) croak ("radio_action_entries must be a reference to an array of action entries"); av = (AV*) SvRV (radio_action_entries); n_actions = av_len (av) + 1; if (n_actions < 1) croak ("radio action array is empty"); entries = gperl_alloc_temp (sizeof (GtkRadioActionEntry) * n_actions); for (i = 0 ; i < n_actions ; i++) { SV ** svp = av_fetch (av, i, 0); read_radio_action_entry_from_sv (*svp, entries+i); } for (i = 0 ; i < n_actions ; i++) { GtkAction * action; gchar * accel_path; const gchar * label; const gchar * tooltip; #if GTK_CHECK_VERSION (2, 6, 0) label = gtk_action_group_translate_string (action_group, entries[i].label); tooltip = gtk_action_group_translate_string (action_group, entries[i].tooltip); #else label = entries[i].label; tooltip = entries[i].tooltip; #endif action = g_object_new (GTK_TYPE_RADIO_ACTION, "name", entries[i].name, "label", label, "tooltip", tooltip, "stock_id", entries[i].stock_id, "value", entries[i].value, NULL); if (i == 0) first_action = action; gtk_radio_action_set_group (GTK_RADIO_ACTION (action), group); group = gtk_radio_action_get_group (GTK_RADIO_ACTION (action)); if (value == entries[i].value) gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), TRUE); /* set the accel path for the menu item */ accel_path = g_strconcat ("/", gtk_action_group_get_name (action_group), "/", entries[i].name, NULL); if (entries[i].accelerator) { guint accel_key = 0; GdkModifierType accel_mods; gtk_accelerator_parse (entries[i].accelerator, &accel_key, &accel_mods); if (accel_key) gtk_accel_map_add_entry (accel_path, accel_key, accel_mods); } gtk_action_set_accel_path (action, accel_path); g_free (accel_path); gtk_action_group_add_action (action_group, action); g_object_unref (action); } if (gperl_sv_is_defined (on_change)) gperl_signal_connect (WRAPINSTANCE (first_action), "changed", on_change, user_data, 0); void gtk_action_group_set_translation_domain (GtkActionGroup *action_group, const gchar *domain); ## NOTE: we had to implement the group adding API in xs so that we can ## properly destroy the user data and callbacks and such. since we ## reimplement, we can't get to the translation function, its data, ## or the translation domain, which are held in the opaque private ## data object of the action group. not the end of the world, but ## not great, either. see #135740 ## as of gtk+ 2.6.0, there is new API that allows one to call the ## translate func, so we can enable the whole translation API. #if GTK_CHECK_VERSION (2, 6, 0) ##void gtk_action_group_set_translate_func (GtkActionGroup *action_group, GtkTranslateFunc func, gpointer data, GtkDestroyNotify notify); void gtk_action_group_set_translate_func (action_group, func, data=NULL) GtkActionGroup *action_group SV *func SV *data PREINIT: GPerlCallback *callback; CODE: callback = gtk2perl_translate_func_create (func, data); gtk_action_group_set_translate_func (action_group, gtk2perl_translate_func, callback, (GtkDestroyNotify) gperl_callback_destroy); const gchar * gtk_action_group_translate_string (GtkActionGroup *action_group, const gchar *string); #endif Gtk2-1.2498/xs/GtkActivatable.xs000644 001750 000024 00000001455 11664366546 017444 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2010 by the gtk2-perl team (see the file AUTHORS) * * Licensed under the LGPL, see LICENSE file for more information. * * $Id$ */ #include "gtk2perl.h" MODULE = Gtk2::Activatable PACKAGE = Gtk2::Activatable PREFIX = gtk_activatable_ void gtk_activatable_do_set_related_action (GtkActivatable *activatable, GtkAction *action); GtkAction_ornull * gtk_activatable_get_related_action (GtkActivatable *activatable); gboolean gtk_activatable_get_use_action_appearance (GtkActivatable *activatable); void gtk_activatable_sync_action_properties (GtkActivatable *activatable, GtkAction *action); void gtk_activatable_set_related_action (GtkActivatable *activatable, GtkAction *action); void gtk_activatable_set_use_action_appearance (GtkActivatable *activatable, gboolean use_appearance); Gtk2-1.2498/xs/GtkAdjustment.xs000644 001750 000024 00000012541 11664366546 017341 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003, 2009 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" MODULE = Gtk2::Adjustment PACKAGE = Gtk2::Adjustment PREFIX = gtk_adjustment_ =for apidoc Gtk2::Adjustment::value =for signature double = $adjustment->value =for signature double = $adjustment->value ($newval) =for signature double = $adjustment->lower =for signature double = $adjustment->lower ($newval) =for signature double = $adjustment->upper =for signature double = $adjustment->upper ($newval) =for signature double = $adjustment->step_increment =for signature double = $adjustment->step_increment ($newval) =for signature double = $adjustment->page_increment =for signature double = $adjustment->page_increment ($newval) =for signature double = $adjustment->page_size =for signature double = $adjustment->page_size ($newval) Get or set the six fields of a Gtk2::Adjustment. The setter functions store $newval and return the old value. Note that they don't emit any signals; it's up to you to emit "notify" (because the fields are also properties) and "changed" or "value-changed", when you're ready. =cut =for apidoc value __hide__ =cut =for apidoc lower __hide__ =cut =for apidoc upper __hide__ =cut =for apidoc step_increment __hide__ =cut =for apidoc page_increment __hide__ =cut =for apidoc page_size __hide__ =cut gdouble value (GtkAdjustment *adjustment, gdouble newval = 0) ALIAS: lower = 1 upper = 2 step_increment = 3 page_increment = 4 page_size = 5 CODE: switch (ix) { case 0: RETVAL = adjustment->value; if (items > 1) adjustment->value = newval; break; case 1: RETVAL = adjustment->lower; if (items > 1) adjustment->lower = newval; break; case 2: RETVAL = adjustment->upper; if (items > 1) adjustment->upper = newval; break; case 3: RETVAL = adjustment->step_increment; if (items > 1) adjustment->step_increment = newval; break; case 4: RETVAL = adjustment->page_increment; if (items > 1) adjustment->page_increment = newval; break; case 5: RETVAL = adjustment->page_size; if (items > 1) adjustment->page_size = newval; break; default: RETVAL = 0.0; g_assert_not_reached (); } OUTPUT: RETVAL GtkObject* gtk_adjustment_new (class, value, lower, upper, step_increment, page_increment, page_size) gdouble value gdouble lower gdouble upper gdouble step_increment gdouble page_increment gdouble page_size C_ARGS: value, lower, upper, step_increment, page_increment, page_size void gtk_adjustment_changed (adjustment) GtkAdjustment *adjustment void gtk_adjustment_value_changed (adjustment) GtkAdjustment *adjustment void gtk_adjustment_clamp_page (adjustment, lower, upper) GtkAdjustment *adjustment gdouble lower gdouble upper gdouble gtk_adjustment_get_value (adjustment) GtkAdjustment *adjustment void gtk_adjustment_set_value (adjustment, value) GtkAdjustment *adjustment gdouble value #if GTK_CHECK_VERSION (2, 14, 0) void gtk_adjustment_configure (adjustment, value, lower, upper, step_increment, page_increment, page_size) GtkAdjustment *adjustment gdouble value gdouble lower gdouble upper gdouble step_increment gdouble page_increment gdouble page_size =for apidoc Gtk2::Adjustment::set_lower =for signature $adjustment->set_lower ($newval) =for signature $adjustment->set_page_increment ($newval) =for signature $adjustment->set_page_size ($newval) =for signature $adjustment->set_step_increment ($newval) =for signature $adjustment->set_upper ($newval) These functions differ from the plain C<< ->lower >> etc setters in that they emit C and C signals if C<$newval> is different from the current value. The corresponding C etc are not wrapped because they're the same as the C etc field accessors above. =cut =for apidoc set_lower __hide__ =cut =for apidoc set_page_increment __hide__ =cut =for apidoc set_page_size __hide__ =cut =for apidoc set_step_increment __hide__ =cut =for apidoc set_upper __hide__ =cut void set_lower (GtkAdjustment *adjustment, gdouble newval) ALIAS: set_page_increment = 1 set_page_size = 2 set_step_increment = 3 set_upper = 4 CODE: switch (ix) { case 0: gtk_adjustment_set_lower (adjustment, newval); break; case 1: gtk_adjustment_set_page_increment (adjustment, newval); break; case 2: gtk_adjustment_set_page_size (adjustment, newval); break; case 3: gtk_adjustment_set_step_increment (adjustment, newval); break; case 4: gtk_adjustment_set_upper (adjustment, newval); break; } #endif /* 2.14 */ Gtk2-1.2498/xs/GtkAlignment.xs000644 001750 000024 00000003716 11664366546 017145 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" MODULE = Gtk2::Alignment PACKAGE = Gtk2::Alignment PREFIX = gtk_alignment_ ## GtkWidget* gtk_alignment_new (gfloat xalign, gfloat yalign, gfloat xscale, gfloat yscale) GtkWidget * gtk_alignment_new (class, xalign, yalign, xscale, yscale) gfloat xalign gfloat yalign gfloat xscale gfloat yscale C_ARGS: xalign, yalign, xscale, yscale ## void gtk_alignment_set (GtkAlignment *alignment, gfloat xalign, gfloat yalign, gfloat xscale, gfloat yscale) void gtk_alignment_set (alignment, xalign, yalign, xscale, yscale) GtkAlignment * alignment gfloat xalign gfloat yalign gfloat xscale gfloat yscale #if GTK_CHECK_VERSION(2,4,0) void gtk_alignment_set_padding (GtkAlignment *alignment, guint padding_top, guint padding_bottom, guint padding_left, guint padding_right); ## void gtk_alignment_get_padding (GtkAlignment *alignment, guint *padding_top, guint *padding_bottom, guint *padding_left, guint *padding_right); void gtk_alignment_get_padding (GtkAlignment *alignment, OUTLIST guint padding_top, OUTLIST guint padding_bottom, OUTLIST guint padding_left, OUTLIST guint padding_right); #endif Gtk2-1.2498/xs/GtkArrow.xs000644 001750 000024 00000002641 11664366546 016315 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" MODULE = Gtk2::Arrow PACKAGE = Gtk2::Arrow PREFIX = gtk_arrow_ =for enum GtkArrowType =cut =for enum GtkShadowType =cut ## GtkWidget* gtk_arrow_new (GtkArrowType arrow_type, GtkShadowType shadow_type) GtkWidget * gtk_arrow_new (class, arrow_type, shadow_type) GtkArrowType arrow_type GtkShadowType shadow_type C_ARGS: arrow_type, shadow_type ## void gtk_arrow_set (GtkArrow *arrow, GtkArrowType arrow_type, GtkShadowType shadow_type) void gtk_arrow_set (arrow, arrow_type, shadow_type) GtkArrow * arrow GtkArrowType arrow_type GtkShadowType shadow_type Gtk2-1.2498/xs/GtkAspectFrame.xs000644 001750 000024 00000003637 11664366546 017423 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003, 2010 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" MODULE = Gtk2::AspectFrame PACKAGE = Gtk2::AspectFrame PREFIX = gtk_aspect_frame_ ## GtkWidget* gtk_aspect_frame_new (const gchar *label, gfloat xalign, gfloat yalign, gfloat ratio, gboolean obey_child) # label can be NULL for no label, as per gtk_frame_set_label() etc, # though not actually in the gtk_aspect_frame_new() docs as of Gtk 2.20 GtkWidget * gtk_aspect_frame_new (class, label, xalign, yalign, ratio, obey_child) const gchar_ornull * label gfloat xalign gfloat yalign gfloat ratio gboolean obey_child C_ARGS: label, xalign, yalign, ratio, obey_child ## void gtk_aspect_frame_set (GtkAspectFrame *aspect_frame, gfloat xalign, gfloat yalign, gfloat ratio, gboolean obey_child) ### NOTE: renamed to avoid clashing with Glib::Object->set void gtk_aspect_frame_set_params (aspect_frame, xalign, yalign, ratio, obey_child) GtkAspectFrame * aspect_frame gfloat xalign gfloat yalign gfloat ratio gboolean obey_child CODE: gtk_aspect_frame_set (aspect_frame, xalign, yalign, ratio, obey_child); Gtk2-1.2498/xs/GtkAssistant.xs000644 001750 000024 00000011404 11664366546 017171 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2006 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" static GPerlCallback * gtk2perl_assistant_page_func_create (SV * func, SV * data) { GType param_types[1]; param_types[0] = G_TYPE_INT; return gperl_callback_new (func, data, G_N_ELEMENTS (param_types), param_types, G_TYPE_INT); } static gint gtk2perl_assistant_page_func (gint current_page, gpointer data) { GPerlCallback *callback = (GPerlCallback*) data; GValue value = {0, }; gint retval; g_value_init (&value, G_TYPE_INT); retval = g_value_get_int (&value); gperl_callback_invoke (callback, &value, current_page); retval = g_value_get_int (&value); g_value_unset (&value); return retval; } MODULE = Gtk2::Assistant PACKAGE = Gtk2::Assistant PREFIX = gtk_assistant_ ##struct _GtkAssistant ##{ ## GtkWindow parent; ## ## GtkWidget *cancel; ## GtkWidget *forward; ## GtkWidget *back; ## GtkWidget *apply; ## GtkWidget *close; ## GtkWidget *last; ## ## /*< private >*/ ## GtkAssistantPrivate *priv; ##}; GtkWidget_ornull * get_cancel_button (GtkAssistant * assistant) ALIAS: get_forward_button = 1 get_back_button = 2 get_apply_button = 3 get_close_button = 4 get_last_button = 5 CODE: switch (ix) { case 0: RETVAL = assistant->cancel; break; case 1: RETVAL = assistant->forward; break; case 2: RETVAL = assistant->back; break; case 3: RETVAL = assistant->apply; break; case 4: RETVAL = assistant->close; break; case 5: RETVAL = assistant->last; break; default: RETVAL = NULL; g_assert_not_reached (); } OUTPUT: RETVAL GtkWidget * gtk_assistant_new (class); C_ARGS: /*void*/ gint gtk_assistant_get_current_page (GtkAssistant *assistant); void gtk_assistant_set_current_page (GtkAssistant *assistant, gint page_num); gint gtk_assistant_get_n_pages (GtkAssistant *assistant); GtkWidget *gtk_assistant_get_nth_page (GtkAssistant *assistant, gint page_num); gint gtk_assistant_prepend_page (GtkAssistant *assistant, GtkWidget *page); gint gtk_assistant_append_page (GtkAssistant *assistant, GtkWidget *page); gint gtk_assistant_insert_page (GtkAssistant *assistant, GtkWidget *page, gint position); ## void gtk_assistant_set_forward_page_func (GtkAssistant *assistant, GtkAssistantPageFunc page_func, gpointer data, GDestroyNotify destroy); void gtk_assistant_set_forward_page_func (GtkAssistant *assistant, SV * func, SV * data=NULL); PREINIT: GPerlCallback * callback; CODE: callback = gtk2perl_assistant_page_func_create (func, data); gtk_assistant_set_forward_page_func (assistant, gtk2perl_assistant_page_func, callback, (GDestroyNotify) gperl_callback_destroy); void gtk_assistant_set_page_type (GtkAssistant *assistant, GtkWidget *page, GtkAssistantPageType type); GtkAssistantPageType gtk_assistant_get_page_type (GtkAssistant *assistant, GtkWidget *page); void gtk_assistant_set_page_title (GtkAssistant *assistant, GtkWidget *page, const gchar *title); const gchar *gtk_assistant_get_page_title (GtkAssistant *assistant, GtkWidget *page); void gtk_assistant_set_page_header_image (GtkAssistant *assistant, GtkWidget *page, GdkPixbuf *pixbuf); GdkPixbuf *gtk_assistant_get_page_header_image (GtkAssistant *assistant, GtkWidget *page); void gtk_assistant_set_page_side_image (GtkAssistant *assistant, GtkWidget *page, GdkPixbuf *pixbuf); GdkPixbuf *gtk_assistant_get_page_side_image (GtkAssistant *assistant, GtkWidget *page); void gtk_assistant_set_page_complete (GtkAssistant *assistant, GtkWidget *page, gboolean complete); gboolean gtk_assistant_get_page_complete (GtkAssistant *assistant, GtkWidget *page); void gtk_assistant_add_action_widget (GtkAssistant *assistant, GtkWidget *child); void gtk_assistant_remove_action_widget (GtkAssistant *assistant, GtkWidget *child); void gtk_assistant_update_buttons_state (GtkAssistant *assistant); #if GTK_CHECK_VERSION (2, 22, 0) void gtk_assistant_commit (GtkAssistant *assistant); #endif /* 2.22 */ Gtk2-1.2498/xs/GtkBin.xs000644 001750 000024 00000002057 11664366546 015734 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" MODULE = Gtk2::Bin PACKAGE = Gtk2::Bin PREFIX = gtk_bin_ GtkWidget * child (bin) GtkBin * bin CODE: RETVAL = gtk_bin_get_child (bin); OUTPUT: RETVAL GtkWidget * gtk_bin_get_child (bin) GtkBin * bin Gtk2-1.2498/xs/GtkBindings.xs000644 001750 000024 00000033774 11664366546 016773 0ustar00bdmanningstaff000000 000000 /* * Copyright 2009 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, see . */ #include "gtk2perl.h" /* GtkBindingSet is a struct treated here as a boxed type. As of Gtk 2.12 there's no GType for it, so that's created here, with a #ifndef in gtk2perl.h in case gtk gains it later. Once created a GtkBindingSet is never destroyed, so no ref counting and no distinction between "own" and "copy". ENHANCE-ME: Currently there's nothing to retrieve the contents of a bindingset at the perl level. The widget_path_pspecs and other pspecs use a private PatternMatch struct so are inaccessible. The linked list of GtkBindingEntry and their contained GtkBindingSignal might be extracted though, maybe in some form tolerably close to the kind of entry_add_signal() calls that would build the set. */ static GtkBindingSet * gtk2perl_binding_set_copy (GtkBindingSet *binding_set) { /* no copying */ return binding_set; } static void gtk2perl_binding_set_free (GtkBindingSet *binding_set) { PERL_UNUSED_VAR (binding_set); /* no freeing */ } GType gtk2perl_binding_set_get_type (void) { static GType binding_set_type = 0; if (binding_set_type == 0) binding_set_type = g_boxed_type_register_static ("GtkBindingSet", (GBoxedCopyFunc) gtk2perl_binding_set_copy, (GBoxedFreeFunc) gtk2perl_binding_set_free); return binding_set_type; } MODULE = Gtk2::BindingSet PACKAGE = Gtk2::BindingSet =for position DESCRIPTION =head1 DESCRIPTION A C is basically a mapping from keyval+modifiers to a named action signal to invoke and with argument values for the signal. Bindings are normally run by the C default C handler, but can also be activated explicitly. Binding sets can be populated from program code with C, or created from an RC file or string (see L). If you use the RC note it doesn't parse and create anything until there's someone interested in the result, such as C for widgets. This means binding sets in RC files or strings don't exist for C<< Gtk2::BindingSet->find >> to retrieve until at least one widget has been created (or similar). Currently there's no Perl-level access to the contents of a BindingSet, except for C. =cut ## Method name "set_name()" corresponds to the struct field name. The name ## might make you think it's a setter, like other set_foo() funcs, so the ## couple of words of apidoc here try to make that clear it's a getter, ## without labouring the point. =for apidoc Return the name of $binding_set. =cut gchar * set_name (binding_set) GtkBindingSet *binding_set CODE: RETVAL = binding_set->set_name; OUTPUT: RETVAL ## Note no field accessor for "priority", because as noted in the docs ## it is unused nowadays, and in fact contains garbage. (The priority ## from add_path() is buried in the private PatternSpec struct, ## establishing an order among the matches, and different places using ## the same GtkBindingSet can have different priorities ...) MODULE = Gtk2::BindingSet PACKAGE = Gtk2::BindingSet PREFIX = gtk_binding_set_ ## Is/was gtk_binding_entry_clear() something subtly different from ## gtk_binding_entry_remove()? The code for the two is different as ## of Gtk circa 2.16. ## ## void ## gtk_binding_entry_clear (binding_set, keyval, modifiers) ## GtkBindingSet *binding_set ## guint keyval ## GdkModifierType modifiers ## GtkBindingSet* gtk_binding_set_new (const gchar *set_name) ## GtkBindingSet* gtk_binding_set_find (const gchar *set_name) ## GtkBindingSet* gtk_binding_set_by_class (gpointer object_class) ## ## gtk_binding_set_new() copies the given set_name, so the string need ## not live beyond the call ## ## Only gtk_binding_set_find() needs the "ornull" return, new() and ## by_class() are never NULL. ## ## In other wrappers normally new() would be an "_own", find() not, ## and by_class() probably not, but as noted at the start of the file ## there's no copying or freeing of GtkBindingSet so no such ## distinction needed here. ## =for apidoc Gtk2::BindingSet::new =for signature GtkBindingSet = Gtk2::BindingSet->new ($set_name) =for arg set_name (string) =for arg name (__hide__) =cut =for apidoc Gtk2::BindingSet::find =for signature GtkBindingSet_ornull Gtk2::BindingSet->find ($set_name) =for arg set_name (string) =for arg name (__hide__) =cut =for apidoc Gtk2::BindingSet::by_class =for signature GtkBindingSet = Gtk2::BindingSet->by_class ($package_name) =for arg package_name (string) =for arg name (__hide__) =cut =for apidoc new __hide__ =for apidoc find __hide__ =for apidoc by_class __hide__ =cut GtkBindingSet_ornull* gtk_binding_set_new (class, name) const gchar *name ALIAS: find = 1 by_class = 2 CODE: switch (ix) { case 0: RETVAL = gtk_binding_set_new (name); break; case 1: RETVAL = gtk_binding_set_find (name); break; default: { GType type; GtkObjectClass *oclass; type = gperl_object_type_from_package (name); if (! type) croak ("package %s is not registered to a GType", name); if (! g_type_is_a (type, GTK_TYPE_OBJECT)) croak ("'%s' is not an object subclass", name); oclass = (GtkObjectClass*) g_type_class_ref (type); RETVAL = gtk_binding_set_by_class (oclass); g_type_class_unref (oclass); } break; } OUTPUT: RETVAL gboolean gtk_binding_set_activate (binding_set, keyval, modifiers, object) GtkBindingSet *binding_set guint keyval GdkModifierType modifiers GtkObject *object =for apidoc The following constants are defined for standard priority levels, Gtk2::GTK_PATH_PRIO_LOWEST Gtk2::GTK_PATH_PRIO_GTK Gtk2::GTK_PATH_PRIO_APPLICATION Gtk2::GTK_PATH_PRIO_THEME Gtk2::GTK_PATH_PRIO_RC Gtk2::GTK_PATH_PRIO_HIGHEST LOWEST, which is 0, and HIGHEST, which is 15, are the limits of the allowed priorities. The standard values are from the C enum, but the parameter here is an integer, not an enum string, so you can give a value for instance a little above or below the pre-defined levels. =cut void gtk_binding_set_add_path (binding_set, path_type, path_pattern, priority) GtkBindingSet *binding_set GtkPathType path_type const gchar *path_pattern int priority MODULE = Gtk2::BindingSet PACKAGE = Gtk2::BindingSet PREFIX = gtk_binding_ =for apidoc =for signature $binding_set->entry_add_signal ($keyval, $modifiers, $signal_name) =for signature $binding_set->entry_add_signal ($keyval, $modifiers, $signal_name, $type,$value, ...) =for arg type (string) =for arg value (scalar) =for arg ... (__hide__) Add an entry to $binding_set. $keyval and $modifier are setup as a binding for $signal_name and with signal parameters given by $value arguments. Each value is preceded by a type (a string), which must be one of Glib::Long Glib::Double Glib::String an enum type, ie. subtype of Glib::Enum Glib::Flags, or a flags subtype For example, $binding_set->entry_add_signal (Gtk2->keyval_from_name('Return'), [ 'control-mask' ], # modifiers 'some-signal-name', 'Glib::Double', 1.5, 'Glib::String, 'hello'); A parameter holds one of the three types Long, Double or String. When invoked they're coerced to the parameter types expected by the target object or widget. Use Glib::Long for any integer argument, including chars and unichars by ordinal value. Use Glib::Double for both single and double precision floats. Flags and enums are held as Longs in the BindingSet. You can pass an enum type and string and C will lookup and store accordingly. For example $binding_set->entry_add_signal (Gtk2->keyval_from_name('Escape), [], 'set-direction', 'Gtk2::Orientation', 'vertical'); Likewise flags from an arrayref, $binding_set->entry_add_signal (Gtk2->keyval_from_name('d'), [], 'initiate-drag', 'Gtk2::Gdk::DragAction', ['move,'ask']); If you've got a Glib::Flags object, rather than just an arrayref, then you can just give Glib::Flags as the type and the value is taken from the object. For example, my $flags = Gtk2::DebugFlag->new (['tree', 'updates']); $binding_set->entry_add_signal (Gtk2->keyval_from_name('x'), ['control-mask'], 'change-debug', 'Glib::Flags', $flags); =cut ## The list style "_signall" version is best here, rather than the ## varargs "_signal". "_signall" is marked as "deprecated" circa Gtk ## 2.12. Of course deprecated is not a word but in this case it means ## "useful feature taken away". As of Gtk 2.16 _signal is in fact ## implemented as a front end to _signall, though with some extra ## coercions on the args, allowing for instance GValue containing ## G_TYPE_INT to promote to G_TYPE_LONG. ## ## void gtk_binding_entry_add_signall (GtkBindingSet *binding_set, ## guint keyval, ## GdkModifierType modifiers, ## const gchar *signal_name, ## GSList *binding_args); ## ## void gtk_binding_entry_add_signal (GtkBindingSet *binding_set, ## guint keyval, ## GdkModifierType modifiers, ## const gchar *signal_name, ## guint n_args, ## ...); ## ## There may be some scope for expanding the helper "type"s accepted. ## For example 'Glib::Boolean' could take the usual perl true/false ## and turn it into 0 or 1. Or 'Glib::Unichar' could take a single ## char string and store its ordinal. Both can be done with ## 'Glib::Long' and a "!!" boolizing or ord() lookup, so it's just ## about what would be helpful and what would be useless bloat. The ## Flags and Enum provided are quite helpful because it's not ## particularly easy to extract the number. A Unichar would probably ## be bloat since there's no signals which take a char ordinal as a ## parameter, is there? ## void gtk_binding_entry_add_signal (binding_set, keyval, modifiers, signal_name, ...) GtkBindingSet *binding_set guint keyval GdkModifierType modifiers const gchar *signal_name PREINIT: const int first_argnum = 4; int count, i; GSList *binding_args = NULL; GtkBindingArg *ap; CODE: count = (items - first_argnum); if ((count % 2) != 0) { croak ("entry_add_signal expects type,value pairs " "(odd number of arguments detected)"); } count /= 2; ap = g_new (GtkBindingArg, count); for (i = 0; i < count; i += 2) { SV *sv_type = ST(i + first_argnum); SV *sv_value = ST(i + first_argnum + 1); GType gtype = gperl_type_from_package(SvPV_nolen(sv_type)); /* gtype==G_TYPE_NONE if sv_type is not registered; it falls * through to the "default:" error */ switch (G_TYPE_FUNDAMENTAL (gtype)) { case G_TYPE_LONG: ap[i].d.long_data = SvIV(sv_value); break; case G_TYPE_DOUBLE: ap[i].d.double_data = SvNV(sv_value); break; case G_TYPE_STRING: /* GTK_TYPE_IDENTIFIER comes through here, but * believe that's only a hangover from gtk 1.2 and * needs no special attention. */ /* gtk copies the string */ ap[i].d.string_data = SvPV_nolen(sv_value); break; /* helpers converting to the three basic types ... */ case G_TYPE_ENUM: /* coerce enum to long */ ap[i].d.long_data = gperl_convert_enum(gtype,sv_value); gtype = G_TYPE_LONG; break; case G_TYPE_FLAGS: /* coerce flags to long */ ap[i].d.long_data = gperl_convert_flags(gtype,sv_value); gtype = G_TYPE_LONG; break; default: g_slist_free (binding_args); g_free (ap); croak ("Unrecognised argument type '%s'", SvPV_nolen(sv_type)); } ap[i].arg_type = gtype; binding_args = g_slist_append (binding_args, &(ap[i])); } gtk_binding_entry_add_signall (binding_set, keyval, modifiers, signal_name, binding_args); g_slist_free (binding_args); g_free (ap); ## void gtk_binding_entry_remove (GtkBindingSet *binding_set, ## guint keyval, ## GdkModifierType modifiers); void gtk_binding_entry_remove (binding_set, keyval, modifiers) GtkBindingSet *binding_set guint keyval GdkModifierType modifiers CODE: gtk_binding_entry_remove (binding_set, keyval, modifiers); #if GTK_CHECK_VERSION (2, 12, 0) ## void gtk_binding_entry_skip (GtkBindingSet *binding_set, ## guint keyval, ## GdkModifierType modifiers); void gtk_binding_entry_skip (binding_set, keyval, modifiers) GtkBindingSet *binding_set guint keyval GdkModifierType modifiers CODE: gtk_binding_entry_skip (binding_set, keyval, modifiers); #endif MODULE = Gtk2::BindingSet PACKAGE = Gtk2::Object PREFIX = gtk_ =for apidoc Although C and C are C methods, as of Gtk 2.12 binding sets are only associated with widgets so on an object as such the return is always false (no binding activated). Further, although C and binding sets are both expressed in terms of keyvals, internally the lookup is by keycode. If a keyval cannot be generated by at least one keycode/modifier combination (see L) then it cannot be activated. In particular this means keyvals like C which are not actual keys cannot be dispatched by C (returning false for no binding activated). =cut gboolean gtk_bindings_activate (object, keyval, modifiers) GtkObject *object guint keyval GdkModifierType modifiers #if GTK_CHECK_VERSION(2, 4, 0) gboolean gtk_bindings_activate_event (object, event) GtkObject *object GdkEvent *event PREINIT: GdkEventType type; CODE: type = event->type; if (type != GDK_KEY_PRESS && type != GDK_KEY_RELEASE) croak ("Event must be key-press or key-release"); RETVAL = gtk_bindings_activate_event (object, (GdkEventKey*) event); OUTPUT: RETVAL #endif Gtk2-1.2498/xs/GtkBox.xs000644 001750 000024 00000004626 11664366546 015760 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" MODULE = Gtk2::Box PACKAGE = Gtk2::Box PREFIX = gtk_box_ void gtk_box_pack_start (box, child, expand, fill, padding) GtkBox *box GtkWidget *child gboolean expand gboolean fill guint padding void gtk_box_pack_end (box, child, expand, fill, padding) GtkBox *box GtkWidget *child gboolean expand gboolean fill guint padding void gtk_box_pack_start_defaults (box, widget) GtkBox *box GtkWidget *widget void gtk_box_pack_end_defaults (box, widget) GtkBox *box GtkWidget *widget void gtk_box_set_homogeneous (box, homogeneous) GtkBox *box gboolean homogeneous gboolean gtk_box_get_homogeneous (box) GtkBox *box void gtk_box_set_spacing (box, spacing) GtkBox *box gint spacing gint gtk_box_get_spacing (box) GtkBox *box void gtk_box_reorder_child (box, child, position) GtkBox *box GtkWidget *child gint position # void gtk_box_query_child_packing (GtkBox * box, GtkWidget * child, gboolean &expand, gboolean &fill, guint &padding, GtkPackType &pack_type) void gtk_box_query_child_packing (GtkBox * box, GtkWidget * child) PREINIT: gboolean expand; gboolean fill; guint padding; GtkPackType pack_type; PPCODE: gtk_box_query_child_packing (box, child, &expand, &fill, &padding, &pack_type); EXTEND (SP, 4); PUSHs (sv_2mortal (boolSV (expand))); PUSHs (sv_2mortal (boolSV (fill))); PUSHs (sv_2mortal (newSVuv (padding))); PUSHs (sv_2mortal (newSVGtkPackType (pack_type))); void gtk_box_set_child_packing (box, child, expand, fill, padding, pack_type) GtkBox *box GtkWidget *child gboolean expand gboolean fill guint padding GtkPackType pack_type Gtk2-1.2498/xs/GtkBuildable.xs000644 001750 000024 00000066535 11664366546 017122 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2007, 2010 by the gtk2-perl team (see the file AUTHORS) * * Licensed under the LGPL, see LICENSE file for more information. * * $Id$ */ #include "gtk2perl.h" /* Since perl already has a metric ton of XML parsers, Glib doesn't wrap GMarkupParser. This is a miniature binding of just the bits of GMarkupParser that GtkBuildable needs. The GMarkupParseContext is blessed as a Gtk2::Builder::ParseContext, and has only the user-usable methods bound. (Should it happen that we need to bind GMarkupParseContext in Glib in the future, we can just move those methods to Glib, and have Gtk2::Builder::ParseContext inherit from Glib::Markup::ParseContext.) Builder doesn't use passthrough() and error(), but they were easy to implement and will be there if and when Builder does start to use them. */ static SV * newSVGtkBuildableParseContext (GMarkupParseContext * context) { return sv_setref_pv (newSV (0), "Gtk2::Buildable::ParseContext", context); } static GMarkupParseContext * SvGtkBuildableParseContext (SV * sv) { if (! gperl_sv_is_defined (sv) || ! SvROK (sv)) croak ("expected a blessed reference"); if (! sv_derived_from (sv, "Gtk2::Buildable::ParseContext")) croak ("%s is not of type Gtk2::Buildable::ParseContext", gperl_format_variable_for_output (sv)); return INT2PTR (GMarkupParseContext *, SvIV (SvRV (sv))); } static SV * check_parser (gpointer user_data) { SV * sv = user_data; if (! gperl_sv_is_defined (sv) || ! SvROK (sv)) croak ("parser object is not an object"); return sv; } /* * Treat parser as an SV object, and call method on it in void context, with * the extra args from the va list. You are expected to do any necessary * sv_2mortal() and such on those. An exception will be converted to a GError. */ static void call_parser_method (GError ** error, gpointer parser, GMarkupParseContext * context, const char * method, int n_args, ...) { va_list ap; dSP; ENTER; SAVETMPS; PUSHMARK (SP); EXTEND (SP, 2 + n_args); PUSHs (check_parser (parser)); PUSHs (sv_2mortal (newSVGtkBuildableParseContext (context))); va_start (ap, n_args); while (n_args-- > 0) { SV * sv = va_arg (ap, SV *); PUSHs (sv); } va_end (ap); PUTBACK; call_method (method, G_VOID | G_DISCARD | G_EVAL); SPAGAIN; if (gperl_sv_is_defined (ERRSV) && SvTRUE (ERRSV)) { if (SvROK (ERRSV) && sv_derived_from (ERRSV, "Glib::Error")) { gperl_gerror_from_sv (ERRSV, error); } else { /* g_error_new_literal() won't let us pass 0 for * the domain... */ g_set_error (error, 0, 0, "%s", SvPV_nolen (ERRSV)); } } FREETMPS; LEAVE; } /* Called for open tags */ static void gtk2perl_buildable_parser_start_element (GMarkupParseContext *context, const gchar *element_name, const gchar **attribute_names, const gchar **attribute_values, gpointer user_data, GError **error) { HV * hv; SV * attrs; int i; hv = newHV (); attrs = newRV_noinc ((SV *) hv); for (i = 0; attribute_names[i] != NULL ; i++) gperl_hv_take_sv ( hv, attribute_names[i], strlen (attribute_names[i]), newSVGChar (attribute_values[i])); call_parser_method (error, user_data, context, "START_ELEMENT", 2, sv_2mortal (newSVGChar (element_name)), sv_2mortal (attrs)); } /* Called for close tags */ static void gtk2perl_buildable_parser_end_element (GMarkupParseContext *context, const gchar *element_name, gpointer user_data, GError **error) { call_parser_method (error, user_data, context, "END_ELEMENT", 1, sv_2mortal (newSVGChar (element_name))); } /* Called for character data */ /* text is not nul-terminated */ static void gtk2perl_buildable_parser_text (GMarkupParseContext *context, const gchar *text, gsize text_len, gpointer user_data, GError **error) { SV * text_sv; text_sv = newSVpv (text, text_len); SvUTF8_on (text_sv); call_parser_method (error, user_data, context, "TEXT", 1, sv_2mortal (text_sv)); } /* Called for strings that should be re-saved verbatim in this same * position, but are not otherwise interpretable. At the moment * this includes comments and processing instructions. */ /* text is not nul-terminated. */ static void gtk2perl_buildable_parser_passthrough (GMarkupParseContext *context, const gchar *passthrough_text, gsize text_len, gpointer user_data, GError **error) { SV * text_sv; text_sv = newSVpv (passthrough_text, text_len); SvUTF8_on (text_sv); call_parser_method (error, user_data, context, "PASSTHROUGH", 1, sv_2mortal (text_sv)); } /* Called on error, including one set by other * methods in the vtable. The GError should not be freed. */ static void gtk2perl_buildable_parser_error (GMarkupParseContext *context, GError *error, gpointer user_data) { dSP; ENTER; SAVETMPS; PUSHMARK (SP); EXTEND (SP, 2); PUSHs (check_parser (user_data)); PUSHs (sv_2mortal (newSVGtkBuildableParseContext (context))); PUSHs (sv_2mortal (gperl_sv_from_gerror (error))); PUTBACK; call_method ("ERROR", G_VOID | G_DISCARD); SPAGAIN; FREETMPS; LEAVE; PERL_UNUSED_VAR (context); } static const GMarkupParser mini_markup_parser = { gtk2perl_buildable_parser_start_element, gtk2perl_buildable_parser_end_element, gtk2perl_buildable_parser_text, gtk2perl_buildable_parser_passthrough, gtk2perl_buildable_parser_error }; /* * Now, support for GtkBuildableIface. */ #define GET_METHOD(object, name) \ HV * stash = gperl_object_stash_from_type (G_OBJECT_TYPE (object)); \ GV * slot = gv_fetchmethod (stash, name); #define METHOD_EXISTS (slot && GvCV (slot)) #define GET_METHOD_OR_DIE(obj, name) \ GET_METHOD (obj, name); \ if (! METHOD_EXISTS) \ die ("No implementation for %s::%s\n", \ gperl_package_from_type (G_OBJECT_TYPE (obj)), name); #define PREP(obj) \ dSP; \ ENTER; \ SAVETMPS; \ PUSHMARK (SP) ; \ PUSHs (sv_2mortal (newSVGObject (G_OBJECT (obj)))); #define CALL_VOID \ PUTBACK; \ call_sv ((SV *) GvCV (slot), G_VOID | G_DISCARD); #define CALL_SCALAR(sv) \ PUTBACK; \ (void) call_sv ((SV *) GvCV (slot), G_SCALAR); \ SPAGAIN; \ sv = POPs; \ PUTBACK; #define FINISH \ FREETMPS; \ LEAVE; static void gtk2perl_buildable_set_name (GtkBuildable *buildable, const gchar *name) { GET_METHOD (buildable, "SET_NAME"); if (METHOD_EXISTS) { PREP (buildable); XPUSHs (sv_2mortal (newSVGChar (name))); CALL_VOID; FINISH; } else { /* Convenient fallback for mere mortals who need nothing complicated. This is the same as in the upstream implementation. */ g_object_set_data_full (G_OBJECT (buildable), "gtk-builder-name", g_strdup (name), g_free); } } static const gchar * gtk2perl_buildable_get_name (GtkBuildable *buildable) { const gchar * name; GET_METHOD (buildable, "GET_NAME"); if (METHOD_EXISTS) { SV * sv; PREP (buildable); CALL_SCALAR (sv); /* * the interface wants us to return a const pointer, which * means this needs to stay alive. Unfortunately, we can't * guarantee that the scalar will still be around by the * time the string is used. My first thought here was to * use gperl_alloc_temp(), but that suffered the same * lifetime issue, because the string was immediately * returned to perl code, which meant that the temp was * cleaned up an reused before the string was read. * So, we'll go a little nuts and store a malloc'd copy * of the string until the next call. In theory, some * code might be crazy enough to return a different name * on the second call, so we won't bother with real caching. */ name = g_strdup (SvGChar (sv)); g_object_set_data_full (G_OBJECT (buildable), "gtk-perl-builder-name", g_strdup (name), g_free); FINISH; } else { /* Convenient fallback for mere mortals who need nothing complicated. This is the same as in the upstream implementation. */ name = (const gchar *) g_object_get_data (G_OBJECT (buildable), "gtk-builder-name"); } return name; } static void gtk2perl_buildable_add_child (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, const gchar *type) { GET_METHOD_OR_DIE (buildable, "ADD_CHILD"); { PREP (buildable); XPUSHs (sv_2mortal (newSVGtkBuilder (builder))); XPUSHs (sv_2mortal (newSVGObject (child))); XPUSHs (sv_2mortal (newSVGChar (type))); CALL_VOID; FINISH; } } static void gtk2perl_buildable_set_buildable_property (GtkBuildable *buildable, GtkBuilder *builder, const gchar *name, const GValue *value) { GET_METHOD (buildable, "SET_BUILDABLE_PROPERTY"); if (METHOD_EXISTS) { PREP (buildable); XPUSHs (sv_2mortal (newSVGtkBuilder (builder))); XPUSHs (sv_2mortal (newSVGChar (name))); XPUSHs (sv_2mortal (gperl_sv_from_value (value))); CALL_VOID; FINISH; } else g_object_set_property (G_OBJECT (buildable), name, value); } /* Nobody should really ever need this one; it's a special case for * GtkUIManager... but, just in case. */ static GObject * gtk2perl_buildable_construct_child (GtkBuildable *buildable, GtkBuilder *builder, const gchar *name) { GObject * child; GET_METHOD_OR_DIE (buildable, "CONSTRUCT_CHILD"); { SV * sv; PREP (buildable); XPUSHs (sv_2mortal (newSVGtkBuilder (builder))); XPUSHs (sv_2mortal (newSVGChar (name))); CALL_SCALAR (sv); child = SvGObject (sv); FINISH; } return child; } static gboolean gtk2perl_buildable_custom_tag_start (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, const gchar *tagname, GMarkupParser *parser, gpointer *data) { gboolean ret = FALSE; GET_METHOD_OR_DIE (buildable, "CUSTOM_TAG_START"); *data = NULL; memset (parser, 0, sizeof (*parser)); { SV * sv; PREP (buildable); XPUSHs (sv_2mortal (newSVGtkBuilder (builder))); XPUSHs (sv_2mortal (newSVGObject (child))); XPUSHs (sv_2mortal (newSVGChar (tagname))); CALL_SCALAR (sv); if (gperl_sv_is_defined (sv)) { ret = TRUE; /* keep it... we'll destroy it in custom-finished, * below, regardless of whether the perl code * actually does anything with it. */ *data = newSVsv (sv); *parser = mini_markup_parser; } FINISH; } return ret; } static void gtk2perl_buildable_custom_tag_end (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, const gchar *tagname, gpointer *data) { GET_METHOD (buildable, "CUSTOM_TAG_END"); if (METHOD_EXISTS) { SV * parser = gperl_sv_is_defined ((SV *) data) ? (SV *) data : &PL_sv_undef; PREP (buildable); XPUSHs (sv_2mortal (newSVGtkBuilder (builder))); XPUSHs (sv_2mortal (newSVGObject (child))); XPUSHs (sv_2mortal (newSVGChar (tagname))); XPUSHs (parser); CALL_VOID; FINISH; } } static void gtk2perl_buildable_custom_finished (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, const gchar *tagname, gpointer data) { SV * parser = gperl_sv_is_defined ((SV *) data) ? (SV *) data : &PL_sv_undef; GET_METHOD (buildable, "CUSTOM_FINISHED"); if (METHOD_EXISTS) { PREP (buildable); XPUSHs (sv_2mortal (newSVGtkBuilder (builder))); XPUSHs (sv_2mortal (newSVGObject (child))); XPUSHs (sv_2mortal (newSVGChar (tagname))); XPUSHs (parser); CALL_VOID; FINISH; } if (parser != &PL_sv_undef) /* No further use for this. */ SvREFCNT_dec (parser); } static void gtk2perl_buildable_parser_finished (GtkBuildable *buildable, GtkBuilder *builder) { GET_METHOD (buildable, "PARSER_FINISHED"); if (METHOD_EXISTS) { PREP (buildable); XPUSHs (sv_2mortal (newSVGtkBuilder (builder))); CALL_VOID; FINISH; } } static GObject * gtk2perl_buildable_get_internal_child (GtkBuildable *buildable, GtkBuilder *builder, const gchar *childname) { GObject * child = NULL; GET_METHOD (buildable, "GET_INTERNAL_CHILD"); if (METHOD_EXISTS) { SV * sv; PREP (buildable); XPUSHs (sv_2mortal (newSVGtkBuilder (builder))); XPUSHs (sv_2mortal (newSVGChar (childname))); CALL_SCALAR (sv); child = SvGObject_ornull (sv); FINISH; } return child; } static void gtk2perl_buildable_init (GtkBuildableIface * iface) { iface->set_name = gtk2perl_buildable_set_name; iface->get_name = gtk2perl_buildable_get_name; iface->add_child = gtk2perl_buildable_add_child; iface->set_buildable_property = gtk2perl_buildable_set_buildable_property; iface->construct_child = gtk2perl_buildable_construct_child; iface->custom_tag_start = gtk2perl_buildable_custom_tag_start; iface->custom_tag_end = gtk2perl_buildable_custom_tag_end; iface->custom_finished = gtk2perl_buildable_custom_finished; iface->parser_finished = gtk2perl_buildable_parser_finished; iface->get_internal_child = gtk2perl_buildable_get_internal_child; } MODULE = Gtk2::Buildable PACKAGE = Gtk2::Buildable PREFIX = gtk_buildable_ =for object Gtk2::Buildable - Interface for objects that can be built by Gtk2::Builder =cut =for apidoc __hide__ =cut void _ADD_INTERFACE (class, const char * target_class) CODE: { static const GInterfaceInfo iface_info = { (GInterfaceInitFunc) gtk2perl_buildable_init, (GInterfaceFinalizeFunc) NULL, (gpointer) NULL }; GType gtype = gperl_object_type_from_package (target_class); g_type_add_interface_static (gtype, GTK_TYPE_BUILDABLE, &iface_info); } # # NOTE: The interface methods here really aren't useful in perl code, # since they are meant to be called by GtkBuilder. I find it # highly improbable that anyone would want to go to the trouble # to reimplement GtkBuilder in perl, though i guess it's # technically possible... Since these were part of the 1.160 # stable release, they can't be removed. Instead, we'll just # hide all of them, so we can focus the docs on how to implement # a buildable, instead of on how to use one. # # These two theoretically collide with Gtk2::Widget::set_name and get_name when # dealing with Gtk2::Widgets. Fortunately though, GtkWidget maps these vfuncs # to gtk_widget_set_name and _get_name anyway. =for apidoc __hide__ =cut void gtk_buildable_set_name (GtkBuildable *buildable, const gchar *name); =for apidoc __hide__ =cut const gchar * gtk_buildable_get_name (GtkBuildable *buildable); =for apidoc __hide__ =cut void gtk_buildable_add_child (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, const gchar_ornull *type); # void gtk_buildable_set_buildable_property (GtkBuildable *buildable, GtkBuilder *builder, const gchar *name, const GValue *value); =for apidoc __hide__ =for signature $buildable->set_buildable_property ($builder, key => $value, ...) =for arg ... (__hide__) =cut void gtk_buildable_set_buildable_property (GtkBuildable *buildable, GtkBuilder *builder, ...) PREINIT: GValue value = {0,}; int i; CODE: #define OFFSET 2 if (0 != ((items - OFFSET) % 2)) croak ("set_property expects name => value pairs " "(odd number of arguments detected)"); for (i = OFFSET; i < items; i += 2) { gchar *name = SvGChar (ST (i)); SV *newval = ST (i + 1); GParamSpec *pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (buildable), name); if (!pspec) { const char *classname = gperl_object_package_from_type (G_OBJECT_TYPE (buildable)); if (!classname) classname = G_OBJECT_TYPE_NAME (buildable); croak ("type %s does not support property '%s'", classname, name); } g_value_init (&value, G_PARAM_SPEC_VALUE_TYPE (pspec)); gperl_value_from_sv (&value, newval); gtk_buildable_set_buildable_property (buildable, builder, name, &value); g_value_unset (&value); } #undef OFFSET # The caller will take ownership of the child. =for apidoc __hide__ =cut GObject_noinc * gtk_buildable_construct_child (GtkBuildable *buildable, GtkBuilder *builder, const gchar *name); # # We should not need to expose these, as they are used by GtkBuilder to # allow the Buildable to handle its own tags during parsing. Unless somebody # wants to reimplement GtkBuilder in perl code, these won't be useful. # Besides, the dependency on GMarkupParser is a bit problematic. # # gboolean gtk_buildable_custom_tag_start (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, const gchar *tagname, GMarkupParser *parser, gpointer *data); # void gtk_buildable_custom_tag_end (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, const gchar *tagname, gpointer *data); # void gtk_buildable_custom_finished (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, const gchar *tagname, gpointer data); =for apidoc __hide__ =cut void gtk_buildable_parser_finished (GtkBuildable *buildable, GtkBuilder *builder); =for apidoc __hide__ =cut GObject * gtk_buildable_get_internal_child (GtkBuildable *buildable, GtkBuilder *builder, const gchar *childname); MODULE = Gtk2::Buildable PACKAGE = Gtk2::Buildable::ParseContext PREFIX = g_markup_parse_context_ # # NOTE: This is a minimal binding for the parts of GMarkupParseContext # a user would need from the Buildable custom tag handlers. # Should GMarkupParseContext be bound in Glib, remove these methods # and have Gtk2::Builder::ParseContext inherit them from Glib. # =for object Gtk2::Buildable::ParseContext =head1 DESCRIPTION This object contains context of the XML subset parser used by Gtk2::Builder. Objects of this type will be passed to the methods invoked on the parser returned from your Gtk2::Buildable's C. You should use these methods to create useful error messages, as necessary. =cut =for see_also Gtk2::Buildable =cut =for apidoc =for signature string = $parse_context->get_element Return the name of the currently open element. =cut const gchar * g_markup_parse_context_get_element (SV * sv); C_ARGS: SvGtkBuildableParseContext (sv) #if GLIB_CHECK_VERSION(2, 16, 0) =for apidoc =for signature list = $parse_context->get_element_stack Returns the element stack; the first item is the currently-open tag (which would be returned by C), and the next item is its immediate parent. =cut void g_markup_parse_context_get_element_stack (SV * sv); PREINIT: const GSList * list; PPCODE: list = g_markup_parse_context_get_element_stack (SvGtkBuildableParseContext (sv)); while (list) { XPUSHs (sv_2mortal (newSVGChar (list->data))); list = list->next; } #endif =for apidoc =for signature (line_number, char_number) = $parse_context->get_position =cut void g_markup_parse_context_get_position (SV * sv) PREINIT: int line_number; int char_number; PPCODE: g_markup_parse_context_get_position (SvGtkBuildableParseContext (sv), &line_number, &char_number); EXTEND (SP, 2); PUSHs (sv_2mortal (newSViv (line_number))); PUSHs (sv_2mortal (newSViv (char_number))); MODULE = Gtk2::Buildable PACKAGE = Gtk2::Buildable =for position SYNOPSIS =head1 SYNOPSIS package Thing; use Gtk2; use Glib::Object::Subclass Glib::Object::, # Some signals and properties on the object... signals => { exploderize => {}, }, properties => [ Glib::ParamSpec->int ('force', 'Force', 'Explosive force, in megatons', 0, 1000000, 5, ['readable', 'writable']), ], ; sub exploderize { my $self = shift; $self->signal_emit ('exploderize'); } # We can accept all defaults for Buildable; see the description # for details on custom XML. package main; use Gtk2 -init; my $builder = Gtk2::Builder->new (); $builder->add_from_string (' 50 '); $builder->connect_signals (); my $thing = $builder->get_object ('thing1'); $thing->exploderize (); sub do_explode { my $thing = shift; printf "boom * %d!\n", $thing->get ('force'); } # This program prints "boom * 50!" on stdout. =cut =head1 DESCRIPTION The Gtk2::Buildable interface allows objects and widgets to have C<< >> objects, special property settings, or extra custom tags in a Gtk2::Builder UI description (L). The main user of the Gtk2::Buildable interface is Gtk2::Builder, so there should be very little need for applications to call any of the Gtk2::Buildable methods. So this documentation deals with implementing a buildable object. Gtk2::Builder already supports plain Glib::Object or Gtk2::Widget with C<< >> construction and C<< >> settings, so often the C interface is not needed. The only thing to note is that an object or widget implemented in Perl must be loaded before building. =head1 OVERRIDING BUILDABLE INTERFACE METHODS The buildable interface can be added to a Perl code object or widget subclass by putting C in the interfaces list and implementing the following methods. In current Gtk2-Perl the custom tags code doesn't chain up to any buildable interfaces in superclasses. This means for instance if you implement Gtk2::Buildable on a new widget subclass then you lose the and tags normally available from Gtk2::Widget. This will likely change in the future, probably by chaining up by default for unhandled tags, maybe with a way to ask deliberately not to chain. =over =item SET_NAME ($self, $name) =over =item * $name (string) =back This method should store I<$name> in I<$self> somehow. For example, Gtk2::Widget maps this to the Gtk2::Widget's C property. If you don't implement this method, the name will be attached in object data down in C code. Implement this method if your object has some notion of "name" and it makes sense to map the XML name attribute to that. =item string = GET_NAME ($self) If you implement C, you need to implement this method to retrieve that name. =item ADD_CHILD ($self, $builder, $child, $type) =over =item * $builder (Gtk2::Builder) =item * $child (Glib::Object or undef) =item * $type (string) =back C will be called to add I<$child> to I<$self>. I<$type> can be used to determine the kind of child. For example, Gtk2::Container implements this method to add a child widget to the container, and Gtk2::Notebook uses I<$type> to distinguish between "page-label" and normal children. The value of I<$type> comes directly from the C attribute of the XML C tag. =item SET_BUILDABLE_PROPERTY ($self, $builder, $name, $value) =over =item * $builder (Gtk2::Builder) =item * $name (string) =item * $value (scalar) =back This will be called to set the object property I<$name> on I<$self>, directly from the C XML tag. It is not normally necessary to implement this method, as the fallback simply calls C. Gtk2::Window implements this method to delay showing itself (i.e., setting the "visible" property) until the whole interface is created. You can also use this to handle properties that are not wired up through the Glib::Object property system (though simply creating the property is easier). =item parser or undef = CUSTOM_TAG_START ($self, $builder, $child, $tagname) =over =item * $builder (Gtk2::Builder) =item * $child (Glib::Object or undef) =item * $tagname (string) =back When Gtk2::Builder encounters an unknown tag while parsing the definition of I<$self>, it will call C to give your code a chance to do something with it. If I<$tagname> was encountered inside a C tag, the corresponding object will be passed in I<$child>; otherwise, I<$child> will be C. Your C method should decide whether it supports I<$tagname>. If not, return C. If you do support it, return a blessed perl object that implements three special methods to be used to parse that tag. (These methods are defined by GLib's GMarkupParser, which is a simple SAX-style setup.) =over =item START_ELEMENT ($self, $context, $element_name, $attributes) =over =item * $context (Gtk2::Buildable::ParseContext) =item * $element_name (string) =item * $attributes (hash reference) Dictionary of all attributes of this tag. =back =item TEXT ($self, $context, $text) =over =item * $context (Gtk2::Buildable::ParseContext) =item * $text (string) The text contained in the tag. =back =item END_ELEMENT ($self, $context, $element_name) =over =item * $context (Gtk2::Buildable::ParseContext) =item * $element_name (string) =back =back Any blessed perl object that implements these methods is valid as a parser. (Ain't duck-typing great?) Gtk2::Builder will hang on to this object until the parsing is complete, and will pass it to C and C, so you shouldn't have to worry about its lifetime. =item CUSTOM_TAG_END ($self, $builder, $child, $tagname, $parser) =over =item * $builder (Gtk2::Builder) =item * $child (Glib::Object or undef) =item * $tagname (string) =item * $parser (some perl object) as returned from C =back This method will be called (if it exists) when the close tag for I<$tagname> is encountered. I<$parser> will be the object you returned from C. I<$child> is the same object-or-undef as passed to C. =item CUSTOM_FINISHED ($self, $builder, $child, $tagname, $parser) =over =item * $builder (Gtk2::Builder) =item * $child (Glib::Object or undef) =item * $tagname (string) =item * $parser (some perl object) as returned from C =back This method will be called (if it exists) when the parser finishes dealing with the custom tag I<$tagname>. I<$parser> will be the object you returned from C. I<$child> is the same object-or-undef as passed to C. =item PARSER_FINISHED ($self, $builder) =over =item * $builder (Gtk2::Builder) =back If this method exists, it will be invoked when the builder finishes parsing the description data. This method is handy if you need to defer any object initialization until all of the rest of the input is parsed, most likely because you need to refer to an object that is declared after I<$self> or you need to perform special cleanup actions. It is not normally necessary to implement this method. =item object or undef = GET_INTERNAL_CHILD ($self, $builder, $childname) =over =item * $builder (Gtk2::Builder) =item * $childname (string) =back This will be called to fetch an internal child of I<$self>. Implement this method if your buildable has internal children that need to be accessed from a UI definition. For example, Gtk2::Dialog implements this to give access to its internal vbox child. If I<$childname> is unknown then return C. (The builder will then generally report a GError for the UI description referring to an unknown child.) =back =cut =for see_also http://library.gnome.org/devel/gtk/unstable/GtkBuilder.html#BUILDER-UI =cut =for see_also Gtk2::Buildable::ParseContext =cut Gtk2-1.2498/xs/GtkBuilder.xs000644 001750 000024 00000016144 12561765037 016607 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2007, 2012 by the gtk2-perl team (see the file AUTHORS) * * Licensed under the LGPL, see LICENSE file for more information. * * $Id$ */ #include "gtk2perl.h" /* This doesn't belong here. But currently, this is the only place a GType for * GConnectFlags is needed, so adding extra API to Glib doesn't seem justified. */ static GType gtk2perl_connect_flags_get_type (void) { static GType etype = 0; if (etype == 0) { static const GFlagsValue values[] = { { G_CONNECT_AFTER, "G_CONNECT_AFTER", "after" }, { G_CONNECT_SWAPPED, "G_CONNECT_SWAPPED", "swapped" }, { 0, NULL, NULL } }; /* This is actually a race condition, but I don't think it * matters too much in this case. */ etype = g_type_from_name ("GConnectFlags"); if (etype == 0) { etype = g_flags_register_static ("GConnectFlags", values); } } return etype; } static GPerlCallback * gtk2perl_builder_connect_func_create (SV *func, SV *data) { GType param_types[] = { GTK_TYPE_BUILDER, G_TYPE_OBJECT, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_OBJECT, gtk2perl_connect_flags_get_type () }; return gperl_callback_new (func, data, G_N_ELEMENTS (param_types), param_types, G_TYPE_NONE); } static void gtk2perl_builder_connect_func (GtkBuilder *builder, GObject *object, const gchar *signal_name, const gchar *handler_name, GObject *connect_object, GConnectFlags flags, gpointer user_data) { gperl_callback_invoke ((GPerlCallback *) user_data, NULL, builder, object, signal_name, handler_name, connect_object, flags); } MODULE = Gtk2::Builder PACKAGE = Gtk2::Builder PREFIX = gtk_builder_ BOOT: if (!gperl_type_from_package ("Glib::ConnectFlags")) { gperl_register_fundamental (gtk2perl_connect_flags_get_type (), "Glib::ConnectFlags"); } gperl_register_error_domain (GTK_BUILDER_ERROR, GTK_TYPE_BUILDER_ERROR, "Gtk2::Builder::Error"); GtkBuilder_noinc * gtk_builder_new (class) C_ARGS: /* void */ # guint gtk_builder_add_from_file (GtkBuilder *builder, const gchar *filename, GError **error); =for apidoc __gerror__ =cut guint gtk_builder_add_from_file (GtkBuilder *builder, GPerlFilename filename) PREINIT: GError *error = NULL; CODE: RETVAL = gtk_builder_add_from_file (builder, filename, &error); if (error) gperl_croak_gerror (NULL, error); OUTPUT: RETVAL # guint gtk_builder_add_from_string (GtkBuilder *builder, const gchar *buffer, gsize length, GError **error); =for apidoc __gerror__ =cut guint gtk_builder_add_from_string (GtkBuilder *builder, const gchar *buffer) PREINIT: gsize length; GError *error = NULL; CODE: length = sv_len (ST (1)); RETVAL = gtk_builder_add_from_string (builder, buffer, length, &error); if (error) gperl_croak_gerror (NULL, error); OUTPUT: RETVAL GObject * gtk_builder_get_object (GtkBuilder *builder, const gchar *name); # GSList * gtk_builder_get_objects (GtkBuilder *builder); void gtk_builder_get_objects (GtkBuilder *builder) PREINIT: GSList *list, *i; PPCODE: list = gtk_builder_get_objects (builder); for (i = list; i != NULL; i = i->next) { XPUSHs (sv_2mortal (newSVGObject (i->data))); } g_slist_free (list); #if 0 /* evil hack to convince Glib::GenPod to output docs for connect_signals */ # connect_signals is implemented in Gtk2.pm =for apidoc Gtk2::Builder::connect_signals =for signature $builder->connect_signals ($user_data) =for signature $builder->connect_signals ($user_data, $package) =for signature $builder->connect_signals ($user_data, %handlers) =for arg ... (__hide__) There are four ways to let Gtk2::Builder do the signal connecting work for you: =over =item C<< $builder->connect_signals ($user_data) >> When invoked like this, Gtk2::Builder will connect signals to functions in the calling package. The callback names are specified in the UI description. =item C<< $builder->connect_signals ($user_data, $package) >> When invoked like this, Gtk2::Builder will connect signals to functions in the package I<$package>. =item C<< $builder->connect_signals ($user_data, $object) >> When invoked like this, Gtk2::Builder will connect signals to method calls against the object $object. =item C<< $builder->connect_signals ($user_data, %handlers) >> When invoked like this, I<%handlers> is used as a mapping from handler names to code references. =back =cut void gtk_builder_connect_signals (GtkBuilder *builder, ...); #endif /* evil hack */ # void gtk_builder_connect_signals_full (GtkBuilder *builder, GtkBuilderConnectFunc func, gpointer user_data); void gtk_builder_connect_signals_full (GtkBuilder *builder, SV *func, SV *user_data=NULL); PREINIT: GPerlCallback *callback; CODE: callback = gtk2perl_builder_connect_func_create (func, user_data); gtk_builder_connect_signals_full ( builder, gtk2perl_builder_connect_func, callback); gperl_callback_destroy (callback); void gtk_builder_set_translation_domain (GtkBuilder *builder, const gchar_ornull *domain); const gchar_ornull * gtk_builder_get_translation_domain (GtkBuilder *builder); # Are these needed? # GType gtk_builder_get_type_from_name (GtkBuilder *builder, const char *type_name); # gboolean gtk_builder_value_from_string (GParamSpec *pspec, const gchar *string, GValue *value); # gboolean gtk_builder_value_from_string_type (GType type, const gchar *string, GValue *value); #if GTK_CHECK_VERSION (2, 14, 0) =for apidoc __hide__ =cut # guint gtk_builder_add_objects_from_file (GtkBuilder *builder, const gchar *filename, gchar **object_ids, GError **error); guint gtk_builder_add_objects_from_file (GtkBuilder *builder, const gchar *filename, gchar *first_object_id, ...) PREINIT: gchar **object_ids = NULL; GError *error = NULL; int i; CODE: #define FIRST_ITEM 2 object_ids = g_new0 (gchar *, items - FIRST_ITEM + 1); /* NULL-terminate */ object_ids[0] = first_object_id; for (i = FIRST_ITEM + 1; i < items; i++) { object_ids[i - FIRST_ITEM] = SvGChar (ST (i)); } RETVAL = gtk_builder_add_objects_from_file ( builder, filename, object_ids, &error); if (!RETVAL) { gperl_croak_gerror (NULL, error); } g_free (object_ids); #undef FIRST_ITEM OUTPUT: RETVAL # guint gtk_builder_add_objects_from_string (GtkBuilder *builder, const gchar *buffer, gsize length, gchar **object_ids, GError **error); guint gtk_builder_add_objects_from_string (GtkBuilder *builder, const gchar *buffer, gchar *first_object_id, ...) PREINIT: gchar **object_ids = NULL; GError *error = NULL; int i; CODE: #define FIRST_ITEM 2 object_ids = g_new0 (gchar *, items - FIRST_ITEM + 1); /* NULL-terminate */ object_ids[0] = first_object_id; for (i = FIRST_ITEM + 1; i < items; i++) { object_ids[i - FIRST_ITEM] = SvGChar (ST (i)); } RETVAL = gtk_builder_add_objects_from_string ( builder, buffer, sv_len (ST (1)), object_ids, &error); if (!RETVAL) { gperl_croak_gerror (NULL, error); } g_free (object_ids); #undef FIRST_ITEM OUTPUT: RETVAL #endif Gtk2-1.2498/xs/GtkButton.xs000644 001750 000024 00000011036 11664366546 016474 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003-2006 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" MODULE = Gtk2::Button PACKAGE = Gtk2::Button PREFIX = gtk_button_ =head1 MNEMONICS Mnemonics are "memory aids"; in GTK+, a mnemonic is an underlined character which corresponds to a keyboard accelerator. For a button, that means pressing Alt and that key activates the button. For convenience, Gtk2-Perl uses mnemonics by default on widgets that support them. If characters in label string are preceded by an underscore, they are underlined. If you need a literal underscore character in a label, use '__' (two underscores). If you don't want to use mnemonics at all, use the non-mnemonic version explicitly (e.g. C). =cut =for apidoc Gtk2::Button::new =for signature widget = Gtk2::Button->new =for signature widget = Gtk2::Button->new ($mnemonic) =for arg label (__hide__) =for arg mnemonic (string) used to label the widget, see L =cut =for apidoc Gtk2::Button::new_with_mnemonic =for signature widget = Gtk2::Button->new_with_mnemonic ($mnemonic) =for arg label (__hide__) =for arg mnemonic (string) used to label the widget, see L =cut =for apidoc Gtk2::Button::new_with_label =for signature widget = Gtk2::Button->new_with_label ($label) =for arg label (string) used to label the widget =cut GtkWidget * gtk_button_new (class, label=NULL) const gchar * label ALIAS: Gtk2::Button::new_with_mnemonic = 1 Gtk2::Button::new_with_label = 2 CODE: if (label) { if (ix == 2) RETVAL = gtk_button_new_with_label (label); else RETVAL = gtk_button_new_with_mnemonic (label); } else RETVAL = gtk_button_new (); OUTPUT: RETVAL # TODO: find and/or create Gtk2::StockItems info/page =for apidoc =for arg stock_id (string) creates a new button using the icon and text from the specified stock item, see L =cut GtkWidget * gtk_button_new_from_stock (class, stock_id) const gchar * stock_id C_ARGS: stock_id void gtk_button_pressed (button) GtkButton * button void gtk_button_released (button) GtkButton * button void gtk_button_clicked (button) GtkButton * button void gtk_button_enter (button) GtkButton * button void gtk_button_leave (button) GtkButton * button void gtk_button_set_relief (button, newstyle) GtkButton * button GtkReliefStyle newstyle GtkReliefStyle gtk_button_get_relief (button) GtkButton * button void gtk_button_set_label (button, label) GtkButton * button const gchar * label # had G_CONST_RETURN const gchar * gtk_button_get_label (button) GtkButton * button void gtk_button_set_use_underline (button, use_underline) GtkButton * button gboolean use_underline gboolean gtk_button_get_use_underline (button) GtkButton * button void gtk_button_set_use_stock (button, use_stock) GtkButton * button gboolean use_stock gboolean gtk_button_get_use_stock (button) GtkButton * button #if GTK_CHECK_VERSION(2,4,0) void gtk_button_set_focus_on_click (GtkButton * button, gboolean focus_on_click) gboolean gtk_button_get_focus_on_click (GtkButton * button) void gtk_button_set_alignment (GtkButton * button, gfloat xalign, gfloat yalign) ## void gtk_button_get_alignment (GtkButton *button, gfloat *xalign, gfloat *yalign) void gtk_button_get_alignment (GtkButton *button, OUTLIST gfloat xalign, OUTLIST gfloat yalign) #endif #if GTK_CHECK_VERSION(2,6,0) void gtk_button_set_image (GtkButton *button, GtkWidget_ornull *image) GtkWidget_ornull * gtk_button_get_image (GtkButton *button) #endif #if GTK_CHECK_VERSION(2,10,0) void gtk_button_set_image_position (GtkButton *button, GtkPositionType position); GtkPositionType gtk_button_get_image_position (GtkButton *button); #endif #if GTK_CHECK_VERSION (2, 22, 0) GdkWindow_ornull * gtk_button_get_event_window (GtkButton *button); #endif /* 2.22 */ Gtk2-1.2498/xs/GtkButtonBox.xs000644 001750 000024 00000003446 11664366546 017153 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" MODULE = Gtk2::ButtonBox PACKAGE = Gtk2::ButtonBox PREFIX = gtk_button_box_ =for enum GtkButtonBoxStyle =cut ## GtkButtonBoxStyle gtk_button_box_get_layout (GtkButtonBox *widget) GtkButtonBoxStyle gtk_button_box_get_layout (widget) GtkButtonBox * widget ## void gtk_button_box_set_layout (GtkButtonBox *widget, GtkButtonBoxStyle layout_style) void gtk_button_box_set_layout (widget, layout_style) GtkButtonBox * widget GtkButtonBoxStyle layout_style #if GTK_CHECK_VERSION(2,4,0) gboolean gtk_button_box_get_child_secondary (GtkButtonBox * widget, GtkWidget * child) #endif ## void gtk_button_box_set_child_secondary (GtkButtonBox *widget, GtkWidget *child, gboolean is_secondary) void gtk_button_box_set_child_secondary (widget, child, is_secondary) GtkButtonBox * widget GtkWidget * child gboolean is_secondary ##void _gtk_button_box_child_requisition (GtkWidget *widget, int *nvis_children, int *nvis_secondaries, int *width, int *height) Gtk2-1.2498/xs/GtkCalendar.xs000644 001750 000024 00000012411 11664366546 016730 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003 by the gtk2-perl team (see the file AUTHORS) * * Licensed under the LGPL, see LICENSE file for more information. * * $Id$ */ #include "gtk2perl.h" #if GTK_CHECK_VERSION (2, 14, 0) static GPerlCallback * gtk2perl_calendar_detail_func_create (SV * func, SV * data) { GType param_types [4]; param_types[0] = GTK_TYPE_CALENDAR; param_types[1] = G_TYPE_UINT; param_types[2] = G_TYPE_UINT; param_types[3] = G_TYPE_UINT; return gperl_callback_new (func, data, G_N_ELEMENTS (param_types), param_types, G_TYPE_STRING); } static gchar * gtk2perl_calendar_detail_func (GtkCalendar *calendar, guint year, guint month, guint day, gpointer user_data) { GPerlCallback * callback = (GPerlCallback*)user_data; GValue value = {0,}; gchar * retval; g_value_init (&value, callback->return_type); gperl_callback_invoke (callback, &value, calendar, year, month, day); /* caller owns return value */ retval = g_value_dup_string (&value); g_value_unset (&value); return retval; } #endif /* 2.14 */ MODULE = Gtk2::Calendar PACKAGE = Gtk2::Calendar PREFIX = gtk_calendar_ =for apidoc marked_date =for signature $widget->marked_date ($value) =for signature value = $widget->marked_date =cut =for apidoc year =for signature $widget->year ($value) =for signature value = $widget->year =cut =for apidoc month =for signature $widget->month ($value) =for signature value = $widget->month =cut =for apidoc selected_day =for signature $widget->selected_day ($value) =for signature value = $widget->selected_day =cut =for apidoc =for signature $widget->num_marked_dates ($value) =for signature value = $widget->num_marked_dates =cut void num_marked_dates (cal) GtkCalendar* cal ALIAS: marked_date = 1 year = 2 month = 3 selected_day = 4 PPCODE: switch (ix) { case 0: PUSHs (sv_2mortal (newSViv (cal->num_marked_dates))); break; case 1: { int i; EXTEND (SP, 31); for (i = 0; i < 31; i++) { PUSHs (sv_2mortal (newSViv (cal->marked_date[i]))); } } break; case 2: PUSHs (sv_2mortal (newSViv (cal->year))); break; case 3: PUSHs (sv_2mortal (newSViv (cal->month))); break; case 4: PUSHs (sv_2mortal (newSViv (cal->selected_day))); break; default: g_assert_not_reached (); } ## GtkWidget* gtk_calendar_new (void) GtkWidget* gtk_calendar_new (class) C_ARGS: /*void*/ ## gboolean gtk_calendar_select_month (GtkCalendar *calendar, guint month, guint year) gboolean gtk_calendar_select_month (calendar, month, year) GtkCalendar * calendar guint month guint year ## void gtk_calendar_select_day (GtkCalendar *calendar, guint day) void gtk_calendar_select_day (calendar, day) GtkCalendar * calendar guint day ## gboolean gtk_calendar_mark_day (GtkCalendar *calendar, guint day) gboolean gtk_calendar_mark_day (calendar, day) GtkCalendar * calendar guint day ## gboolean gtk_calendar_unmark_day (GtkCalendar *calendar, guint day) gboolean gtk_calendar_unmark_day (calendar, day) GtkCalendar * calendar guint day ## void gtk_calendar_clear_marks (GtkCalendar *calendar) void gtk_calendar_clear_marks (calendar) GtkCalendar * calendar ## void gtk_calendar_set_display_options (GtkCalendar *calendar, GtkCalendarDisplayOptions flags) ## void gtk_calendar_display_options (GtkCalendar *calendar, GtkCalendarDisplayOptions flags) =for apidoc display_options The old name for C. =cut void gtk_calendar_set_display_options (calendar, flags) GtkCalendar * calendar GtkCalendarDisplayOptions flags ALIAS: display_options = 1 CODE: #if GTK_CHECK_VERSION(2,4,0) gtk_calendar_set_display_options (calendar, flags); #else gtk_calendar_display_options (calendar, flags); #endif CLEANUP: PERL_UNUSED_VAR (ix); GtkCalendarDisplayOptions gtk_calendar_get_display_options (GtkCalendar * calendar) CODE: #if GTK_CHECK_VERSION(2,4,0) RETVAL = gtk_calendar_get_display_options (calendar); #else RETVAL = calendar->display_flags; #endif OUTPUT: RETVAL ## void gtk_calendar_get_date (GtkCalendar *calendar, guint *year, guint *month, guint *day) void gtk_calendar_get_date (GtkCalendar * calendar, OUTLIST guint year, OUTLIST guint month, OUTLIST guint day) ## void gtk_calendar_freeze (GtkCalendar *calendar) void gtk_calendar_freeze (calendar) GtkCalendar * calendar ## void gtk_calendar_thaw (GtkCalendar *calendar) void gtk_calendar_thaw (calendar) GtkCalendar * calendar #if GTK_CHECK_VERSION (2, 14, 0) ## void gtk_calendar_set_detail_func (GtkCalendar *calendar, GtkCalendarDetailFunc func, gpointer data, GDestroyNotify destroy) void gtk_calendar_set_detail_func (GtkCalendar *calendar, SV *func, SV *data=NULL) PREINIT: GPerlCallback * callback; CODE: callback = gtk2perl_calendar_detail_func_create (func, data); gtk_calendar_set_detail_func (calendar, gtk2perl_calendar_detail_func, callback, (GDestroyNotify) gperl_callback_destroy); gint gtk_calendar_get_detail_width_chars (GtkCalendar *calendar); void gtk_calendar_set_detail_width_chars (GtkCalendar *calendar, gint chars); gint gtk_calendar_get_detail_height_rows (GtkCalendar *calendar); void gtk_calendar_set_detail_height_rows (GtkCalendar *calendar, gint rows); #endif /* 2.14 */ Gtk2-1.2498/xs/GtkCellEditable.xs000644 001750 000024 00000006160 11664366546 017534 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" /* this is an interface */ #define PREP \ dSP; \ ENTER; \ SAVETMPS; \ PUSHMARK (SP); \ PUSHs (sv_2mortal (newSVGObject (G_OBJECT (cell)))); #define CALL \ PUTBACK; \ call_sv ((SV *)GvCV (slot), G_VOID|G_DISCARD); #define FINISH \ FREETMPS; \ LEAVE; #define GET_METHOD(method) \ HV * stash = gperl_object_stash_from_type (G_OBJECT_TYPE (cell)); \ GV * slot = gv_fetchmethod (stash, method); #define METHOD_EXISTS (slot && GvCV (slot)) static void gtk2perl_cell_editable_start_editing (GtkCellEditable *cell, GdkEvent *event) { GET_METHOD ("START_EDITING"); if (METHOD_EXISTS) { PREP; XPUSHs (sv_2mortal (newSVGdkEvent (event))); CALL; FINISH; } } static void gtk2perl_cell_editable_editing_done (GtkCellEditable *cell) { GET_METHOD ("EDITING_DONE"); if (METHOD_EXISTS) { PREP; CALL; FINISH; } } static void gtk2perl_cell_editable_remove_widget (GtkCellEditable *cell) { GET_METHOD ("REMOVE_WIDGET"); if (METHOD_EXISTS) { PREP; CALL; FINISH; } } static void gtk2perl_cell_editable_init (GtkCellEditableIface * iface) { iface->start_editing = gtk2perl_cell_editable_start_editing; iface->editing_done = gtk2perl_cell_editable_editing_done; iface->remove_widget = gtk2perl_cell_editable_remove_widget; } MODULE = Gtk2::CellEditable PACKAGE = Gtk2::CellEditable PREFIX = gtk_cell_editable_ =for apidoc __hide__ =cut void _ADD_INTERFACE (class, const char * target_class) CODE: { static const GInterfaceInfo iface_info = { (GInterfaceInitFunc) gtk2perl_cell_editable_init, (GInterfaceFinalizeFunc) NULL, (gpointer) NULL }; GType gtype = gperl_object_type_from_package (target_class); g_type_add_interface_static (gtype, GTK_TYPE_CELL_EDITABLE, &iface_info); } ## void gtk_cell_editable_start_editing (GtkCellEditable *cell_editable, GdkEvent *event) void gtk_cell_editable_start_editing (cell_editable, event=NULL) GtkCellEditable *cell_editable GdkEvent_ornull *event ## void gtk_cell_editable_editing_done (GtkCellEditable *cell_editable) void gtk_cell_editable_editing_done (cell_editable) GtkCellEditable *cell_editable ## void gtk_cell_editable_remove_widget (GtkCellEditable *cell_editable) void gtk_cell_editable_remove_widget (cell_editable) GtkCellEditable *cell_editable Gtk2-1.2498/xs/GtkCellLayout.xs000644 001750 000024 00000034257 11664366546 017310 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003 by the gtk2-perl team (see the file AUTHORS) * * Licensed under the LGPL, see LICENSE file for more information. * * $Id$ */ #include "gtk2perl.h" /* typedef void (* GtkCellLayoutDataFunc) (GtkCellLayout *cell_layout, GtkCellRenderer *cell, GtkTreeModel *tree_model, GtkTreeIter *iter, gpointer data); */ static void gtk2perl_cell_layout_data_func (GtkCellLayout *cell_layout, GtkCellRenderer *cell, GtkTreeModel *tree_model, GtkTreeIter *iter, gpointer data) { GPerlCallback * callback = (GPerlCallback *) data; gperl_callback_invoke (callback, NULL, cell_layout, cell, tree_model, iter); } /* GInterface support */ #define GET_METHOD(obj, name) \ HV * stash = gperl_object_stash_from_type (G_OBJECT_TYPE (obj)); \ GV * slot = gv_fetchmethod (stash, name); #define METHOD_EXISTS (slot && GvCV (slot)) #define GET_METHOD_OR_DIE(obj, name) \ GET_METHOD (obj, name); \ if (!METHOD_EXISTS) \ die ("No implementation for %s::%s", \ gperl_package_from_type (G_OBJECT_TYPE (obj)), name); #define PREP(obj) \ dSP; \ ENTER; \ SAVETMPS; \ PUSHMARK (SP) ; \ PUSHs (sv_2mortal (newSVGObject (G_OBJECT (obj)))); #define CALL \ PUTBACK; \ call_sv ((SV *) GvCV (slot), G_VOID | G_DISCARD); #define FINISH \ FREETMPS; \ LEAVE; static void gtk2perl_cell_layout_pack_start (GtkCellLayout *cell_layout, GtkCellRenderer *cell, gboolean expand) { GET_METHOD_OR_DIE (cell_layout, "PACK_START"); { PREP (cell_layout); XPUSHs (sv_2mortal (newSVGtkCellRenderer (cell))); XPUSHs (sv_2mortal (boolSV (expand))); CALL; FINISH; } } static void gtk2perl_cell_layout_pack_end (GtkCellLayout *cell_layout, GtkCellRenderer *cell, gboolean expand) { GET_METHOD_OR_DIE (cell_layout, "PACK_END"); { PREP (cell_layout); XPUSHs (sv_2mortal (newSVGtkCellRenderer (cell))); XPUSHs (sv_2mortal (boolSV (expand))); CALL; FINISH; } } static void gtk2perl_cell_layout_clear (GtkCellLayout *cell_layout) { GET_METHOD_OR_DIE (cell_layout, "CLEAR"); { PREP (cell_layout); CALL; FINISH; } } static void gtk2perl_cell_layout_add_attribute (GtkCellLayout *cell_layout, GtkCellRenderer *cell, const gchar *attribute, gint column) { GET_METHOD_OR_DIE (cell_layout, "ADD_ATTRIBUTE"); { PREP (cell_layout); XPUSHs (sv_2mortal (newSVGtkCellRenderer (cell))); XPUSHs (sv_2mortal (newSVGChar (attribute))); XPUSHs (sv_2mortal (newSViv (column))); CALL; FINISH; } } /* The strategy for passing the function pointer to Perl land is the same as * the one used in GtkTreeSortable.xs. */ typedef struct { GtkCellLayoutDataFunc func; gpointer data; GtkDestroyNotify destroy; } Gtk2PerlCellLayoutDataFunc; static void create_callback (GtkCellLayoutDataFunc func, gpointer data, GtkDestroyNotify destroy, SV **code_return, SV **data_return) { HV *stash; SV *code_sv, *data_sv; Gtk2PerlCellLayoutDataFunc *wrapper; wrapper = g_new0 (Gtk2PerlCellLayoutDataFunc, 1); wrapper->func = func; wrapper->data = data; wrapper->destroy = destroy; data_sv = newSViv (PTR2IV (wrapper)); stash = gv_stashpv ("Gtk2::CellLayout::DataFunc", TRUE); code_sv = sv_bless (newRV (data_sv), stash); *code_return = code_sv; *data_return = data_sv; } static void gtk2perl_cell_layout_set_cell_data_func (GtkCellLayout *cell_layout, GtkCellRenderer *cell, GtkCellLayoutDataFunc func, gpointer func_data, GDestroyNotify destroy) { GET_METHOD_OR_DIE (cell_layout, "SET_CELL_DATA_FUNC"); { SV *code_sv, *data_sv; PREP (cell_layout); XPUSHs (sv_2mortal (newSVGtkCellRenderer (cell))); if (func) { create_callback (func, func_data, destroy, &code_sv, &data_sv); XPUSHs (sv_2mortal (code_sv)); XPUSHs (sv_2mortal (data_sv)); } CALL; FINISH; } } static void gtk2perl_cell_layout_clear_attributes (GtkCellLayout *cell_layout, GtkCellRenderer *cell) { GET_METHOD_OR_DIE (cell_layout, "CLEAR_ATTRIBUTES"); { PREP (cell_layout); XPUSHs (sv_2mortal (newSVGtkCellRenderer (cell))); CALL; FINISH; } } static void gtk2perl_cell_layout_reorder (GtkCellLayout *cell_layout, GtkCellRenderer *cell, gint position) { GET_METHOD_OR_DIE (cell_layout, "REORDER"); { PREP (cell_layout); XPUSHs (sv_2mortal (newSVGtkCellRenderer (cell))); XPUSHs (sv_2mortal (newSViv (position))); CALL; FINISH; } } #if GTK_CHECK_VERSION (2, 12, 0) static GList* gtk2perl_cell_layout_get_cells (GtkCellLayout *cell_layout) { GList * cells = NULL; GET_METHOD (cell_layout, "GET_CELLS"); if (METHOD_EXISTS) { int count; PREP (cell_layout); PUTBACK; count = call_sv ((SV *) GvCV (slot), G_ARRAY); SPAGAIN; while (count > 0) { SV * sv = POPs; cells = g_list_prepend (cells, SvGtkCellRenderer (sv)); count--; } PUTBACK; FINISH; } return cells; } #endif static void gtk2perl_cell_layout_init (GtkCellLayoutIface * iface) { iface->pack_start = gtk2perl_cell_layout_pack_start; iface->pack_end = gtk2perl_cell_layout_pack_end; iface->clear = gtk2perl_cell_layout_clear; iface->add_attribute = gtk2perl_cell_layout_add_attribute; iface->set_cell_data_func = gtk2perl_cell_layout_set_cell_data_func; iface->clear_attributes = gtk2perl_cell_layout_clear_attributes; iface->reorder = gtk2perl_cell_layout_reorder; #if GTK_CHECK_VERSION (2, 12, 0) iface->get_cells = gtk2perl_cell_layout_get_cells; #endif } MODULE = Gtk2::CellLayout PACKAGE = Gtk2::CellLayout PREFIX = gtk_cell_layout_ =for position SYNOPSIS =head1 SYNOPSIS # This is an abstract interface; the CellLayout interface is # implemented by concrete classes like ComboBox and TreeViewColumn. # See the discussion for details on creating your own CellLayout. # This synopsis assumes you already have an instance in $cell_layout. # Add a cell renderer that shows the pixbuf in column 2 of the # associated TreeModel. It will take up only the necessary space # ("expand" => FALSE). my $cell = Gtk2::CellRendererPixbuf->new (); $cell_layout->pack_start ($cell, FALSE); $cell_layout->add_attribute ($cell, pixbuf => 2); # Add another cell renderer that gets the "text" property from # column 3 of the associated TreeModel, and takes up all remaining # horizontal space ("expand" => TRUE). my $cell = Gtk2::CellRendererText->new (); $cell_layout->pack_start ($cell, TRUE); $cell_layout->add_attribute ($cell, text => 3); =cut =for position DESCRIPTION =head1 DESCRIPTION Gtk2::CellLayout is an interface to be implemented by all objects which want to provide a Gtk2::TreeViewColumn-like API for packing cells, setting attributes and data funcs. =cut =for position post_methods =head1 CREATING A CUSTOM CELL LAYOUT GTK+ provides several CellLayout implementations, such as Gtk2::TreeViewColumn and Gtk2::ComboBox. To create your own object that implements the CellLayout interface and therefore can be used to display CellRenderers, you need to add Gtk2::CellLayout to your class's "interfaces" list, like this: package MyLayout; use Gtk2; use Glib::Object::Subclass Gtk2::Widget::, interfaces => [ Gtk2::CellLayout:: ], ; This will cause perl to call several virtual methods with ALL_CAPS_NAMES when GTK+ attempts to perform certain actions. You simply provide (or override) those methods with perl code. The methods map rather directly to the object interface, so it should be easy to figure out what they should do. Those methods are: =over =item PACK_START ($cell_layout, $cell, $expand) =item PACK_END ($cell_layout, $cell, $expand) =item CLEAR ($cell_layout) =item ADD_ATTRIBUTE ($cell_layout, $cell, $attribute, $column) =item SET_CELL_DATA_FUNC ($cell_layout, $cell, $func, $data) =item CLEAR_ATTRIBUTES ($cell_layout, $cell) =item REORDER ($cell_layout, $cell, $position) =item list = GET_CELLS ($cell_layout) =back =cut =for apidoc __hide__ =cut void _ADD_INTERFACE (class, const char * target_class) CODE: { static const GInterfaceInfo iface_info = { (GInterfaceInitFunc) gtk2perl_cell_layout_init, (GInterfaceFinalizeFunc) NULL, (gpointer) NULL }; GType gtype = gperl_object_type_from_package (target_class); g_type_add_interface_static (gtype, GTK_TYPE_CELL_LAYOUT, &iface_info); } =for apidoc Packs I<$cell> into the beginning of I<$cell_layout>. If I<$expand> is false, then I<$cell> is allocated no more space than it needs. Any unused space is divided evenly between cells for which I<$expand> is true. =cut void gtk_cell_layout_pack_start (GtkCellLayout *cell_layout, GtkCellRenderer *cell, gboolean expand); =for apidoc Like C, but adds from the end of the layout instead of the beginning. =cut void gtk_cell_layout_pack_end (GtkCellLayout *cell_layout, GtkCellRenderer *cell, gboolean expand); =for apidoc Unsets all the mappings on all renderers on I<$cell_layout> and removes all renderers attached to it. =cut void gtk_cell_layout_clear (GtkCellLayout *cell_layout); =for apidoc =for arg ... list of property name and column number pairs. Sets the pairs in the I<...> list as the attributes of I<$cell_layout>, as with repeated calls to C. All existing attributes are removed, and replaced with the new attributes. =cut void gtk_cell_layout_set_attributes (GtkCellLayout *cell_layout, GtkCellRenderer *cell, ...); PREINIT: gint i; CODE: if (items < 2 || 0 != (items - 2) % 2) croak ("usage: $cell_layout->set_attributes ($cell, name => column, ...)\n" " expecting a list of name => column pairs"); gtk_cell_layout_clear_attributes (cell_layout, cell); for (i = 2 ; i < items ; i+=2) { gtk_cell_layout_add_attribute (cell_layout, cell, SvPV_nolen (ST (i)), SvIV (ST (i+1))); } =for apidoc Adds an attribute mapping to the list in I<$cell_layout>. The I<$column> is the column of the model from which to get a value, and the I<$attribute> is the property of I<$cell> to be set from the value. So, for example, if column 2 of the model contains strings, you could have the "text" attribute of a Gtk2::CellRendererText get its values from column 2. =cut void gtk_cell_layout_add_attribute (GtkCellLayout *cell_layout, GtkCellRenderer *cell, const gchar *attribute, gint column); =for apidoc Sets up I<$cell_layout> to call I<$func> to set up attributes of I<$cell>, instead of the standard attribute mapping. I<$func> may be undef to remove an older callback. I<$func> will receive these parameters: =over =item $cell_layout The cell layout instance =item $cell The cell renderer to set up =item $model The tree model =item $iter TreeIter of the row for which to set the values =item $data The I<$func_data> passed to C =back =cut void gtk_cell_layout_set_cell_data_func (GtkCellLayout *cell_layout, GtkCellRenderer *cell, SV * func, SV * func_data=NULL); CODE: if (gperl_sv_is_defined (func)) { GType param_types[4]; GPerlCallback * callback; param_types[0] = GTK_TYPE_CELL_LAYOUT; param_types[1] = GTK_TYPE_CELL_RENDERER; param_types[2] = GTK_TYPE_TREE_MODEL; param_types[3] = GTK_TYPE_TREE_ITER; callback = gperl_callback_new (func, func_data, 4, param_types, G_TYPE_NONE); gtk_cell_layout_set_cell_data_func (cell_layout, cell, gtk2perl_cell_layout_data_func, callback, (GDestroyNotify) gperl_callback_destroy); } else gtk_cell_layout_set_cell_data_func (cell_layout, cell, NULL, NULL, NULL); =for apidoc Clears all existing attributes previously set with for I<$cell> with C or C. =cut void gtk_cell_layout_clear_attributes (GtkCellLayout *cell_layout, GtkCellRenderer *cell); =for apidoc Re-insert I<$cell> at I<$position>. I<$cell> must already be packed into I<$cell_layout>. =cut void gtk_cell_layout_reorder (GtkCellLayout *cell_layout, GtkCellRenderer *cell, gint position) #if GTK_CHECK_VERSION (2, 12, 0) =for apidoc Fetch all of the cell renderers which have been added to I<$cell_layout>. Note that if there are no cells this functions returns 'undef' instead of an empty list. =cut void gtk_cell_layout_get_cells (GtkCellLayout *cell_layout) PREINIT: GList *result, *i; PPCODE: PUTBACK; result = gtk_cell_layout_get_cells (cell_layout); SPAGAIN; if (!result) /* can happen if the widget doesn't implement get_cells */ XSRETURN_UNDEF; for (i = result; i != NULL; i = i->next) XPUSHs (sv_2mortal (newSVGtkCellRenderer (i->data))); g_list_free (result); #endif MODULE = Gtk2::CellLayout PACKAGE = Gtk2::CellLayout::DataFunc =for apidoc __hide__ =cut void invoke (SV *code, GtkCellLayout *cell_layout, GtkCellRenderer *cell, GtkTreeModel *tree_model, GtkTreeIter *iter, data) PREINIT: Gtk2PerlCellLayoutDataFunc *wrapper; CODE: wrapper = INT2PTR (Gtk2PerlCellLayoutDataFunc*, SvIV (SvRV (code))); if (!wrapper || !wrapper->func) croak ("Invalid reference encountered in cell data func"); wrapper->func (cell_layout, cell, tree_model, iter, wrapper->data); void DESTROY (SV *code) PREINIT: Gtk2PerlCellLayoutDataFunc *wrapper; CODE: if (!gperl_sv_is_defined (code) || !SvROK (code)) return; wrapper = INT2PTR (Gtk2PerlCellLayoutDataFunc*, SvIV (SvRV (code))); if (wrapper && wrapper->destroy) wrapper->destroy (wrapper->data); if (wrapper) g_free (wrapper); Gtk2-1.2498/xs/GtkCellRenderer.xs000644 001750 000024 00000066763 11664366546 017610 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003-2004, 2009 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" static void warn_deprecated (const char * old_and_busted, const char * new_hotness) { static int debugging_on = -1; if (debugging_on < 0) { HV * env = get_hv ("::ENV", FALSE); SV ** v = hv_fetch (env, "GTK2PERL_DEBUG", 14, 0); debugging_on = (v && SvTRUE (*v)); } if (debugging_on) { if (new_hotness) warn ("%s is deprecated, use %s instead", old_and_busted, new_hotness); else warn ("%s is deprecated", old_and_busted); } } #define newSVGChar_ornull(s) \ ((s) ? newSVGChar(s) : newSVsv (&PL_sv_undef)) static void gtk2perl_cell_renderer_class_init (GtkCellRendererClass * class); static void gtk2perl_cell_renderer_get_size (GtkCellRenderer * cell, GtkWidget * widget, GdkRectangle * cell_area, gint * x_offset, gint * y_offset, gint * width, gint * height); static void gtk2perl_cell_renderer_render (GtkCellRenderer * cell, #if GTK_CHECK_VERSION(2,4,0) GdkDrawable * window, #else GdkWindow * window, #endif GtkWidget * widget, GdkRectangle * background_area, GdkRectangle * cell_area, GdkRectangle * expose_area, GtkCellRendererState flags); static gboolean gtk2perl_cell_renderer_activate (GtkCellRenderer * cell, GdkEvent * event, GtkWidget * widget, const gchar * path, GdkRectangle * background_area, GdkRectangle * cell_area, GtkCellRendererState flags); static GtkCellEditable * gtk2perl_cell_renderer_start_editing (GtkCellRenderer * cell, GdkEvent * event, GtkWidget * widget, const gchar * path, GdkRectangle * background_area, GdkRectangle * cell_area, GtkCellRendererState flags); /* * this mangles a CellRendererClass to call the local marshallers. * you should only ever call this on a new subclass of CellRenderer, never * directly on a preexisting CellRendererClass. */ static void gtk2perl_cell_renderer_class_init (GtkCellRendererClass * class) { class->get_size = gtk2perl_cell_renderer_get_size; class->render = gtk2perl_cell_renderer_render; class->activate = gtk2perl_cell_renderer_activate; class->start_editing = gtk2perl_cell_renderer_start_editing; } /* * the following functions look for WHATEVER in the package belonging * to a cell. this is our custom override, since CellRenderer does not * have signals for these virtual methods. */ #define GET_METHOD(cell, method, fallback) \ HV * stash = gperl_object_stash_from_type (G_OBJECT_TYPE (cell)); \ GV * slot = gv_fetchmethod (stash, fallback); \ \ if (slot && GvCV (slot)) \ warn_deprecated (fallback, method); \ else \ slot = gv_fetchmethod (stash, method); static void gtk2perl_cell_renderer_get_size (GtkCellRenderer * cell, GtkWidget * widget, GdkRectangle * cell_area, gint * x_offset, gint * y_offset, gint * width, gint * height) { GET_METHOD (cell, "GET_SIZE", "on_get_size"); if (slot && GvCV (slot)) { int count, i; dSP; ENTER; SAVETMPS; PUSHMARK (SP); EXTEND (SP, 3); PUSHs (sv_2mortal (newSVGtkCellRenderer (cell))); PUSHs (sv_2mortal (newSVGtkWidget (widget))); PUSHs (sv_2mortal (newSVGdkRectangle_ornull (cell_area))); PUTBACK; count = call_sv ((SV *)GvCV (slot), G_ARRAY); SPAGAIN; if (count != 4) croak ("GET_SIZE must return four values -- " "the x_offset, y_offset, width, and height"); i = POPi; if (height) *height = i; i = POPi; if (width) *width = i; i = POPi; if (y_offset) *y_offset = i; i = POPi; if (x_offset) *x_offset = i; PUTBACK; FREETMPS; LEAVE; } } static void gtk2perl_cell_renderer_render (GtkCellRenderer * cell, #if GTK_CHECK_VERSION(2,4,0) GdkDrawable * drawable, #else GdkWindow * drawable, #endif GtkWidget * widget, GdkRectangle * background_area, GdkRectangle * cell_area, GdkRectangle * expose_area, GtkCellRendererState flags) { GET_METHOD (cell, "RENDER", "on_render"); if (slot && GvCV (slot)) { dSP; ENTER; SAVETMPS; PUSHMARK (SP); EXTEND (SP, 7); PUSHs (sv_2mortal (newSVGtkCellRenderer (cell))); PUSHs (sv_2mortal (newSVGdkDrawable_ornull (drawable))); PUSHs (sv_2mortal (newSVGtkWidget_ornull (widget))); PUSHs (sv_2mortal (newSVGdkRectangle_ornull (background_area))); PUSHs (sv_2mortal (newSVGdkRectangle_ornull (cell_area))); PUSHs (sv_2mortal (newSVGdkRectangle_ornull (expose_area))); PUSHs (sv_2mortal (newSVGtkCellRendererState (flags))); PUTBACK; call_sv ((SV *)GvCV (slot), G_VOID|G_DISCARD); FREETMPS; LEAVE; } } static gboolean gtk2perl_cell_renderer_activate (GtkCellRenderer * cell, GdkEvent * event, GtkWidget * widget, const gchar * path, GdkRectangle * background_area, GdkRectangle * cell_area, GtkCellRendererState flags) { gboolean retval = FALSE; GET_METHOD (cell, "ACTIVATE", "on_activate"); if (slot && GvCV (slot)) { dSP; ENTER; SAVETMPS; PUSHMARK (SP); XPUSHs (sv_2mortal (newSVGtkCellRenderer (cell))); XPUSHs (sv_2mortal (newSVGdkEvent_ornull (event))); XPUSHs (sv_2mortal (newSVGtkWidget_ornull (widget))); XPUSHs (sv_2mortal (newSVGChar_ornull (path))); XPUSHs (sv_2mortal (newSVGdkRectangle_ornull (background_area))); XPUSHs (sv_2mortal (newSVGdkRectangle_ornull (cell_area))); XPUSHs (sv_2mortal (newSVGtkCellRendererState (flags))); PUTBACK; call_sv ((SV*) GvCV (slot), G_SCALAR); SPAGAIN; retval = POPi; PUTBACK; FREETMPS; LEAVE; } return retval; } static GtkCellEditable * gtk2perl_cell_renderer_start_editing (GtkCellRenderer * cell, GdkEvent * event, GtkWidget * widget, const gchar * path, GdkRectangle * background_area, GdkRectangle * cell_area, GtkCellRendererState flags) { GtkCellEditable * editable = NULL; GET_METHOD (cell, "START_EDITING", "on_start_editing"); if (slot && GvCV (slot)) { SV * sv; dSP; ENTER; SAVETMPS; PUSHMARK (SP); EXTEND (SP, 7); PUSHs (sv_2mortal (newSVGtkCellRenderer (cell))); PUSHs (sv_2mortal (newSVGdkEvent_ornull (event))); PUSHs (sv_2mortal (newSVGtkWidget_ornull (widget))); PUSHs (sv_2mortal (newSVGChar_ornull (path))); PUSHs (sv_2mortal (newSVGdkRectangle_ornull (background_area))); PUSHs (sv_2mortal (newSVGdkRectangle_ornull (cell_area))); PUSHs (sv_2mortal (newSVGtkCellRendererState (flags))); PUTBACK; call_sv ((SV*) GvCV (slot), G_SCALAR); SPAGAIN; sv = POPs; if (gperl_sv_is_defined (sv)) { editable = SvGtkCellEditable (sv); #if GLIB_CHECK_VERSION (2, 10, 0) /* (*start_editing)() is basically a constructor and * as such should return an object with a floating * reference for the caller to take over. * * For GtkTreeView and GtkIconView for example that * ref is sunk when gtk_tree_view_put() or * gtk_icon_view_put() call gtk_widget_set_parent() * to add "editable" as one of their container * children. (Eventually to be dereffed in the * usual way by gtk_container_remove() from * gtk_tree_view_remove_widget() or * gtk_icon_view_remove_widget() at the end of * editing.) * * Perl code constructors like Gtk2::Foo->new or * Glib::Object->new sink any initial floating * reference when making the wrapper (either if * constructing in the START_EDITING code or from * something made or wrapped previously). So must * explicitly add a floating ref for GtkTreeView etc * to take over. * * If START_EDITING code gives a new object in "sv" * and it's used nowhere else then FREETMPS below * will SvREFCNT_dec it to zero and send it to the * usual Glib::Object::DESTROY. If there wasn't a * floating ref added here on the GObject then that * GObject would be destroyed before we ever got to * return it. With the extra floating ref the * wrapper converts to undead (ie. unused from perl * for the time being) and the GObject has a * refcount of 1 and the floating flag set. * * It's conceivable there could be a floating ref * already at this point. That was the case in the * past from chained-up perl SUPER::START_EDITING * for instance. Though it's abnormal let's assume * any floating ref here is meant for the caller to * take over and therefore should be left unchanged. */ if (! g_object_is_floating (editable)) { g_object_ref (editable); g_object_force_floating (G_OBJECT (editable)); } #else if (! GTK_OBJECT_FLOATING (editable)) { gtk_object_ref (GTK_OBJECT (editable)); GTK_OBJECT_SET_FLAGS (editable, GTK_FLOATING); } #endif } else { editable = NULL; } PUTBACK; FREETMPS; LEAVE; } return editable; } MODULE = Gtk2::CellRenderer PACKAGE = Gtk2::CellRenderer PREFIX = gtk_cell_renderer_ =for object Gtk2::CellRenderer - An object that renders a single cell onto a Gtk2::Gdk::Drawable =cut =for position DESCRIPTION =head1 DESCRIPTION The Gtk2::CellRenderer is the base class for objects which render cells onto drawables. These objects are used primarily by the Gtk2::TreeView, though they aren't tied to them in any specific way. Typically, one cell renderer is used to draw many cells onto the screen. Thus, the cell renderer doesn't keep state; instead, any state is set immediately prior to use through the object property system. The cell is measured with C, and then renderered with C. =cut =for position post_enums =head1 DERIVING NEW CELL RENDERERS Gtk+ provides three cell renderers: Gtk2::CellRendererText, Gtk2::CellRendererToggle, and Gtk2::CellRendererPixbuf. You may derive a new renderer from any of these, or directly from Gtk2::CellRenderer itself. There are a number of rules that must be followed when writing a new cell renderer. First and foremost, it's important that a certain set of properties always yields a cell of the same size, barring a Gtk2::Style change. The cell renderer also has a number of generic properties that are expected to be honored by all children. The new renderer must be a GObject, so you must follow the normal procedure for creating a new Glib::Object (i.e., either Glib::Object::Subclass or Glib::Type::register_object). The new subclass can customize the object's behavior by providing new implementations of these four methods: =over =item (x_offset, y_offset, width, height) = GET_SIZE ($cell, $widget, $cell_area) =over =item o $cell (Gtk2::CellRenderer) =item o $widget (Gtk2::Widget) widget to which I<$cell> is rendering =item o $cell_area (Gtk2::Gdk::Rectangle or undef) The area a cell will be allocated, or undef. =back Return Values: =over =item - x_offset - x offset of cell relative to I<$cell_area> =item - y_offset - y offset of cell relative to I<$cell_area> =item - width - width needed to render cell =item - height - height needed to render cell =back This is called to calculate the size of the cell for display, taking into account the padding and alignment properties of the parent. This one will be called very often. If you need to know your cell's data, then get it from the appropriate object properties, which will be set accordingly before this method is called. =item RENDER ($cell, $drawable, $widget, $background_area, $cell_area, $expose_area, $flags) =over =item o $cell (Gtk2::CellRenderer) =item o $drawable (Gtk2::Gdk::Drawable) window on which to draw =item o $widget (Gtk2::Widget) widget owning I<$drawable> =item o $background_area (Gtk2::Gdk::Rectangle) entire cell area (including tree expanders and maybe padding on the sides) =item o $cell_area (Gtk2::Gdk::Rectangle) area normally rendered by a cell renderer =item o $expose_area (Gtk2::Gdk::Rectangle) area that actually needs updating =item o $flags (Gtk2::CellRendererState) flags that affect rendering =back This is called to render the cell onto the screen. As with GET_SIZE, the data for the cell comes from object properties. In general, you'll want to make use of Gtk2::Style methods for drawing anything fancy. The three passed-in rectangles are areas of I<$drawable>. Most renderers draw within I<$cell_area>; the xalign, yalign, xpad, and ypad fields of the cell renderer should be honored with respect to I<$cell_area>. I<$background_area> includes the blank space around the cell, and also the area containing the tree expander; so the I<$background_area> rectangles for all cells cover the entire I<$drawable>. I<$expose_area> is a clip rectangle. =item boolean = ACTIVATE ($cell, $event, $widget, $path, $background_area, $cell_area, $flags) =over =item o $cell (Gtk2::CellRenderer) =item o $event (Gtk2::Gdk::Event) =item o $widget (Gtk2::Widget) widget that received the event =item o $path (string) widget-dependent string representation of the event location; e.g. for a Gtk2::TreeView, a string representation of a Gtk2::TreePath. =item o $background_area (Gtk2::Gdk::Rectangle) background area as passed to C. =item o $cell_area (Gtk2::Gdk::Rectangle) cell area as passed to C. =item o $flags (Gtk2::CellRendererState) render flags =back This method is called when an event occurs on a cell. Implementing it is not mandatory. The return value should be TRUE if the event was consumed/handled. =item celleditable or undef = START_EDITING ($cell, $event, $widget, $path, $background_area, $cell_area, $flags) =over =item o $cell (Gtk2::CellRenderer) =item o $event (Gtk2::Gdk::Event) =item o $widget (Gtk2::Widget) widget that received the event =item o $path (string) widget-dependent string representation of the event location; e.g. for a Gtk2::TreeView, a string representation of a Gtk2::TreePath. =item o $background_area (Gtk2::Gdk::Rectangle) background area as passed to C. =item o $cell_area (Gtk2::Gdk::Rectangle) cell area as passed to C. =item o $flags (Gtk2::CellRendererState) render flags =back For cells that are editable, this is called to put the cell into editing mode. If the return value is an object is a Gtk2::CellEditable, that widget will be used to edit the value; the calling code takes care of sizing, placing, and showing the editable, you just need to return it. If the return value is undef, the editing is aborted. =back Note: for backward compatibility, the bizarre and non-standard scheme used for this in 1.02x is still supported, but is deprecated and should not be used in new code, and since i don't want people to use it any more i will not document it here. =cut =for flags GtkCellRendererState =cut =for enum GtkCellRendererMode =cut ## void gtk_cell_renderer_set_fixed_size (GtkCellRenderer *cell, gint width, gint height) =for apidoc Set the renderer's size explicitly, independent of object properties. A value of -1 means "don't use a fixed size for this dimension." =cut void gtk_cell_renderer_set_fixed_size (cell, width, height) GtkCellRenderer * cell gint width gint height ## void gtk_cell_renderer_get_fixed_size (GtkCellRenderer *cell, gint *width, gint *height) =for apidoc Fetch the fixed size if I<$cell>. Values of -1 mean "this dimension is not fixed." =cut void gtk_cell_renderer_get_fixed_size (GtkCellRenderer * cell, OUTLIST gint width, OUTLIST gint height) ## void gtk_cell_renderer_get_size (GtkCellRenderer *cell, GtkWidget *widget, GdkRectangle *cell_area, gint *x_offset, gint *y_offset, gint *width, gint *height) =for apidoc =for signature (x_offset, y_offset, width, height) = $cell->get_size ($widget, $cell_area) =cut void gtk_cell_renderer_get_size (cell, widget, cell_area) GtkCellRenderer * cell GtkWidget * widget GdkRectangle_ornull * cell_area PREINIT: gint x_offset; gint y_offset; gint width; gint height; PPCODE: PUTBACK; gtk_cell_renderer_get_size(cell, widget, cell_area, &x_offset, &y_offset, &width, &height); SPAGAIN; EXTEND(SP,4); PUSHs(sv_2mortal(newSViv(x_offset))); PUSHs(sv_2mortal(newSViv(y_offset))); PUSHs(sv_2mortal(newSViv(width))); PUSHs(sv_2mortal(newSViv(height))); ## void gtk_cell_renderer_render (GtkCellRenderer *cell, GdkWindow *window, GtkWidget *widget, GdkRectangle *background_area, GdkRectangle *cell_area, GdkRectangle *expose_area, GtkCellRendererState flags) void gtk_cell_renderer_render (cell, drawable, widget, background_area, cell_area, expose_area, flags) GtkCellRenderer * cell GdkDrawable * drawable GtkWidget * widget GdkRectangle * background_area GdkRectangle * cell_area GdkRectangle * expose_area GtkCellRendererState flags ## gboolean gtk_cell_renderer_activate (GtkCellRenderer *cell, GdkEvent *event, GtkWidget *widget, const gchar *path, GdkRectangle *background_area, GdkRectangle *cell_area, GtkCellRendererState flags) gboolean gtk_cell_renderer_activate (cell, event, widget, path, background_area, cell_area, flags) GtkCellRenderer * cell GdkEvent * event GtkWidget * widget const gchar * path GdkRectangle * background_area GdkRectangle * cell_area GtkCellRendererState flags ## gtk_cell_renderer_start_editing() is normally a constructor, ## returning a widget with a floating ref ready for the caller to take ## over. But the generated typemap for "interface" objects like ## GtkCellEditable only treats it as GObject and doesn't sink when ## making the perl wrapper, so cast up to GtkWidget to get that. ## GtkWidget is a requirement of GtkCellEditable, so "editable" is ## certain to be a widget. ## ## The returned widget is normally about to be put in a container ## anyway, which sinks any floating ref, but sink it now to follow the ## general rule that wrapped widgets at the perl level don't have a ## floating ref left. In particular this means if you start_editing() ## and then strike an error or otherwise never add it to a container ## it won't be a memory leak. ## ##GtkCellEditable* gtk_cell_renderer_start_editing (GtkCellRenderer *cell, GdkEvent *event, GtkWidget *widget, const gchar *path, GdkRectangle *background_area, GdkRectangle *cell_area, GtkCellRendererState flags) =for apidoc =for signature celleditable or undef = $cell->start_editing ($event, $widget, $path, $background_area, $cell_area, $flags) =cut GtkWidget_ornull * gtk_cell_renderer_start_editing (cell, event, widget, path, background_area, cell_area, flags) GtkCellRenderer * cell GdkEvent * event GtkWidget * widget const gchar * path GdkRectangle * background_area GdkRectangle * cell_area GtkCellRendererState flags CODE: RETVAL = GTK_WIDGET (gtk_cell_renderer_start_editing (cell, event, widget, path, background_area, cell_area, flags)); OUTPUT: RETVAL #if GTK_CHECK_VERSION (2, 4, 0) ## void gtk_cell_renderer_editing_canceled (GtkCellRenderer *cell) void gtk_cell_renderer_editing_canceled (cell) GtkCellRenderer *cell #endif #if GTK_CHECK_VERSION (2, 6, 0) void gtk_cell_renderer_stop_editing (GtkCellRenderer *cell, gboolean canceled) #endif #if GTK_CHECK_VERSION (2, 18, 0) gboolean gtk_cell_renderer_get_visible (GtkCellRenderer *cell); void gtk_cell_renderer_set_visible (GtkCellRenderer *cell, gboolean visible); gboolean gtk_cell_renderer_get_sensitive (GtkCellRenderer *cell); void gtk_cell_renderer_set_sensitive (GtkCellRenderer *cell, gboolean sensitive); void gtk_cell_renderer_get_alignment (GtkCellRenderer *cell, OUTLIST gfloat xalign, OUTLIST gfloat yalign); void gtk_cell_renderer_set_alignment (GtkCellRenderer *cell, gfloat xalign, gfloat yalign); void gtk_cell_renderer_get_padding (GtkCellRenderer *cell, OUTLIST gint xpad, OUTLIST gint ypad); void gtk_cell_renderer_set_padding (GtkCellRenderer *cell, gint xpad, gint ypad); #endif /* 2.18 */ ## ## Modify the underlying GObjectClass structure for the given package ## to call Perl methods as virtual overrides for the get_size, render, ## activate, and start_editing vfuncs. The overrides will look for ## methods with all-caps versions of the vfunc names. ## ## This is called automatically by Glib::Type::register_object. ## ## For backward compatibility, we support being called directly as ## _install_overrides; this is deprecated, however. ## =for apidoc Gtk2::CellRenderer::_INSTALL_OVERRIDES __hide__ =cut =for apidoc Gtk2::CellRenderer::_install_overrides __hide__ =cut void _INSTALL_OVERRIDES (const char * package) ALIAS: Gtk2::CellRenderer::_install_overrides = 1 PREINIT: GType gtype; GtkCellRendererClass * class; CODE: PERL_UNUSED_VAR (ix); gtype = gperl_object_type_from_package (package); if (!gtype) croak ("package '%s' is not registered with Gtk2-Perl", package); if (! g_type_is_a (gtype, GTK_TYPE_CELL_RENDERER)) croak ("%s(%s) is not a GtkCellRenderer", package, g_type_name (gtype)); /* peek should suffice, as the bindings should keep this class * alive for us. */ class = g_type_class_peek (gtype); if (! class) croak ("internal problem: can't peek at type class for %s(%d)", g_type_name (gtype), gtype); gtk2perl_cell_renderer_class_init (class); ## ## here we provide a hokey way to chain up from one of the overrides we ## installed above. since the class of an object is determined by looking ## at the bottom of the chain, we can't rely on that to give us the ## class of the parent; so we rely on the package returned by caller(). ## if caller returns nothing useful, then we assume we need to call the ## base method. ## ## For backward compatibility, we support the old parent_foo syntax, although ## the actual call semantics are slightly different. ## =for apidoc Gtk2::CellRenderer::GET_SIZE __hide__ =cut =for apidoc Gtk2::CellRenderer::RENDER __hide__ =cut =for apidoc Gtk2::CellRenderer::ACTIVATE __hide__ =cut =for apidoc Gtk2::CellRenderer::START_EDITING __hide__ =cut =for apidoc Gtk2::CellRenderer::parent_get_size __hide__ =cut =for apidoc Gtk2::CellRenderer::parent_render __hide__ =cut =for apidoc Gtk2::CellRenderer::parent_activate __hide__ =cut =for apidoc Gtk2::CellRenderer::parent_start_editing __hide__ =cut void GET_SIZE (GtkCellRenderer * cell, ...) ALIAS: Gtk2::CellRenderer::RENDER = 1 Gtk2::CellRenderer::ACTIVATE = 2 Gtk2::CellRenderer::START_EDITING = 3 Gtk2::CellRenderer::parent_get_size = 4 Gtk2::CellRenderer::parent_render = 5 Gtk2::CellRenderer::parent_activate = 6 Gtk2::CellRenderer::parent_start_editing = 7 PREINIT: GtkCellRendererClass *parent_class = NULL; GType this, parent; PPCODE: /* look up the parent. * * FIXME: this approach runs into an endless loop with a hierarchy * where a Perl class inherits from a C class which inherits from a * Perl class. Like this: * * ... * +- GtkCellRenderer * +- Foo::RendererOne (Perl subclass) * +- FooRendererTwo (C subclass) * +- Foo::RendererThree (Perl subclass) * * yes, this is contrived. but possible! */ this = G_OBJECT_TYPE (cell); while ((parent = g_type_parent (this))) { if (! g_type_is_a (parent, GTK_TYPE_CELL_RENDERER)) croak ("parent of %s is not a GtkCellRenderer", g_type_name (this)); parent_class = g_type_class_peek (parent); /* check if this class isn't actually one of ours. if it is a * Perl class, then we must not chain up to it: if it had a sub * defined for the current vfunc, we wouldn't be in this * fallback one here since perl's method resolution machinery * would have found and called the sub. so chaining up would * result in the fallback being called again. this will lead * to an endless loop. * * so, if it's not a Perl class, we're done. if it is, * continue in the while loop to the next parent. */ if (parent_class->get_size != gtk2perl_cell_renderer_get_size) { break; } this = parent; } /* the ancestry will always contain GtkCellRenderer, so parent and * parent_class should never be NULL. */ assert (parent != 0 && parent_class != NULL); switch (ix) { case 4: /* deprecated parent_get_size */ case 0: /* GET_SIZE */ if (parent_class->get_size) { gint x_offset, y_offset, width, height; parent_class->get_size (cell, SvGtkWidget (ST (1)), SvGdkRectangle_ornull (ST (2)), &x_offset, &y_offset, &width, &height); EXTEND (SP, 4); PUSHs (sv_2mortal (newSViv (x_offset))); PUSHs (sv_2mortal (newSViv (y_offset))); PUSHs (sv_2mortal (newSViv (width))); PUSHs (sv_2mortal (newSViv (height))); } break; case 5: /* deprecated parent_render */ case 1: /* RENDER */ if (parent_class->render) parent_class->render (cell, SvGdkDrawable_ornull (ST (1)), /* drawable */ SvGtkWidget_ornull (ST (2)), /* widget */ SvGdkRectangle_ornull (ST (3)), /* background_area */ SvGdkRectangle_ornull (ST (4)), /* cell_area */ SvGdkRectangle_ornull (ST (5)), /* expose_area */ SvGtkCellRendererState (ST (6))); /* flags */ break; case 6: /* deprecated parent_activate */ case 2: /* ACTIVATE */ if (parent_class->activate) { gboolean ret; ret = parent_class->activate (cell, SvGdkEvent (ST (1)), SvGtkWidget (ST (2)), SvGChar (ST (3)), SvGdkRectangle_ornull (ST (4)), SvGdkRectangle_ornull (ST (5)), SvGtkCellRendererState (ST (6))); EXTEND (SP, 1); PUSHs (sv_2mortal (newSViv (ret))); } break; case 7: /* deprecated parent_start_editing */ case 3: /* START_EDITING */ if (parent_class->start_editing) { GtkCellEditable * editable; editable = parent_class->start_editing (cell, SvGdkEvent_ornull (ST (1)), SvGtkWidget (ST (2)), SvGChar (ST (3)), SvGdkRectangle_ornull (ST (4)), SvGdkRectangle_ornull (ST (5)), SvGtkCellRendererState (ST (6))); EXTEND (SP, 1); /* Note newSVGtkWidget here instead of * newSVGtkCellEditable so as to take ownership of * any floating ref. See comments with * gtk_cell_renderer_start_editing() above. */ PUSHs (sv_2mortal (newSVGtkWidget_ornull (GTK_WIDGET (editable)))); } break; default: g_assert_not_reached (); } Gtk2-1.2498/xs/GtkCellRendererAccel.xs000644 001750 000024 00000002474 11664366546 020525 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2006 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" MODULE = Gtk2::CellRendererAccel PACKAGE = Gtk2::CellRendererAccel PREFIX = gtk_cell_renderer_accel_ ##struct _GtkCellRendererAccel ##{ ## GtkCellRendererText parent; ## ## /*< private >*/ ## guint accel_key; ## GdkModifierType accel_mods; ## guint keycode; ## GtkCellRendererAccelMode accel_mode; ## ## GtkWidget *edit_widget; ## GtkWidget *grab_widget; ## GtkWidget *sizing_label; ##}; GtkCellRenderer *gtk_cell_renderer_accel_new (class); C_ARGS: /*void*/ Gtk2-1.2498/xs/GtkCellRendererCombo.xs000644 001750 000024 00000000641 11664366546 020547 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2004 by the gtk2-perl team (see the file AUTHORS) * * Licensed under the LGPL, see LICENSE file for more information. * * $Id$ */ #include "gtk2perl.h" MODULE = Gtk2::CellRendererCombo PACKAGE = Gtk2::CellRendererCombo PREFIX = gtk_cell_renderer_combo_ ## GtkCellRenderer * gtk_cell_renderer_combo_new (void); GtkCellRenderer * gtk_cell_renderer_combo_new (class) C_ARGS: /* void */ Gtk2-1.2498/xs/GtkCellRendererPixbuf.xs000644 001750 000024 00000002023 11664366546 020741 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" MODULE = Gtk2::CellRendererPixbuf PACKAGE = Gtk2::CellRendererPixbuf PREFIX = gtk_cell_renderer_pixbuf_ GtkCellRenderer * gtk_cell_renderer_pixbuf_new (class) C_ARGS: /* void */ Gtk2-1.2498/xs/GtkCellRendererProgress.xs000644 001750 000024 00000000660 11664366546 021315 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2004 by the gtk2-perl team (see the file AUTHORS) * * Licensed under the LGPL, see LICENSE file for more information. * * $Id$ */ #include "gtk2perl.h" MODULE = Gtk2::CellRendererProgress PACKAGE = Gtk2::CellRendererProgress PREFIX = gtk_cell_renderer_progress_ ## GtkCellRenderer * gtk_cell_renderer_progress_new (void); GtkCellRenderer * gtk_cell_renderer_progress_new (class) C_ARGS: /* void */ Gtk2-1.2498/xs/GtkCellRendererSpin.xs000644 001750 000024 00000002007 11664366546 020417 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2006 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" MODULE = Gtk2::CellRendererSpin PACKAGE = Gtk2::CellRendererSpin PREFIX = gtk_cell_renderer_spin_ GtkCellRenderer *gtk_cell_renderer_spin_new (class) C_ARGS: /*void*/ Gtk2-1.2498/xs/GtkCellRendererSpinner.xs000644 001750 000024 00000000557 11664366546 021134 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2010 by the gtk2-perl team (see the file AUTHORS) * * Licensed under the LGPL, see LICENSE file for more information. * * $Id$ */ #include "gtk2perl.h" MODULE = Gtk2::CellRendererSpinner PACKAGE = Gtk2::CellRendererSpinner PREFIX = gtk_cell_renderer_spinner_ GtkCellRenderer * gtk_cell_renderer_spinner_new (class) C_ARGS: /* void */ Gtk2-1.2498/xs/GtkCellRendererText.xs000644 001750 000024 00000002503 11664366546 020433 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" MODULE = Gtk2::CellRendererText PACKAGE = Gtk2::CellRendererText PREFIX = gtk_cell_renderer_text_ ##GtkWidget* gtk_cell_renderer_text_new (void); GtkCellRenderer * gtk_cell_renderer_text_new (class) C_ARGS: /* void */ ## void gtk_cell_renderer_text_set_fixed_height_from_font (GtkCellRendererText *renderer, gint number_of_rows) void gtk_cell_renderer_text_set_fixed_height_from_font (renderer, number_of_rows) GtkCellRendererText * renderer gint number_of_rows Gtk2-1.2498/xs/GtkCellRendererToggle.xs000644 001750 000024 00000003770 11664366546 020737 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" MODULE = Gtk2::CellRendererToggle PACKAGE = Gtk2::CellRendererToggle PREFIX = gtk_cell_renderer_toggle_ GtkCellRenderer * gtk_cell_renderer_toggle_new (class) C_ARGS: /* void */ ## gboolean gtk_cell_renderer_toggle_get_radio (GtkCellRendererToggle *toggle) gboolean gtk_cell_renderer_toggle_get_radio (toggle) GtkCellRendererToggle * toggle ## void gtk_cell_renderer_toggle_set_radio (GtkCellRendererToggle *toggle, gboolean radio) void gtk_cell_renderer_toggle_set_radio (toggle, radio) GtkCellRendererToggle * toggle gboolean radio ## gboolean gtk_cell_renderer_toggle_get_active (GtkCellRendererToggle *toggle) gboolean gtk_cell_renderer_toggle_get_active (toggle) GtkCellRendererToggle * toggle ## void gtk_cell_renderer_toggle_set_active (GtkCellRendererToggle *toggle, gboolean setting) void gtk_cell_renderer_toggle_set_active (toggle, setting) GtkCellRendererToggle * toggle gboolean setting #if GTK_CHECK_VERSION (2, 18, 0) gboolean gtk_cell_renderer_toggle_get_activatable (GtkCellRendererToggle *toggle); void gtk_cell_renderer_toggle_set_activatable (GtkCellRendererToggle *toggle, gboolean setting); #endif /* 2.18 */ Gtk2-1.2498/xs/GtkCellView.xs000644 001750 000024 00000003523 11664366546 016735 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2004 by the gtk2-perl team (see the file AUTHORS) * * Licensed under the LGPL, see LICENSE file for more information. * * $Id$ */ #include "gtk2perl.h" MODULE = Gtk2::CellView PACKAGE = Gtk2::CellView PREFIX = gtk_cell_view_ GtkWidget * gtk_cell_view_new (class) C_ARGS: /* void */ GtkWidget * gtk_cell_view_new_with_text (class, text) const gchar * text C_ARGS: text GtkWidget * gtk_cell_view_new_with_markup (class, markup) const gchar * markup C_ARGS: markup GtkWidget * gtk_cell_view_new_with_pixbuf (class, pixbuf) GdkPixbuf * pixbuf C_ARGS: pixbuf void gtk_cell_view_set_model (GtkCellView * cell_view, GtkTreeModel_ornull * model); void gtk_cell_view_set_displayed_row (GtkCellView * cell_view, GtkTreePath * path); GtkTreePath_own * gtk_cell_view_get_displayed_row (GtkCellView * cell_view); ## gboolean gtk_cell_view_get_size_of_row (GtkCellView * cell_view, GtkTreePath * path, GtkRequisition * requisition); GtkRequisition_copy * gtk_cell_view_get_size_of_row (GtkCellView * cell_view, GtkTreePath * path) PREINIT: GtkRequisition requisition; CODE: gtk_cell_view_get_size_of_row (cell_view, path, &requisition); RETVAL = &requisition; OUTPUT: RETVAL void gtk_cell_view_set_background_color (GtkCellView * cell_view, const GdkColor * color); ## GList * gtk_cell_view_get_cell_renderers (GtkCellView * cellview); void gtk_cell_view_get_cell_renderers (GtkCellView * cellview); PREINIT: GList * list; PPCODE: list = gtk_cell_view_get_cell_renderers (cellview); if (list) { GList * curr; for (curr = list; curr; curr = g_list_next (curr)) XPUSHs (sv_2mortal (newSVGtkCellRenderer (curr->data))); g_list_free (list); } else XSRETURN_EMPTY; #if GTK_CHECK_VERSION (2, 16, 0) GtkTreeModel_ornull * gtk_cell_view_get_model (GtkCellView * cellview); #endif /* 2.16 */ Gtk2-1.2498/xs/GtkCheckButton.xs000644 001750 000024 00000003146 11664366546 017435 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" MODULE = Gtk2::CheckButton PACKAGE = Gtk2::CheckButton PREFIX = gtk_check_button_ ## GtkWidget* gtk_check_button_new (void) ## GtkWidget* gtk_check_button_new_with_mnemonic (const gchar *label) ## GtkWidget* gtk_check_button_new_with_label (const gchar *label) GtkWidget* gtk_check_button_new (class, label=NULL) const gchar * label ALIAS: Gtk2::CheckButton::new_with_mnemonic = 1 Gtk2::CheckButton::new_with_label = 2 CODE: if (label) { if (ix == 2) RETVAL = gtk_check_button_new_with_label (label); else /* if (ix == 1) */ RETVAL = gtk_check_button_new_with_mnemonic (label); } else RETVAL = gtk_check_button_new (); OUTPUT: RETVAL ## void _gtk_check_button_get_props (GtkCheckButton *check_button, gint *indicator_size, gint *indicator_spacing) Gtk2-1.2498/xs/GtkCheckMenuItem.xs000644 001750 000024 00000004343 11664366546 017705 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" MODULE = Gtk2::CheckMenuItem PACKAGE = Gtk2::CheckMenuItem PREFIX = gtk_check_menu_item_ ## GtkWidget* gtk_check_menu_item_new (void) ## GtkWidget* gtk_check_menu_item_new_with_mnemonic (const gchar *label) ## GtkWidget* gtk_check_menu_item_new_with_label (const gchar *label) GtkWidget * gtk_check_menu_item_new (class, label=NULL) const gchar * label ALIAS: Gtk2::CheckMenuItem::new_with_mnemonic = 1 Gtk2::CheckMenuItem::new_with_label = 2 CODE: if (label) { if (ix == 2) RETVAL = gtk_check_menu_item_new_with_label (label); else RETVAL = gtk_check_menu_item_new_with_mnemonic (label); } else RETVAL = gtk_check_menu_item_new (); OUTPUT: RETVAL void gtk_check_menu_item_set_active (GtkCheckMenuItem *check_menu_item, gboolean is_active) gboolean gtk_check_menu_item_get_active (GtkCheckMenuItem *check_menu_item) void gtk_check_menu_item_toggled (GtkCheckMenuItem *check_menu_item) void gtk_check_menu_item_set_inconsistent (GtkCheckMenuItem *check_menu_item, gboolean setting) gboolean gtk_check_menu_item_get_inconsistent (GtkCheckMenuItem *check_menu_item) void gtk_check_menu_item_set_show_toggle (GtkCheckMenuItem *menu_item, gboolean always) #if GTK_CHECK_VERSION(2,4,0) void gtk_check_menu_item_set_draw_as_radio (GtkCheckMenuItem *check_menu_item, gboolean draw_as_radio); gboolean gtk_check_menu_item_get_draw_as_radio (GtkCheckMenuItem *check_menu_item); #endif Gtk2-1.2498/xs/GtkClipboard.xs000644 001750 000024 00000046053 11664366546 017127 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003-2006 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" /* * this entire object didn't exist in the original 2.0.0 release. hrm. */ #ifdef GTK_TYPE_CLIPBOARD #define DEFINE_QUARK(stem) \ static GQuark \ stem ## _quark (void) \ { \ static GQuark q = 0; \ if (q == 0) \ q = g_quark_from_static_string ("gtk2perl_" #stem ); \ return q; \ } DEFINE_QUARK (clipboard_get) DEFINE_QUARK (clipboard_clear) DEFINE_QUARK (clipboard_user_data) static void gtk2perl_clipboard_received_func (GtkClipboard *clipboard, GtkSelectionData *selection_data, gpointer data) { GPerlCallback * callback = (GPerlCallback*) data; gperl_callback_invoke (callback, NULL, clipboard, selection_data); gperl_callback_destroy (callback); } static void gtk2perl_clipboard_text_received_func (GtkClipboard *clipboard, const gchar *text, gpointer data) { GPerlCallback * callback = (GPerlCallback*) data; gperl_callback_invoke (callback, NULL, clipboard, text); gperl_callback_destroy (callback); } #if GTK_CHECK_VERSION(2, 4, 0) static void gtk2perl_clipboard_targets_received_func (GtkClipboard *clipboard, GdkAtom * targets, gint n_targets, gpointer data) { SV * targetlist; AV * av; int i; GPerlCallback * callback = (GPerlCallback*) data; av = newAV (); for (i = 0 ; i < n_targets ; i++) av_push (av, newSVGdkAtom (targets[i])); targetlist = sv_2mortal (newRV_noinc ((SV*) av)); gperl_callback_invoke (callback, NULL, clipboard, targetlist); gperl_callback_destroy (callback); } #endif #if GTK_CHECK_VERSION(2, 6, 0) static void gtk2perl_clipboard_image_received_func (GtkClipboard *clipboard, GdkPixbuf *pixbuf, gpointer data) { GPerlCallback * callback = (GPerlCallback*) data; gperl_callback_invoke (callback, NULL, clipboard, pixbuf); gperl_callback_destroy (callback); } #endif static void gtk2perl_clipboard_get_func (GtkClipboard *clipboard, GtkSelectionData *selection_data, guint info, gpointer user_data_or_owner) { GPerlCallback * callback = (GPerlCallback*) g_object_get_qdata (G_OBJECT (clipboard), clipboard_get_quark()); gperl_callback_invoke (callback, NULL, clipboard, selection_data, info, user_data_or_owner); } static void gtk2perl_clipboard_clear_func (GtkClipboard *clipboard, gpointer user_data_or_owner) { GPerlCallback * callback = (GPerlCallback*) g_object_get_qdata (G_OBJECT (clipboard), clipboard_clear_quark()); gperl_callback_invoke (callback, NULL, clipboard, user_data_or_owner); } #if GTK_CHECK_VERSION (2, 10, 0) static void gtk2perl_clipboard_rich_text_received_func (GtkClipboard *clipboard, GdkAtom format, const guint8 *text, gsize length, gpointer data) { gperl_callback_invoke ((GPerlCallback*) data, NULL, clipboard, sv_2mortal (newSVGdkAtom (format)), sv_2mortal (newSVpvn ((const char *) text, length))); } #endif /* 2.10 */ #if GTK_CHECK_VERSION (2, 14, 0) static void gtk2perl_clipboard_uri_received_func (GtkClipboard *clipboard, gchar **uris, gpointer data) { /* uris is not owned by us */ gperl_callback_invoke ((GPerlCallback*) data, NULL, clipboard, uris); } #endif /* 2.14 */ #endif /* defined GTK_TYPE_CLIPBOARD */ MODULE = Gtk2::Clipboard PACKAGE = Gtk2::Clipboard PREFIX = gtk_clipboard_ #ifdef GTK_TYPE_CLIPBOARD ## GtkClipboard *gtk_clipboard_get (GdkAtom selection) GtkClipboard * gtk_clipboard_get (class, selection) GdkAtom selection C_ARGS: selection #if GTK_CHECK_VERSION(2,2,0) ## GtkClipboard *gtk_clipboard_get_for_display (GdkDisplay *display, GdkAtom selection) GtkClipboard * gtk_clipboard_get_for_display (class, display, selection) GdkDisplay *display GdkAtom selection C_ARGS: display, selection ## GdkDisplay *gtk_clipboard_get_display (GtkClipboard *clipboard) GdkDisplay * gtk_clipboard_get_display (clipboard) GtkClipboard *clipboard #endif /* >=2.2.0 */ #### gboolean gtk_clipboard_set_with_data (GtkClipboard *clipboard, const GtkTargetEntry *targets, guint n_targets, GtkClipboardGetFunc get_func, GtkClipboardClearFunc clear_func, gpointer user_data) =for apidoc =for arg ... of Gtk2::TargetEntry's =cut gboolean gtk_clipboard_set_with_data (clipboard, get_func, clear_func, user_data, ...) GtkClipboard *clipboard SV * get_func SV * clear_func SV * user_data PREINIT: GtkTargetEntry *targets = NULL; guint n_targets; GPerlCallback * get_callback; GType get_param_types[4]; GPerlCallback * clear_callback; GType clear_param_types[2]; SV * real_user_data; CODE: get_param_types[0] = GTK_TYPE_CLIPBOARD; get_param_types[1] = GTK_TYPE_SELECTION_DATA; get_param_types[2] = G_TYPE_UINT; /* since we're on the _data one */ get_param_types[3] = GPERL_TYPE_SV; clear_param_types[0] = GTK_TYPE_CLIPBOARD; /* since we're on the _data one */ clear_param_types[1] = GPERL_TYPE_SV; GTK2PERL_STACK_ITEMS_TO_TARGET_ENTRY_ARRAY (4, targets, n_targets); /* WARNING: since we're piggybacking on the same callback for * the _with_data and _with_owner forms, the user_data arg * will go through the standard GSignal user data, and thus * we'll pass NULL to gperl_callback_new's user_data parameter. * this is not typical usage. */ get_callback = gperl_callback_new (get_func, NULL, 4, get_param_types, G_TYPE_NONE); clear_callback = gperl_callback_new (clear_func, NULL, 2, clear_param_types, G_TYPE_NONE); real_user_data = newSVsv (user_data); RETVAL = gtk_clipboard_set_with_data (clipboard, targets, n_targets, gtk2perl_clipboard_get_func, gtk2perl_clipboard_clear_func, real_user_data); if (!RETVAL) { gperl_callback_destroy (get_callback); gperl_callback_destroy (clear_callback); SvREFCNT_dec (real_user_data); } else { g_object_set_qdata_full (G_OBJECT (clipboard), clipboard_get_quark(), get_callback, (GDestroyNotify) gperl_callback_destroy); g_object_set_qdata_full (G_OBJECT (clipboard), clipboard_clear_quark(), clear_callback, (GDestroyNotify) gperl_callback_destroy); g_object_set_qdata_full (G_OBJECT (clipboard), clipboard_user_data_quark (), real_user_data, (GDestroyNotify) gperl_sv_free); } OUTPUT: RETVAL ## gboolean gtk_clipboard_set_with_owner (GtkClipboard *clipboard, const GtkTargetEntry *targets, guint n_targets, GtkClipboardGetFunc get_func, GtkClipboardClearFunc clear_func, GObject *owner) =for apidoc =for arg ... of Gtk2::TargetEntry's =cut gboolean gtk_clipboard_set_with_owner (clipboard, get_func, clear_func, owner, ...) GtkClipboard *clipboard SV * get_func SV * clear_func GObject *owner PREINIT: GtkTargetEntry *targets = NULL; guint n_targets = 0; GPerlCallback * get_callback; GType get_param_types[4]; GPerlCallback * clear_callback; GType clear_param_types[2]; CODE: get_param_types[0] = GTK_TYPE_CLIPBOARD; get_param_types[1] = GTK_TYPE_SELECTION_DATA; get_param_types[2] = G_TYPE_UINT; /* since we're on the _owner one */ get_param_types[3] = G_TYPE_OBJECT; clear_param_types[0] = GTK_TYPE_CLIPBOARD; /* since we're on the _owner one */ clear_param_types[1] = G_TYPE_OBJECT; GTK2PERL_STACK_ITEMS_TO_TARGET_ENTRY_ARRAY (4, targets, n_targets); /* WARNING: since we're piggybacking on the same callback for * the _with_data and _with_owner forms, the owner arg * will go through the standard GSignal user data, and thus * we'll pass NULL to gperl_callback_new's user_data parameter. * this is not typical usage. * * you may be thinking that i should just use the same function * for both forms, like with signal_connect in Glib. the * difference here is that gtk will treat the owner differently -- * you can query the owner -- so we have to call the proper one. * of course, we could put both of these in the same perl wrapper... */ get_callback = gperl_callback_new (get_func, NULL, 4, get_param_types, G_TYPE_NONE); clear_callback = gperl_callback_new (clear_func, NULL, 2, clear_param_types, G_TYPE_NONE); RETVAL = gtk_clipboard_set_with_owner (clipboard, targets, n_targets, gtk2perl_clipboard_get_func, gtk2perl_clipboard_clear_func, owner); if (!RETVAL) { gperl_callback_destroy (get_callback); gperl_callback_destroy (clear_callback); } else { g_object_set_qdata_full (G_OBJECT (clipboard), clipboard_get_quark(), get_callback, (GDestroyNotify) gperl_callback_destroy); g_object_set_qdata_full (G_OBJECT (clipboard), clipboard_clear_quark(), clear_callback, (GDestroyNotify) gperl_callback_destroy); } OUTPUT: RETVAL ## GObject *gtk_clipboard_get_owner (GtkClipboard *clipboard) ###GObject_ornull * GObject * gtk_clipboard_get_owner (clipboard) GtkClipboard *clipboard ## void gtk_clipboard_clear (GtkClipboard *clipboard) void gtk_clipboard_clear (clipboard) GtkClipboard *clipboard void gtk_clipboard_set_text (GtkClipboard *clipboard, const gchar_length *text, int length(text)) ## void gtk_clipboard_request_contents (GtkClipboard *clipboard, GdkAtom target, GtkClipboardReceivedFunc callback, gpointer user_data) void gtk_clipboard_request_contents (clipboard, target, callback, user_data=NULL) GtkClipboard *clipboard GdkAtom target SV * callback SV * user_data PREINIT: GPerlCallback * real_callback; GType param_types[2]; CODE: param_types[0] = GTK_TYPE_CLIPBOARD; param_types[1] = GTK_TYPE_SELECTION_DATA; real_callback = gperl_callback_new (callback, user_data, 2, param_types, G_TYPE_NONE); gtk_clipboard_request_contents (clipboard, target, gtk2perl_clipboard_received_func, real_callback); ## void gtk_clipboard_request_text (GtkClipboard *clipboard, GtkClipboardTextReceivedFunc callback, gpointer user_data) void gtk_clipboard_request_text (clipboard, callback, user_data=NULL) GtkClipboard *clipboard SV * callback SV * user_data PREINIT: GPerlCallback * real_callback; GType param_types[2]; CODE: param_types[0] = GTK_TYPE_CLIPBOARD; param_types[1] = G_TYPE_STRING; real_callback = gperl_callback_new (callback, user_data, 2, param_types, G_TYPE_NONE); gtk_clipboard_request_text (clipboard, gtk2perl_clipboard_text_received_func, real_callback); ## GtkSelectionData *gtk_clipboard_wait_for_contents (GtkClipboard *clipboard, GdkAtom target) GtkSelectionData_own_ornull * gtk_clipboard_wait_for_contents (clipboard, target) GtkClipboard *clipboard GdkAtom target ## gchar * gtk_clipboard_wait_for_text (GtkClipboard *clipboard) gchar * gtk_clipboard_wait_for_text (clipboard) GtkClipboard *clipboard CLEANUP: g_free (RETVAL); ## gboolean gtk_clipboard_wait_is_text_available (GtkClipboard *clipboard) gboolean gtk_clipboard_wait_is_text_available (clipboard) GtkClipboard *clipboard #if GTK_CHECK_VERSION (2, 4, 0) ## void gtk_clipboard_request_targets (GtkClipboard *clipboard, GtkClipboardTargetsReceivedFunc callback, gpointer user_data); void gtk_clipboard_request_targets (GtkClipboard *clipboard, SV * callback, SV * user_data=NULL) PREINIT: GType param_types[2]; GPerlCallback * real_callback; CODE: param_types[0] = GTK_TYPE_CLIPBOARD; param_types[1] = GPERL_TYPE_SV; real_callback = gperl_callback_new (callback, user_data, 2, param_types, G_TYPE_NONE); gtk_clipboard_request_targets (clipboard, gtk2perl_clipboard_targets_received_func, real_callback); =for apidoc Returns a list of GdkAtom's. =cut ## gboolean gtk_clipboard_wait_for_targets (GtkClipboard *clipboard, GdkAtom **targets, gint *n_targets); void gtk_clipboard_wait_for_targets (GtkClipboard *clipboard) PREINIT: GdkAtom *targets = NULL; gint n_targets, i; PPCODE: if (!gtk_clipboard_wait_for_targets (clipboard, &targets, &n_targets)) XSRETURN_EMPTY; if (targets) { EXTEND (SP, n_targets); for (i = 0 ; i < n_targets ; i++) PUSHs (sv_2mortal (newSVGdkAtom (targets[i]))); g_free (targets); } #endif /* 2.4.0 */ #if GTK_CHECK_VERSION (2, 6, 0) void gtk_clipboard_set_image (GtkClipboard *clipboard, GdkPixbuf *pixbuf); GdkPixbuf_noinc_ornull * gtk_clipboard_wait_for_image (GtkClipboard *clipboard); gboolean gtk_clipboard_wait_is_image_available (GtkClipboard *clipboard); ## void gtk_clipboard_request_image (GtkClipboard *clipboard, GtkClipboardImageReceivedFunc callback, gpointer user_data); void gtk_clipboard_request_image (GtkClipboard *clipboard, SV *callback, SV *user_data=NULL) PREINIT: GType param_types[2]; GPerlCallback *real_callback; CODE: param_types[0] = GTK_TYPE_CLIPBOARD; param_types[1] = GDK_TYPE_PIXBUF; real_callback = gperl_callback_new (callback, user_data, 2, param_types, G_TYPE_NONE); gtk_clipboard_request_image (clipboard, gtk2perl_clipboard_image_received_func, real_callback); ## void gtk_clipboard_set_can_store (GtkClipboard *clipboard, const GtkTargetEntry *targets, gint n_targets); =for apidoc =for arg ... of Gtk2::TargetEntry's =cut void gtk_clipboard_set_can_store (clipboard, ...); GtkClipboard *clipboard PREINIT: GtkTargetEntry *targets = NULL; guint n_targets; CODE: GTK2PERL_STACK_ITEMS_TO_TARGET_ENTRY_ARRAY (1, targets, n_targets); gtk_clipboard_set_can_store (clipboard, targets, (gint) n_targets); void gtk_clipboard_store (GtkClipboard *clipboard); gboolean gtk_clipboard_wait_is_target_available (GtkClipboard *clipboard, GdkAtom target); #endif /* 2.6.0 */ #if GTK_CHECK_VERSION (2, 10, 0) ##void ##gtk_clipboard_request_rich_text (GtkClipboard *clipboard, ## GtkTextBuffer *buffer, ## GtkClipboardRichTextReceivedFunc callback, ## gpointer user_data) void gtk_clipboard_request_rich_text (clipboard, buffer, callback, user_data=NULL) GtkClipboard * clipboard GtkTextBuffer * buffer SV * callback SV * user_data PREINIT: GPerlCallback * real_callback; GType param_types[3]; CODE: param_types[0] = GTK_TYPE_CLIPBOARD; param_types[1] = GPERL_TYPE_SV; /* there is no GDK_TYPE_ATOM */ /* The real callback gets string and length parameters, but * perl scalars know their own length, so we won't expose that. * The string may have embedded nuls, so we use an SV. */ param_types[2] = GPERL_TYPE_SV; real_callback = gperl_callback_new (callback, user_data, G_N_ELEMENTS (param_types), param_types, G_TYPE_NONE); gtk_clipboard_request_rich_text (clipboard, buffer, gtk2perl_clipboard_rich_text_received_func, real_callback); ##guint8 * ##gtk_clipboard_wait_for_rich_text (GtkClipboard *clipboard, ## GtkTextBuffer *buffer, ## GdkAtom *format, ## gsize *length) void gtk_clipboard_wait_for_rich_text (clipboard, buffer) GtkClipboard *clipboard GtkTextBuffer *buffer PREINIT: GdkAtom format; gsize length; guint8 *text; PPCODE: text = gtk_clipboard_wait_for_rich_text (clipboard, buffer, &format, &length); if (text) { EXTEND (SP, 2); PUSHs (sv_2mortal (newSVpvn ((const char *) text, length))); PUSHs (sv_2mortal (newSVGdkAtom (format))); g_free (text); } gboolean gtk_clipboard_wait_is_rich_text_available (GtkClipboard *clipboard, GtkTextBuffer *buffer) #endif /* 2.10.0 */ #if GTK_CHECK_VERSION (2, 14, 0) # void gtk_clipboard_request_uris (GtkClipboard *clipboard, GtkClipboardURIReceivedFunc callback, gpointer user_data); void gtk_clipboard_request_uris (GtkClipboard *clipboard, SV *func, SV *data=NULL) PREINIT: GPerlCallback * callback; GType param_types[2]; CODE: param_types[0] = GTK_TYPE_CLIPBOARD; param_types[1] = G_TYPE_STRV; callback = gperl_callback_new (func, data, G_N_ELEMENTS (param_types), param_types, G_TYPE_NONE); gtk_clipboard_request_uris (clipboard, gtk2perl_clipboard_uri_received_func, callback); # gchar** gtk_clipboard_wait_for_uris (GtkClipboard *clipboard); SV * gtk_clipboard_wait_for_uris (GtkClipboard *clipboard) PREINIT: gchar **strv; CODE: strv = gtk_clipboard_wait_for_uris (clipboard); RETVAL = gperl_new_boxed (strv, G_TYPE_STRV, TRUE); /* we own the strv */ OUTPUT: RETVAL gboolean gtk_clipboard_wait_is_uris_available (GtkClipboard *clipboard); #endif /* 2.14 */ #endif /* defined GTK_TYPE_CLIPBOARD */ Gtk2-1.2498/xs/GtkColorButton.xs000644 001750 000024 00000002674 11664366546 017503 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003 by the gtk2-perl team (see the file AUTHORS) * * Licensed under the LGPL, see LICENSE file for more information. * * $Id$ */ #include "gtk2perl.h" MODULE = Gtk2::ColorButton PACKAGE = Gtk2::ColorButton PREFIX = gtk_color_button_ ## GtkWidget *gtk_color_button_new (void); ## GtkWidget *gtk_color_button_new_with_color (GdkColor *color); GtkWidget * gtk_color_button_new (class, GdkColor*color=NULL) ALIAS: new_with_color = 1 CODE: PERL_UNUSED_VAR (ix); if (items == 2) RETVAL = gtk_color_button_new_with_color (color); else RETVAL = gtk_color_button_new (); OUTPUT: RETVAL void gtk_color_button_set_color (GtkColorButton *color_button, GdkColor *color); void gtk_color_button_set_alpha (GtkColorButton *color_button, guint16 alpha); ## void gtk_color_button_get_color (GtkColorButton *color_button, GdkColor *color); GdkColor_copy * gtk_color_button_get_color (GtkColorButton *color_button) PREINIT: GdkColor color; CODE: gtk_color_button_get_color (color_button, &color); RETVAL = &color; OUTPUT: RETVAL guint16 gtk_color_button_get_alpha (GtkColorButton *color_button); void gtk_color_button_set_use_alpha (GtkColorButton *color_button, gboolean use_alpha); gboolean gtk_color_button_get_use_alpha (GtkColorButton *color_button); void gtk_color_button_set_title (GtkColorButton *color_button, const gchar *title); const gchar *gtk_color_button_get_title (GtkColorButton *color_button); Gtk2-1.2498/xs/GtkColorSelection.xs000644 001750 000024 00000014227 11664366546 020152 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" MODULE = Gtk2::ColorSelection PACKAGE = Gtk2::ColorSelection PREFIX = gtk_color_selection_ GtkWidget * gtk_color_selection_new (class) C_ARGS: /* void */ ## gboolean gtk_color_selection_get_has_opacity_control (GtkColorSelection *colorsel) gboolean gtk_color_selection_get_has_opacity_control (colorsel) GtkColorSelection * colorsel ## void gtk_color_selection_set_has_opacity_control (GtkColorSelection *colorsel, gboolean has_opacity) void gtk_color_selection_set_has_opacity_control (colorsel, has_opacity) GtkColorSelection * colorsel gboolean has_opacity ## gboolean gtk_color_selection_get_has_palette (GtkColorSelection *colorsel) gboolean gtk_color_selection_get_has_palette (colorsel) GtkColorSelection * colorsel ## void gtk_color_selection_set_has_palette (GtkColorSelection *colorsel, gboolean has_palette) void gtk_color_selection_set_has_palette (colorsel, has_palette) GtkColorSelection * colorsel gboolean has_palette ## void gtk_color_selection_set_current_color (GtkColorSelection *colorsel, GdkColor *color) void gtk_color_selection_set_current_color (colorsel, color) GtkColorSelection * colorsel GdkColor * color # void gtk_color_selection_set_current_alpha (GtkColorSelection *colorsel, guint16 alpha) void gtk_color_selection_set_current_alpha (colorsel, alpha) GtkColorSelection * colorsel guint16 alpha ## void gtk_color_selection_get_current_color (GtkColorSelection *colorsel, GdkColor *color) GdkColor_copy * gtk_color_selection_get_current_color (colorsel) GtkColorSelection * colorsel PREINIT: GdkColor color; CODE: gtk_color_selection_get_current_color (colorsel, &color); RETVAL = &color; OUTPUT: RETVAL # guint16 gtk_color_selection_get_current_alpha (GtkColorSelection *colorsel) guint16 gtk_color_selection_get_current_alpha (colorsel) GtkColorSelection * colorsel ## void gtk_color_selection_set_previous_color (GtkColorSelection *colorsel, GdkColor *color) void gtk_color_selection_set_previous_color (colorsel, color) GtkColorSelection * colorsel GdkColor * color # void gtk_color_selection_set_previous_alpha (GtkColorSelection *colorsel, guint16 alpha) void gtk_color_selection_set_previous_alpha (colorsel, alpha) GtkColorSelection * colorsel guint16 alpha ## void gtk_color_selection_get_previous_color (GtkColorSelection *colorsel, GdkColor *color) GdkColor_copy * gtk_color_selection_get_previous_color (colorsel) GtkColorSelection * colorsel PREINIT: GdkColor color; CODE: gtk_color_selection_get_previous_color (colorsel, &color); RETVAL = &color; OUTPUT: RETVAL # guint16 gtk_color_selection_get_previous_alpha (GtkColorSelection *colorsel) guint16 gtk_color_selection_get_previous_alpha (colorsel) GtkColorSelection * colorsel ## gboolean gtk_color_selection_is_adjusting (GtkColorSelection *colorsel) gboolean gtk_color_selection_is_adjusting (colorsel) GtkColorSelection * colorsel ## gboolean gtk_color_selection_palette_from_string (const gchar *str, GdkColor **colors, gint *n_colors) =for apidoc Returns a list of Gtk2::Gdk::color's. =cut void gtk_color_selection_palette_from_string (class, string) gchar * string PREINIT: GdkColor * colors; gint n_colors; int i; PPCODE: if (!gtk_color_selection_palette_from_string (string, &colors, &n_colors)) XSRETURN_EMPTY; EXTEND (SP, n_colors); for (i = 0; i < n_colors; i++) PUSHs (sv_2mortal (newSVGdkColor_copy (&(colors[i])))); g_free (colors); ## gchar* gtk_color_selection_palette_to_string (const GdkColor *colors, gint n_colors) =for apidoc =for signature (string) = Gtk::ColorSelection->palette_to_string (...) =for arg ... of Gtk2::Gdk::Color's for the palette Encodes a palette as a string, useful for persistent storage. =cut SV * gtk_color_selection_palette_to_string (class, ...) PREINIT: GdkColor * colors; gint n_colors; gchar * string; int i; CODE: n_colors = items - 1; for (i = 0 ; i < n_colors ; i++) { /* this will croak if any of the items are not valid */ gperl_get_boxed_check (ST (i+1), GDK_TYPE_COLOR); } /* now that we know we won't croak, it's safe to alloc some memory. */ colors = g_new0 (GdkColor, n_colors); for (i = 0 ; i < n_colors ; i++) { GdkColor * c = gperl_get_boxed_check (ST (i+1), GDK_TYPE_COLOR); colors[i] = *c; } string = gtk_color_selection_palette_to_string (colors, n_colors); RETVAL = newSVpv (string, 0); g_free (colors); g_free (string); OUTPUT: RETVAL # TODO: GtkColorSelectionChangePaletteFunc not in typemap (that's a mouthfull) ## GtkColorSelectionChangePaletteFunc gtk_color_selection_set_change_palette_hook (GtkColorSelectionChangePaletteFunc func) #GtkColorSelectionChangePaletteFunc #gtk_color_selection_set_change_palette_hook (func) # GtkColorSelectionChangePaletteFunc func # TODO: no marshaller for GtkColorSelectionChangePaletteWithScreenFunc either ## GtkColorSelectionChangePaletteWithScreenFunc gtk_color_selection_set_change_palette_with_screen_hook (GtkColorSelectionChangePaletteWithScreenFunc func) # deprecated ## void gtk_color_selection_get_color (GtkColorSelection *colorsel, gdouble *color) # deprecated ## void gtk_color_selection_set_update_policy (GtkColorSelection *colorsel, GtkUpdateType policy) # deprecated #void gtk_color_selection_set_color (GtkColorSelection *colorsel, gdouble *color) #GtkType gtk_color_selection_get_type (void) G_GNUC_CONST Gtk2-1.2498/xs/GtkColorSelectionDialog.xs000644 001750 000024 00000003347 11664366546 021273 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" MODULE = Gtk2::ColorSelectionDialog PACKAGE = Gtk2::ColorSelectionDialog PREFIX = gtk_color_selection_dialog_ =for apidoc colorsel __hide__ =cut GtkWidget * get_color_selection (dialog) GtkColorSelectionDialog *dialog ALIAS: colorsel = 1 ok_button = 2 cancel_button = 3 help_button = 4 CODE: switch (ix) { case 0: case 1: #if GTK_CHECK_VERSION (2, 14, 0) RETVAL = gtk_color_selection_dialog_get_color_selection (dialog); #else RETVAL = dialog->colorsel; #endif /* 2.14 */ break; case 2: RETVAL = dialog->ok_button; break; case 3: RETVAL = dialog->cancel_button; break; case 4: RETVAL = dialog->help_button; break; default: RETVAL = NULL; g_assert_not_reached (); } OUTPUT: RETVAL ## GtkWidget* gtk_color_selection_dialog_new (const gchar *title) GtkWidget * gtk_color_selection_dialog_new (class, title) const gchar * title C_ARGS: title Gtk2-1.2498/xs/GtkCombo.xs000644 001750 000024 00000005232 11664366546 016261 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" MODULE = Gtk2::Combo PACKAGE = Gtk2::Combo PREFIX = gtk_combo_ =for deprecated_by Gtk2::ComboBox =cut ## GtkWidget* gtk_combo_new (void) GtkWidget* gtk_combo_new (class) C_ARGS: /* void */ ## void gtk_combo_disable_activate (GtkCombo* combo) void gtk_combo_disable_activate (combo) GtkCombo * combo ##void gtk_combo_set_value_in_list (GtkCombo* combo, gboolean val, gboolean ok_if_empty) void gtk_combo_set_value_in_list (combo, val, ok_if_empty) GtkCombo * combo gboolean val gboolean ok_if_empty ##void gtk_combo_set_use_arrows (GtkCombo* combo, gboolean val) void gtk_combo_set_use_arrows (combo, val) GtkCombo * combo gboolean val ##void gtk_combo_set_use_arrows_always (GtkCombo* combo, gboolean val) void gtk_combo_set_use_arrows_always (combo, val) GtkCombo * combo gboolean val ##void gtk_combo_set_case_sensitive (GtkCombo* combo, gboolean val) void gtk_combo_set_case_sensitive (combo, val) GtkCombo * combo gboolean val ##void gtk_combo_set_item_string (GtkCombo* combo, GtkItem* item, const gchar* item_value) void gtk_combo_set_item_string (combo, item, item_value) GtkCombo * combo GtkItem * item gchar * item_value ##void gtk_combo_set_popdown_strings (GtkCombo* combo, GList *strings) =for apidoc =for arg ... of strings =cut void gtk_combo_set_popdown_strings (combo, ...) GtkCombo * combo PREINIT: GList * strings = NULL; CODE: for( items--; items > 0; items-- ) strings = g_list_prepend(strings, SvGChar(ST(items))); if( strings ) { gtk_combo_set_popdown_strings(combo, strings); g_list_free(strings); } GtkWidget * entry (combo) GtkCombo * combo ALIAS: Gtk2::Combo::list = 1 CODE: switch (ix) { case 0: RETVAL = combo->entry; break; case 1: RETVAL = combo->list; break; default: RETVAL = NULL; g_assert_not_reached (); } OUTPUT: RETVAL Gtk2-1.2498/xs/GtkComboBox.xs000644 001750 000024 00000014651 11664366546 016737 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003-2006, 2010 by the gtk2-perl team (see the file AUTHORS) * * Licensed under the LGPL, see LICENSE file for more information. * * $Id$ */ #include "gtk2perl.h" #if GTK_CHECK_VERSION (2, 6, 0) # include "gtk2perl-private.h" /* For the row separator callback. */ #endif MODULE = Gtk2::ComboBox PACKAGE = Gtk2::ComboBox PREFIX = gtk_combo_box_ =for object Gtk2::ComboBox - A widget used to choose from a list of items =cut =for position SYNOPSIS =head1 SYNOPSIS # the easy way: $combobox = Gtk2::ComboBox->new_text; foreach (@strings) { $combobox->append_text ($_); } $combobox->prepend_text ($another_string); $combobox->insert_text ($index, $yet_another_string); $combobox->remove_text ($index); $text = $combobox->get_active_text; # the full-featured way. # a combo box that shows stock ids and their images: use constant ID_COLUMN => 0; $model = Gtk2::ListStore->new ('Glib::String'); foreach (qw(gtk-ok gtk-cancel gtk-yes gtk-no gtk-save gtk-open)) { $model->set ($model->append, ID_COLUMN, $_); } $combo_box = Gtk2::ComboBox->new ($model); # to display anything, you must pack cell renderers into # the combobox, which implements the Gtk2::CellLayout interface. $renderer = Gtk2::CellRendererPixbuf->new; $combo_box->pack_start ($renderer, FALSE); $combo_box->add_attribute ($renderer, stock_id => ID_COLUMN); $renderer = Gtk2::CellRendererText->new; $combo_box->pack_start ($renderer, TRUE); $combo_box->add_attribute ($renderer, text => ID_COLUMN); # select by index $combo_box->set_active ($index); $active_index = $combo_box->get_active; # or by iter $combo_box->set_active_iter ($iter); $active_iter = $combo_box->get_active_iter; =cut =for position DESCRIPTION =head1 DESCRIPTION Gtk2::ComboBox is a widget that allows the user to choose from a list of valid choices. The ComboBox displays the selected choice. When activated, the ComboBox displays a popup which allows the user to make a new choice. Unlike its predecessors Gtk2::Combo and Gtk2::OptionMenu, the Gtk2::ComboBox uses the model-view pattern; the list of valid choices is specified in the form of a tree model, and the display of the choices can be adapted to the data in the model by using cell renderers, as you would in a tree view. This is possible since ComboBox implements the Gtk2::CellLayout interface. The tree model holding the valid choices is not restricted to a flat list; it can be a real tree, and the popup will reflect the tree structure. In addition to the model-view API, ComboBox offers a simple API which is suitable for text-only combo boxes, and hides the complexity of managing the data in a model. It consists of the methods C, C, C, C, C and C. =cut GtkWidget *gtk_combo_box_new (class, GtkTreeModel *model=NULL) ALIAS: new_with_model = 1 CODE: if (model) RETVAL = gtk_combo_box_new_with_model (model); else RETVAL = gtk_combo_box_new (); OUTPUT: RETVAL CLEANUP: PERL_UNUSED_VAR (ix); ##/* grids */ void gtk_combo_box_set_wrap_width (GtkComboBox *combo_box, gint width); void gtk_combo_box_set_row_span_column (GtkComboBox *combo_box, gint row_span); void gtk_combo_box_set_column_span_column (GtkComboBox *combo_box, gint column_span); ##/* get/set active item */ gint gtk_combo_box_get_active (GtkComboBox *combo_box); void gtk_combo_box_set_active (GtkComboBox *combo_box, gint index); ## gboolean gtk_combo_box_get_active_iter (GtkComboBox *combo_box, GtkTreeIter *iter); GtkTreeIter_copy * gtk_combo_box_get_active_iter (GtkComboBox * combo_box) PREINIT: GtkTreeIter iter; CODE: if (!gtk_combo_box_get_active_iter (combo_box, &iter)) XSRETURN_UNDEF; RETVAL = &iter; OUTPUT: RETVAL void gtk_combo_box_set_active_iter (GtkComboBox *combo_box, GtkTreeIter_ornull *iter); ##/* getters and setters */ =for apidoc Note that setting C for no model is new in Gtk 2.6. (Both here or via C.) =cut void gtk_combo_box_set_model (GtkComboBox *combo_box, GtkTreeModel_ornull *model) GtkTreeModel *gtk_combo_box_get_model (GtkComboBox *combo_box); ##/* convenience -- text */ GtkWidget *gtk_combo_box_new_text (class); C_ARGS: /* void */ void gtk_combo_box_append_text (GtkComboBox *combo_box, const gchar *text); void gtk_combo_box_insert_text (GtkComboBox *combo_box, gint position, const gchar *text); void gtk_combo_box_prepend_text (GtkComboBox *combo_box, const gchar *text); void gtk_combo_box_remove_text (GtkComboBox *combo_box, gint position); ##/* programmatic control */ void gtk_combo_box_popup (GtkComboBox *combo_box); void gtk_combo_box_popdown (GtkComboBox *combo_box); #if GTK_CHECK_VERSION (2, 6, 0) gint gtk_combo_box_get_wrap_width (GtkComboBox *combo_box); gint gtk_combo_box_get_row_span_column (GtkComboBox *combo_box); gint gtk_combo_box_get_column_span_column (GtkComboBox *combo_box); #endif #if GTK_CHECK_VERSION (2, 6, 0) gchar_own * gtk_combo_box_get_active_text (GtkComboBox *combo_box); gboolean gtk_combo_box_get_add_tearoffs (GtkComboBox *combo_box); void gtk_combo_box_set_add_tearoffs (GtkComboBox *combo_box, gboolean add_tearoffs); #GtkTreeViewRowSeparatorFunc gtk_combo_box_get_row_separator_func (GtkComboBox *combo_box); ## void gtk_combo_box_set_row_separator_func (GtkComboBox *combo_box, GtkTreeViewRowSeparatorFunc func, gpointer data, GtkDestroyNotify destroy) void gtk_combo_box_set_row_separator_func (GtkComboBox *combo_box, SV *func, SV *data = NULL) PREINIT: GPerlCallback *callback; CODE: callback = gtk2perl_tree_view_row_separator_func_create (func, data); gtk_combo_box_set_row_separator_func ( combo_box, (GtkTreeViewRowSeparatorFunc) gtk2perl_tree_view_row_separator_func, callback, (GtkDestroyNotify) gperl_callback_destroy); void gtk_combo_box_set_focus_on_click (GtkComboBox *combo_box, gboolean focus_on_click); gboolean gtk_combo_box_get_focus_on_click (GtkComboBox *combo_box); #AtkObject * gtk_combo_box_get_popup_accessible (GtkComboBox *combo_box); #endif #if GTK_CHECK_VERSION (2, 10, 0) void gtk_combo_box_set_title (GtkComboBox *combo_box, const gchar * title); const gchar * gtk_combo_box_get_title (GtkComboBox *combo_box); #endif #if GTK_CHECK_VERSION (2, 14, 0) void gtk_combo_box_set_button_sensitivity (GtkComboBox *combo_box, GtkSensitivityType sensitivity); GtkSensitivityType gtk_combo_box_get_button_sensitivity (GtkComboBox *combo_box); #endif /* 2.14 */ Gtk2-1.2498/xs/GtkComboBoxEntry.xs000644 001750 000024 00000005326 11664366546 017760 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003 by the gtk2-perl team (see the file AUTHORS) * * Licensed under the LGPL, see LICENSE file for more information. * * $Id$ */ #include "gtk2perl.h" MODULE = Gtk2::ComboBoxEntry PACKAGE = Gtk2::ComboBoxEntry PREFIX = gtk_combo_box_entry_ =for object Gtk2::ComboBoxEntry - A text entry field with a dropdown list =cut =for position SYNOPSIS =head1 SYNOPSIS # the easy way $combo_box_entry = Gtk2::ComboBoxEntry->new_text; foreach (qw(one two three four five)) { $combo_box_entry->append_text ($_); } # or the powerful way. there always has to be at least # one text column in the model, but you can have anything # else in it that you want, just like Gtk2::ComboBox. $combo_box_entry = Gtk2::ComboBoxEntry->new ($model, $text_index); # to mess with with entry directly, get the child: $current_text = $combo_box_entry->child->get_text; =cut =for position DESCRIPTION =head1 DESCRIPTION A ComboBoxEntry is a widget that allows the user to choose from a list of valid choices or enter a different value. It is very similar to a ComboBox, but displays the selected value in an entry to allow modifying it. The ComboBoxEntry has a Gtk2::Entry as its child. To get or set the currently-displayed text, just manipulate the entry normally. =cut ## GtkWidget *gtk_combo_box_entry_new (void); ## GtkWidget *gtk_combo_box_entry_new_with_model (GtkTreeModel *model, gint text_column); =for apidoc new_with_model =for signature $entry = Gtk2::ComboBoxEntry->new_with_model ($model, $text_column) =for arg model (GtkTreeModel) =for arg text_column (int) =for arg ... (__hide__) Alias for new, with two arguments. =cut =for apidoc =for signature $entry = Gtk2::ComboBoxEntry->new =for signature $entry = Gtk2::ComboBoxEntry->new ($model, $text_column) =for arg model (GtkTreeModel) =for arg text_column (int) =for arg ... (__hide__) =cut GtkWidget * gtk_combo_box_entry_new (class, ...) ALIAS: new_with_model = 1 CODE: if (ix == 1 || items == 3) { RETVAL = gtk_combo_box_entry_new_with_model (SvGtkTreeModel (ST (1)), SvIV (ST (2))); } else if (ix == 0 && items == 1) { RETVAL = gtk_combo_box_entry_new (); } else { croak ("Usage: Gtk2::ComboBoxEntry->new ()\n" " OR\n" " Gtk2::ComboBoxEntry->new (model, text_column)\n" " OR\n" " Gtk2::ComboBoxEntry->new_with_model (model, text_column)\n" " wrong number of arguments"); } OUTPUT: RETVAL gint gtk_combo_box_entry_get_text_column (GtkComboBoxEntry *entry_box); void gtk_combo_box_entry_set_text_column (GtkComboBoxEntry *entry_box, gint text_column); #if GTK_CHECK_VERSION (2, 4, 0) GtkWidget * gtk_combo_box_entry_new_text (class) C_ARGS: /* void */ #endif Gtk2-1.2498/xs/GtkContainer.xs000644 001750 000024 00000033422 11664366546 017146 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003, 2010 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" static void init_child_property_value (GObject * object, const char * name, GValue * value) { GParamSpec * pspec; pspec = gtk_container_class_find_child_property (G_OBJECT_GET_CLASS (object), name); if (!pspec) croak ("property %s not found in object class %s", name, G_OBJECT_TYPE_NAME (object)); g_value_init (value, G_PARAM_SPEC_VALUE_TYPE (pspec)); } static void gtk2perl_foreach_callback (GtkWidget * widget, GPerlCallback * callback) { gperl_callback_invoke (callback, NULL, widget); } MODULE = Gtk2::Container PACKAGE = Gtk2::Container PREFIX = gtk_container_ void gtk_container_set_border_width (container, border_width) GtkContainer *container guint border_width guint gtk_container_get_border_width (container) GtkContainer *container void gtk_container_add (container, widget) GtkContainer *container GtkWidget *widget void gtk_container_remove (container, widget) GtkContainer *container GtkWidget *widget void gtk_container_set_resize_mode (container, resize_mode) GtkContainer *container GtkResizeMode resize_mode GtkResizeMode gtk_container_get_resize_mode (container) GtkContainer *container void gtk_container_check_resize (container) GtkContainer *container =for apidoc forall =for arg callback (subroutine) Code to invoke on each child widget Invoke I<$callback> on each child of I<$container>, including "internal" children. Most applications should not use this function. Compare with I. =cut =for apidoc =for arg callback (subroutine) Code to invoke on each child widget Invoke I<$callback> on each child of I<$container>, ignoring "internal" children. =cut void gtk_container_foreach (container, callback, callback_data=NULL) GtkContainer *container SV * callback SV * callback_data ALIAS: forall = 1 PREINIT: GPerlCallback * real_callback; GType param_types [1]; CODE: param_types[0] = GTK_TYPE_WIDGET; real_callback = gperl_callback_new (callback, callback_data, 1, param_types, G_TYPE_NONE); if (ix == 1) gtk_container_forall (container, (GtkCallback)gtk2perl_foreach_callback, real_callback); else gtk_container_foreach (container, (GtkCallback)gtk2perl_foreach_callback, real_callback); gperl_callback_destroy (real_callback); ## deprecated ## gtk_container_foreach_full ## GList* gtk_container_get_children (GtkContainer *container) =for apidoc Returns a list of Gtk2::Widget's, the children of the container. =cut void gtk_container_get_children (container) GtkContainer *container PREINIT: GList * children, * i; PPCODE: children = gtk_container_get_children (container); for (i = children ; i != NULL ; i = i->next) XPUSHs (sv_2mortal (newSVGtkWidget (GTK_WIDGET (i->data)))); g_list_free (children); ## void gtk_container_propagate_expose (GtkContainer *container, GtkWidget *child, GdkEventExpose *event) void gtk_container_propagate_expose (container, child, event) GtkContainer *container GtkWidget *child GdkEvent *event C_ARGS: container, child, (GdkEventExpose *) event ## void gtk_container_set_focus_chain (GtkContainer *container, GList *focusable_widgets) =for apidoc =for arg ... of Gtk2::Widget's, the focus chain Sets a focus chain, overriding the one computed automatically by GTK+. In principle each widget in the chain should be a descendant of the container, but this is not enforced by this method, since it's allowed to set the focus chain before you pack the widgets, or have a widget in the chain that isn't always packed. The necessary checks are done when the focus chain is actually traversed. =cut void gtk_container_set_focus_chain (container, ...) GtkContainer *container PREINIT: GList *focusable_widgets = NULL; int i; CODE: for (i = items - 1 ; i > 0 ; i--) focusable_widgets = g_list_prepend (focusable_widgets, SvGtkWidget (ST (i))); gtk_container_set_focus_chain (container, focusable_widgets); g_list_free (focusable_widgets); ## gboolean gtk_container_get_focus_chain (GtkContainer *container, GList **focusable_widgets) =for apidoc Returns a list of Gtk2::Widgets, the focus chain. =cut void gtk_container_get_focus_chain (container) GtkContainer *container PREINIT: GList * i, * focusable_widgets = NULL; PPCODE: if (!gtk_container_get_focus_chain (container, &focusable_widgets)) XSRETURN_EMPTY; for (i = focusable_widgets; i != NULL ; i = i->next) XPUSHs (sv_2mortal (newSVGtkWidget (i->data))); g_list_free (focusable_widgets); void gtk_container_unset_focus_chain (container) GtkContainer *container void gtk_container_set_focus_child (container, child) GtkContainer *container GtkWidget_ornull *child #if GTK_CHECK_VERSION (2, 14, 0) GtkWidget_ornull * gtk_container_get_focus_child (GtkContainer *container); #endif /* 2.14 */ GtkAdjustment_ornull * gtk_container_get_focus_hadjustment (container) GtkContainer * container GtkAdjustment_ornull * gtk_container_get_focus_vadjustment (container) GtkContainer * container void gtk_container_set_focus_vadjustment (container, adjustment) GtkContainer *container GtkAdjustment_ornull *adjustment void gtk_container_set_focus_hadjustment (container, adjustment) GtkContainer *container GtkAdjustment_ornull *adjustment void gtk_container_resize_children (container) GtkContainer *container ## GtkType gtk_container_child_type (GtkContainer *container) const char * gtk_container_child_type (container) GtkContainer *container PREINIT: GType gtype; CODE: gtype = gtk_container_child_type (container); if (!gtype) /* this means that the container is full. */ XSRETURN_UNDEF; /* GtkWidgets are GObjects, so we should only be getting object * types back from this function. however, we might get a GType * that isn't registered with the bindings, so we have to look * for one that we know about. since Glib::Object is always * registered, this loop cannot be infinite. */ RETVAL = NULL; while (gtype && (NULL == (RETVAL = gperl_object_package_from_type (gtype)))) gtype = g_type_parent (gtype); OUTPUT: RETVAL ## void gtk_container_class_install_child_property (GtkContainerClass *cclass, guint property_id, GParamSpec *pspec) ## GParamSpec* gtk_container_class_find_child_property (GObjectClass *cclass, const gchar *property_name) ## GParamSpec** gtk_container_class_list_child_properties (GObjectClass *cclass, guint *n_properties) =for apidoc Gtk2::Container::list_child_properties =for signature list = $object_or_class_name->list_child_properties =for arg ... (__hide__) Return a list of C objects which are the child properties available for children of a container C<$object_or_class_name>. See L C for the fields in a ParamSpec. =cut =for apidoc Gtk2::Container::find_child_property =for signature pspec or undef = $object_or_class_name->find_child_property ($name) =for arg name (string) =for arg ... (__hide__) Return a C for child property C<$name> on container C<$object_or_class_name>. If there's no property C<$name> then return C. See L C for the fields in a ParamSpec. =cut void find_child_property (container_or_class_name, ...) SV * container_or_class_name ALIAS: Gtk2::Container::list_child_properties = 1 PREINIT: GType type; gchar *name = NULL; GObjectClass *object_class; PPCODE: /* ENHANCE-ME: share this SV to GType with Glib::Object::find_property and probably other places. Might pass GTK_TYPE_CONTAINER to say it should be a container. */ if (gperl_sv_is_defined (container_or_class_name) && SvROK (container_or_class_name)) { GObject * object = SvGObject (container_or_class_name); if (!object) croak ("wha? NULL object in list_properties"); type = G_OBJECT_TYPE (object); } else { type = gperl_object_type_from_package (SvPV_nolen (container_or_class_name)); if (!type) croak ("package %s is not registered with GPerl", SvPV_nolen (container_or_class_name)); } switch (ix) { case 0: if (items != 2) croak ("Usage: Gtk2::Container::find_child_property (class, name)"); name = SvGChar (ST (1)); break; default: /* ix==1 */ if (items != 1) croak ("Usage: Gtk2::Container::list_child_properties (class)"); break; } if (! g_type_is_a (type, GTK_TYPE_CONTAINER)) croak ("Not a Gtk2::Container"); /* classes registered by perl are kept alive by the bindings. * those coming straight from C are not. if we had an actual * object, the class will be alive, but if we just had a * package, the class may not exist yet. thus, we'll have to * do an honest ref here, rather than a peek. */ object_class = g_type_class_ref (type); if (ix == 0) { GParamSpec *pspec = gtk_container_class_find_child_property (object_class, name); XPUSHs (pspec ? sv_2mortal (newSVGParamSpec (pspec)) : &PL_sv_undef); } else if (ix == 1) { GParamSpec **props; guint n_props, i; props = gtk_container_class_list_child_properties (object_class, &n_props); if (n_props) { EXTEND (SP, n_props); for (i = 0; i < n_props; i++) PUSHs (sv_2mortal (newSVGParamSpec (props[i]))); } g_free (props); /* must free even when n_props==0 */ } g_type_class_unref (object_class); =for apidoc =for arg ... list of property name/value pairs =cut ## void gtk_container_add_with_properties (GtkContainer *container, GtkWidget *widget, const gchar *first_prop_name, ...) void gtk_container_add_with_properties (container, widget, ...) GtkContainer *container GtkWidget *widget PREINIT: GValue value = {0,}; int i; CODE: g_object_ref (container); g_object_ref (widget); gtk_widget_freeze_child_notify (widget); gtk_container_add (container, widget); if (widget->parent) { if (0 != ((items - 2) % 2)) croak ("add_with_properties expects name => value pairs " "(odd number of arguments detected)"); for (i = 2; i < items; i += 2) { char *name = SvPV_nolen (ST (i)); SV *newval = ST (i + 1); init_child_property_value (G_OBJECT (container), name, &value); gperl_value_from_sv (&value, newval); gtk_container_child_set_property (container, widget, name, &value); g_value_unset (&value); } } gtk_widget_thaw_child_notify (widget); g_object_unref (widget); g_object_unref (container); ## void gtk_container_child_get_valist (GtkContainer *container, GtkWidget *child, const gchar *first_property_name, va_list var_args) ## void gtk_container_child_get_property (GtkContainer *container, GtkWidget *child, const gchar *property_name, GValue *value) ## void gtk_container_child_get (GtkContainer *container, GtkWidget *child, const gchar *first_prop_name, ...) =for apidoc Gtk2::Container::child_get_property Alias for child_get =cut =for apidoc =for arg ... list of property names Returns a list of properties of the child. =cut void gtk_container_child_get (container, child, ...) GtkContainer *container GtkWidget *child ALIAS: Gtk2::Container::child_get_property = 1 PREINIT: GValue value = {0,}; int i; PPCODE: PERL_UNUSED_VAR (ix); EXTEND (SP, items-1); for (i = 2; i < items; i++) { char *name = SvPV_nolen (ST (i)); init_child_property_value (G_OBJECT (container), name, &value); gtk_container_child_get_property (container, child, name, &value); PUSHs (sv_2mortal (gperl_sv_from_value (&value))); g_value_unset (&value); } ## void gtk_container_child_set_valist (GtkContainer *container, GtkWidget *child, const gchar *first_property_name, va_list var_args); ## void gtk_container_child_set_property (GtkContainer *container, GtkWidget *child, const gchar *property_name, const GValue *value) ## void gtk_container_child_set (GtkContainer *container, GtkWidget *child, const gchar *first_prop_name, ...) =for apidoc Gtk2::Container::child_set_property Alias for child_set =cut =for apidoc =for arg ... list of property name/value pairs Sets a list of properties on the child. =cut void gtk_container_child_set (container, child, ...) GtkContainer *container GtkWidget *child ALIAS: Gtk2::Container::child_set_property = 1 PREINIT: GValue value = {0,}; int i; CODE: PERL_UNUSED_VAR (ix); if (0 != ((items - 2) % 2)) croak ("set method expects name => value pairs " "(odd number of arguments detected)"); for (i = 2; i < items; i += 2) { char *name = SvPV_nolen (ST (i)); SV *newval = ST (i + 1); init_child_property_value (G_OBJECT (container), name, &value); gperl_value_from_sv (&value, newval); gtk_container_child_set_property (container, child, name, &value); g_value_unset (&value); } ##GtkType gtk_container_get_type (void) G_GNUC_CONST ##void gtk_container_set_reallocate_redraws (GtkContainer *container, gboolean needs_redraws) void gtk_container_set_reallocate_redraws (container, needs_redraws) GtkContainer * container gboolean needs_redraws # __PRIVATE__ ##void _gtk_container_queue_resize (GtkContainer *container) Gtk2-1.2498/xs/GtkCurve.xs000644 001750 000024 00000006034 11664366546 016307 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" MODULE = Gtk2::Curve PACKAGE = Gtk2::Curve PREFIX = gtk_curve_ ## GtkWidget* gtk_curve_new (void) GtkWidget * gtk_curve_new (class) C_ARGS: /* void */ ## void gtk_curve_reset (GtkCurve *curve) void gtk_curve_reset (curve) GtkCurve * curve ## void gtk_curve_set_gamma (GtkCurve *curve, gfloat gamma) void gtk_curve_set_gamma (curve, gamma) GtkCurve * curve gfloat gamma ## void gtk_curve_set_range (GtkCurve *curve, gfloat min_x, gfloat max_x, gfloat min_y, gfloat max_y) void gtk_curve_set_range (curve, min_x, max_x, min_y, max_y) GtkCurve * curve gfloat min_x gfloat max_x gfloat min_y gfloat max_y ## void gtk_curve_get_vector (GtkCurve *curve, int veclen, gfloat vector[]) =for apidoc Returns a list of real numbers, the curve's vector. =cut void gtk_curve_get_vector (curve, veclen=32) GtkCurve * curve int veclen PREINIT: gint i; gfloat * vector; PPCODE: if( veclen < 1 ) croak("ERROR: Gtk2::Curve->get_vector: veclen must be greater " "than zero"); vector = g_new(gfloat, veclen); gtk_curve_get_vector(curve, veclen, vector); EXTEND(SP, veclen); for( i = 0; i < veclen; i++ ) PUSHs(sv_2mortal(newSVnv(vector[i]))); g_free(vector); ## void gtk_curve_set_vector (GtkCurve *curve, int veclen, gfloat vector[]) =for apidoc =for arg ... of float's, the points of the curve =cut void gtk_curve_set_vector (curve, ...) GtkCurve * curve PREINIT: int veclen; gfloat * vector; CODE: if (items <= 1) croak ("ERROR: Gtk2::Curve->set_vector must be called with at " "least one value"); veclen = --items; vector = g_new(gfloat, veclen); for( ; items > 0; items-- ) vector[items-1] = (gfloat) SvNV(ST(items)); gtk_curve_set_vector(curve, veclen, vector); g_free(vector); ## void gtk_curve_set_curve_type (GtkCurve *curve, GtkCurveType type) void gtk_curve_set_curve_type (curve, type) GtkCurve * curve GtkCurveType type CODE: /* there's a bug in gtk2 that causes a core dump if set_curve_type is * called before the widget is realized, they won't fix it so i'll * catch and prevent it here. */ g_return_if_fail(GTK_WIDGET_REALIZED(curve)); gtk_curve_set_curve_type(curve, type); Gtk2-1.2498/xs/GtkDialog.xs000644 001750 000024 00000044477 11664366546 016437 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003-2005 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" #include /* * The next three functions are also used in GtkInfoBar.xs, thus they are not * declared static. */ /* * GtkDialog interprets the response id as completely user-defined for * positive values, and as special enums for negative values. so, we * will handle the response_id as a plain SV so we can implement this * special behavior. */ gint gtk2perl_dialog_response_id_from_sv (SV * sv) { int n; if (looks_like_number (sv)) return SvIV (sv); if (!gperl_try_convert_enum (GTK_TYPE_RESPONSE_TYPE, sv, &n)) croak ("response_id should be either a GtkResponseType or an integer"); return n; } SV * gtk2perl_dialog_response_id_to_sv (gint response) { return gperl_convert_back_enum_pass_unknown (GTK_TYPE_RESPONSE_TYPE, response); } /* GtkDialog's response event is defined in Gtk as having a signal parameter of type G_TYPE_INT, but GtkResponseType values are passed through it. this custom marshaller allows us to catch and convert enum codes like those returned by $dialog->run , instead of requiring the callback to deal with the raw negative numeric values for the predefined constants. */ void gtk2perl_dialog_response_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); PERL_UNUSED_VAR (return_value); PERL_UNUSED_VAR (n_param_values); PERL_UNUSED_VAR (invocation_hint); ENTER; SAVETMPS; PUSHMARK (SP); GPERL_CLOSURE_MARSHAL_PUSH_INSTANCE (param_values); /* the second parameter for this signal is defined as an int * but is actually a response code, and can have GtkResponseType * values. */ XPUSHs (sv_2mortal (gtk2perl_dialog_response_id_to_sv (g_value_get_int (param_values + 1)))); GPERL_CLOSURE_MARSHAL_PUSH_DATA; PUTBACK; GPERL_CLOSURE_MARSHAL_CALL (G_DISCARD); /* * clean up */ FREETMPS; LEAVE; } MODULE = Gtk2::Dialog PACKAGE = Gtk2::Dialog PREFIX = gtk_dialog_ =for position SYNOPSIS =head1 SYNOPSIS # create a new dialog with some buttons - one stock, one not. $dialog = Gtk2::Dialog->new ($title, $parent_window, $flags, 'gtk-cancel' => 'cancel', 'Do it' => 'ok'); # create window contents for yourself. $dialog->get_content_area ()->add ($some_widget); $dialog->set_default_response ('ok'); # show and interact modally -- blocks until the user # activates a response. $response = $dialog->run; if ($response eq 'ok') { do_the_stuff (); } # activating a response does not destroy the window, # that's up to you. $dialog->destroy; =cut =for position DESCRIPTION =head1 DESCRIPTION Dialog boxes are a convenient way to prompt the user for a small amount of input, eg. to display a message, ask a question, or anything else that does not require extensive effort on the user's part. GTK+ treats a dialog as a window split vertically. The top section is a Gtk2::VBox, and is where widgets such as a Gtk2::Label or a Gtk2::Entry should be packed. The bottom area is known as the "action_area". This is generally used for packing buttons into the dialog which may perform functions such as cancel, ok, or apply. The two areas are separated by a Gtk2::HSeparator. GtkDialog boxes are created with a call to C<< Gtk2::Dialog->new >>. The multi-argument form (and its alias, C is recommended; it allows you to set the dialog title, some convenient flags, and add simple buttons all in one go. If I<$dialog> is a newly created dialog, the two primary areas of the window can be accessed as C<< $dialog->get_content_area () >> and C<< $dialog->get_action_area () >>, as can be seen from the example, below. A 'modal' dialog (that is, one which freezes the rest of the application from user input), can be created by calling the Gtk2::Window method C on the dialog. You can also pass the 'modal' flag to C. If you add buttons to GtkDialog using C, C, C, C, or C, clicking the button will emit a signal called "response" with a response ID that you specified. GTK+ will never assign a meaning to positive response IDs; these are entirely user-defined. But for convenience, you can use the response IDs in the Gtk2::ResponseType enumeration. If a dialog receives a delete event, the "response" signal will be emitted with a response ID of 'delete-event'. If you want to block waiting for a dialog to return before returning control flow to your code, you can call C<< $dialog->run >>. This function enters a recursive main loop and waits for the user to respond to the dialog, returning the response ID corresponding to the button the user clicked. For the simple dialog in the following example, in reality you'd probably use Gtk2::MessageDialog to save yourself some effort. But you'd need to create the dialog contents manually if you had more than a simple message in the dialog. # Function to open a dialog box displaying the message provided. sub quick_message { my $message = shift; my $dialog = Gtk2::Dialog->new ('Message', $main_app_window, 'destroy-with-parent', 'gtk-ok' => 'none'); my $label = Gtk2::Label->new (message); $dialog->get_content_area ()->add ($label); # Ensure that the dialog box is destroyed when the user responds. $dialog->signal_connect (response => sub { $_[0]->destroy }); $dialog->show_all; } =head2 Delete, Close and Destroy In the default keybindings the "Esc" key calls the C action signal. The default in that signal is to synthesise a C like a window manager close would do. A delete-event first runs the C signal with ID C<"delete-event">, but the handler there can't influence the default destroy behaviour of the C signal. See L for notes on destroy vs hide. If you add your own "Close" button to the dialog, perhaps using the builtin C response ID, you must make your C signal handler do whatever's needed for closing. Often a good thing is just to run the C action signal the same as the Esc key. sub my_response_handler { my ($dialog, $response) = @_; if ($response eq 'close') { $self->signal_emit ('close'); } elsif ... } =cut =for position post_signals Note that currently in a Perl subclass of C a class closure, ie. class default signal handler, for the C signal will be called with the response ID just as an integer, it's not turned into an enum string like C<"ok"> the way a handler setup with C receives. Hopefully this will change in the future, so don't count on it. In the interim the easiest thing to do is install your default handler in C with a C. (The subtleties of what order handlers are called in will differ, but often that doesn't matter.) =cut =for enum GtkResponseType The response type is somewhat abnormal as far as gtk2-perl enums go. In C, this enum lists named, predefined integer values for a field that is other composed of whatever integer values you like. In Perl, we allow this to be either one of the string constants listed here or any positive integer value. For example, 'ok', 'cancel', 4, and 42 are all valid response ids. You cannot use arbitrary string values, they must be integers. Be careful, because unknown string values tend to be mapped to 0. =cut =for enum GtkDialogFlags =cut BOOT: gperl_signal_set_marshaller_for (GTK_TYPE_DIALOG, "response", gtk2perl_dialog_response_marshal); =for apidoc Gtk2::Dialog::vbox __hide__ =cut =for apidoc Gtk2::Dialog::action_area __hide__ =cut GtkWidget * get_content_area (dialog) GtkDialog * dialog ALIAS: Gtk2::Dialog::vbox = 1 Gtk2::Dialog::get_action_area = 2 Gtk2::Dialog::action_area = 3 CODE: switch(ix) { case 0: case 1: #if GTK_CHECK_VERSION (2, 14, 0) RETVAL = gtk_dialog_get_content_area (dialog); #else RETVAL = dialog->vbox; #endif break; case 2: case 3: #if GTK_CHECK_VERSION (2, 14, 0) RETVAL = gtk_dialog_get_action_area (dialog); #else RETVAL = dialog->action_area; #endif break; default: RETVAL = NULL; g_assert_not_reached (); } OUTPUT: RETVAL ##GtkWidget * ##gtk_dialog_new (class) ## ##GtkWidget* gtk_dialog_new_with_buttons (const gchar *title, ## GtkWindow *parent, ## GtkDialogFlags flags, ## const gchar *first_button_text, ## ...); =for apidoc Gtk2::Dialog::new_with_buttons =for signature $widget = Gtk2::Dialog->new_with_buttons ($title, $parent, $flags, ...) =for arg ... of button-text => response-id pairs. Alias for the multi-argument version of C<< Gtk2::Dialog->new >>. =cut =for apidoc =for signature $widget = Gtk2::Dialog->new; =for signature $widget = Gtk2::Dialog->new ($title, $parent, $flags, ...) =for arg title (string) window title =for arg parent (GtkWindow_ornull) make the new dialog transient for this window =for arg flags (GtkDialogFlags) interesting properties =for arg ... of button-text => response-id pairs. The multi-argument form takes the same list of text => response-id pairs as C<< $dialog->add_buttons >>. Do not pack widgets directly into the window; add them to C<< $dialog->get_content_area () >>. Here's a simple example: $dialog = Gtk2::Dialog->new ('A cool dialog', $main_app_window, [qw/modal destroy-with-parent/], 'gtk-ok' => 'accept', 'gtk-cancel' => 'reject'); =cut GtkWidget * gtk_dialog_new (class, ...) ALIAS: Gtk2::Dialog::new_with_buttons = 1 PREINIT: int i; gchar * title; GtkWidget * dialog; GtkWindow * parent; int flags; CODE: PERL_UNUSED_VAR (ix); if (items == 1) { /* the easy way out... */ dialog = gtk_dialog_new (); } else if ((items < 4) || (items % 2)) { croak ("USAGE: Gtk2::Dialog->new ()\n" " or Gtk2::Dialog->new (TITLE, PARENT, FLAGS, ...)\n" " where ... is a series of button text and response id pairs"); } else { title = SvGChar (ST (1)); parent = SvGtkWindow_ornull (ST (2)); flags = SvGtkDialogFlags (ST (3)); /* we can't really pass on a varargs call (at least, i don't * know how to convert from perl stack to C va_list), so we * have to duplicate a bit of the functionality of the C * version. luckily it's nothing too intense. */ dialog = gtk_dialog_new (); if (title) gtk_window_set_title (GTK_WINDOW (dialog), title); if (parent) gtk_window_set_transient_for (GTK_WINDOW (dialog), parent); if (flags & GTK_DIALOG_MODAL) gtk_window_set_modal (GTK_WINDOW (dialog), TRUE); if (flags & GTK_DIALOG_DESTROY_WITH_PARENT) gtk_window_set_destroy_with_parent (GTK_WINDOW (dialog), TRUE); if (flags & GTK_DIALOG_NO_SEPARATOR) gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE); /* skip the first 4 stack items --- we've already seen them! */ for (i = 4; i < items; i += 2) { gchar * text = SvGChar (ST (i)); int response_id = gtk2perl_dialog_response_id_from_sv (ST (i+1)); gtk_dialog_add_button (GTK_DIALOG (dialog), text, response_id); } } RETVAL = dialog; OUTPUT: RETVAL =for apidoc =for signature $responsetype = $dialog->run Blocks in a recursive main loop until the dialog either emits the response signal, or is destroyed. If the dialog is destroyed during the call to C<< $dialog->run >>, the function returns 'GTK_RESPONSE_NONE' ('none'). Otherwise, it returns the response ID from the "response" signal emission. Before entering the recursive main loop, C<< $dialog->run >> calls C<< $widget->show >> on I<$dialog> for you. Note that you still need to show any children of the dialog yourself. During C, the default behavior of "delete_event" is disabled; if the dialog receives "delete_event", it will not be destroyed as windows usually are, and C will return 'delete-event'. Also, during C the dialog will be modal. You can force C to return at any time by calling C<< $dialog->response >> to emit the "response" signal. Destroying the dialog during C is a very bad idea, because your post-run code won't know whether the dialog was destroyed or not. After C returns, you are responsible for hiding or destroying the dialog if you wish to do so. Typical usage of this function might be: if ('accept' eq $dialog->run) { do_application_specific_something (); } else { do_nothing_since_dialog_was_cancelled (); } $dialog->destroy; =cut SV * gtk_dialog_run (dialog) GtkDialog * dialog CODE: RETVAL = gtk2perl_dialog_response_id_to_sv (gtk_dialog_run (dialog)); OUTPUT: RETVAL =for apidoc =for arg response_id (GtkResponseType) Emit the response signal, as though the user had clicked on the button with I<$response_id>. =cut void gtk_dialog_response (dialog, response_id) GtkDialog * dialog SV * response_id C_ARGS: dialog, gtk2perl_dialog_response_id_from_sv (response_id) =for apidoc =for arg button_text (string) may be arbitrary text with mnenonics, or stock ids =for arg response_id (GtkResponseType) Returns the created button. =cut GtkWidget * gtk_dialog_add_button (dialog, button_text, response_id) GtkDialog * dialog const gchar * button_text SV * response_id CODE: RETVAL = gtk_dialog_add_button (dialog, button_text, gtk2perl_dialog_response_id_from_sv ( response_id)); OUTPUT: RETVAL =for apidoc =for arg ... of button-text => response-id pairs Like calling C<< $dialog->add_button >> repeatedly, except you don't get the created widgets back. The buttons go from left to right, so the first button added will be the left-most one. =cut void gtk_dialog_add_buttons (dialog, ...) GtkDialog * dialog PREINIT: int i; CODE: if (!(items % 2)) croak("gtk_dialog_add_buttons: odd number of parameters"); /* we can't make var args, so we'll call add_button for each */ for (i = 1; i < items; i += 2) gtk_dialog_add_button (dialog, SvGChar (ST (i)), gtk2perl_dialog_response_id_from_sv ( ST (i+1))); =for apidoc =for arg response_id (GtkResponseType) Enable or disable an action button by its I<$response_id>. =cut void gtk_dialog_set_response_sensitive (dialog, response_id, setting) GtkDialog * dialog SV * response_id gboolean setting CODE: gtk_dialog_set_response_sensitive (dialog, gtk2perl_dialog_response_id_from_sv ( response_id), setting); =for apidoc =for arg response_id (GtkResponseType) =cut void gtk_dialog_add_action_widget (dialog, child, response_id) GtkDialog * dialog GtkWidget * child SV * response_id CODE: gtk_dialog_add_action_widget (dialog, child, gtk2perl_dialog_response_id_from_sv ( response_id)); =for apidoc =for arg response_id (GtkResponseType) =cut void gtk_dialog_set_default_response (dialog, response_id) GtkDialog * dialog SV * response_id CODE: gtk_dialog_set_default_response (dialog, gtk2perl_dialog_response_id_from_sv ( response_id)); void gtk_dialog_set_has_separator (dialog, setting) GtkDialog * dialog gboolean setting gboolean gtk_dialog_get_has_separator (dialog) GtkDialog * dialog #if GTK_CHECK_VERSION (2, 6, 0) ## void gtk_dialog_set_alternative_button_order (GtkDialog *dialog, gint first_response_id, ...) void gtk_dialog_set_alternative_button_order (dialog, ...) GtkDialog *dialog PREINIT: gint n_params, i; gint *new_order; CODE: if ((n_params = (items - 1)) > 0) { new_order = g_new0 (gint, n_params); for (i = 1; i < items; i++) new_order[i - 1] = gtk2perl_dialog_response_id_from_sv ( ST (i)); gtk_dialog_set_alternative_button_order_from_array ( dialog, n_params, new_order); g_free (new_order); } #endif #if GTK_CHECK_VERSION (2, 8, 0) ## gint gtk_dialog_get_response_for_widget (GtkDialog *dialog, GtkWidget *widget); SV * gtk_dialog_get_response_for_widget (dialog, widget) GtkDialog *dialog GtkWidget *widget PREINIT: gint tmp; CODE: tmp = gtk_dialog_get_response_for_widget (dialog, widget); RETVAL = gtk2perl_dialog_response_id_to_sv (tmp); OUTPUT: RETVAL #endif #if GTK_CHECK_VERSION (2, 20, 0) ## GtkWidget *widget gtk_dialog_get_widget_for_response (GtkDialog *dialog, gint); =for arg response_id (GtkResponseType) =cut GtkWidget * gtk_dialog_get_widget_for_response (dialog, response_id) GtkDialog *dialog SV *response_id C_ARGS: dialog, gtk2perl_dialog_response_id_from_sv (response_id) #endif MODULE = Gtk2::Dialog PACKAGE = Gtk2 PREFIX = gtk_ #if GTK_CHECK_VERSION (2, 6, 0) # don't override the pod from Gtk2.pm... =for object Gtk2::main =cut ## gboolean gtk_alternative_dialog_button_order (GdkScreen *screen); gboolean gtk_alternative_dialog_button_order (class, screen=NULL) GdkScreen_ornull *screen C_ARGS: screen #endif Gtk2-1.2498/xs/GtkDnd.xs000644 001750 000024 00000020241 11664366546 015724 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003-2006 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" MODULE = Gtk2::Dnd PACKAGE = Gtk2::Gdk::DragContext PREFIX = gtk_drag_ ## void gtk_drag_finish (GdkDragContext *context, gboolean success, gboolean del, guint32 time_) void gtk_drag_finish (context, success, del, time_) GdkDragContext *context gboolean success gboolean del guint32 time_ ## GtkWidget *gtk_drag_get_source_widget (GdkDragContext *context) GtkWidget * gtk_drag_get_source_widget (context) GdkDragContext *context ## void gtk_drag_set_icon_widget (GdkDragContext *context, GtkWidget *widget, gint hot_x, gint hot_y) void gtk_drag_set_icon_widget (context, widget, hot_x, hot_y) GdkDragContext *context GtkWidget *widget gint hot_x gint hot_y ## void gtk_drag_set_icon_pixmap (GdkDragContext *context, GdkColormap *colormap, GdkPixmap *pixmap, GdkBitmap *mask, gint hot_x, gint hot_y) void gtk_drag_set_icon_pixmap (context, colormap, pixmap, mask, hot_x, hot_y) GdkDragContext *context GdkColormap *colormap GdkPixmap *pixmap GdkBitmap_ornull *mask gint hot_x gint hot_y ## void gtk_drag_set_icon_pixbuf (GdkDragContext *context, GdkPixbuf *pixbuf, gint hot_x, gint hot_y) void gtk_drag_set_icon_pixbuf (context, pixbuf, hot_x, hot_y) GdkDragContext *context GdkPixbuf *pixbuf gint hot_x gint hot_y ## void gtk_drag_set_icon_stock (GdkDragContext *context, const gchar *stock_id, gint hot_x, gint hot_y) void gtk_drag_set_icon_stock (context, stock_id, hot_x, hot_y) GdkDragContext *context const gchar *stock_id gint hot_x gint hot_y #if GTK_CHECK_VERSION (2, 8, 0) void gtk_drag_set_icon_name (GdkDragContext *context, const gchar *icon_name, gint hot_x, gint hot_y) #endif ## void gtk_drag_set_icon_default (GdkDragContext *context) void gtk_drag_set_icon_default (context) GdkDragContext *context MODULE = Gtk2::Dnd PACKAGE = Gtk2::Drag PREFIX = gtk_drag_ ## GdkDragContext *gtk_drag_begin (GtkWidget *widget, GtkTargetList *targets, GdkDragAction actions, gint button, GdkEvent *event) GdkDragContext_noinc * gtk_drag_begin (class, widget, targets, actions, button, event) GtkWidget *widget GtkTargetList *targets GdkDragAction actions gint button GdkEvent *event C_ARGS: widget, targets, actions, button, event MODULE = Gtk2::Dnd PACKAGE = Gtk2::Widget PREFIX = gtk_ ## GdkDragContext *gtk_drag_begin (GtkWidget *widget, GtkTargetList *targets, GdkDragAction actions, gint button, GdkEvent *event) GdkDragContext_noinc * gtk_drag_begin (widget, targets, actions, button, event) GtkWidget *widget GtkTargetList *targets GdkDragAction actions gint button GdkEvent *event ## void gtk_drag_get_data (GtkWidget *widget, GdkDragContext *context, GdkAtom target, guint32 time_) void gtk_drag_get_data (widget, context, target, time_) GtkWidget *widget GdkDragContext *context GdkAtom target guint32 time_ ## void gtk_drag_highlight (GtkWidget *widget) void gtk_drag_highlight (widget) GtkWidget *widget ## void gtk_drag_unhighlight (GtkWidget *widget) void gtk_drag_unhighlight (widget) GtkWidget *widget #### void gtk_drag_dest_set (GtkWidget *widget, GtkDestDefaults flags, const GtkTargetEntry *targets, gint n_targets, GdkDragAction actions) =for apidoc =for arg ... of Gtk2::TargetEntry's =cut void gtk_drag_dest_set (widget, flags, actions, ...) GtkWidget *widget GtkDestDefaults flags GdkDragAction actions PREINIT: GtkTargetEntry * targets = NULL; gint n_targets, i; CODE: #define FIRST_TARGET 3 n_targets = items - FIRST_TARGET; targets = g_new (GtkTargetEntry, n_targets); for (i = 0 ; i < n_targets ; i++) gtk2perl_read_gtk_target_entry (ST (i+FIRST_TARGET), targets+i); gtk_drag_dest_set (widget, flags, targets, n_targets, actions); #undef FIRST_TARGET CLEANUP: g_free (targets); ## void gtk_drag_dest_set_proxy (GtkWidget *widget, GdkWindow *proxy_window, GdkDragProtocol protocol, gboolean use_coordinates) void gtk_drag_dest_set_proxy (widget, proxy_window, protocol, use_coordinates) GtkWidget *widget GdkWindow *proxy_window GdkDragProtocol protocol gboolean use_coordinates ## void gtk_drag_dest_unset (GtkWidget *widget) void gtk_drag_dest_unset (widget) GtkWidget *widget ## GdkAtom gtk_drag_dest_find_target (GtkWidget *widget, GdkDragContext *context, GtkTargetList *target_list) GdkAtom gtk_drag_dest_find_target (widget, context, target_list) GtkWidget *widget GdkDragContext *context GtkTargetList_ornull *target_list ## GtkTargetList* gtk_drag_dest_get_target_list (GtkWidget *widget) GtkTargetList_ornull* gtk_drag_dest_get_target_list (widget) GtkWidget *widget ## void gtk_drag_dest_set_target_list (GtkWidget *widget, GtkTargetList *target_list) void gtk_drag_dest_set_target_list (widget, target_list) GtkWidget *widget GtkTargetList_ornull *target_list #### void gtk_drag_source_set (GtkWidget *widget, GdkModifierType start_button_mask, const GtkTargetEntry *targets, gint n_targets, GdkDragAction actions) =for apidoc =for arg ... of Gtk2::TargetEntry's =cut void gtk_drag_source_set (widget, start_button_mask, actions, ...) GtkWidget *widget GdkModifierType start_button_mask GdkDragAction actions PREINIT: GtkTargetEntry * targets = NULL; gint n_targets, i; CODE: #define FIRST_TARGET 3 n_targets = items - FIRST_TARGET; targets = g_new (GtkTargetEntry, n_targets); for (i = 0 ; i < n_targets ; i++) gtk2perl_read_gtk_target_entry (ST (i+FIRST_TARGET), targets+i); gtk_drag_source_set (widget, start_button_mask, targets, n_targets, actions); #undef FIRST_TARGET CLEANUP: g_free (targets); ## void gtk_drag_source_unset (GtkWidget *widget) void gtk_drag_source_unset (widget) GtkWidget *widget ## void gtk_drag_source_set_icon (GtkWidget *widget, GdkColormap *colormap, GdkPixmap *pixmap, GdkBitmap *mask) void gtk_drag_source_set_icon (widget, colormap, pixmap, mask) GtkWidget *widget GdkColormap_ornull *colormap GdkPixmap_ornull *pixmap GdkBitmap_ornull *mask ## void gtk_drag_source_set_icon_pixbuf (GtkWidget *widget, GdkPixbuf *pixbuf) void gtk_drag_source_set_icon_pixbuf (widget, pixbuf) GtkWidget *widget GdkPixbuf_ornull *pixbuf ## void gtk_drag_source_set_icon_stock (GtkWidget *widget, const gchar *stock_id) void gtk_drag_source_set_icon_stock (widget, stock_id) GtkWidget *widget const gchar *stock_id ## gboolean gtk_drag_check_threshold (GtkWidget *widget, gint start_x, gint start_y, gint current_x, gint current_y) gboolean gtk_drag_check_threshold (widget, start_x, start_y, current_x, current_y) GtkWidget *widget gint start_x gint start_y gint current_x gint current_y #if GTK_CHECK_VERSION(2,4,0) GtkTargetList_ornull * gtk_drag_source_get_target_list (widget) GtkWidget *widget void gtk_drag_source_set_target_list (widget, target_list) GtkWidget *widget GtkTargetList_ornull *target_list #endif #if GTK_CHECK_VERSION(2,6,0) void gtk_drag_dest_add_text_targets (GtkWidget *widget); void gtk_drag_dest_add_image_targets (GtkWidget *widget); void gtk_drag_dest_add_uri_targets (GtkWidget *widget); void gtk_drag_source_add_text_targets (GtkWidget *widget); void gtk_drag_source_add_image_targets (GtkWidget *widget); void gtk_drag_source_add_uri_targets (GtkWidget *widget); #endif #if GTK_CHECK_VERSION(2,8,0) void gtk_drag_source_set_icon_name (GtkWidget *widget, const gchar *icon_name); #endif #if GTK_CHECK_VERSION (2,10,0) void gtk_drag_dest_set_track_motion (GtkWidget *widget, gboolean track_motion); gboolean gtk_drag_dest_get_track_motion (GtkWidget *widget); #endif Gtk2-1.2498/xs/GtkDrawingArea.xs000644 001750 000024 00000002344 11664366546 017407 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" MODULE = Gtk2::DrawingArea PACKAGE = Gtk2::DrawingArea PREFIX = gtk_drawing_area_ ## GtkWidget* gtk_drawing_area_new (void) GtkWidget * gtk_drawing_area_new (class) C_ARGS: /* void */ ## void gtk_drawing_area_size (GtkDrawingArea *darea, gint width, gint height) void gtk_drawing_area_size (darea, width, height) GtkDrawingArea * darea gint width gint height Gtk2-1.2498/xs/GtkEditable.xs000644 001750 000024 00000017112 11664366546 016733 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" #include /* GtkEditable's insert-text signal uses an integer pointer as a write-through parameter; unlike GtkWidget's size-request signal, we can't just pass an editable object, because an integer is an integral type. void user_function (GtkEditable *editable, gchar *new_text, gint new_text_length, gint *position, <<=== that's the problem gpointer user_data); */ static void gtk2perl_editable_insert_text_marshal (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) { STRLEN len; gint * position_p; SV * string, * position; dGPERL_CLOSURE_MARSHAL_ARGS; GPERL_CLOSURE_MARSHAL_INIT (closure, marshal_data); PERL_UNUSED_VAR (return_value); PERL_UNUSED_VAR (n_param_values); PERL_UNUSED_VAR (invocation_hint); ENTER; SAVETMPS; PUSHMARK (SP); GPERL_CLOSURE_MARSHAL_PUSH_INSTANCE (param_values); /* string and position are cleaned up manually further down, so they * don't need sv_2mortal. */ /* new_text */ string = newSVGChar (g_value_get_string (param_values+1)); XPUSHs (string); /* text length is redundant, but documented. it doesn't hurt * anything to include it, but would be a doc hassle to omit it. */ XPUSHs (sv_2mortal (newSViv (g_value_get_int (param_values+2)))); /* insert position */ position_p = g_value_get_pointer (param_values+3); position = newSViv (*position_p); XPUSHs (position); GPERL_CLOSURE_MARSHAL_PUSH_DATA; PUTBACK; GPERL_CLOSURE_MARSHAL_CALL (G_ARRAY); /* refresh the param_values with whatever changes the callback may * have made. values returned on the stack take precedence over * modifications to @_. */ if (count == 2) { SV * sv; /* get the values off the end of the stack. why do my * attempts to use ST() result in segfaults? */ *position_p = POPi; sv = POPs; sv_utf8_upgrade (sv); g_value_set_string ((GValue*)param_values+1, SvPV (sv, len)); g_value_set_int ((GValue*)param_values+2, len); PUTBACK; } else if (count == 0) { /* returned no values, then refresh string and position * params from the callback's args, which may have been * modified. */ sv_utf8_upgrade (string); g_value_set_string ((GValue*)param_values+1, SvPV (string, len)); g_value_set_int ((GValue*)param_values+2, len); *position_p = SvIV (position); if (*position_p < 0) *position_p = 0; } else { /* NOTE: croaking here can cause bad things to happen to the * app, because croaking in signal handlers is bad juju. */ croak ("an insert-text signal handler must either return" " two items (text and position)\nor return no items" " and possibly modify its @_ parameters.\n" " callback returned %d items", count); } /* * clean up */ SvREFCNT_dec (string); SvREFCNT_dec (position); PUTBACK; FREETMPS; LEAVE; } MODULE = Gtk2::Editable PACKAGE = Gtk2::Editable PREFIX = gtk_editable_ =for position post_signals The C signal handler can optionally alter the text to be inserted. It may =over 4 =item Return no values for no change. Be sure to end with an empty C. sub my_insert_text_handler { my ($widget, $text, $len, $pos, $userdata) = @_; print "inserting '$text' at char position '$pos'\n"; return; # no values } =item Return two values C<($text, $pos)> which are the new text and character position. sub my_insert_text_handler { my ($widget, $text, $len, $pos, $userdata) = @_; return (uc($text), $pos); # force to upper case } =item Return no values and modify the text in C<$_[1]> and/or position in C<$_[3]>. For example, sub my_insert_text_handler { $_[1] = uc($_[1]); # force to upper case $_[3] = 0; # force position to the start return; # no values } =back Note that currently in a Perl subclass of a C widget, a class closure (ie. class default signal handler) for C does not work this way. It instead sees the C level C<($text, $len, $pos_pointer)>, where C<$pos_pointer> is a machine address and cannot be used easily. Hopefully this will change in the future. A C with the args as passed works, but for anything else the suggestion is to use a C instead. =cut BOOT: gperl_signal_set_marshaller_for (GTK_TYPE_EDITABLE, "insert_text", gtk2perl_editable_insert_text_marshal); void gtk_editable_select_region (editable, start, end) GtkEditable *editable gint start gint end ## returns an empty list if there is no selection =for apidoc =for signature (start, end) = $editable->get_selection_bounds Returns integers, start and end. =cut void gtk_editable_get_selection_bounds (editable) GtkEditable *editable PREINIT: gint start; gint end; PPCODE: if (!gtk_editable_get_selection_bounds (editable, &start, &end)) XSRETURN_EMPTY; EXTEND (SP, 2); PUSHs (sv_2mortal (newSViv (start))); PUSHs (sv_2mortal (newSViv (end))); =for apidoc =for signature new_position = $editable->insert_text (new_text, position) =cut ## returns position of next char after inserted text gint gtk_editable_insert_text (editable, new_text, ...) GtkEditable *editable gchar *new_text PREINIT: gint new_text_length; gint position; CODE: if (items == 3) { new_text_length = strlen (new_text); position = SvIV (ST (2)); } else if (items == 4) { new_text_length = SvIV (ST (2)); position = SvIV (ST (3)); } else { croak ("Usage: Gtk2::Editable::insert_text(editable, new_text, position)"); } gtk_editable_insert_text (editable, new_text, new_text_length, &position); RETVAL = position; OUTPUT: RETVAL void gtk_editable_delete_text (editable, start_pos, end_pos) GtkEditable *editable gint start_pos gint end_pos gchar_own * gtk_editable_get_chars (editable, start_pos, end_pos) GtkEditable *editable gint start_pos gint end_pos void gtk_editable_cut_clipboard (editable) GtkEditable *editable void gtk_editable_copy_clipboard (editable) GtkEditable *editable void gtk_editable_paste_clipboard (editable) GtkEditable *editable void gtk_editable_delete_selection (editable) GtkEditable *editable void gtk_editable_set_position (editable, position) GtkEditable *editable gint position gint gtk_editable_get_position (editable) GtkEditable *editable void gtk_editable_set_editable (editable, is_editable) GtkEditable *editable gboolean is_editable gboolean gtk_editable_get_editable (editable) GtkEditable *editable Gtk2-1.2498/xs/GtkEntry.xs000644 001750 000024 00000022426 11664366546 016327 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003-2006 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" static GPerlBoxedWrapperClass gtk_border_wrapper_class; static SV * gtk2perl_border_wrap (GType gtype, const char * package, gpointer boxed, gboolean own) { GtkBorder *border = boxed; HV *hv; PERL_UNUSED_VAR (gtype); PERL_UNUSED_VAR (package); if (!border) return &PL_sv_undef; hv = newHV (); gperl_hv_take_sv_s (hv, "left", newSViv (border->left)); gperl_hv_take_sv_s (hv, "right", newSViv (border->right)); gperl_hv_take_sv_s (hv, "top", newSViv (border->top)); gperl_hv_take_sv_s (hv, "bottom", newSViv (border->bottom)); if (own) gtk_border_free (border); return newRV_noinc ((SV *) hv); } /* This uses gperl_alloc_temp so make sure you don't hold on to pointers * returned by SvGtkBorder for too long. */ static gpointer gtk2perl_border_unwrap (GType gtype, const char * package, SV * sv) { HV *hv; SV **value; GtkBorder *border; PERL_UNUSED_VAR (gtype); PERL_UNUSED_VAR (package); if (!gperl_sv_is_defined (sv) || !SvRV (sv)) return NULL; if (!gperl_sv_is_hash_ref (sv)) croak ("GtkBorder must be a hash reference with four keys: " "left, right, top, bottom"); hv = (HV *) SvRV (sv); border = gperl_alloc_temp (sizeof (GtkBorder)); value = hv_fetch (hv, "left", 4, 0); if (value && gperl_sv_is_defined (*value)) border->left = SvIV (*value); value = hv_fetch (hv, "right", 5, 0); if (value && gperl_sv_is_defined (*value)) border->right = SvIV (*value); value = hv_fetch (hv, "top", 3, 0); if (value && gperl_sv_is_defined (*value)) border->top = SvIV (*value); value = hv_fetch (hv, "bottom", 6, 0); if (value && gperl_sv_is_defined (*value)) border->bottom = SvIV (*value); return border; } MODULE = Gtk2::Entry PACKAGE = Gtk2::Entry PREFIX = gtk_entry_ BOOT: gperl_prepend_isa ("Gtk2::Entry", "Gtk2::CellEditable"); gperl_prepend_isa ("Gtk2::Entry", "Gtk2::Editable"); gtk_border_wrapper_class = * gperl_default_boxed_wrapper_class (); gtk_border_wrapper_class.wrap = gtk2perl_border_wrap; gtk_border_wrapper_class.unwrap = gtk2perl_border_unwrap; gperl_register_boxed (GTK_TYPE_BORDER, "Gtk2::Border", >k_border_wrapper_class); GtkWidget* gtk_entry_new (class) C_ARGS: /* void */ ##GtkWidget* gtk_entry_new_with_max_length (gint max) GtkWidget * gtk_entry_new_with_max_length (class, max) gint max C_ARGS: max void gtk_entry_set_visibility (entry, visible) GtkEntry *entry gboolean visible gboolean gtk_entry_get_visibility (entry) GtkEntry *entry ## void gtk_entry_set_invisible_char (GtkEntry *entry, gunichar ch) void gtk_entry_set_invisible_char (entry, ch) GtkEntry *entry gunichar ch ## gunichar gtk_entry_get_invisible_char (GtkEntry *entry) gunichar gtk_entry_get_invisible_char (entry) GtkEntry *entry void gtk_entry_set_has_frame (entry, setting) GtkEntry *entry gboolean setting gboolean gtk_entry_get_has_frame (entry) GtkEntry *entry void gtk_entry_set_max_length (entry, max) GtkEntry *entry gint max gint gtk_entry_get_max_length (entry) GtkEntry *entry void gtk_entry_set_activates_default (entry, setting) GtkEntry *entry gboolean setting gboolean gtk_entry_get_activates_default (entry) GtkEntry *entry void gtk_entry_set_width_chars (entry, n_chars) GtkEntry *entry gint n_chars gint gtk_entry_get_width_chars (entry) GtkEntry *entry void gtk_entry_set_text (entry, text) GtkEntry *entry const gchar *text # had G_CONST_RETURN const gchar* gtk_entry_get_text (entry) GtkEntry *entry PangoLayout* gtk_entry_get_layout (entry) GtkEntry *entry ## void gtk_entry_get_layout_offsets (GtkEntry *entry, gint *x, gint *y) void gtk_entry_get_layout_offsets (GtkEntry *entry, OUTLIST gint x, OUTLIST gint y) #if GTK_CHECK_VERSION(2,4,0) void gtk_entry_set_completion (GtkEntry *entry, GtkEntryCompletion_ornull *completion); GtkEntryCompletion_ornull *gtk_entry_get_completion (GtkEntry *entry); void gtk_entry_set_alignment (GtkEntry *entry, gfloat xalign); gfloat gtk_entry_get_alignment (GtkEntry *entry); #endif #if GTK_CHECK_VERSION(2, 6, 0) gint gtk_entry_layout_index_to_text_index (GtkEntry *entry, gint layout_index) gint gtk_entry_text_index_to_layout_index (GtkEntry *entry, gint text_index) #endif #if GTK_CHECK_VERSION(2, 10, 0) void gtk_entry_set_inner_border (GtkEntry *entry, const GtkBorder_ornull *border); const GtkBorder_ornull * gtk_entry_get_inner_border (GtkEntry *entry); #endif #if GTK_CHECK_VERSION(2, 12, 0) void gtk_entry_set_cursor_hadjustment (GtkEntry *entry, GtkAdjustment_ornull *adjustment); GtkAdjustment_ornull* gtk_entry_get_cursor_hadjustment (GtkEntry *entry); #endif #if GTK_CHECK_VERSION (2, 14, 0) void gtk_entry_set_overwrite_mode (GtkEntry *entry, gboolean overwrite); gboolean gtk_entry_get_overwrite_mode (GtkEntry *entry); guint16 gtk_entry_get_text_length (GtkEntry *entry); #endif /* 2.14 */ #if GTK_CHECK_VERSION (2, 16, 0) # # FIXME: Missing typemap, actually I don't think that gio is available through Perl # # GIcon_ornull* gtk_entry_get_gicon (GtkEntry *entry, GtkEntryIconPosition icon_pos); # void gtk_entry_set_icon_from_gicon (GtkEntry *entry, GtkEntryIconPosition icon_pos, GIcon_ornull *icon); # gboolean gtk_entry_get_icon_activatable (GtkEntry *entry, GtkEntryIconPosition icon_pos); gint gtk_entry_get_icon_at_pos (GtkEntry *entry, gint x, gint y); const gchar_ornull* gtk_entry_get_icon_name (GtkEntry *entry, GtkEntryIconPosition icon_pos); gboolean gtk_entry_get_icon_sensitive (GtkEntry *entry, GtkEntryIconPosition icon_pos); GdkPixbuf_ornull* gtk_entry_get_icon_pixbuf (GtkEntry *entry, GtkEntryIconPosition icon_pos); gdouble gtk_entry_get_progress_fraction (GtkEntry *entry); gdouble gtk_entry_get_progress_pulse_step (GtkEntry *entry); void gtk_entry_progress_pulse (GtkEntry *entry); const gchar_ornull* gtk_entry_get_icon_stock (GtkEntry *entry, GtkEntryIconPosition icon_pos); GtkImageType gtk_entry_get_icon_storage_type (GtkEntry *entry, GtkEntryIconPosition icon_pos); void gtk_entry_set_icon_activatable (GtkEntry *entry, GtkEntryIconPosition icon_pos, gboolean activatable); void gtk_entry_set_icon_from_icon_name (GtkEntry *entry, GtkEntryIconPosition icon_pos, const gchar_ornull *icon_name); void gtk_entry_set_icon_from_pixbuf (GtkEntry *entry, GtkEntryIconPosition icon_pos, GdkPixbuf_ornull *pixbuf); void gtk_entry_set_icon_from_stock (GtkEntry *entry, GtkEntryIconPosition icon_pos, const gchar_ornull *stock_id); void gtk_entry_set_icon_sensitive (GtkEntry *entry, GtkEntryIconPosition icon_pos, gboolean sensitive); void gtk_entry_set_icon_tooltip_markup (GtkEntry *entry, GtkEntryIconPosition icon_pos, const gchar_ornull *tooltip); gchar_own_ornull * gtk_entry_get_icon_tooltip_markup (GtkEntry *entry, GtkEntryIconPosition icon_pos); void gtk_entry_set_icon_tooltip_text (GtkEntry *entry, GtkEntryIconPosition icon_pos, const gchar_ornull *tooltip); gchar_own_ornull * gtk_entry_get_icon_tooltip_text (GtkEntry *entry, GtkEntryIconPosition icon_pos); void gtk_entry_set_progress_fraction (GtkEntry *entry, gdouble fraction); void gtk_entry_set_progress_pulse_step (GtkEntry *entry, gdouble fraction); void gtk_entry_unset_invisible_char (GtkEntry *entry); void gtk_entry_set_icon_drag_source (GtkEntry *entry, GtkEntryIconPosition icon_pos, GtkTargetList *target_list, GdkDragAction actions); gint gtk_entry_get_current_icon_drag_source (GtkEntry *entry); #endif /* 2.16 */ #if GTK_CHECK_VERSION (2, 18, 0) GtkWidget *gtk_entry_new_with_buffer (class, GtkEntryBuffer *buffer) C_ARGS: buffer GtkEntryBuffer *gtk_entry_get_buffer (GtkEntry *entry); void gtk_entry_set_buffer (GtkEntry *entry, GtkEntryBuffer *buffer); #endif /* 2.18 */ #if GTK_CHECK_VERSION (2, 20, 0) GdkWindow * gtk_entry_get_icon_window (GtkEntry *entry, GtkEntryIconPosition icon_pos); GdkWindow * gtk_entry_get_text_window (GtkEntry *entry); #endif /* 2.20 */ #if GTK_CHECK_VERSION (2, 22, 0) gboolean gtk_entry_im_context_filter_keypress (GtkEntry *entry, GdkEvent *event); C_ARGS: entry, (GdkEventKey *) event void gtk_entry_reset_im_context (GtkEntry *entry); #endif /* 2.22 */ ## ## hey, these are deprecated! is that new as of 2.3.x? ## void gtk_entry_append_text (entry, text) GtkEntry * entry const gchar * text void gtk_entry_prepend_text (entry, text) GtkEntry * entry const gchar * text void gtk_entry_set_position (entry, position) GtkEntry * entry gint position void gtk_entry_select_region (entry, start, end) GtkEntry * entry gint start gint end void gtk_entry_set_editable (entry, editable) GtkEntry * entry gboolean editable Gtk2-1.2498/xs/GtkEntryBuffer.xs000644 001750 000024 00000005445 11664366546 017463 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2010 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library. If not, see http://www.gnu.org/licenses/ */ #include "gtk2perl.h" MODULE = Gtk2::EntryBuffer PACKAGE = Gtk2::EntryBuffer PREFIX = gtk_entry_buffer_ =for apidoc =for position DESCRIPTION The B class contains the actual text displayed in a L widget. A single Gtk2::EntryBuffer object can be shared by multiple Gtk2::Entry widgets which will then share the same text content, but not the cursor position, visibility attributes, icon etc. Gtk2::EntryBuffer may be derived from. Such a derived class might allow text to be stored in an alternate location, such as non-pageable memory, useful in the case of important passwords. Or a derived class could integrate with an application's concept of undo/redo. =cut =for apidoc =for signature entrybuffer = Gtk2::EntryBuffer->new ($initial_chars=undef) =for arg initial_chars (string) =cut GtkEntryBuffer_noinc * gtk_entry_buffer_new (class, const gchar_utf8_length *initial_chars=NULL, gint length(initial_chars)) CODE: if (initial_chars == NULL) { RETVAL = gtk_entry_buffer_new (NULL, 0); } else { RETVAL = gtk_entry_buffer_new (initial_chars, XSauto_length_of_initial_chars); } OUTPUT: RETVAL gsize gtk_entry_buffer_get_bytes (GtkEntryBuffer *buffer); guint gtk_entry_buffer_get_length (GtkEntryBuffer *buffer); const gchar * gtk_entry_buffer_get_text (GtkEntryBuffer *buffer); void gtk_entry_buffer_set_text (GtkEntryBuffer *buffer, const gchar_utf8_length *chars, gint length(chars)); void gtk_entry_buffer_set_max_length (GtkEntryBuffer *buffer, gint max_length); gint gtk_entry_buffer_get_max_length (GtkEntryBuffer *buffer); void gtk_entry_buffer_insert_text (GtkEntryBuffer *buffer, guint position, const gchar_utf8_length *chars, gint length(chars)); guint gtk_entry_buffer_delete_text (GtkEntryBuffer *buffer, guint position=0, gint n_chars=-1); void gtk_entry_buffer_emit_inserted_text (GtkEntryBuffer *buffer, guint position, const gchar *chars, guint n_chars); void gtk_entry_buffer_emit_deleted_text (GtkEntryBuffer *buffer, guint position, guint n_chars); Gtk2-1.2498/xs/GtkEntryCompletion.xs000644 001750 000024 00000010523 11664366546 020354 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003-2005 by the gtk2-perl team (see the file AUTHORS) * * Licensed under the LGPL, see LICENSE file for more information. * * $Id$ */ #include "gtk2perl.h" /* typedef gboolean (* GtkEntryCompletionMatchFunc) (GtkEntryCompletion *completion, const gchar *key, GtkTreeIter *iter, gpointer user_data); */ static gboolean gtk2perl_entry_completion_match_func (GtkEntryCompletion *completion, const gchar *key, GtkTreeIter *iter, gpointer user_data) { GPerlCallback * callback = (GPerlCallback*)user_data; GValue value = {0,}; gboolean ret; g_value_init (&value, G_TYPE_BOOLEAN); gperl_callback_invoke (callback, &value, completion, key, iter); ret = g_value_get_boolean (&value); g_value_unset (&value); return ret; } MODULE = Gtk2::EntryCompletion PACKAGE = Gtk2::EntryCompletion PREFIX = gtk_entry_completion_ # GtkEntryCompletion is a direct GObject descendent, so we need _noinc. GtkEntryCompletion_noinc *gtk_entry_completion_new (class) C_ARGS: /*void*/ GtkWidget *gtk_entry_completion_get_entry (GtkEntryCompletion *entry); void gtk_entry_completion_set_model (GtkEntryCompletion *completion, GtkTreeModel_ornull *model); GtkTreeModel *gtk_entry_completion_get_model (GtkEntryCompletion *completion); ## void gtk_entry_completion_set_match_func (GtkEntryCompletion *completion, GtkEntryCompletionMatchFunc func, gpointer func_data, GDestroyNotify func_notify); void gtk_entry_completion_set_match_func (GtkEntryCompletion *completion, SV * func, SV * func_data=NULL) PREINIT: GType param_types[3]; GPerlCallback * callback; CODE: param_types[0] = GTK_TYPE_ENTRY_COMPLETION; param_types[1] = G_TYPE_STRING; param_types[2] = GTK_TYPE_TREE_ITER; callback = gperl_callback_new (func, func_data, 3, param_types, G_TYPE_BOOLEAN); gtk_entry_completion_set_match_func (completion, gtk2perl_entry_completion_match_func, callback, (GDestroyNotify) gperl_callback_destroy); void gtk_entry_completion_set_minimum_key_length (GtkEntryCompletion *completion, gint length); gint gtk_entry_completion_get_minimum_key_length (GtkEntryCompletion *completion); void gtk_entry_completion_complete (GtkEntryCompletion *completion); void gtk_entry_completion_insert_action_text (GtkEntryCompletion *completion, gint index, const gchar *text); void gtk_entry_completion_insert_action_markup (GtkEntryCompletion *completion, gint index, const gchar *markup); void gtk_entry_completion_delete_action (GtkEntryCompletion *completion, gint index); ## ## /* convenience */ ## void gtk_entry_completion_set_text_column (GtkEntryCompletion *completion, gint column); #if GTK_CHECK_VERSION (2, 6, 0) gint gtk_entry_completion_get_text_column (GtkEntryCompletion *completion); void gtk_entry_completion_insert_prefix (GtkEntryCompletion *completion); void gtk_entry_completion_set_inline_completion (GtkEntryCompletion *completion, gboolean inline_completion); gboolean gtk_entry_completion_get_inline_completion (GtkEntryCompletion *completion); void gtk_entry_completion_set_popup_completion (GtkEntryCompletion *completion, gboolean popup_completion); gboolean gtk_entry_completion_get_popup_completion (GtkEntryCompletion *completion); #endif #if GTK_CHECK_VERSION(2, 8, 0) void gtk_entry_completion_set_popup_set_width (GtkEntryCompletion *completion, gboolean popup_set_width); gboolean gtk_entry_completion_get_popup_set_width (GtkEntryCompletion *completion); void gtk_entry_completion_set_popup_single_match (GtkEntryCompletion *completion, gboolean popup_single_match); gboolean gtk_entry_completion_get_popup_single_match (GtkEntryCompletion *completion); #endif #if GTK_CHECK_VERSION(2, 12, 0) void gtk_entry_completion_set_inline_selection (GtkEntryCompletion *completion, gboolean inline_selection); gboolean gtk_entry_completion_get_inline_selection (GtkEntryCompletion *completion); const gchar_ornull *gtk_entry_completion_get_completion_prefix (GtkEntryCompletion *completion); #endif Gtk2-1.2498/xs/GtkEventBox.xs000644 001750 000024 00000002544 11664366546 016757 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" MODULE = Gtk2::EventBox PACKAGE = Gtk2::EventBox PREFIX = gtk_event_box_ ## GtkWidget* gtk_event_box_new (void) GtkWidget * gtk_event_box_new (class) C_ARGS: /* void */ #if GTK_CHECK_VERSION(2,4,0) gboolean gtk_event_box_get_visible_window (GtkEventBox *event_box); void gtk_event_box_set_visible_window (GtkEventBox *event_box, gboolean visible_window); gboolean gtk_event_box_get_above_child (GtkEventBox *event_box); void gtk_event_box_set_above_child (GtkEventBox *event_box, gboolean above_child); #endif Gtk2-1.2498/xs/GtkExpander.xs000644 001750 000024 00000003017 11664366546 016767 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003 by the gtk2-perl team (see the file AUTHORS) * * Licensed under the LGPL, see LICENSE file for more information. * * $Id$ */ #include "gtk2perl.h" MODULE = Gtk2::Expander PACKAGE = Gtk2::Expander PREFIX = gtk_expander_ GtkWidget *gtk_expander_new (class, const gchar_ornull *label=NULL); C_ARGS: label GtkWidget *gtk_expander_new_with_mnemonic (class, const gchar *label); C_ARGS: label void gtk_expander_set_expanded (GtkExpander *expander, gboolean expanded); gboolean gtk_expander_get_expanded (GtkExpander *expander); ###/* Spacing between the expander/label and the child */ void gtk_expander_set_spacing (GtkExpander *expander, gint spacing); gint gtk_expander_get_spacing (GtkExpander *expander); void gtk_expander_set_label (GtkExpander *expander, const gchar *label); ## G_CONST_RETURN const gchar *gtk_expander_get_label (GtkExpander *expander); void gtk_expander_set_use_underline (GtkExpander *expander, gboolean use_underline); gboolean gtk_expander_get_use_underline (GtkExpander *expander); void gtk_expander_set_use_markup (GtkExpander *expander, gboolean use_markup) gboolean gtk_expander_get_use_markup (GtkExpander *expander) void gtk_expander_set_label_widget (GtkExpander *expander, GtkWidget *label_widget); GtkWidget *gtk_expander_get_label_widget (GtkExpander *expander); #if GTK_CHECK_VERSION (2, 22, 0) void gtk_expander_set_label_fill (GtkExpander *expander, gboolean label_fill); gboolean gtk_expander_get_label_fill (GtkExpander *expander); #endif /* 2.22 */ Gtk2-1.2498/xs/GtkFileChooser.xs000644 001750 000024 00000015172 11664366546 017430 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003-2005 by the gtk2-perl team (see the file AUTHORS) * * Licensed under the LGPL, see LICENSE file for more information. * * $Id$ */ #include "gtk2perl.h" MODULE = Gtk2::FileChooser PACKAGE = Gtk2::FileChooser PREFIX = gtk_file_chooser_ =for enum GtkFileChooserAction =cut =for enum GtkFileChooserError =cut ## Configuration ## void gtk_file_chooser_set_action (GtkFileChooser *chooser, GtkFileChooserAction action); GtkFileChooserAction gtk_file_chooser_get_action (GtkFileChooser *chooser); void gtk_file_chooser_set_local_only (GtkFileChooser *chooser, gboolean files_only); gboolean gtk_file_chooser_get_local_only (GtkFileChooser *chooser); void gtk_file_chooser_set_select_multiple (GtkFileChooser *chooser, gboolean select_multiple); gboolean gtk_file_chooser_get_select_multiple (GtkFileChooser *chooser); ## Filename manipulation ## void gtk_file_chooser_set_current_name (GtkFileChooser *chooser, const gchar *name); gchar_own * gtk_file_chooser_get_filename (GtkFileChooser *chooser); gboolean gtk_file_chooser_set_filename (GtkFileChooser *chooser, const char *filename); gboolean gtk_file_chooser_select_filename (GtkFileChooser *chooser, const char *filename); void gtk_file_chooser_unselect_filename (GtkFileChooser *chooser, const char *filename); void gtk_file_chooser_select_all (GtkFileChooser *chooser); void gtk_file_chooser_unselect_all (GtkFileChooser *chooser); void gtk_file_chooser_get_filenames (GtkFileChooser *chooser); PREINIT: GSList * names, * i; PPCODE: names = gtk_file_chooser_get_filenames (chooser); for (i = names ; i != NULL ; i = i->next) { XPUSHs (sv_2mortal (newSVGChar (i->data))); g_free (i->data); } g_slist_free (names); gboolean gtk_file_chooser_set_current_folder (GtkFileChooser *chooser, const gchar *filename); gchar_own *gtk_file_chooser_get_current_folder (GtkFileChooser *chooser); ## URI manipulation ## gchar_own * gtk_file_chooser_get_uri (GtkFileChooser *chooser); gboolean gtk_file_chooser_set_uri (GtkFileChooser *chooser, const char *uri); gboolean gtk_file_chooser_select_uri (GtkFileChooser *chooser, const char *uri); void gtk_file_chooser_unselect_uri (GtkFileChooser *chooser, const char *uri); void gtk_file_chooser_get_uris (GtkFileChooser *chooser); PREINIT: GSList * uris, * i; PPCODE: uris = gtk_file_chooser_get_uris (chooser); for (i = uris ; i != NULL ; i = i->next) { XPUSHs (sv_2mortal (newSVGChar (i->data))); g_free (i->data); } g_slist_free (uris); gboolean gtk_file_chooser_set_current_folder_uri (GtkFileChooser *chooser, const gchar *uri); gchar_own *gtk_file_chooser_get_current_folder_uri (GtkFileChooser *chooser); ## Preview widget ## void gtk_file_chooser_set_preview_widget (GtkFileChooser *chooser, GtkWidget *preview_widget); GtkWidget *gtk_file_chooser_get_preview_widget (GtkFileChooser *chooser); void gtk_file_chooser_set_preview_widget_active (GtkFileChooser *chooser, gboolean active); gboolean gtk_file_chooser_get_preview_widget_active (GtkFileChooser *chooser); ## char *gtk_file_chooser_get_preview_filename (GtkFileChooser *file_chooser); GPerlFilename_own gtk_file_chooser_get_preview_filename (GtkFileChooser *file_chooser); CODE: RETVAL = gtk_file_chooser_get_preview_filename (file_chooser); if (!RETVAL) XSRETURN_UNDEF; OUTPUT: RETVAL ## char *gtk_file_chooser_get_preview_uri (GtkFileChooser *file_chooser); gchar_own *gtk_file_chooser_get_preview_uri (GtkFileChooser *file_chooser); CODE: RETVAL = gtk_file_chooser_get_preview_uri (file_chooser); if (!RETVAL) XSRETURN_UNDEF; OUTPUT: RETVAL void gtk_file_chooser_set_use_preview_label (GtkFileChooser *chooser, gboolean use_label); gboolean gtk_file_chooser_get_use_preview_label (GtkFileChooser *chooser); ## Extra widget ## void gtk_file_chooser_set_extra_widget (GtkFileChooser *chooser, GtkWidget *extra_widget); GtkWidget *gtk_file_chooser_get_extra_widget (GtkFileChooser *chooser); ## List of user selectable filters ## void gtk_file_chooser_add_filter (GtkFileChooser *chooser, GtkFileFilter *filter); void gtk_file_chooser_remove_filter (GtkFileChooser *chooser, GtkFileFilter *filter); void gtk_file_chooser_list_filters (GtkFileChooser *chooser); PREINIT: GSList * filters, * i; PPCODE: filters = gtk_file_chooser_list_filters (chooser); for (i = filters ; i != NULL ; i = i->next) XPUSHs (sv_2mortal (newSVGtkFileFilter (i->data))); g_slist_free (filters); ## Current filter ## void gtk_file_chooser_set_filter (GtkFileChooser *chooser, GtkFileFilter *filter); GtkFileFilter *gtk_file_chooser_get_filter (GtkFileChooser *chooser); ## Per-application shortcut folders =for apidoc __gerror__ =cut void gtk_file_chooser_add_shortcut_folder (GtkFileChooser *chooser, const char *folder); ALIAS: add_shortcut_folder = 0 remove_shortcut_folder = 1 add_shortcut_folder_uri = 2 remove_shortcut_folder_uri = 3 PREINIT: GError * error = NULL; gboolean ret = FALSE; CODE: switch (ix) { case 0: ret = gtk_file_chooser_add_shortcut_folder (chooser, folder, &error); break; case 1: ret = gtk_file_chooser_remove_shortcut_folder (chooser, folder, &error); break; case 2: ret = gtk_file_chooser_add_shortcut_folder_uri (chooser, folder, &error); break; case 3: ret = gtk_file_chooser_remove_shortcut_folder_uri (chooser, folder, &error); break; default: g_assert_not_reached (); } if (!ret) gperl_croak_gerror (NULL, error); ## GSList *gtk_file_chooser_list_shortcut_folders (GtkFileChooser *chooser); ## GSList *gtk_file_chooser_list_shortcut_folder_uris (GtkFileChooser *chooser); void gtk_file_chooser_list_shortcut_folders (GtkFileChooser *chooser); ALIAS: list_shortcut_folders = 0 list_shortcut_folder_uris = 1 PREINIT: GSList * slist, * i; PPCODE: if (ix == 0) slist = gtk_file_chooser_list_shortcut_folders (chooser); else slist = gtk_file_chooser_list_shortcut_folder_uris (chooser); for (i = slist ; i != NULL ; i = i->next) { XPUSHs (sv_2mortal (newSVGChar (i->data))); g_free (i->data); } g_slist_free (slist); #if GTK_CHECK_VERSION (2, 6, 0) void gtk_file_chooser_set_show_hidden (GtkFileChooser *chooser, gboolean show_hidden) gboolean gtk_file_chooser_get_show_hidden (GtkFileChooser *chooser) #endif #if GTK_CHECK_VERSION (2, 8, 0) void gtk_file_chooser_set_do_overwrite_confirmation (GtkFileChooser *chooser, gboolean do_overwrite_confirmation); gboolean gtk_file_chooser_get_do_overwrite_confirmation (GtkFileChooser *chooser); #endif #if GTK_CHECK_VERSION (2, 18, 0) void gtk_file_chooser_set_create_folders (GtkFileChooser *chooser, gboolean create_folders); gboolean gtk_file_chooser_get_create_folders (GtkFileChooser *chooser); #endif Gtk2-1.2498/xs/GtkFileChooserButton.xs000644 001750 000024 00000003212 11664366546 020614 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2004-2006 by the gtk2-perl team (see the file AUTHORS) * * Licensed under the LGPL, see LICENSE file for more information. * * $Id$ */ #include "gtk2perl.h" MODULE = Gtk2::FileChooserButton PACKAGE = Gtk2::FileChooserButton PREFIX = gtk_file_chooser_button_ BOOT: gperl_prepend_isa ("Gtk2::FileChooserButton", "Gtk2::FileChooser"); ## GtkWidget * gtk_file_chooser_button_new (const gchar *title, GtkFileChooserAction action) GtkWidget * gtk_file_chooser_button_new (class, title, action) const gchar *title GtkFileChooserAction action C_ARGS: title, action ## GtkWidget * gtk_file_chooser_button_new_with_backend (const gchar *title, GtkFileChooserAction action, const gchar *backend) GtkWidget * gtk_file_chooser_button_new_with_backend (class, title, action, backend) const gchar *title GtkFileChooserAction action const gchar *backend C_ARGS: title, action, backend ## GtkWidget * gtk_file_chooser_button_new_with_dialog (GtkWidget *dialog) GtkWidget * gtk_file_chooser_button_new_with_dialog (class, dialog) GtkWidget *dialog C_ARGS: dialog const gchar *gtk_file_chooser_button_get_title (GtkFileChooserButton *button); void gtk_file_chooser_button_set_title (GtkFileChooserButton *button, const gchar *title); gint gtk_file_chooser_button_get_width_chars (GtkFileChooserButton *button); void gtk_file_chooser_button_set_width_chars (GtkFileChooserButton *button, gint n_chars); #if GTK_CHECK_VERSION (2, 10, 0) void gtk_file_chooser_button_set_focus_on_click (GtkFileChooserButton *button, gboolean focus_on_click) gboolean gtk_file_chooser_button_get_focus_on_click (GtkFileChooserButton *button) #endif Gtk2-1.2498/xs/GtkFileChooserDialog.xs000644 001750 000024 00000004070 11664366546 020543 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003 by the gtk2-perl team (see the file AUTHORS) * * Licensed under the LGPL, see LICENSE file for more information. * * $Id$ */ #include "gtk2perl.h" MODULE = Gtk2::FileChooserDialog PACKAGE = Gtk2::FileChooserDialog PREFIX = gtk_file_chooser_dialog_ BOOT: /* GtkFileChooserDialog implements the GtkFileChooserIface */ gperl_prepend_isa ("Gtk2::FileChooserDialog", "Gtk2::FileChooser"); =for apidoc Gtk2::FileChooserDialog::new_with_backend =for signature widget = Gtk2::FileChooserDialog->new_with_backend ($title, $parent, $action, $backend, ...) =for arg backend (gchar*) =for arg ... (list) list of button-text => response-id pairs =cut =for apidoc Gtk2::FileChooserDialog::new =for arg ... list of button-text => response-id pairs =cut GtkWidget * gtk_file_chooser_dialog_new (class, gchar *title, GtkWindow_ornull *parent, GtkFileChooserAction action, ...) ALIAS: Gtk2::FileChooserDialog::new_with_backend = 1 PREINIT: gint i, first_index; gchar *backend; CODE: if (ix == 1) { first_index = 5; backend = SvGChar (ST (4)); } else { first_index = 4; backend = NULL; } if (0 != (items - first_index) % 2) { if (ix == 1) croak ("Usage: Gtk2::FileChooserDialog->new_with_backend (title, parent, action, backend, button-text => response-id, ...)\n" " expecting list of button-text => response-id pairs"); else croak ("Usage: Gtk2::FileChooserDialog->new (title, parent, action, button-text => response-id, ...)\n" " expecting list of button-text => response-id pairs"); } RETVAL = g_object_new (GTK_TYPE_FILE_CHOOSER_DIALOG, "title", title, "action", action, "file-system-backend", backend, NULL); if (parent) gtk_window_set_transient_for (GTK_WINDOW (RETVAL), parent); for (i = first_index ; i < items ; i+=2) { gchar * button_text = SvGChar (ST (i)); gint response_id = SvGtkResponseType (ST (i+1)); gtk_dialog_add_button (GTK_DIALOG (RETVAL), button_text, response_id); } OUTPUT: RETVAL Gtk2-1.2498/xs/GtkFileChooserWidget.xs000644 001750 000024 00000001424 11664366546 020567 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003 by the gtk2-perl team (see the file AUTHORS) * * Licensed under the LGPL, see LICENSE file for more information. * * $Id$ */ #include "gtk2perl.h" MODULE = Gtk2::FileChooserWidget PACKAGE = Gtk2::FileChooserWidget PREFIX = gtk_file_chooser_widget_ BOOT: /* GtkFileChooserWidget implements the GtkFileChooserIface */ gperl_prepend_isa ("Gtk2::FileChooserWidget", "Gtk2::FileChooser"); /* apparently private, but still in list_interfaces gperl_set_isa ("Gtk2::FileChooserWidget", "Gtk2::FileChooserEmbed"); */ GtkWidget *gtk_file_chooser_widget_new (class, GtkFileChooserAction action); C_ARGS: action GtkWidget *gtk_file_chooser_widget_new_with_backend (class, GtkFileChooserAction action, const gchar *backend); C_ARGS: action, backend Gtk2-1.2498/xs/GtkFileFilter.xs000644 001750 000024 00000007205 12222205272 017224 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003, 2013 by the gtk2-perl team (see the file AUTHORS) * * Licensed under the LGPL, see LICENSE file for more information. * * $Id$ */ #include "gtk2perl.h" /* struct _GtkFileFilterInfo { GtkFileFilterFlags contains; const gchar *filename; const gchar *uri; const gchar *display_name; const gchar *mime_type; }; */ static SV * newSVGtkFileFilterInfo (const GtkFileFilterInfo * info) { HV * hv; if (!info) return &PL_sv_undef; hv = newHV (); gperl_hv_take_sv_s (hv, "contains", newSVGtkFileFilterFlags (info->contains)); if (info->filename) gperl_hv_take_sv_s (hv, "filename", gperl_sv_from_filename (info->filename)); if (info->uri) gperl_hv_take_sv_s (hv, "uri", newSVpv (info->uri, 0)); if (info->display_name) gperl_hv_take_sv_s (hv, "display_name", newSVGChar (info->display_name)); if (info->mime_type) gperl_hv_take_sv_s (hv, "mime_type", newSVGChar (info->mime_type)); return newRV_noinc ((SV*) hv); } static GtkFileFilterInfo * SvGtkFileFilterInfo (SV * sv) { HV * hv; SV ** svp; GtkFileFilterInfo * info; if (!gperl_sv_is_hash_ref (sv)) croak ("invalid file filter info - expecting a hash reference"); hv = (HV*) SvRV (sv); info = gperl_alloc_temp (sizeof (GtkFileFilterInfo)); if ((svp = hv_fetch (hv, "contains", 8, 0))) info->contains = SvGtkFileFilterFlags (*svp); if ((svp = hv_fetch (hv, "filename", 8, 0))) info->filename = gperl_filename_from_sv (*svp); if ((svp = hv_fetch (hv, "uri", 3, 0))) info->uri = SvPV_nolen (*svp); if ((svp = hv_fetch (hv, "display_name", 12, 0))) info->display_name = SvGChar (*svp); if ((svp = hv_fetch (hv, "mime_type", 9, 0))) info->mime_type = SvGChar (*svp); return info; } static gboolean gtk2perl_file_filter_func (const GtkFileFilterInfo *filter_info, gpointer data) { GPerlCallback * callback = (GPerlCallback*) data; GValue value = {0,}; gboolean retval; SV * sv; g_value_init (&value, G_TYPE_BOOLEAN); sv = newSVGtkFileFilterInfo (filter_info); gperl_callback_invoke (callback, &value, sv); retval = g_value_get_boolean (&value); SvREFCNT_dec (sv); g_value_unset (&value); return retval; } MODULE = Gtk2::FileFilter PACKAGE = Gtk2::FileFilter PREFIX = gtk_file_filter_ GtkFileFilter * gtk_file_filter_new (class); C_ARGS: /*void*/ void gtk_file_filter_set_name (GtkFileFilter *filter, const gchar *name); const gchar *gtk_file_filter_get_name (GtkFileFilter *filter); void gtk_file_filter_add_mime_type (GtkFileFilter *filter, const gchar *mime_type); void gtk_file_filter_add_pattern (GtkFileFilter *filter, const gchar *pattern); ### /* there appears to be no boxed type support for GtkFileFilterInfo */ void gtk_file_filter_add_custom (GtkFileFilter *filter, GtkFileFilterFlags needed, SV * func, SV * data=NULL); PREINIT: GType param_types[1]; GPerlCallback * callback; CODE: param_types[0] = GPERL_TYPE_SV; callback = gperl_callback_new (func, data, 1, param_types, G_TYPE_BOOLEAN); gtk_file_filter_add_custom (filter, needed, gtk2perl_file_filter_func, callback, (GDestroyNotify)gperl_callback_destroy); GtkFileFilterFlags gtk_file_filter_get_needed (GtkFileFilter *filter); ###gboolean gtk_file_filter_filter (GtkFileFilter *filter, const GtkFileFilterInfo *filter_info); gboolean gtk_file_filter_filter (GtkFileFilter *filter, SV *filter_info); C_ARGS: filter, SvGtkFileFilterInfo (filter_info) #if GTK_CHECK_VERSION (2, 6, 0) void gtk_file_filter_add_pixbuf_formats (GtkFileFilter *filter) #endif Gtk2-1.2498/xs/GtkFileSelection.xs000644 001750 000024 00000010742 11664366546 017751 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" MODULE = Gtk2::FileSelection PACKAGE = Gtk2::FileSelection PREFIX = gtk_file_selection_ =for deprecated_by Gtk2::FileChooserDialog =cut GtkWidget * dir_list (fs) GtkFileSelection* fs ALIAS: Gtk2::FileSelection::file_list = 1 Gtk2::FileSelection::selection_entry = 2 Gtk2::FileSelection::selection_text = 3 Gtk2::FileSelection::main_vbox = 4 Gtk2::FileSelection::ok_button = 5 Gtk2::FileSelection::cancel_button = 6 Gtk2::FileSelection::help_button = 7 Gtk2::FileSelection::history_pulldown = 8 Gtk2::FileSelection::history_menu = 9 Gtk2::FileSelection::fileop_dialog = 10 Gtk2::FileSelection::fileop_entry = 11 Gtk2::FileSelection::fileop_c_dir = 12 Gtk2::FileSelection::fileop_del_file = 13 Gtk2::FileSelection::fileop_ren_file = 14 Gtk2::FileSelection::button_area = 15 Gtk2::FileSelection::action_area = 16 CODE: switch (ix) { case 0: RETVAL = fs->dir_list; break; case 1: RETVAL = fs->file_list; break; case 2: RETVAL = fs->selection_entry; break; case 3: RETVAL = fs->selection_text; break; case 4: RETVAL = fs->main_vbox; break; case 5: RETVAL = fs->ok_button; break; case 6: RETVAL = fs->cancel_button; break; case 7: RETVAL = fs->help_button; break; case 8: RETVAL = fs->history_pulldown; break; case 9: RETVAL = fs->history_menu; break; case 10: RETVAL = fs->fileop_dialog; break; case 11: RETVAL = fs->fileop_entry; break; case 12: RETVAL = fs->fileop_c_dir; break; case 13: RETVAL = fs->fileop_del_file; break; case 14: RETVAL = fs->fileop_ren_file; break; case 15: RETVAL = fs->button_area; break; case 16: RETVAL = fs->action_area; break; default: RETVAL = NULL; g_assert_not_reached (); } OUTPUT: RETVAL gchar * fileop_file (fs) GtkFileSelection* fs CODE: RETVAL = fs->fileop_file; OUTPUT: RETVAL ## GtkWidget* gtk_file_selection_new (const gchar *title) GtkWidget * gtk_file_selection_new (class, title) const gchar * title C_ARGS: title ## void gtk_file_selection_set_filename (GtkFileSelection *filesel, const gchar *filename) void gtk_file_selection_set_filename (filesel, filename) GtkFileSelection * filesel GPerlFilename filename ## void gtk_file_selection_complete (GtkFileSelection *filesel, const gchar *pattern) void gtk_file_selection_complete (filesel, pattern) GtkFileSelection * filesel const gchar * pattern ## void gtk_file_selection_show_fileop_buttons (GtkFileSelection *filesel) void gtk_file_selection_show_fileop_buttons (filesel) GtkFileSelection * filesel ## void gtk_file_selection_hide_fileop_buttons (GtkFileSelection *filesel) void gtk_file_selection_hide_fileop_buttons (filesel) GtkFileSelection * filesel ## void gtk_file_selection_set_select_multiple (GtkFileSelection *filesel, gboolean select_multiple) void gtk_file_selection_set_select_multiple (filesel, select_multiple) GtkFileSelection * filesel gboolean select_multiple ## gboolean gtk_file_selection_get_select_multiple (GtkFileSelection *filesel) gboolean gtk_file_selection_get_select_multiple (filesel) GtkFileSelection * filesel ## gtk_file_selection_get_filename returns a statically allocated string GPerlFilename_const gtk_file_selection_get_filename (filesel) GtkFileSelection * filesel =for apidoc Returns the list of file name(s) selected. =cut void gtk_file_selection_get_selections (filesel) GtkFileSelection * filesel PREINIT: int i; gchar ** rets; PPCODE: rets = gtk_file_selection_get_selections(filesel); for (i = 0; rets[i] != NULL; i++) XPUSHs (sv_2mortal (gperl_sv_from_filename (rets[i]))); g_strfreev(rets); Gtk2-1.2498/xs/GtkFixed.xs000644 001750 000024 00000003206 11664366546 016260 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" MODULE = Gtk2::Fixed PACKAGE = Gtk2::Fixed PREFIX = gtk_fixed_ ## GtkWidget* gtk_fixed_new (void) GtkWidget * gtk_fixed_new (class) C_ARGS: /* void */ ## void gtk_fixed_put (GtkFixed *fixed, GtkWidget *widget, gint x, gint y) void gtk_fixed_put (fixed, widget, x, y) GtkFixed * fixed GtkWidget * widget gint x gint y ## void gtk_fixed_move (GtkFixed *fixed, GtkWidget *widget, gint x, gint y) void gtk_fixed_move (fixed, widget, x, y) GtkFixed * fixed GtkWidget * widget gint x gint y ## void gtk_fixed_set_has_window (GtkFixed *fixed, gboolean has_window) void gtk_fixed_set_has_window (fixed, has_window) GtkFixed * fixed gboolean has_window ## gboolean gtk_fixed_get_has_window (GtkFixed *fixed) gboolean gtk_fixed_get_has_window (fixed) GtkFixed * fixed Gtk2-1.2498/xs/GtkFontButton.xs000644 001750 000024 00000003042 11664366546 017321 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003 by the gtk2-perl team (see the file AUTHORS) * * Licensed under the LGPL, see LICENSE file for more information. * * $Id$ */ #include "gtk2perl.h" MODULE = Gtk2::FontButton PACKAGE = Gtk2::FontButton PREFIX = gtk_font_button_ ## GtkWidget *gtk_font_button_new (void); ## GtkWidget *gtk_font_button_new_with_font (const gchar *fontname); GtkWidget * gtk_font_button_new (class, const gchar * fontname=NULL) ALIAS: new_with_font = 1 CODE: PERL_UNUSED_VAR (ix); RETVAL = items == 2 ? gtk_font_button_new_with_font (fontname) : gtk_font_button_new (); OUTPUT: RETVAL const gchar *gtk_font_button_get_title (GtkFontButton *font_button); void gtk_font_button_set_title (GtkFontButton *font_button, const gchar *title); gboolean gtk_font_button_get_use_font (GtkFontButton *font_button); void gtk_font_button_set_use_font (GtkFontButton *font_button, gboolean use_font); gboolean gtk_font_button_get_use_size (GtkFontButton *font_button); void gtk_font_button_set_use_size (GtkFontButton *font_button, gboolean use_size); const gchar* gtk_font_button_get_font_name (GtkFontButton *font_button); gboolean gtk_font_button_set_font_name (GtkFontButton *font_button, const gchar *fontname); gboolean gtk_font_button_get_show_style (GtkFontButton *font_button); void gtk_font_button_set_show_style (GtkFontButton *font_button, gboolean show_style); gboolean gtk_font_button_get_show_size (GtkFontButton *font_button); void gtk_font_button_set_show_size (GtkFontButton *font_button, gboolean show_size); Gtk2-1.2498/xs/GtkFontSelection.xs000644 001750 000024 00000012050 11664366546 017772 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" MODULE = Gtk2::FontSelection PACKAGE = Gtk2::FontSelection PREFIX = gtk_font_selection_ ## GtkWidget* gtk_font_selection_new (void) GtkWidget * gtk_font_selection_new (class) C_ARGS: /* void */ ## gchar* gtk_font_selection_get_font_name (GtkFontSelection *fontsel) gchar_own * gtk_font_selection_get_font_name (fontsel) GtkFontSelection * fontsel ## GdkFont* gtk_font_selection_get_font (GtkFontSelection *fontsel) GdkFont * gtk_font_selection_get_font (fontsel) GtkFontSelection * fontsel ## gboolean gtk_font_selection_set_font_name (GtkFontSelection *fontsel, const gchar *fontname) gboolean gtk_font_selection_set_font_name (fontsel, fontname) GtkFontSelection * fontsel const gchar * fontname ## void gtk_font_selection_set_preview_text (GtkFontSelection *fontsel, const gchar *text) void gtk_font_selection_set_preview_text (fontsel, text) GtkFontSelection * fontsel const gchar * text ## G_CONST_RETURN gchar* gtk_font_selection_get_preview_text (GtkFontSelection *fontsel) const gchar * gtk_font_selection_get_preview_text (fontsel) GtkFontSelection * fontsel #if GTK_CHECK_VERSION (2, 14, 0) # We don't own the face, so no _noinc. PangoFontFace * gtk_font_selection_get_face (GtkFontSelection *fontsel); GtkWidget * gtk_font_selection_get_face_list (GtkFontSelection *fontsel); # We don't own the family, so no _noinc. PangoFontFamily * gtk_font_selection_get_family (GtkFontSelection *fontsel); GtkWidget * gtk_font_selection_get_family_list (GtkFontSelection *fontsel); GtkWidget * gtk_font_selection_get_preview_entry (GtkFontSelection *fontsel); gint gtk_font_selection_get_size (GtkFontSelection *fontsel); GtkWidget * gtk_font_selection_get_size_entry (GtkFontSelection *fontsel); GtkWidget * gtk_font_selection_get_size_list (GtkFontSelection *fontsel); #endif /* 2.14 */ MODULE = Gtk2::FontSelection PACKAGE = Gtk2::FontSelectionDialog PREFIX = gtk_font_selection_dialog_ ## GtkWidget* gtk_font_selection_dialog_new (const gchar *title) GtkWidget * gtk_font_selection_dialog_new (class, title) const gchar * title C_ARGS: title =for apidoc Gtk2::FontSelectionDialog::ok_button __hide__ =cut =for apidoc Gtk2::FontSelectionDialog::apply_button __hide__ =cut =for apidoc Gtk2::FontSelectionDialog::cancel_button __hide__ =cut GtkWidget * get_ok_button (fsd) GtkFontSelectionDialog * fsd ALIAS: Gtk2::FontSelectionDialog::ok_button = 1 Gtk2::FontSelectionDialog::get_apply_button = 2 Gtk2::FontSelectionDialog::apply_button = 3 Gtk2::FontSelectionDialog::get_cancel_button = 4 Gtk2::FontSelectionDialog::cancel_button = 5 CODE: switch(ix) { case 0: case 1: #if GTK_CHECK_VERSION (2, 14, 0) RETVAL = gtk_font_selection_dialog_get_ok_button (fsd); #else RETVAL = fsd->ok_button; #endif break; case 2: case 3: #if GTK_CHECK_VERSION (2, 14, 0) RETVAL = gtk_font_selection_dialog_get_apply_button (fsd); #else RETVAL = fsd->apply_button; #endif break; case 4: case 5: #if GTK_CHECK_VERSION (2, 14, 0) RETVAL = gtk_font_selection_dialog_get_cancel_button (fsd); #else RETVAL = fsd->cancel_button; #endif break; default: RETVAL = NULL; g_assert_not_reached (); } OUTPUT: RETVAL ##gchar* gtk_font_selection_dialog_get_font_name (GtkFontSelectionDialog *fsd) gchar_own * gtk_font_selection_dialog_get_font_name (fsd) GtkFontSelectionDialog * fsd ##GdkFont* gtk_font_selection_dialog_get_font (GtkFontSelectionDialog *fsd) GdkFont * gtk_font_selection_dialog_get_font (fsd) GtkFontSelectionDialog * fsd ##gboolean gtk_font_selection_dialog_set_font_name (GtkFontSelectionDialog *fsd, const gchar *fontname) gboolean gtk_font_selection_dialog_set_font_name (fsd, fontname) GtkFontSelectionDialog * fsd gchar * fontname ##void gtk_font_selection_dialog_set_preview_text (GtkFontSelectionDialog *fsd, const gchar *text) void gtk_font_selection_dialog_set_preview_text (fsd, text) GtkFontSelectionDialog * fsd gchar * text ##G_CONST_RETURN gchar* gtk_font_selection_dialog_get_preview_text (GtkFontSelectionDialog *fsd) const gchar * gtk_font_selection_dialog_get_preview_text (fsd) GtkFontSelectionDialog * fsd #if GTK_CHECK_VERSION (2, 22, 0) GtkWidget * gtk_font_selection_dialog_get_font_selection (GtkFontSelectionDialog *fsd); #endif /* 2.22 */ Gtk2-1.2498/xs/GtkFrame.xs000644 001750 000024 00000003222 11664366546 016251 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" MODULE = Gtk2::Frame PACKAGE = Gtk2::Frame PREFIX = gtk_frame_ GtkWidget* gtk_frame_new (class, label=NULL) gchar_ornull *label C_ARGS: label void gtk_frame_set_label (frame, label=NULL) GtkFrame *frame gchar_ornull *label void gtk_frame_set_label_widget (frame, label_widget) GtkFrame *frame GtkWidget *label_widget GtkWidget * gtk_frame_get_label_widget (frame) GtkFrame * frame void gtk_frame_set_label_align (frame, xalign, yalign) GtkFrame *frame gfloat xalign gfloat yalign # G_CONST_RETURN const gchar * gtk_frame_get_label (frame) GtkFrame * frame void gtk_frame_get_label_align (GtkFrame * frame, OUTLIST gfloat xalign, OUTLIST gfloat yalign) void gtk_frame_set_shadow_type (frame, type) GtkFrame *frame GtkShadowType type GtkShadowType gtk_frame_get_shadow_type (frame) GtkFrame *frame Gtk2-1.2498/xs/GtkGammaCurve.xs000644 001750 000024 00000002205 11664366546 017246 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" MODULE = Gtk2::GammaCurve PACKAGE = Gtk2::GammaCurve PREFIX = gtk_gamma_curve_ ## GtkWidget* gtk_gamma_curve_new (void) GtkWidget * gtk_gamma_curve_new (class) C_ARGS: /* void */ GtkCurve * curve (gamma) GtkGammaCurve * gamma CODE: RETVAL = (GtkCurve*)gamma->curve; OUTPUT: RETVAL Gtk2-1.2498/xs/GtkGC.xs000644 001750 000024 00000006024 11664366546 015513 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003 by the gtk2-perl team (see the file AUTHORS) * * Licensed under the LGPL, see LICENSE file for more information. * * $Id$ */ #include "gtk2perl.h" static GQuark release_count_quark (void) G_GNUC_CONST; static GQuark release_count_quark (void) { static GQuark q = 0; if (!q) q = g_quark_from_static_string ("gtk2perl_gc_release_count"); return q; } static gint modify_count (GdkGC * gc, gint diff) { gint count; count = GPOINTER_TO_INT (g_object_get_qdata (G_OBJECT (gc), release_count_quark ())); count += diff; g_object_set_qdata (G_OBJECT (gc), release_count_quark (), GINT_TO_POINTER (count)); return count; } MODULE = Gtk2::GC PACKAGE = Gtk2::GC PREFIX = gtk_gc_ BOOT: gperl_set_isa ("Gtk2::GC", "Gtk2::Gdk::GC"); =for position post_hierarchy =head1 HIERARCHY Glib::Object +----Gtk2::Gdk::GC +----Gtk2::GC =cut =for position DESCRIPTION =head1 DESCRIPTION These functions provide access to a shared pool of L objects. When a new L is needed, I is called with the required depth, colormap and I. If a L with the required properties already exists then that is returned. If not, a new L is created. [From: L] =cut ## GdkGC * gtk_gc_get (gint depth, GdkColormap *colormap, GdkGCValues *values, GdkGCValuesMask values_mask) =for apidoc =for signature gc = Gtk2::GC->get ($depth, $colormap, $values) =for arg values (Gtk2::Gdk::GCValues) Values to match C<$values> is a hashref with keys and values as per C<< Gtk2::Gdk::GC->new >> (see L). =cut SV * gtk_gc_get (class, depth, colormap, values) gint depth GdkColormap *colormap SV *values PREINIT: GdkGC * gc; GdkGCValues v; GdkGCValuesMask m; CODE: SvGdkGCValues (values, &v, &m); gc = gtk_gc_get (depth, colormap, &v, m); modify_count (gc, 1); /* Rebless to Gtk2::GC, so that we get our DESTROY called */ RETVAL = sv_bless (newSVGdkGC (gc), gv_stashpv ("Gtk2::GC", 1)); OUTPUT: RETVAL =for apidoc __hide__ =cut ## void gtk_gc_release (GdkGC *gc) void gtk_gc_release (class, gc) GdkGC *gc CODE: modify_count (gc, -1); gtk_gc_release (gc); =for apidoc __hide__ =cut void DESTROY (SV * sv) PREINIT: GdkGC * gc; CODE: gc = SvGdkGC (sv); /* Release all live references */ while (modify_count (gc, -1) >= 0) gtk_gc_release (gc); /* You must never fail to chain up to DESTROY on a Glib::Object. */ PUSHMARK (SP); EXTEND (SP, 1); PUSHs (sv); PUTBACK; call_method ("Gtk2::Gdk::GC::DESTROY", G_VOID|G_DISCARD); SPAGAIN; =for position post_methods =head2 Compatibility Before version 1.200 of the Gtk2 perl module, it was necessary to call C on GCs obtained from C. As of version 1.200, this is no longer necessary; a GC will be released when the last perl reference goes away. Old-style code continues to work, but C is deprecated. =cut Gtk2-1.2498/xs/GtkHandleBox.xs000644 001750 000024 00000004720 11664366546 017067 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" MODULE = Gtk2::HandleBox PACKAGE = Gtk2::HandleBox PREFIX = gtk_handle_box_ =for enum GtkPositionType =cut =for enum GtkShadowType =cut ## GtkWidget* gtk_handle_box_new (void) GtkWidget * gtk_handle_box_new (class) C_ARGS: /* void */ ## void gtk_handle_box_set_shadow_type (GtkHandleBox *handle_box, GtkShadowType type) void gtk_handle_box_set_shadow_type (handle_box, type) GtkHandleBox * handle_box GtkShadowType type ## GtkShadowType gtk_handle_box_get_shadow_type (GtkHandleBox *handle_box) GtkShadowType gtk_handle_box_get_shadow_type (handle_box) GtkHandleBox * handle_box ## void gtk_handle_box_set_handle_position (GtkHandleBox *handle_box, GtkPositionType position) void gtk_handle_box_set_handle_position (handle_box, position) GtkHandleBox * handle_box GtkPositionType position ## GtkPositionType gtk_handle_box_get_handle_position(GtkHandleBox *handle_box) GtkPositionType gtk_handle_box_get_handle_position (handle_box) GtkHandleBox * handle_box ## void gtk_handle_box_set_snap_edge (GtkHandleBox *handle_box, GtkPositionType edge) void gtk_handle_box_set_snap_edge (handle_box, edge) GtkHandleBox * handle_box GtkPositionType edge ## GtkPositionType gtk_handle_box_get_snap_edge (GtkHandleBox *handle_box) GtkPositionType gtk_handle_box_get_snap_edge (handle_box) GtkHandleBox * handle_box ## Added to have an accessor for child_detached. gboolean gtk_handle_box_get_child_detached (handle_box) GtkHandleBox * handle_box CODE: #if GTK_CHECK_VERSION (2, 14, 0) RETVAL = gtk_handle_box_get_child_detached (handle_box); #else RETVAL = handle_box->child_detached; #endif /* 2.14 */ OUTPUT: RETVAL Gtk2-1.2498/xs/GtkHBox.xs000644 001750 000024 00000002030 11664366546 016053 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" MODULE = Gtk2::HBox PACKAGE = Gtk2::HBox PREFIX = gtk_hbox_ GtkWidget* gtk_hbox_new (class, homogeneous=0, spacing=5) gboolean homogeneous gint spacing C_ARGS: homogeneous, spacing Gtk2-1.2498/xs/GtkHButtonBox.xs000644 001750 000024 00000003145 11664366546 017257 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" MODULE = Gtk2::HButtonBox PACKAGE = Gtk2::HButtonBox PREFIX = gtk_hbutton_box_ ## GtkWidget* gtk_hbutton_box_new (void) GtkWidget * gtk_hbutton_box_new (class) C_ARGS: /*void*/ ## GtkButtonBoxStyle gtk_hbutton_box_get_layout_default (void) GtkButtonBoxStyle gtk_hbutton_box_get_layout_default (class) C_ARGS: /*void*/ ## void gtk_hbutton_box_set_spacing_default (gint spacing) void gtk_hbutton_box_set_spacing_default (class, spacing) gint spacing C_ARGS: spacing ## void gtk_hbutton_box_set_layout_default (GtkButtonBoxStyle layout) void gtk_hbutton_box_set_layout_default (class, layout) GtkButtonBoxStyle layout C_ARGS: layout ##gint gtk_hbutton_box_get_spacing_default (void) gint gtk_hbutton_box_get_spacing_default (class) C_ARGS: /*void*/ Gtk2-1.2498/xs/GtkHPaned.xs000644 001750 000024 00000001732 11664366546 016362 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" MODULE = Gtk2::HPaned PACKAGE = Gtk2::HPaned PREFIX = gtk_hpaned_ GtkWidget * gtk_hpaned_new (class) C_ARGS: /* void */ Gtk2-1.2498/xs/GtkHRuler.xs000644 001750 000024 00000001775 11664366546 016433 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" MODULE = Gtk2::HRuler PACKAGE = Gtk2::HRuler PREFIX = gtk_hruler_ ## GtkWidget* gtk_hruler_new (void) GtkWidget * gtk_hruler_new (class) C_ARGS: /* void */ Gtk2-1.2498/xs/GtkHScale.xs000644 001750 000024 00000002432 11664366546 016360 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" MODULE = Gtk2::HScale PACKAGE = Gtk2::HScale PREFIX = gtk_hscale_ ## GtkWidget* gtk_hscale_new (GtkAdjustment *adjustment) GtkWidget * gtk_hscale_new (class, adjustment=NULL) GtkAdjustment_ornull * adjustment C_ARGS: adjustment ## GtkWidget* gtk_hscale_new_with_range (gdouble min, gdouble max, gdouble step) GtkWidget * gtk_hscale_new_with_range (class, min, max, step) gdouble min gdouble max gdouble step C_ARGS: min, max, step Gtk2-1.2498/xs/GtkHScrollbar.xs000644 001750 000024 00000003072 11664366546 017255 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" MODULE = Gtk2::HScrollbar PACKAGE = Gtk2::HScrollbar PREFIX = gtk_hscrollbar_ ## GtkWidget* gtk_hscrollbar_new (GtkAdjustment *adjustment) GtkWidget * gtk_hscrollbar_new (class, adjustment=NULL) GtkAdjustment_ornull * adjustment ALIAS: Gtk2::HScrollBar::new = 1 C_ARGS: adjustment CLEANUP: PERL_UNUSED_VAR (ix); =for apidoc Gtk2::HScrollBar::new A typo in days long past resulted in the package names for Gtk2::HScrollbar and Gtk2::VScrollbar being misspelled with a capital C, despite the fact that only the proper name (with the small C) was actually registered with the Glib type system. For backward compatibility with Gtk2-1.00, Gtk2::HScrollBar->new calls Gtk2::HScrollbar->new without complaint. =cut Gtk2-1.2498/xs/GtkHSeparator.xs000644 001750 000024 00000002021 11664366546 017263 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" MODULE = Gtk2::HSeparator PACKAGE = Gtk2::HSeparator PREFIX = gtk_hseparator_ ## GtkWidget* gtk_hseparator_new (void) GtkWidget * gtk_hseparator_new (class) C_ARGS: /* void */ Gtk2-1.2498/xs/GtkHSV.xs000644 001750 000024 00000001775 11664366546 015672 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2010 by the gtk2-perl team (see the file AUTHORS) * * Licensed under the LGPL, see LICENSE file for more information. * * $Id$ */ #include "gtk2perl.h" MODULE = Gtk2::HSV PACKAGE = Gtk2::HSV PREFIX = gtk_hsv_ GtkWidget * gtk_hsv_new (class) C_ARGS: /* void */ void gtk_hsv_set_color (GtkHSV *hsv, double h, double s, double v); void gtk_hsv_get_color (GtkHSV *hsv, OUTLIST gdouble h, OUTLIST gdouble s, OUTLIST gdouble v); void gtk_hsv_set_metrics (GtkHSV *hsv, gint size, gint ring_width); void gtk_hsv_get_metrics (GtkHSV *hsv, OUTLIST gint size, OUTLIST gint ring_width); gboolean gtk_hsv_is_adjusting (GtkHSV *hsv); MODULE = Gtk2::HSV PACKAGE = Gtk2 PREFIX = gtk_ =for object Gtk2::HSV =cut =for apidoc __function__ =cut void gtk_hsv_to_rgb (gdouble h, gdouble s, gdouble v, OUTLIST gdouble r, OUTLIST gdouble g, OUTLIST gdouble b); =for apidoc __function__ =cut void gtk_rgb_to_hsv (gdouble r, gdouble g, gdouble b, OUTLIST gdouble h, OUTLIST gdouble s, OUTLIST gdouble v); Gtk2-1.2498/xs/GtkIconFactory.xs000644 001750 000024 00000023371 11664366546 017446 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" /* * Programs and libraries can register their own GtkIconSizes, making the * standard enum handling rather incorrect. so, we override that stuff * here. FIXME if this stuff is ever needed outside this file, we'll have * to undef and prototype in gtk2perl.h, instead. */ #undef newSVGtkIconSize #undef SvGtkIconSize static SV * newSVGtkIconSize (GtkIconSize size) { /* crap. there is no try. do, or do not. */ /* SV * sv = gperl_try_convert_back_enum (GTK_TYPE_ICON_SIZE, size); */ SV * sv = gperl_convert_back_enum_pass_unknown (GTK_TYPE_ICON_SIZE, size); if (looks_like_number (sv)) { /* fall back... */ const char * name; name = gtk_icon_size_get_name (size); if (name) sv_setpv (sv, name); } return sv; } static GtkIconSize SvGtkIconSize (SV * sv) { GtkIconSize size; if (gperl_try_convert_enum (GTK_TYPE_ICON_SIZE, sv, (gint*)&size)) return size; /* fall back... */ return gtk_icon_size_from_name (SvPV_nolen (sv)); } MODULE = Gtk2::IconFactory PACKAGE = Gtk2::IconFactory PREFIX = gtk_icon_factory_ ## GtkIconFactory* gtk_icon_factory_new (void) GtkIconFactory_noinc * gtk_icon_factory_new (class) C_ARGS: /*void*/ ## void gtk_icon_factory_add (GtkIconFactory *factory, const gchar *stock_id, GtkIconSet *icon_set) void gtk_icon_factory_add (factory, stock_id, icon_set) GtkIconFactory *factory const gchar *stock_id GtkIconSet *icon_set ## GtkIconSet* gtk_icon_factory_lookup (GtkIconFactory *factory, const gchar *stock_id) GtkIconSet* gtk_icon_factory_lookup (factory, stock_id) GtkIconFactory *factory const gchar *stock_id ## void gtk_icon_factory_add_default (GtkIconFactory *factory) void gtk_icon_factory_add_default (factory) GtkIconFactory *factory ## void gtk_icon_factory_remove_default (GtkIconFactory *factory) void gtk_icon_factory_remove_default (factory) GtkIconFactory *factory # apps should generally use themes for this, but the stock browser needs it ## GtkIconSet* gtk_icon_factory_lookup_default (const gchar *stock_id) GtkIconSet* gtk_icon_factory_lookup_default (class, stock_id) const gchar *stock_id CODE: RETVAL = gtk_icon_factory_lookup_default (stock_id); if (!RETVAL) XSRETURN_UNDEF; OUTPUT: RETVAL MODULE = Gtk2::IconFactory PACKAGE = Gtk2::IconSize PREFIX = gtk_icon_size_ ## gboolean gtk_icon_size_lookup (GtkIconSize size, gint *width, gint *height) =for apidoc =for signature (width, height) = Gtk2::IconSize->lookup ($size) =cut void gtk_icon_size_lookup (class, size) GtkIconSize size PREINIT: gint width; gint height; PPCODE: if (!gtk_icon_size_lookup (size, &width, &height)) XSRETURN_EMPTY; EXTEND (SP, 2); PUSHs (sv_2mortal (newSViv (width))); PUSHs (sv_2mortal (newSViv (height))); #if GTK_CHECK_VERSION(2,2,0) ## gboolean gtk_icon_size_lookup_for_settings (GtkSettings *settings, GtkIconSize size, gint *width, gint *height) =for apidoc =for signature (width, height) = Gtk2::IconSize->lookup_for_settings ($settings, $size) =cut void gtk_icon_size_lookup_for_settings (class, settings, size) GtkSettings *settings GtkIconSize size PREINIT: gint width; gint height; PPCODE: if (!gtk_icon_size_lookup_for_settings (settings, size, &width, &height)) XSRETURN_EMPTY; EXTEND (SP, 2); PUSHs (sv_2mortal (newSViv (width))); PUSHs (sv_2mortal (newSViv (height))); #endif /* >= 2.2.0 */ ## GtkIconSize gtk_icon_size_register (const gchar *name, gint width, gint height) GtkIconSize gtk_icon_size_register (class, name, width, height) const gchar *name gint width gint height C_ARGS: name, width, height ## void gtk_icon_size_register_alias (const gchar *alias, GtkIconSize target) void gtk_icon_size_register_alias (class, alias, target) const gchar *alias GtkIconSize target C_ARGS: alias, target ## GtkIconSize gtk_icon_size_from_name (const gchar *name) GtkIconSize gtk_icon_size_from_name (class, name) const gchar *name C_ARGS: name ## const gchar * gtk_icon_size_get_name (GtkIconSize size) MODULE = Gtk2::IconFactory PACKAGE = Gtk2::IconSet PREFIX = gtk_icon_set_ ## GtkIconSet* gtk_icon_set_new (void) GtkIconSet_own* gtk_icon_set_new (class) C_ARGS: /*void*/ ## GtkIconSet* gtk_icon_set_new_from_pixbuf (GdkPixbuf *pixbuf) GtkIconSet_own* gtk_icon_set_new_from_pixbuf (class, pixbuf) GdkPixbuf *pixbuf C_ARGS: pixbuf # these are done for you by the Glib bindings ### GtkIconSet* gtk_icon_set_ref (GtkIconSet *icon_set) ### void gtk_icon_set_unref (GtkIconSet *icon_set) ### GtkIconSet* gtk_icon_set_copy (GtkIconSet *icon_set) #### apps should almost always use gtk_widget_render_icon ## GdkPixbuf* gtk_icon_set_render_icon (GtkIconSet *icon_set, GtkStyle *style, GtkTextDirection direction, GtkStateType state, GtkIconSize size, GtkWidget *widget, const char *detail) GdkPixbuf_noinc* gtk_icon_set_render_icon (icon_set, style, direction, state, size, widget, detail=NULL) GtkIconSet *icon_set GtkStyle_ornull *style GtkTextDirection direction GtkStateType state GtkIconSize size GtkWidget_ornull *widget const char *detail ## void gtk_icon_set_add_source (GtkIconSet *icon_set, const GtkIconSource *source) void gtk_icon_set_add_source (icon_set, source) GtkIconSet *icon_set GtkIconSource *source ## void gtk_icon_set_get_sizes (GtkIconSet *icon_set, GtkIconSize **sizes, gint *n_sizes) =for apidoc Returns a list of Gtk2::IconSize's. =cut void gtk_icon_set_get_sizes (icon_set) GtkIconSet *icon_set PREINIT: GtkIconSize * sizes = NULL; gint n_sizes, i; PPCODE: gtk_icon_set_get_sizes (icon_set, &sizes, &n_sizes); EXTEND (SP, n_sizes); for (i = 0 ; i < n_sizes ; i++) PUSHs (sv_2mortal (newSVGtkIconSize (sizes[i]))); g_free (sizes); MODULE = Gtk2::IconFactory PACKAGE = Gtk2::IconSource PREFIX = gtk_icon_source_ ## GtkIconSource* gtk_icon_source_new (void) GtkIconSource_own* gtk_icon_source_new (class) C_ARGS: /*void*/ # these are done for you by the Glib::Boxed bindings ## GtkIconSource* gtk_icon_source_copy (const GtkIconSource *source) ## void gtk_icon_source_free (GtkIconSource *source) ## void gtk_icon_source_set_filename (GtkIconSource *source, const gchar *filename) void gtk_icon_source_set_filename (source, filename) GtkIconSource *source GPerlFilename filename GPerlFilename_const gtk_icon_source_get_filename (source) GtkIconSource *source ## void gtk_icon_source_set_pixbuf (GtkIconSource *source, GdkPixbuf *pixbuf) void gtk_icon_source_set_pixbuf (source, pixbuf) GtkIconSource *source GdkPixbuf *pixbuf ## GdkPixbuf* gtk_icon_source_get_pixbuf (const GtkIconSource *source) GdkPixbuf_ornull* gtk_icon_source_get_pixbuf (source) GtkIconSource *source ## void gtk_icon_source_set_direction_wildcarded (GtkIconSource *source, gboolean setting) void gtk_icon_source_set_direction_wildcarded (source, setting) GtkIconSource *source gboolean setting ## void gtk_icon_source_set_state_wildcarded (GtkIconSource *source, gboolean setting) void gtk_icon_source_set_state_wildcarded (source, setting) GtkIconSource *source gboolean setting ## void gtk_icon_source_set_size_wildcarded (GtkIconSource *source, gboolean setting) void gtk_icon_source_set_size_wildcarded (source, setting) GtkIconSource *source gboolean setting ## gboolean gtk_icon_source_get_size_wildcarded (const GtkIconSource *source) gboolean gtk_icon_source_get_size_wildcarded (source) GtkIconSource *source ## gboolean gtk_icon_source_get_state_wildcarded (const GtkIconSource *source) gboolean gtk_icon_source_get_state_wildcarded (source) GtkIconSource *source ## gboolean gtk_icon_source_get_direction_wildcarded (const GtkIconSource *source) gboolean gtk_icon_source_get_direction_wildcarded (source) GtkIconSource *source ## void gtk_icon_source_set_direction (GtkIconSource *source, GtkTextDirection direction) void gtk_icon_source_set_direction (source, direction) GtkIconSource *source GtkTextDirection direction ## void gtk_icon_source_set_state (GtkIconSource *source, GtkStateType state) void gtk_icon_source_set_state (source, state) GtkIconSource *source GtkStateType state ## void gtk_icon_source_set_size (GtkIconSource *source, GtkIconSize size) void gtk_icon_source_set_size (source, size) GtkIconSource *source GtkIconSize size ## GtkTextDirection gtk_icon_source_get_direction (const GtkIconSource *source) GtkTextDirection gtk_icon_source_get_direction (source) GtkIconSource *source ## GtkStateType gtk_icon_source_get_state (const GtkIconSource *source) GtkStateType gtk_icon_source_get_state (source) GtkIconSource *source ## GtkIconSize gtk_icon_source_get_size (const GtkIconSource *source) GtkIconSize gtk_icon_source_get_size (source) GtkIconSource *source #if GTK_CHECK_VERSION(2,4,0) ## void gtk_icon_source_set_icon_name (GtkIconSource *source, const gchar *icon_name) void gtk_icon_source_set_icon_name (source, icon_name) GtkIconSource *source const gchar *icon_name ## const gchar *gtk_icon_source_get_icon_name (const GtkIconSource *source) const gchar * gtk_icon_source_get_icon_name (source) GtkIconSource *source #endif Gtk2-1.2498/xs/GtkIconTheme.xs000644 001750 000024 00000020402 11664366546 017071 0ustar00bdmanningstaff000000 000000 /* * Copyright (C) 2003 by the gtk2-perl team (see the file AUTHORS for a * complete listing) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include "gtk2perl.h" MODULE = Gtk2::IconTheme PACKAGE = Gtk2::IconTheme PREFIX = gtk_icon_theme_ =for flags GtkIconLookupFlags =cut =for enum GtkIconThemeError =cut GtkIconTheme_noinc * gtk_icon_theme_new (class) C_ARGS: /*void*/ GtkIconTheme *gtk_icon_theme_get_default (class) C_ARGS: /*void*/ GtkIconTheme * gtk_icon_theme_get_for_screen (class, GdkScreen *screen) C_ARGS: screen void gtk_icon_theme_set_screen (GtkIconTheme *icon_theme, GdkScreen *screen); ## void gtk_icon_theme_set_search_path (GtkIconTheme *icon_theme, const gchar *path[], gint n_elements); void gtk_icon_theme_set_search_path (GtkIconTheme *icon_theme, ...) PREINIT: const gchar ** path = NULL; gint n_elements, i; CODE: n_elements = items - 1; path = gperl_alloc_temp (sizeof (gchar*) * n_elements + 1); for (i = 0 ; i < n_elements ; i++) path[i] = gperl_filename_from_sv (ST (i + 1)); gtk_icon_theme_set_search_path (icon_theme, path, n_elements); ## void gtk_icon_theme_get_search_path (GtkIconTheme *icon_theme, gchar **path[], gint *n_elements); void gtk_icon_theme_get_search_path (GtkIconTheme *icon_theme) PREINIT: gchar ** path = NULL; gint n_elements, i; PPCODE: gtk_icon_theme_get_search_path (icon_theme, &path, &n_elements); EXTEND (SP, n_elements); for (i = 0; i < n_elements; i++) PUSHs (sv_2mortal (gperl_sv_from_filename (path[i]))); g_strfreev (path); ## void gtk_icon_theme_append_search_path (GtkIconTheme *icon_theme, const gchar *path); void gtk_icon_theme_append_search_path (GtkIconTheme *icon_theme, GPerlFilename_const path); ## void gtk_icon_theme_prepend_search_path (GtkIconTheme *icon_theme, const gchar *path); void gtk_icon_theme_prepend_search_path (GtkIconTheme *icon_theme, GPerlFilename_const path); =for apidoc Cannot be used on a C returned by Gtk2::IconTheme->get_default or Gtk2::IconTheme->get_for_screen. =cut void gtk_icon_theme_set_custom_theme (GtkIconTheme *icon_theme, const gchar_ornull *theme_name); gboolean gtk_icon_theme_has_icon (GtkIconTheme *icon_theme, const gchar *icon_name); GtkIconInfo_own_ornull * gtk_icon_theme_lookup_icon (GtkIconTheme *icon_theme, const gchar *icon_name, gint size, GtkIconLookupFlags flags); ## GdkPixbuf * gtk_icon_theme_load_icon (GtkIconTheme *icon_theme, const gchar *icon_name, gint size, GtkIconLookupFlags flags, GError **error); =for apidoc __gerror__ =cut GdkPixbuf_noinc_ornull * gtk_icon_theme_load_icon (GtkIconTheme *icon_theme, const gchar *icon_name, gint size, GtkIconLookupFlags flags) PREINIT: GError * error = NULL; CODE: RETVAL = gtk_icon_theme_load_icon (icon_theme, icon_name, size, flags, &error); if (!RETVAL) gperl_croak_gerror (NULL, error); OUTPUT: RETVAL ## GList * gtk_icon_theme_list_icons (GtkIconTheme *icon_theme, const gchar *context); void gtk_icon_theme_list_icons (GtkIconTheme * icon_theme, const gchar_ornull * context) PREINIT: GList * list, * i; PPCODE: list = gtk_icon_theme_list_icons (icon_theme, context); for (i = list ; i != NULL ; i = i->next) { XPUSHs (sv_2mortal (newSVGChar (i->data))); g_free (i->data); } g_list_free (list); ## char * gtk_icon_theme_get_example_icon_name (GtkIconTheme *icon_theme); gchar_own_ornull * gtk_icon_theme_get_example_icon_name (GtkIconTheme *icon_theme); gboolean gtk_icon_theme_rescan_if_needed (GtkIconTheme *icon_theme); void gtk_icon_theme_add_builtin_icon (class, const gchar *icon_name, gint size, GdkPixbuf *pixbuf); C_ARGS: icon_name, size, pixbuf #if GTK_CHECK_VERSION (2, 6, 0) ## gint * gtk_icon_theme_get_icon_sizes (GtkIconTheme *icon_theme, const gchar *icon_name); void gtk_icon_theme_get_icon_sizes (GtkIconTheme *icon_theme, const gchar *icon_name); PREINIT: gint *result = NULL, *shadow = NULL; gint size; PPCODE: shadow = result = gtk_icon_theme_get_icon_sizes (icon_theme, icon_name); if (result) { /* The list is 0-terminated, so we loop over it until we get a 0. */ while (0 != (size = *(result++))) XPUSHs (sv_2mortal (newSViv (size))); g_free (shadow); } #endif #if GTK_CHECK_VERSION (2, 12, 0) # GList * gtk_icon_theme_list_contexts (GtkIconTheme *icon_theme); void gtk_icon_theme_list_contexts (GtkIconTheme *icon_theme) PREINIT: GList *list, *i; PPCODE: list = gtk_icon_theme_list_contexts (icon_theme); for (i = list; i != NULL; i = i->next) { XPUSHs (sv_2mortal (newSVGChar (i->data))); g_free (i->data); } g_list_free (list); # GtkIconInfo * gtk_icon_theme_choose_icon (GtkIconTheme *icon_theme, const gchar *icon_names[], gint size, GtkIconLookupFlags flags); GtkIconInfo_own_ornull * gtk_icon_theme_choose_icon (GtkIconTheme *icon_theme, SV *icon_names, gint size, GtkIconLookupFlags flags) PREINIT: gchar **names; AV *av; int length, i; CODE: if (!gperl_sv_is_array_ref (icon_names)) croak ("icon_names must be an array reference of icon names"); av = (AV *) SvRV (icon_names); length = av_len (av) + 1; names = g_new0 (gchar *, length + 1); for (i = 0; i < length; i++) { SV **sv = av_fetch (av, i, 0); names[i] = sv && gperl_sv_is_defined (*sv) ? SvPV_nolen (*sv) : ""; } names[length] = NULL; RETVAL = gtk_icon_theme_choose_icon ( icon_theme, (const char **) names, size, flags); g_free (names); OUTPUT: RETVAL #endif MODULE = Gtk2::IconTheme PACKAGE = Gtk2::IconInfo PREFIX = gtk_icon_info_ ## don't need to bind these -- they are automagical ## GType gtk_icon_info_get_type (void); ## GtkIconInfo *gtk_icon_info_copy (GtkIconInfo *icon_info); ## void gtk_icon_info_free (GtkIconInfo *icon_info); gint gtk_icon_info_get_base_size (GtkIconInfo *icon_info); const gchar_ornull *gtk_icon_info_get_filename (GtkIconInfo *icon_info); GdkPixbuf_ornull * gtk_icon_info_get_builtin_pixbuf (GtkIconInfo *icon_info); ## GdkPixbuf * gtk_icon_info_load_icon (GtkIconInfo *icon_info, GError **error); =for apidoc __gerror__ =cut GdkPixbuf_noinc_ornull * gtk_icon_info_load_icon (GtkIconInfo *icon_info) PREINIT: GError *error = NULL; CODE: RETVAL = gtk_icon_info_load_icon (icon_info, &error); if (!RETVAL) gperl_croak_gerror (NULL, error); OUTPUT: RETVAL void gtk_icon_info_set_raw_coordinates (GtkIconInfo *icon_info, gboolean raw_coordinates); ## gboolean gtk_icon_info_get_embedded_rect (GtkIconInfo *icon_info, GdkRectangle *rectangle); GdkRectangle_copy * gtk_icon_info_get_embedded_rect (GtkIconInfo *icon_info) PREINIT: GdkRectangle rectangle; CODE: if (!gtk_icon_info_get_embedded_rect (icon_info, &rectangle)) XSRETURN_UNDEF; RETVAL = &rectangle; OUTPUT: RETVAL ## gboolean gtk_icon_info_get_attach_points (GtkIconInfo *icon_info, GdkPoint **points, gint *n_points); =for apidoc Returns the attach points as an interleaved list of x and y coordinates. =cut void gtk_icon_info_get_attach_points (GtkIconInfo *icon_info) PREINIT: GdkPoint *points = NULL; gint n_points; PPCODE: if (gtk_icon_info_get_attach_points (icon_info, &points, &n_points)) { int i; EXTEND (SP, n_points * 2); for (i = 0 ; i < n_points ; i++) { PUSHs (sv_2mortal (newSViv (points[i].x))); PUSHs (sv_2mortal (newSViv (points[i].y))); } g_free (points); } const gchar_ornull *gtk_icon_info_get_display_name (GtkIconInfo *icon_info); #if GTK_CHECK_VERSION (2, 14, 0) ## GtkIconInfo* gtk_icon_info_new_for_pixbuf (GtkIconTheme *icon_theme, GdkPixbuf *pixbuf) GtkIconInfo_own * gtk_icon_info_new_for_pixbuf (class, GtkIconTheme *icon_theme, GdkPixbuf *pixbuf) C_ARGS: icon_theme, pixbuf #endif /* 2.14 */ Gtk2-1.2498/xs/GtkIconView.xs000644 001750 000024 00000026141 11664366546 016747 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2004-2005, 2009 by the gtk2-perl team (see the file AUTHORS) * * Licensed under the LGPL, see LICENSE file for more information. * * $Id$ */ #include "gtk2perl.h" static GPerlCallback * gtk2perl_icon_view_foreach_func_create (SV * func, SV * data) { GType param_types [2]; param_types[0] = GTK_TYPE_ICON_VIEW; param_types[1] = GTK_TYPE_TREE_PATH; return gperl_callback_new (func, data, G_N_ELEMENTS (param_types), param_types, G_TYPE_NONE); } static void gtk2perl_icon_view_foreach_func (GtkIconView *icon_view, GtkTreePath *path, gpointer data) { gperl_callback_invoke ((GPerlCallback*) data, NULL, icon_view, path); } MODULE = Gtk2::IconView PACKAGE = Gtk2::IconView PREFIX = gtk_icon_view_ GtkWidget * gtk_icon_view_new (class) C_ARGS: /* void */ GtkWidget * gtk_icon_view_new_with_model (class, model) GtkTreeModel * model C_ARGS: model void gtk_icon_view_set_model (GtkIconView * icon_view, GtkTreeModel * model); GtkTreeModel * gtk_icon_view_get_model (GtkIconView * icon_view); void gtk_icon_view_set_text_column (GtkIconView * icon_view, gint column); gint gtk_icon_view_get_text_column (GtkIconView * icon_view); void gtk_icon_view_set_markup_column (GtkIconView * icon_view, gint column); gint gtk_icon_view_get_markup_column (GtkIconView * icon_view); void gtk_icon_view_set_pixbuf_column (GtkIconView * icon_view, gint column); gint gtk_icon_view_get_pixbuf_column (GtkIconView * icon_view); void gtk_icon_view_set_orientation (GtkIconView * icon_view, GtkOrientation orientation); GtkOrientation gtk_icon_view_get_orientation (GtkIconView * icon_view); void gtk_icon_view_set_columns (GtkIconView *icon_view, gint columns); gint gtk_icon_view_get_columns (GtkIconView *icon_view); void gtk_icon_view_set_item_width (GtkIconView *icon_view, gint item_width); gint gtk_icon_view_get_item_width (GtkIconView *icon_view); void gtk_icon_view_set_spacing (GtkIconView *icon_view, gint spacing); gint gtk_icon_view_get_spacing (GtkIconView *icon_view); void gtk_icon_view_set_row_spacing (GtkIconView *icon_view, gint row_spacing); gint gtk_icon_view_get_row_spacing (GtkIconView *icon_view); void gtk_icon_view_set_column_spacing (GtkIconView *icon_view, gint column_spacing); gint gtk_icon_view_get_column_spacing (GtkIconView *icon_view); void gtk_icon_view_set_margin (GtkIconView *icon_view, gint margin); gint gtk_icon_view_get_margin (GtkIconView *icon_view); GtkTreePath_own * gtk_icon_view_get_path_at_pos (GtkIconView * icon_view, gint x, gint y); ## void gtk_icon_view_selected_foreach (GtkIconView * icon_view, GtkIconViewForeachFunc func, gpointer data); void gtk_icon_view_selected_foreach (GtkIconView * icon_view, SV * func, SV * data=NULL); PREINIT: GPerlCallback * callback; CODE: callback = gtk2perl_icon_view_foreach_func_create (func, data); gtk_icon_view_selected_foreach (icon_view, gtk2perl_icon_view_foreach_func, callback); gperl_callback_destroy (callback); void gtk_icon_view_set_selection_mode (GtkIconView * icon_view, GtkSelectionMode mode); GtkSelectionMode gtk_icon_view_get_selection_mode (GtkIconView * icon_view); void gtk_icon_view_select_path (GtkIconView * icon_view, GtkTreePath * path); void gtk_icon_view_unselect_path (GtkIconView * icon_view, GtkTreePath * path); gboolean gtk_icon_view_path_is_selected (GtkIconView * icon_view, GtkTreePath * path); ## GList * gtk_icon_view_get_selected_items (GtkIconView * icon_view); void gtk_icon_view_get_selected_items (GtkIconView * icon_view) PREINIT: GList * list; PPCODE: list = gtk_icon_view_get_selected_items (icon_view); if (list) { GList * curr; for (curr = list; curr; curr = g_list_next (curr)) XPUSHs (sv_2mortal (newSVGtkTreePath_own (curr->data))); g_list_free (list); } else XSRETURN_EMPTY; void gtk_icon_view_select_all (GtkIconView * icon_view); void gtk_icon_view_unselect_all (GtkIconView * icon_view); void gtk_icon_view_item_activated (GtkIconView * icon_view, GtkTreePath * path); #if GTK_CHECK_VERSION(2, 8, 0) ## gboolean gtk_icon_view_get_cursor (GtkIconView *icon_view, GtkTreePath **path, GtkCellRenderer **cell); void gtk_icon_view_get_cursor (icon_view) GtkIconView *icon_view PREINIT: GtkTreePath *path = NULL; GtkCellRenderer *cell = NULL; PPCODE: if (!gtk_icon_view_get_cursor (icon_view, &path, &cell)) XSRETURN_EMPTY; EXTEND (sp, 2); PUSHs (sv_2mortal (newSVGtkTreePath_own (path))); PUSHs (sv_2mortal (newSVGtkCellRenderer (cell))); void gtk_icon_view_set_cursor (GtkIconView *icon_view, GtkTreePath *path, GtkCellRenderer_ornull *cell, gboolean start_editing); ## gboolean gtk_icon_view_get_item_at_pos (GtkIconView *icon_view, gint x, gint y, GtkTreePath **path, GtkCellRenderer **cell); void gtk_icon_view_get_item_at_pos (icon_view, x, y) GtkIconView *icon_view gint x gint y PREINIT: GtkTreePath *path = NULL; GtkCellRenderer *cell = NULL; CODE: /* Note gtk_icon_view_get_item_at_pos() can call out to perl model and/or cell renderer code when figuring sizes, so avoid local SP. */ if (!gtk_icon_view_get_item_at_pos (icon_view, x, y, &path, &cell)) XSRETURN_EMPTY; ST(0) = sv_2mortal (newSVGtkTreePath_own (path)); ST(1) = sv_2mortal (newSVGtkCellRenderer (cell)); XSRETURN(2); ## gboolean gtk_icon_view_get_visible_range (GtkIconView *icon_view, GtkTreePath **start_path, GtkTreePath **end_path); void gtk_icon_view_get_visible_range (icon_view) GtkIconView *icon_view PREINIT: GtkTreePath *start_path = NULL, *end_path = NULL; PPCODE: if (!gtk_icon_view_get_visible_range(icon_view, &start_path, &end_path)) XSRETURN_EMPTY; EXTEND (sp, 2); PUSHs (sv_2mortal (newSVGtkTreePath_own (start_path))); PUSHs (sv_2mortal (newSVGtkTreePath_own (end_path))); void gtk_icon_view_scroll_to_path (GtkIconView *icon_view, GtkTreePath *path, gboolean use_align=FALSE, gfloat row_align=0.0, gfloat col_align=0.0); ## void gtk_icon_view_enable_model_drag_source (GtkIconView *icon_view, GdkModifierType start_button_mask, const GtkTargetEntry *targets, gint n_targets, GdkDragAction actions); =for apidoc =for arg ... of Gtk2::TargetEntry's =cut void gtk_icon_view_enable_model_drag_source (icon_view, start_button_mask, actions, ...) GtkIconView *icon_view GdkModifierType start_button_mask GdkDragAction actions PREINIT: GtkTargetEntry * targets = NULL; gint n_targets, i; CODE: #define FIRST_TARGET 3 n_targets = items - FIRST_TARGET; targets = g_new (GtkTargetEntry, n_targets); for (i = 0 ; i < n_targets ; i++) gtk2perl_read_gtk_target_entry (ST (i+FIRST_TARGET), targets+i); gtk_icon_view_enable_model_drag_source (icon_view, start_button_mask, targets, n_targets, actions); #undef FIRST_TARGET CLEANUP: g_free (targets); ## void gtk_icon_view_enable_model_drag_dest (GtkIconView *icon_view, const GtkTargetEntry *targets, gint n_targets, GdkDragAction actions); =for apidoc =for arg ... of Gtk2::TargetEntry's =cut void gtk_icon_view_enable_model_drag_dest (icon_view, actions, ...) GtkIconView *icon_view GdkDragAction actions PREINIT: GtkTargetEntry * targets = NULL; gint n_targets, i; CODE: #define FIRST_TARGET 2 n_targets = items - FIRST_TARGET; targets = g_new (GtkTargetEntry, n_targets); for (i = 0 ; i < n_targets ; i++) gtk2perl_read_gtk_target_entry (ST (i+FIRST_TARGET), targets+i); gtk_icon_view_enable_model_drag_dest (icon_view, targets, n_targets, actions); #undef FIRST_TARGET CLEANUP: g_free (targets); void gtk_icon_view_unset_model_drag_source (GtkIconView *icon_view); void gtk_icon_view_unset_model_drag_dest (GtkIconView *icon_view); void gtk_icon_view_set_reorderable (GtkIconView *icon_view, gboolean reorderable); gboolean gtk_icon_view_get_reorderable (GtkIconView *icon_view); void gtk_icon_view_set_drag_dest_item (GtkIconView *icon_view, GtkTreePath *path, GtkIconViewDropPosition pos); ## void gtk_icon_view_get_drag_dest_item (GtkIconView *icon_view, GtkTreePath **path, GtkIconViewDropPosition *pos); void gtk_icon_view_get_drag_dest_item (GtkIconView *icon_view) PREINIT: GtkTreePath *path = NULL; GtkIconViewDropPosition pos; PPCODE: gtk_icon_view_get_drag_dest_item (icon_view, &path, &pos); EXTEND (SP, 2); PUSHs (sv_2mortal (newSVGtkTreePath_own (path))); PUSHs (sv_2mortal (newSVGtkIconViewDropPosition (pos))); ## gboolean gtk_icon_view_get_dest_item_at_pos (GtkIconView *icon_view, gint drag_x, gint drag_y, GtkTreePath **path, GtkIconViewDropPosition *pos); void gtk_icon_view_get_dest_item_at_pos (icon_view, drag_x, drag_y) GtkIconView *icon_view gint drag_x gint drag_y PREINIT: GtkTreePath *path = NULL; GtkIconViewDropPosition pos; CODE: /* Note gtk_icon_view_get_dest_item_at_pos() may call out to perl model and/or cell renderer code when figuring cell sizes (in gtk_icon_view_get_item_at_coords()), so avoid local SP. */ if (!gtk_icon_view_get_dest_item_at_pos (icon_view, drag_x, drag_y, &path, &pos)) XSRETURN_EMPTY; ST(0) = sv_2mortal (newSVGtkTreePath_own (path)); ST(1) = sv_2mortal (newSVGtkIconViewDropPosition (pos)); XSRETURN(2); GdkPixmap_noinc *gtk_icon_view_create_drag_icon (GtkIconView *icon_view, GtkTreePath *path); #endif /* 2.8.0 */ #if GTK_CHECK_VERSION (2, 12, 0) void gtk_icon_view_convert_widget_to_bin_window_coords (GtkIconView *icon_view, gint wx, gint wy, OUTLIST gint bx, OUTLIST gint by); void gtk_icon_view_set_tooltip_item (GtkIconView *icon_view, GtkTooltip *tooltip, GtkTreePath *path); void gtk_icon_view_set_tooltip_cell (GtkIconView *icon_view, GtkTooltip *tooltip, GtkTreePath *path, GtkCellRenderer *cell); # gboolean gtk_icon_view_get_tooltip_context (GtkIconView *icon_view, gint *x, gint *y, gboolean keyboard_tip, GtkTreeModel **model, GtkTreePath **path, GtkTreeIter *iter); void gtk_icon_view_get_tooltip_context (GtkIconView *icon_view, gint x, gint y, gboolean keyboard_tip) PREINIT: GtkTreeModel *model = NULL; GtkTreePath *path = NULL; GtkTreeIter iter = {0, }; PPCODE: /* PUTBACK/SPAGAIN because gtk_icon_view_get_tooltip_context() calls gtk_tree_model_get_iter(), which may reach a perl code model. */ PUTBACK; if (! gtk_icon_view_get_tooltip_context (icon_view, &x, &y, keyboard_tip, &model, &path, &iter)) XSRETURN_EMPTY; SPAGAIN; EXTEND (sp, 5); PUSHs (sv_2mortal (newSViv (x))); PUSHs (sv_2mortal (newSViv (y))); PUSHs (sv_2mortal (newSVGtkTreeModel (model))); PUSHs (sv_2mortal (newSVGtkTreePath_own (path))); PUSHs (sv_2mortal (newSVGtkTreeIter_copy (&iter))); void gtk_icon_view_set_tooltip_column (GtkIconView *icon_view, gint column); gint gtk_icon_view_get_tooltip_column (GtkIconView *icon_view); #endif #if GTK_CHECK_VERSION (2, 18, 0) void gtk_icon_view_set_item_padding (GtkIconView *icon_view, gint item_padding); gint gtk_icon_view_get_item_padding (GtkIconView *icon_view); #endif #if GTK_CHECK_VERSION (2, 22, 0) gint gtk_icon_view_get_item_row (GtkIconView *icon_view, GtkTreePath *path); gint gtk_icon_view_get_item_column (GtkIconView *icon_view, GtkTreePath *path); void gtk_icon_view_set_item_orientation (GtkIconView *icon_view, GtkOrientation orientation); GtkOrientation gtk_icon_view_get_item_orientation (GtkIconView *icon_view); #endif /* 2.22 */ Gtk2-1.2498/xs/GtkImage.xs000644 001750 000024 00000013331 11664366546 016243 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003-2005 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" MODULE = Gtk2::Image PACKAGE = Gtk2::Image PREFIX = gtk_image_ GtkWidget* gtk_image_new (class) C_ARGS: /*void*/ ## GtkWidget* gtk_image_new_from_pixmap (GdkPixmap *pixmap, GdkBitmap *mask) GtkWidget* gtk_image_new_from_pixmap (class, pixmap, mask) GdkPixmap_ornull * pixmap GdkBitmap_ornull * mask C_ARGS: pixmap, mask ## GtkWidget* gtk_image_new_from_image (GdkImage *image, GdkBitmap *mask) GtkWidget* gtk_image_new_from_image (class, image, mask) GdkImage_ornull *image GdkBitmap_ornull *mask C_ARGS: image, mask GtkWidget* gtk_image_new_from_file (class, filename) GPerlFilename_ornull filename C_ARGS: filename ## GtkWidget* gtk_image_new_from_pixbuf (GdkPixbuf *pixbuf) GtkWidget* gtk_image_new_from_pixbuf (class, pixbuf) GdkPixbuf_ornull * pixbuf C_ARGS: pixbuf GtkWidget* gtk_image_new_from_stock (class, stock_id, size) const gchar *stock_id GtkIconSize size C_ARGS: stock_id, size ## GtkWidget* gtk_image_new_from_icon_set (GtkIconSet *icon_set, GtkIconSize size) GtkWidget* gtk_image_new_from_icon_set (class, icon_set, size) GtkIconSet *icon_set GtkIconSize size C_ARGS: icon_set, size ## GtkWidget* gtk_image_new_from_animation (GdkPixbufAnimation *animation) GtkWidget* gtk_image_new_from_animation (class, GdkPixbufAnimation *animation) C_ARGS: animation ## void gtk_image_set_from_pixmap (GtkImage *image, GdkPixmap *pixmap, GdkBitmap *mask) void gtk_image_set_from_pixmap (image, pixmap, mask) GtkImage * image GdkPixmap_ornull * pixmap GdkBitmap_ornull * mask void gtk_image_set_from_image (image, gdk_image, mask) GtkImage *image GdkImage_ornull *gdk_image GdkBitmap_ornull *mask void gtk_image_set_from_file (image, filename) GtkImage *image GPerlFilename_ornull filename void gtk_image_set_from_pixbuf (image, pixbuf) GtkImage *image GdkPixbuf_ornull *pixbuf void gtk_image_set_from_stock (image, stock_id, size) GtkImage *image const gchar *stock_id GtkIconSize size void gtk_image_set_from_icon_set (image, icon_set, size) GtkImage *image GtkIconSet *icon_set GtkIconSize size void gtk_image_set_from_animation (GtkImage *image, GdkPixbufAnimation *animation) GtkImageType gtk_image_get_storage_type (image) GtkImage *image ## void gtk_image_get_pixmap (GtkImage *image, GdkPixmap **pixmap, GdkBitmap **mask) void gtk_image_get_pixmap (GtkImage *image) PREINIT: GdkPixmap * pixmap = NULL; GdkBitmap * mask = NULL; PPCODE: gtk_image_get_pixmap (image, &pixmap, &mask); EXTEND (SP, 2); PUSHs (sv_2mortal (newSVGdkPixmap (pixmap))); PUSHs (sv_2mortal (newSVGdkBitmap (mask))); ## void gtk_image_get_image (GtkImage *image, GdkImage **gdk_image, GdkBitmap **mask) void gtk_image_get_image (GtkImage *image) PREINIT: GdkImage * gdk_image = NULL; GdkBitmap * mask = NULL; PPCODE: gtk_image_get_image (image, &gdk_image, &mask); EXTEND (SP, 2); PUSHs (sv_2mortal (newSVGdkImage (gdk_image))); PUSHs (sv_2mortal (newSVGdkBitmap (mask))); GdkPixbuf* gtk_image_get_pixbuf (image) GtkImage *image =for apidoc =for signature (stock_id, icon_size) = $image->get_stock =cut void gtk_image_get_stock (image) GtkImage * image PREINIT: gchar * stock_id; GtkIconSize size; PPCODE: gtk_image_get_stock (image, &stock_id, &size); EXTEND (SP, 2); PUSHs (sv_2mortal (stock_id ? newSVpv (stock_id, 0) : newSVsv(&PL_sv_undef))); PUSHs (sv_2mortal (newSVGtkIconSize (size))); ## void gtk_image_get_icon_set (GtkImage *image, GtkIconSet **icon_set, GtkIconSize *size) void gtk_image_get_icon_set (GtkImage *image) PREINIT: GtkIconSet *icon_set = NULL; GtkIconSize size; PPCODE: gtk_image_get_icon_set (image, &icon_set, &size); EXTEND (SP, 2); PUSHs (sv_2mortal (newSVGtkIconSet (icon_set))); PUSHs (sv_2mortal (newSVGtkIconSize (size))); GdkPixbufAnimation* gtk_image_get_animation (GtkImage *image) # deprecated ## void gtk_image_get (GtkImage *image, GdkImage **val, GdkBitmap **mask) ##void gtk_image_set (GtkImage *image, GdkImage *val, GdkBitmap *mask) #if GTK_CHECK_VERSION (2, 6, 0) ## GtkWidget * gtk_image_new_from_icon_name (const gchar *icon_name, GtkIconSize size) GtkWidget * gtk_image_new_from_icon_name (class, icon_name, size) const gchar *icon_name GtkIconSize size C_ARGS: icon_name, size void gtk_image_set_from_icon_name (GtkImage *image, const gchar *icon_name, GtkIconSize size) # void gtk_image_get_icon_name (GtkImage *image, const gchar **icon_name, GtkIconSize *size) void gtk_image_get_icon_name (GtkImage *image) PREINIT: const gchar *icon_name = NULL; GtkIconSize size; PPCODE: gtk_image_get_icon_name (image, &icon_name, &size); EXTEND (SP, 2); PUSHs (sv_2mortal (newSVGChar (icon_name))); PUSHs (sv_2mortal (newSVGtkIconSize (size))); void gtk_image_set_pixel_size (GtkImage *image, gint pixel_size) gint gtk_image_get_pixel_size (GtkImage *image) #endif #if GTK_CHECK_VERSION (2, 8, 0) void gtk_image_clear (GtkImage *image); #endif Gtk2-1.2498/xs/GtkImageMenuItem.xs000644 001750 000024 00000006077 11664366546 017720 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" MODULE = Gtk2::ImageMenuItem PACKAGE = Gtk2::ImageMenuItem PREFIX = gtk_image_menu_item_ ## GtkWidget* gtk_image_menu_item_new (void) ## GtkWidget* gtk_image_menu_item_new_with_mnemonic (const gchar *label) ## GtkWidget* gtk_image_menu_item_new_with_label (const gchar *label) GtkWidget * gtk_image_menu_item_new (class, label=NULL) const gchar * label ALIAS: Gtk2::ImageMenuItem::new_with_mnemonic = 1 Gtk2::ImageMenuItem::new_with_label = 2 CODE: if( label ) { if (ix == 2) RETVAL = gtk_image_menu_item_new_with_label (label); else RETVAL = gtk_image_menu_item_new_with_mnemonic(label); } else RETVAL = gtk_image_menu_item_new(); OUTPUT: RETVAL ## GtkWidget* gtk_image_menu_item_new_from_stock (const gchar *stock_id, GtkAccelGroup *accel_group) GtkWidget * gtk_image_menu_item_new_from_stock (class, stock_id, accel_group=NULL) const gchar * stock_id GtkAccelGroup_ornull * accel_group C_ARGS: stock_id, accel_group ## void gtk_image_menu_item_set_image (GtkImageMenuItem *image_menu_item, GtkWidget *image) void gtk_image_menu_item_set_image (image_menu_item, image) GtkImageMenuItem * image_menu_item GtkWidget * image ## GtkWidget* gtk_image_menu_item_get_image (GtkImageMenuItem *image_menu_item) GtkWidget * gtk_image_menu_item_get_image (image_menu_item) GtkImageMenuItem * image_menu_item #if GTK_CHECK_VERSION (2, 16, 0) ## gboolean gtk_image_menu_item_get_use_stock (GtkImageMenuItem *image_menu_item); gboolean gtk_image_menu_item_get_use_stock (image_menu_item) GtkImageMenuItem * image_menu_item ## void gtk_image_menu_item_set_use_stock (GtkImageMenuItem *image_menu_item, gboolean use_stock); void gtk_image_menu_item_set_use_stock (image_menu_item, use_stock) GtkImageMenuItem * image_menu_item gboolean use_stock ## void gtk_image_menu_item_set_accel_group (GtkImageMenuItem *image_menu_item, GtkAccelGroup *accel_group); void gtk_image_menu_item_set_accel_group (image_menu_item, accel_group) GtkImageMenuItem * image_menu_item GtkAccelGroup * accel_group gboolean gtk_image_menu_item_get_always_show_image (GtkImageMenuItem *image_menu_item); void gtk_image_menu_item_set_always_show_image (GtkImageMenuItem *image_menu_item, gboolean always_show); #endif /* 2.16 */ Gtk2-1.2498/xs/GtkIMContext.xs000644 001750 000024 00000005441 11664366546 017076 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2006 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" MODULE = Gtk2::IMContext PACKAGE = Gtk2::IMContext PREFIX = gtk_im_context_ void gtk_im_context_set_client_window (GtkIMContext *context, GdkWindow_ornull *window); ## void gtk_im_context_get_preedit_string (GtkIMContext *context, gchar **str, PangoAttrList **attrs, gint *cursor_pos); void gtk_im_context_get_preedit_string (GtkIMContext *context) PREINIT: gchar *str = NULL; PangoAttrList *attrs = NULL; gint cursor_pos = -1; PPCODE: gtk_im_context_get_preedit_string (context, &str, &attrs, &cursor_pos); EXTEND (SP, 3); PUSHs (sv_2mortal (newSVGChar (str))); PUSHs (sv_2mortal (newSVPangoAttrList (attrs))); PUSHs (sv_2mortal (newSViv (cursor_pos))); ## gboolean gtk_im_context_filter_keypress (GtkIMContext *context, GdkEventKey *event); gboolean gtk_im_context_filter_keypress (GtkIMContext *context, GdkEvent *key_event) C_ARGS: context, (GdkEventKey *) key_event void gtk_im_context_focus_in (GtkIMContext *context); void gtk_im_context_focus_out (GtkIMContext *context); void gtk_im_context_reset (GtkIMContext *context); void gtk_im_context_set_cursor_location (GtkIMContext *context, GdkRectangle *area); void gtk_im_context_set_use_preedit (GtkIMContext *context, gboolean use_preedit); void gtk_im_context_set_surrounding (GtkIMContext *context, const gchar_length *text, gint length(text), gint cursor_index); ## gboolean gtk_im_context_get_surrounding (GtkIMContext *context, gchar **text, gint *cursor_index); void gtk_im_context_get_surrounding (GtkIMContext *context) PREINIT: gchar *text; gint cursor_index; PPCODE: if (!gtk_im_context_get_surrounding (context, &text, &cursor_index)) XSRETURN_EMPTY; EXTEND (SP, 2); PUSHs (sv_2mortal (newSVGChar (text))); PUSHs (sv_2mortal (newSViv (cursor_index))); g_free (text); gboolean gtk_im_context_delete_surrounding (GtkIMContext *context, gint offset, gint n_chars); Gtk2-1.2498/xs/GtkIMContextSimple.xs000644 001750 000024 00000002634 11664366546 020251 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2006 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" MODULE = Gtk2::IMContextSimple PACKAGE = Gtk2::IMContextSimple PREFIX = gtk_im_context_simple_ GtkIMContext_noinc * gtk_im_context_simple_new (class) C_ARGS: /*void*/ ### This just copies the pointer value, so we'd have to keep that memory alive; ### likely attached to the object. ##void gtk_im_context_simple_add_table (GtkIMContextSimple *context_simple, ## guint16 *data, ## gint max_seq_len, ## gint n_seqs); Gtk2-1.2498/xs/GtkIMMulticontext.xs000644 001750 000024 00000002513 11664366546 020146 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2006 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" MODULE = Gtk2::IMMultiContext PACKAGE = Gtk2::IMMulticontext PREFIX = gtk_im_multicontext_ GtkIMContext_noinc * gtk_im_multicontext_new (class) C_ARGS: /*void*/ void gtk_im_multicontext_append_menuitems (GtkIMMulticontext *context, GtkMenuShell *menushell); #if GTK_CHECK_VERSION (2, 16, 0) void gtk_im_multicontext_set_context_id (GtkIMMulticontext *context, const char *context_id); const char* gtk_im_multicontext_get_context_id (GtkIMMulticontext *context); #endif /* 2.16 */ Gtk2-1.2498/xs/GtkInfoBar.xs000644 001750 000024 00000015060 11664366546 016542 0ustar00bdmanningstaff000000 000000 /* * Copyright 2010 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, see . */ #include "gtk2perl.h" #include "gtk2perl-private.h" /* for the custom response id handling */ MODULE = Gtk2::InfoBar PACKAGE = Gtk2::InfoBar PREFIX = gtk_info_bar_ BOOT: gperl_signal_set_marshaller_for (GTK_TYPE_INFO_BAR, "response", gtk2perl_dialog_response_marshal); =for position post_signals Note that currently in a Perl subclass of C a class closure, ie. class default signal handler, for the C signal will be called with the response ID just as an integer, it's not turned into an enum string like C<"ok"> the way a handler setup with C receives. Hopefully this will change in the future, so don't count on it. In the interim the easiest thing to do is install your default handler in C with a C. (The subtleties of what order handlers are called in will differ, but often that doesn't matter.) =cut =for enum GtkResponseType The response type is somewhat abnormal as far as gtk2-perl enums go. In C, this enum lists named, predefined integer values for a field that is other composed of whatever integer values you like. In Perl, we allow this to be either one of the string constants listed here or any positive integer value. For example, 'ok', 'cancel', 4, and 42 are all valid response ids. You cannot use arbitrary string values, they must be integers. Be careful, because unknown string values tend to be mapped to 0. =cut =for apidoc Gtk2::InfoBar::new_with_buttons =for signature $widget = Gtk2::InfoBar->new_with_buttons (...) =for arg ... of button-text => response-id pairs. Alias for the multi-argument version of C<< Gtk2::InfoBar->new >>. =cut =for apidoc =for signature $widget = Gtk2::InfoBar->new; =for signature $widget = Gtk2::InfoBar->new (...) =for arg ... of button-text => response-id pairs. The multi-argument form takes the same list of text => response-id pairs as C<< $infobar->add_buttons >>. Do not pack widgets directly into the infobar; add them to C<< $infobar->get_content_area () >>. Here's a simple example: $infobar = Gtk2::InfoBar->new ('gtk-ok' => 'accept', 'gtk-cancel' => 'reject'); =cut GtkWidget * gtk_info_bar_new (class, ...) ALIAS: Gtk2::InfoBar::new_with_buttons = 1 PREINIT: int i; GtkWidget * info_bar; CODE: PERL_UNUSED_VAR (ix); if (items == 1) { /* the easy way out... */ info_bar = gtk_info_bar_new (); } else if ( !(items % 2) ) { croak ("USAGE: Gtk2::InfoBar->new ()\n" " or Gtk2::InfoBar->new (...)\n" " where ... is a series of button text and response id pairs"); } else { /* we can't really pass on a varargs call (at least, i don't * know how to convert from perl stack to C va_list), so we * have to duplicate a bit of the functionality of the C * version. luckily it's nothing too intense. */ info_bar = gtk_info_bar_new (); for (i = 1; i < items; i += 2) { gchar * text = SvGChar (ST (i)); int response_id = gtk2perl_dialog_response_id_from_sv (ST (i+1)); gtk_info_bar_add_button (GTK_INFO_BAR (info_bar), text, response_id); } } RETVAL = info_bar; OUTPUT: RETVAL GtkWidget * gtk_info_bar_add_button (info_bar, button_text, response_id) GtkInfoBar * info_bar const gchar * button_text SV * response_id CODE: RETVAL = gtk_info_bar_add_button (info_bar, button_text, gtk2perl_dialog_response_id_from_sv ( response_id)); OUTPUT: RETVAL =for apidoc =for arg ... of button-text => response-id pairs Like calling C<< $infobar->add_button >> repeatedly, except you don't get the created widgets back. The buttons go from left to right, so the first button added will be the left-most one. =cut void gtk_info_bar_add_buttons (info_bar, ...) GtkInfoBar * info_bar PREINIT: int i; CODE: if (!(items % 2)) croak("gtk_info_bar_add_buttons: odd number of parameters"); /* we can't make var args, so we'll call add_button for each */ for (i = 1; i < items; i += 2) gtk_info_bar_add_button (info_bar, SvGChar (ST (i)), gtk2perl_dialog_response_id_from_sv ( ST (i+1))); =for apidoc =for arg response_id (GtkResponseType) =cut void gtk_info_bar_add_action_widget (info_bar, child, response_id) GtkInfoBar * info_bar GtkWidget * child SV * response_id CODE: gtk_info_bar_add_action_widget (info_bar, child, gtk2perl_dialog_response_id_from_sv ( response_id)); =for apidoc =for arg response_id (GtkResponseType) Enable or disable an action button by its I<$response_id>. =cut void gtk_info_bar_set_response_sensitive (info_bar, response_id, setting) GtkInfoBar * info_bar SV * response_id gboolean setting CODE: gtk_info_bar_set_response_sensitive ( info_bar, gtk2perl_dialog_response_id_from_sv (response_id), setting); =for apidoc =for arg response_id (GtkResponseType) =cut void gtk_info_bar_set_default_response (info_bar, response_id) GtkInfoBar * info_bar SV * response_id CODE: gtk_info_bar_set_default_response (info_bar, gtk2perl_dialog_response_id_from_sv ( response_id)); =for apidoc =for arg response_id (GtkResponseType) =cut void gtk_info_bar_response (info_bar, response_id) GtkInfoBar * info_bar SV * response_id C_ARGS: info_bar, gtk2perl_dialog_response_id_from_sv (response_id) void gtk_info_bar_set_message_type (info_bar, type); GtkInfoBar * info_bar GtkMessageType type GtkMessageType gtk_info_bar_get_message_type (info_bar); GtkInfoBar * info_bar GtkWidget * gtk_info_bar_get_action_area (info_bar) GtkInfoBar * info_bar GtkWidget * gtk_info_bar_get_content_area (info_bar) GtkInfoBar * info_bar Gtk2-1.2498/xs/GtkInputDialog.xs000644 001750 000024 00000002031 11664366546 017433 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" MODULE = Gtk2::InputDialog PACKAGE = Gtk2::InputDialog PREFIX = gtk_input_dialog_ ## GtkWidget* gtk_input_dialog_new (void) GtkWidget * gtk_input_dialog_new (class) C_ARGS: /* void */ Gtk2-1.2498/xs/GtkInvisible.xs000644 001750 000024 00000003011 11664366546 017137 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" MODULE = Gtk2::Invisible PACKAGE = Gtk2::Invisible PREFIX = gtk_invisible_ ## GtkWidget* gtk_invisible_new (void) GtkWidget * gtk_invisible_new (class) C_ARGS: /* void */ #if GTK_CHECK_VERSION(2,2,0) ##GtkWidget * gtk_invisible_new_for_screen (GdkScreen *screen) GtkWidget * gtk_invisible_new_for_screen (class, screen) GdkScreen *screen C_ARGS: screen ##void gtk_invisible_set_screen (GtkInvisible *invisible, GdkScreen *screen) void gtk_invisible_set_screen (invisible, screen) GtkInvisible *invisible GdkScreen *screen ##GdkScreen * gtk_invisible_get_screen (GtkInvisible *invisible) GdkScreen * gtk_invisible_get_screen (invisible) GtkInvisible *invisible #endif Gtk2-1.2498/xs/GtkItem.xs000644 001750 000024 00000002232 11664366546 016115 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" MODULE = Gtk2::Item PACKAGE = Gtk2::Item PREFIX = gtk_item_ ## void gtk_item_select (GtkItem *item) void gtk_item_select (item) GtkItem * item ## void gtk_item_deselect (GtkItem *item) void gtk_item_deselect (item) GtkItem * item ## void gtk_item_toggle (GtkItem *item) void gtk_item_toggle (item) GtkItem * item Gtk2-1.2498/xs/GtkItemFactory.xs000644 001750 000024 00000030505 11664366546 017451 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" /* ------------------------------------------------------------------------- */ /* * a custom marshaler for the item factory callbacks */ static void gtk2perl_item_factory_item_activate (gpointer data, guint callback_action, GtkWidget * widget) { SV * callback_sv; SV * callback_data; dSP; /* the callback out of the widget */ callback_sv = (SV *) g_object_get_data ( G_OBJECT (widget), "_gtk2perl_item_factory_callback_sv"); callback_data = (SV *) data; ENTER; SAVETMPS; PUSHMARK (SP); /* put the parameters on the stack (we're always type 1) */ EXTEND (SP, 3); PUSHs (sv_2mortal (newSVsv (callback_data ? callback_data : &PL_sv_undef))); PUSHs (sv_2mortal (newSViv (callback_action))); PUSHs (sv_2mortal (newSVGtkWidget (widget))); PUTBACK; /* call the code in sv */ call_sv (callback_sv, G_DISCARD); FREETMPS; LEAVE; } /* ------------------------------------------------------------------------- */ GPerlCallback * gtk2perl_translate_func_create (SV * func, SV * data) { GType param_types[1]; param_types[0] = G_TYPE_STRING; return gperl_callback_new (func, data, G_N_ELEMENTS (param_types), param_types, G_TYPE_STRING); } gchar * gtk2perl_translate_func (const gchar *path, gpointer data) { GPerlCallback * callback = (GPerlCallback*)data; GValue value = {0,}; SV * tempsv = NULL; gchar * retval; g_value_init (&value, callback->return_type); gperl_callback_invoke (callback, &value, path); retval = (gchar *) g_value_get_string (&value); /* g_value_unset() will free the string to which retval points. * we will need to keep a copy; let's use a mortal scalar to keep * it around long enough to be useful to the C callers. */ if (retval) tempsv = sv_2mortal (newSVGChar (retval)); g_value_unset (&value); /* using SvPV rather than SvGChar because we used newSVGChar to create * it above, so we're assured that it's been upgraded to utf8 already. * this avoids uncertainty about whether SvGChar may vivify the mortal * value. (i'm paranoid.) */ return tempsv ? SvPV_nolen (tempsv) : NULL; } /* ------------------------------------------------------------------------- */ #define HV_FETCH_AND_CHECK(_member, _sv) \ if (hv_exists (hv, #_member, strlen (#_member))) { \ value = hv_fetch (hv, #_member, strlen (#_member), FALSE); \ if (value && gperl_sv_is_defined (*value)) \ entry->_member = _sv; \ } #define AV_FETCH_AND_CHECK(_index, _member, _sv) \ value = av_fetch (av, _index, 0); \ if (value && gperl_sv_is_defined (*value)) \ entry->_member = _sv; GtkItemFactoryEntry * SvGtkItemFactoryEntry (SV *data, SV **callback) { GtkItemFactoryEntry *entry = gperl_alloc_temp (sizeof (GtkItemFactoryEntry)); memset (entry, 0, sizeof (GtkItemFactoryEntry)); if (!gperl_sv_is_defined (data)) return entry; /* fail silently if undef */ if (gperl_sv_is_hash_ref (data)) { HV *hv = (HV *) SvRV (data); SV **value; HV_FETCH_AND_CHECK (path, SvGChar (*value)); HV_FETCH_AND_CHECK (accelerator, SvGChar (*value)); if (hv_exists (hv, "callback", 8)) { value = hv_fetch (hv, "callback", 8, FALSE); if (callback && value && gperl_sv_is_defined (*value)) { *callback = *value; entry->callback = gtk2perl_item_factory_item_activate; } } HV_FETCH_AND_CHECK (callback_action, SvIV (*value)); HV_FETCH_AND_CHECK (item_type, SvGChar (*value)); HV_FETCH_AND_CHECK (extra_data, SvPOK (*value) ? SvGChar (*value) : NULL); } else if (gperl_sv_is_array_ref (data)) { AV *av = (AV *) SvRV (data); SV **value; AV_FETCH_AND_CHECK (0, path, SvGChar (*value)); AV_FETCH_AND_CHECK (1, accelerator, SvGChar (*value)); value = av_fetch (av, 2, 0); if (callback && value && gperl_sv_is_defined (*value)) { *callback = *value; entry->callback = gtk2perl_item_factory_item_activate; } AV_FETCH_AND_CHECK (3, callback_action, SvIV (*value)); AV_FETCH_AND_CHECK (4, item_type, SvGChar (*value)); AV_FETCH_AND_CHECK (5, extra_data, SvPOK (*value) ? SvGChar (*value) : NULL); } else { croak ("badly formed GtkItemFactoryEntry; use either list or hash form:\n" " list form:\n" " [ path, accel, callback, action, type ]\n" " hash form:\n" " {\n" " path => $path,\n" " accelerator => $accel, # optional\n" " callback => $callback,\n" " callback_action => $action,\n" " item_type => $type, # optional\n" " extra_data => $extra, # optional\n" " }\n" " "); } return entry; } static void gtk2perl_item_factory_create_item_helper (GtkItemFactory *ifactory, SV *entry_ref, SV *callback_data) { GtkItemFactoryEntry *entry; gchar *clean_path; GtkWidget *widget = NULL; SV *callback_sv = NULL, *tmp_defsv; SV * real_data = callback_data ? gperl_sv_copy (callback_data) : NULL; entry = SvGtkItemFactoryEntry (entry_ref, &callback_sv); /* remove all those underscores that gtk+ turns into accelerators to * get a clean path that can later be used for item retrieval */ tmp_defsv = newSVsv (DEFSV); sv_setsv (DEFSV, sv_2mortal (newSVGChar (entry->path))); eval_pv ("s/_(?!_+)//g; s/_+/_/g;", 1); clean_path = SvGChar (sv_2mortal (newSVsv (DEFSV))); sv_setsv (DEFSV, tmp_defsv); /* create the item in the normal manner now */ gtk_item_factory_create_item (ifactory, entry, real_data, 1); /* get the widget that was created by create_item (this is why * we needed clean_path) */ widget = gtk_item_factory_get_item (ifactory, clean_path); if (widget) { /* put the sv we need to call into the widget */ g_object_set_data_full (G_OBJECT (widget), "_gtk2perl_item_factory_callback_sv", gperl_sv_copy (callback_sv), (GtkDestroyNotify) gperl_sv_free); if (real_data) g_object_set_data_full (G_OBJECT (widget), "_gtk2perl_item_factory_callback_data", real_data, (GtkDestroyNotify) gperl_sv_free); } else { if (real_data) gperl_sv_free (real_data); croak("ItemFactory couldn't retrieve widget it just created"); } } /* ------------------------------------------------------------------------- */ MODULE = Gtk2::ItemFactory PACKAGE = Gtk2::ItemFactory PREFIX = gtk_item_factory_ =for deprecated_by Gtk2::UIManager =cut ## GtkItemFactory* gtk_item_factory_new (GType container_type, const gchar *path, GtkAccelGroup *accel_group) GtkItemFactory* gtk_item_factory_new (class, container_type_package, path, accel_group=NULL) char * container_type_package const gchar *path GtkAccelGroup_ornull *accel_group PREINIT: GType container_type; CODE: container_type = gperl_type_from_package (container_type_package); RETVAL = gtk_item_factory_new (container_type, path, accel_group); OUTPUT: RETVAL ### deprecated ## void gtk_item_factory_add_foreign (GtkWidget *accel_widget, const gchar *full_path, GtkAccelGroup *accel_group, guint keyval, GdkModifierType modifiers) GtkItemFactory_ornull* gtk_item_factory_from_widget (class, widget) GtkWidget *widget C_ARGS: widget const gchar* gtk_item_factory_path_from_widget (class, widget) GtkWidget *widget C_ARGS: widget GtkWidget_ornull* gtk_item_factory_get_item (ifactory, path) GtkItemFactory *ifactory const gchar *path GtkWidget_ornull* gtk_item_factory_get_widget (ifactory, path) GtkItemFactory *ifactory const gchar *path GtkWidget_ornull* gtk_item_factory_get_widget_by_action (ifactory, action) GtkItemFactory *ifactory guint action GtkWidget_ornull* gtk_item_factory_get_item_by_action (ifactory, action) GtkItemFactory *ifactory guint action =for apidoc =for arg entry_ref GtkItemFactoryEntry =cut void gtk_item_factory_create_item (ifactory, entry_ref, callback_data=NULL) GtkItemFactory *ifactory SV *entry_ref SV *callback_data CODE: gtk2perl_item_factory_create_item_helper (ifactory, entry_ref, callback_data); =for apidoc =for arg ... GtkItemFactoryEntry's =cut void gtk_item_factory_create_items (ifactory, callback_data, ...) GtkItemFactory *ifactory SV *callback_data PREINIT: int i; CODE: for (i = 2; i < items; i++) gtk2perl_item_factory_create_item_helper (ifactory, ST (i), callback_data); void gtk_item_factory_delete_item (ifactory, path) GtkItemFactory *ifactory const gchar *path =for apidoc =for arg entry_ref GtkItemFactoryEntry =cut void gtk_item_factory_delete_entry (ifactory, entry_ref) GtkItemFactory *ifactory SV *entry_ref PREINIT: GtkItemFactoryEntry *entry; CODE: entry = SvGtkItemFactoryEntry (entry_ref, NULL); gtk_item_factory_delete_entry (ifactory, entry); =for apidoc =for arg ... GtkItemFactoryEntry's =cut void gtk_item_factory_delete_entries (ifactory, ...) GtkItemFactory *ifactory PREINIT: int i; GtkItemFactoryEntry *entry; CODE: for (i = 1; i < items; i++) { entry = SvGtkItemFactoryEntry (ST (i), NULL); gtk_item_factory_delete_entry (ifactory, entry); } ## void gtk_item_factory_popup (GtkItemFactory *ifactory, guint x, guint y, guint mouse_button, guint32 time_) ## void gtk_item_factory_popup_with_data(GtkItemFactory *ifactory, gpointer popup_data, GtkDestroyNotify destroy, guint x, guint y, guint mouse_button, guint32 time_) ### combination of gtk_item_factory_popup and gtk_item_factory_popup_with_data void gtk_item_factory_popup (ifactory, x, y, mouse_button, time_, popup_data=NULL) GtkItemFactory *ifactory guint x guint y guint mouse_button guint32 time_ SV * popup_data PREINIT: SV * real_popup_data = NULL; CODE: if (gperl_sv_is_defined (popup_data)) real_popup_data = gperl_sv_copy (popup_data); gtk_item_factory_popup_with_data (ifactory, real_popup_data, real_popup_data ? (GDestroyNotify)gperl_sv_free : NULL, x, y, mouse_button, time_); SV * gtk_item_factory_popup_data (ifactory) GtkItemFactory *ifactory CODE: RETVAL = (SV *) gtk_item_factory_popup_data (ifactory); if (RETVAL) { RETVAL = gperl_sv_copy (RETVAL); } else { RETVAL = &PL_sv_undef; } OUTPUT: RETVAL SV * gtk_item_factory_popup_data_from_widget (class, widget) GtkWidget *widget CODE: RETVAL = (SV *) gtk_item_factory_popup_data_from_widget (widget); if (RETVAL) { RETVAL = gperl_sv_copy (RETVAL); } else { RETVAL = &PL_sv_undef; } OUTPUT: RETVAL void gtk_item_factory_set_translate_func (ifactory, func, data=NULL) GtkItemFactory *ifactory SV *func SV *data PREINIT: GPerlCallback *callback; CODE: callback = gtk2perl_translate_func_create (func, data); gtk_item_factory_set_translate_func (ifactory, gtk2perl_translate_func, callback, (GtkDestroyNotify) gperl_callback_destroy); ## ## deprecated ## ## void gtk_item_factory_create_items_ac (GtkItemFactory *ifactory, guint n_entries, GtkItemFactoryEntry *entries, gpointer callback_data, guint callback_type) ## GtkItemFactory* gtk_item_factory_from_path (const gchar *path) ## void gtk_item_factory_create_menu_entries (guint n_entries, GtkMenuEntry *entries) ## void gtk_item_factories_path_delete (const gchar *ifactory_path, const gchar *path) Gtk2-1.2498/xs/GtkLabel.xs000644 001750 000024 00000012336 11664366546 016244 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" MODULE = Gtk2::Label PACKAGE = Gtk2::Label PREFIX = gtk_label_ =for enum GtkJustification =cut GtkWidget * gtk_label_new (class, str=NULL) const gchar_ornull * str C_ARGS: str GtkWidget * gtk_label_new_with_mnemonic (class, str) const gchar * str C_ARGS: str ### gtk_label_[gs]et_text ---- string does *not* include any embedded stuff void gtk_label_set_text (label, str) GtkLabel * label const gchar_ornull * str const gchar_ornull * gtk_label_get_text (label) GtkLabel * label void gtk_label_set_attributes (GtkLabel * label, PangoAttrList * attrs) PangoAttrList * gtk_label_get_attributes (GtkLabel * label) CODE: RETVAL = gtk_label_get_attributes (label); if (!RETVAL) XSRETURN_UNDEF; OUTPUT: RETVAL ### gtk_label_[gs]et_label ---- string includes any embedded stuff void gtk_label_set_label (label, str) GtkLabel * label const gchar * str const gchar * gtk_label_get_label (label) GtkLabel * label void gtk_label_set_markup (label, str) GtkLabel * label const gchar * str void gtk_label_set_use_markup (label, setting) GtkLabel * label gboolean setting gboolean gtk_label_get_use_markup (label) GtkLabel * label void gtk_label_set_use_underline (label, setting) GtkLabel * label gboolean setting gboolean gtk_label_get_use_underline (label) GtkLabel * label void gtk_label_set_markup_with_mnemonic (label, str) GtkLabel * label const gchar * str guint gtk_label_get_mnemonic_keyval (label) GtkLabel * label void gtk_label_set_mnemonic_widget (label, widget) GtkLabel * label GtkWidget_ornull * widget GtkWidget_ornull * gtk_label_get_mnemonic_widget (label) GtkLabel * label void gtk_label_set_text_with_mnemonic (label, str) GtkLabel * label const gchar * str void gtk_label_set_justify (label, jtype) GtkLabel * label GtkJustification jtype GtkJustification gtk_label_get_justify (label) GtkLabel * label void gtk_label_set_pattern (label, pattern) GtkLabel * label const gchar * pattern void gtk_label_set_line_wrap (label, wrap) GtkLabel * label gboolean wrap gboolean gtk_label_get_line_wrap (label) GtkLabel * label void gtk_label_set_selectable (label, setting) GtkLabel * label gboolean setting gboolean gtk_label_get_selectable (label) GtkLabel * label void gtk_label_select_region (label, start_offset=-1, end_offset=-1) GtkLabel * label gint start_offset gint end_offset #gboolean gtk_label_get_selection_bounds (GtkLabel * label, # gint * start, # gint * end) ## done by hand because we don't want to return the boolean... either there's ## a list or not. =for apidoc =for signature (start, end) = $label->get_selection_bounds Returns integers, start and end. =cut void gtk_label_get_selection_bounds (label) GtkLabel * label PREINIT: gint start, end; PPCODE: if (!gtk_label_get_selection_bounds (label, &start, &end)) XSRETURN_UNDEF; EXTEND (SP, 2); PUSHs (sv_2mortal (newSViv (start))); PUSHs (sv_2mortal (newSViv (end))); PangoLayout * gtk_label_get_layout (label) GtkLabel * label void gtk_label_get_layout_offsets (GtkLabel * label, OUTLIST gint x, OUTLIST gint y) #if GTK_CHECK_VERSION (2, 6, 0) void gtk_label_set_ellipsize (GtkLabel *label, PangoEllipsizeMode mode); PangoEllipsizeMode gtk_label_get_ellipsize (GtkLabel *label); void gtk_label_set_width_chars (GtkLabel *label, gint n_chars); gint gtk_label_get_width_chars (GtkLabel *label); void gtk_label_set_max_width_chars (GtkLabel *label, gint n_chars); gint gtk_label_get_max_width_chars (GtkLabel *label); void gtk_label_set_angle (GtkLabel *label, gdouble angle); gdouble gtk_label_get_angle (GtkLabel *label); void gtk_label_set_single_line_mode (GtkLabel *label, gboolean single_line_mode); gboolean gtk_label_get_single_line_mode (GtkLabel *label); #endif #if GTK_CHECK_VERSION (2, 9, 4) void gtk_label_set_line_wrap_mode (GtkLabel *label, PangoWrapMode wrap_mode); PangoWrapMode gtk_label_get_line_wrap_mode (GtkLabel *label); #endif #if GTK_CHECK_VERSION (2, 18, 0) const gchar * gtk_label_get_current_uri (GtkLabel *label) void gtk_label_set_track_visited_links (GtkLabel *label, gboolean track_links) gboolean gtk_label_get_track_visited_links (GtkLabel *label) #endif Gtk2-1.2498/xs/GtkLayout.xs000644 001750 000024 00000006163 11664366546 016503 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" MODULE = Gtk2::Layout PACKAGE = Gtk2::Layout PREFIX = gtk_layout_ =for apidoc bin_window __hide__ =cut ## GdkWindow* gtk_layout_get_bin_window (GtkLayout *layout) GdkWindow_ornull * get_bin_window (layout) GtkLayout * layout ALIAS: bin_window = 1 CODE: PERL_UNUSED_VAR (ix); #if GTK_CHECK_VERSION (2, 14, 0) RETVAL = gtk_layout_get_bin_window (layout); #else RETVAL = layout->bin_window; #endif /* 2.14 */ OUTPUT: RETVAL ## GtkWidget* gtk_layout_new (GtkAdjustment *hadjustment, GtkAdjustment *vadjustment) GtkWidget * gtk_layout_new (class, hadjustment=NULL, vadjustment=NULL) GtkAdjustment_ornull * hadjustment GtkAdjustment_ornull * vadjustment C_ARGS: hadjustment, vadjustment ## void gtk_layout_put (GtkLayout *layout, GtkWidget *child_widget, gint x, gint y) void gtk_layout_put (layout, child_widget, x, y) GtkLayout * layout GtkWidget * child_widget gint x gint y ## void gtk_layout_move (GtkLayout *layout, GtkWidget *child_widget, gint x, gint y) void gtk_layout_move (layout, child_widget, x, y) GtkLayout * layout GtkWidget * child_widget gint x gint y ## void gtk_layout_set_size (GtkLayout *layout, guint width, guint height) void gtk_layout_set_size (layout, width, height) GtkLayout * layout guint width guint height ## void gtk_layout_get_size (GtkLayout *layout, guint *width, guint *height) void gtk_layout_get_size (GtkLayout * layout, OUTLIST guint width, OUTLIST guint height) ## GtkAdjustment* gtk_layout_get_hadjustment (GtkLayout *layout) GtkAdjustment * gtk_layout_get_hadjustment (layout) GtkLayout * layout ## GtkAdjustment* gtk_layout_get_vadjustment (GtkLayout *layout) GtkAdjustment * gtk_layout_get_vadjustment (layout) GtkLayout * layout ## void gtk_layout_set_hadjustment (GtkLayout *layout, GtkAdjustment *adjustment) void gtk_layout_set_hadjustment (layout, adjustment) GtkLayout * layout GtkAdjustment * adjustment ## void gtk_layout_set_vadjustment (GtkLayout *layout, GtkAdjustment *adjustment) void gtk_layout_set_vadjustment (layout, adjustment) GtkLayout * layout GtkAdjustment * adjustment ## void gtk_layout_thaw (GtkLayout *layout) void gtk_layout_thaw (layout) GtkLayout * layout ##void gtk_layout_freeze (GtkLayout *layout) void gtk_layout_freeze (layout) GtkLayout * layout Gtk2-1.2498/xs/GtkLinkButton.xs000644 001750 000024 00000005646 11664366546 017324 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2006 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" static GPerlCallback * gtk2perl_link_button_uri_func_create (SV * func, SV * data) { GType param_types[2]; param_types[0] = GTK_TYPE_LINK_BUTTON; param_types[1] = G_TYPE_STRING; return gperl_callback_new (func, data, G_N_ELEMENTS (param_types), param_types, G_TYPE_NONE); } static void gtk2perl_link_button_uri_func (GtkLinkButton *button, const gchar *link, gpointer user_data) { GPerlCallback * callback = (GPerlCallback*) user_data; gperl_callback_invoke (callback, NULL, button, link); } MODULE = Gtk2::LinkButton PACKAGE = Gtk2::LinkButton PREFIX = gtk_link_button_ GtkWidget * gtk_link_button_new (class, const gchar *url, const gchar *label=NULL) ALIAS: new_with_label = 1 CODE: PERL_UNUSED_VAR (ix); if (label) RETVAL = gtk_link_button_new_with_label (url, label); else RETVAL = gtk_link_button_new (url); OUTPUT: RETVAL const gchar *gtk_link_button_get_uri (GtkLinkButton *link_button); void gtk_link_button_set_uri (GtkLinkButton *link_button, const gchar *uri); =for apidoc Pass undef for I to unset the URI hook. Note that the current implementation does B return the old hook function. This means that there is no way to restore an old hook once you overwrote it. =cut ## GtkLinkButtonUriFunc gtk_link_button_set_uri_hook (GtkLinkButtonUriFunc func, gpointer data, GDestroyNotify destroy); void gtk_link_button_set_uri_hook (class, SV *func, SV *data=NULL) CODE: if (!gperl_sv_is_defined (func)) { gtk_link_button_set_uri_hook (NULL, NULL, NULL); } else { GPerlCallback * callback; callback = gtk2perl_link_button_uri_func_create (func, data); gtk_link_button_set_uri_hook (gtk2perl_link_button_uri_func, callback, (GDestroyNotify) gperl_callback_destroy); } #if GTK_CHECK_VERSION (2, 14, 0) gboolean gtk_link_button_get_visited (GtkLinkButton *link_button); void gtk_link_button_set_visited (GtkLinkButton *link_button, gboolean visited); #endif /* 2.14 */ Gtk2-1.2498/xs/GtkList.xs000644 001750 000024 00000015433 11664366546 016141 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ * * NOTE: GtkList and GtkListItem are deprecated and only included b/c GtkCombo * still makes use of them, they are subject to removal at any point so you * should not utilize them unless absolutly necessary.) * */ #include "gtk2perl.h" MODULE = Gtk2::List PACKAGE = Gtk2::List PREFIX = gtk_list_ =for position DESCRIPTION =head1 DESCRIPTION Gtk2::List is deprecated; use Gtk2::TreeView and a Gtk2::ListStore instead. Gtk2::List is included in Gtk2-Perl only because Gtk2::Combo still makes use of it, and Gtk2::Combo's replacement, Gtk2::ComboBox, didn't appear in gtk+ until 2.4.0. =cut #ifdef GTK_TYPE_LIST ## GtkWidget* gtk_list_new (void) GtkWidget * gtk_list_new (class) C_ARGS: /* void */ ## parameter order flipped on this function so the item ## list soaks up the rest of the arg stack ## void gtk_list_insert_items (GtkList *list, GList *items, gint position) =for apidoc =for arg ... of Gtk2::ListItem's to be inserted =cut void gtk_list_insert_items (list, position, ...) GtkList * list gint position PREINIT: GList * list_items = NULL; CODE: for( items--; items > 0; items-- ) list_items = g_list_prepend(list_items, SvGtkListItem(ST(items))); if( list_items ) { gtk_list_insert_items(list, list_items, position); g_list_free(list_items); } ## void gtk_list_append_items (GtkList *list, GList *items) =for apidoc =for arg ... of Gtk2::ListItem's to be appended =cut void gtk_list_append_items (list, ...) GtkList * list PREINIT: GList * list_items = NULL; CODE: for( items--; items > 0; items-- ) list_items = g_list_prepend(list_items, SvGtkListItem(ST(items))); if( list_items ) { gtk_list_append_items(list, list_items); g_list_free(list_items); } ## void gtk_list_prepend_items (GtkList *list, GList *items) =for apidoc =for arg list_item (GtkListItem) =for arg ... of Gtk2::ListItem's to be prepended =cut void gtk_list_prepend_items (list, ...) GtkList * list PREINIT: GList * list_items = NULL; CODE: for( items--; items > 0; items-- ) list_items = g_list_prepend(list_items, SvGtkListItem(ST(items))); if( list_items ) { gtk_list_prepend_items(list, list_items); g_list_free(list_items); } ## void gtk_list_remove_items (GtkList *list, GList *items) =for apidoc =for arg list_item (GtkListItem) =for arg ... of Gtk2::ListItem's to be removed =cut void gtk_list_remove_items (list, ...) GtkList * list PREINIT: GList * list_items = NULL; CODE: for( items--; items > 0; items-- ) list_items = g_list_prepend(list_items, SvGtkListItem(ST(items))); if( list_items ) { gtk_list_remove_items(list, list_items); g_list_free(list_items); } ## should this function be through since perl handles the ref counting, i'm ## going to go with no till i hear otherwise ## void gtk_list_remove_items_no_unref (GtkList *list, GList *items) ##void ##gtk_list_remove_items_no_unref (list, list_item, ...) ## GtkList * list ## GtkListItem * list_item ## PREINIT: ## GList * list_items = NULL; ## CODE: ## for( items--; items > 0; items-- ) ## list_items = g_list_prepend(list_items, ## SvGtkListItem(ST(items))); ## if( list_items ) ## { ## gtk_list_remove_items_no_unref(list, list_items); ## g_list_free(list_items); ## } ## void gtk_list_clear_items (GtkList *list, gint start, gint end) void gtk_list_clear_items (list, start, end) GtkList * list gint start gint end ## void gtk_list_select_item (GtkList *list, gint item) void gtk_list_select_item (list, item) GtkList * list gint item ## void gtk_list_unselect_item (GtkList *list, gint item) void gtk_list_unselect_item (list, item) GtkList * list gint item ## void gtk_list_select_child (GtkList *list, GtkWidget *child) void gtk_list_select_child (list, child) GtkList * list GtkWidget * child ## void gtk_list_unselect_child (GtkList *list, GtkWidget *child) void gtk_list_unselect_child (list, child) GtkList * list GtkWidget * child ## gint gtk_list_child_position (GtkList *list, GtkWidget *child) gint gtk_list_child_position (list, child) GtkList * list GtkWidget * child ## void gtk_list_set_selection_mode (GtkList *list, GtkSelectionMode mode) void gtk_list_set_selection_mode (list, mode) GtkList * list GtkSelectionMode mode ## void gtk_list_extend_selection (GtkList *list, GtkScrollType scroll_type, gfloat position, gboolean auto_start_selection) void gtk_list_extend_selection (list, scroll_type, position, auto_start_selection) GtkList * list GtkScrollType scroll_type gfloat position gboolean auto_start_selection ## void gtk_list_start_selection (GtkList *list) void gtk_list_start_selection (list) GtkList * list ## void gtk_list_end_selection (GtkList *list) void gtk_list_end_selection (list) GtkList * list ## void gtk_list_select_all (GtkList *list) void gtk_list_select_all (list) GtkList *list ## void gtk_list_unselect_all (GtkList *list) void gtk_list_unselect_all (list) GtkList *list ## void gtk_list_scroll_horizontal (GtkList *list, GtkScrollType scroll_type, gfloat position) void gtk_list_scroll_horizontal (list, scroll_type, position) GtkList *list GtkScrollType scroll_type gfloat position ## void gtk_list_scroll_vertical (GtkList *list, GtkScrollType scroll_type, gfloat position) void gtk_list_scroll_vertical (list, scroll_type, position) GtkList *list GtkScrollType scroll_type gfloat position ## void gtk_list_toggle_add_mode (GtkList *list) void gtk_list_toggle_add_mode (list) GtkList *list ## void gtk_list_toggle_focus_row (GtkList *list) void gtk_list_toggle_focus_row (list) GtkList *list ## void gtk_list_toggle_row (GtkList *list, GtkWidget *item) void gtk_list_toggle_row (list, item) GtkList *list GtkWidget *item ## void gtk_list_undo_selection (GtkList *list) void gtk_list_undo_selection (list) GtkList *list ## void gtk_list_end_drag_selection (GtkList *list) void gtk_list_end_drag_selection (list) GtkList *list #endif /* GTK_TYPE_LIST */ Gtk2-1.2498/xs/GtkListItem.xs000644 001750 000024 00000004213 11664366546 016752 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ * * NOTE: GtkList and GtkListItem are deprecated and only included b/c GtkCombo * still makes use of them, they are subject to removal at any point so you * should not utilize them unless absolutly necessary.) * */ #include "gtk2perl.h" MODULE = Gtk2::ListItem PACKAGE = Gtk2::ListItem PREFIX = gtk_list_item_ =for position DESCRIPTION =head1 DESCRIPTION Gtk2::ListItem is the widget used for each item in a Gtk2::List. Gtk2::List and Gtk2::ListItem are deprecated; use Gtk2::TreeView and a Gtk2::ListStore instead. Gtk2::ListItem is included in Gtk2-Perl only because Gtk2::Combo contains a Gtk2::List, and Gtk2::Combo's replacement, Gtk2::ComboBox, didn't appear in gtk+ until 2.4.0. =cut #ifdef GTK_TYPE_LIST_ITEM ## GtkWidget* gtk_list_item_new (void) ## GtkWidget* gtk_list_item_new_with_label (const gchar *label) GtkWidget * gtk_list_item_new (class, label=NULL) gchar * label ALIAS: Gtk2::ListItem::new_with_label = 1 CODE: PERL_UNUSED_VAR (ix); if( label ) RETVAL = gtk_list_item_new_with_label(label); else RETVAL = gtk_list_item_new(); OUTPUT: RETVAL ## void gtk_list_item_select (GtkListItem *list_item) void gtk_list_item_select (list_item) GtkListItem * list_item ## void gtk_list_item_deselect (GtkListItem *list_item) void gtk_list_item_deselect (list_item) GtkListItem * list_item #endif Gtk2-1.2498/xs/GtkListStore.xs000644 001750 000024 00000025357 11664366546 017164 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003, 2009 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" MODULE = Gtk2::ListStore PACKAGE = Gtk2::ListStore PREFIX = gtk_list_store_ BOOT: /* must prepend TreeModel in the hierarchy so that * Gtk2::TreeModel::get isn't masked by Glib::Object::get. * should we change the api to something unique, instead? */ gperl_prepend_isa ("Gtk2::ListStore", "Gtk2::TreeModel"); ## GtkListStore* gtk_list_store_new (gint n_columns, ...); =for apidoc =for arg ... of strings =cut GtkListStore_noinc* gtk_list_store_new (class, ...) PREINIT: GArray * typearray; CODE: GTK2PERL_STACK_ITEMS_TO_GTYPE_ARRAY (typearray, 1, items-1); RETVAL = gtk_list_store_newv (typearray->len, (GType*)typearray->data); g_array_free (typearray, TRUE); OUTPUT: RETVAL # for initializing GListStores derived in perl ## void gtk_list_store_set_column_types (GtkListStore *list_store, gint n_columns, GType *types) =for apidoc =for arg ... of strings =cut void gtk_list_store_set_column_types (list_store, ...) GtkListStore *list_store PREINIT: GArray * typearray; CODE: GTK2PERL_STACK_ITEMS_TO_GTYPE_ARRAY (typearray, 1, items-1); gtk_list_store_set_column_types (list_store, typearray->len, (GType*)(typearray->data)); g_array_free (typearray, TRUE); ## void gtk_list_store_set (GtkListStore *list_store, GtkTreeIter *iter, ...) =for apidoc Gtk2::ListStore::set_value =for signature $list_store->set_value ($iter, $col, $val) =for arg col (integer) =for arg val (scalar) =for arg col1 (__hide__) =for arg val1 (__hide__) =for arg ... (__hide__) =cut =for apidoc =for arg col1 (integer) the first column number =for arg val1 (scalar) the first value =for arg ... pairs of column numbers and values =cut void gtk_list_store_set (list_store, iter, col1, val1, ...) GtkListStore *list_store GtkTreeIter *iter ALIAS: Gtk2::ListStore::set_value = 1 PREINIT: int i, ncols; CODE: PERL_UNUSED_VAR (ix); /* require at least one pair --- that means there needs to be * four items on the stack. also require that the stack has an * even number of items on it. */ if (items < 4 || 0 != (items % 2)) { /* caller didn't specify an even number of parameters... */ croak ("Usage: $liststore->set ($iter, column1, value1, column2, value2, ...)\n" " there must be a value for every column number"); } ncols = gtk_tree_model_get_n_columns (GTK_TREE_MODEL (list_store)); for (i = 2 ; i < items ; i+= 2) { gint column; GValue gvalue = {0, }; if (!looks_like_number (ST (i))) croak ("Usage: $liststore->set ($iter, column1, value1, column2, value2, ...)\n" " the first value in each pair must be a column number"); column = SvIV (ST (i)); /* warn (" %d %d %s\n", i, column, SvPV_nolen (ST (i+1))); */ if (column >= 0 && column < ncols) { g_value_init (&gvalue, gtk_tree_model_get_column_type (GTK_TREE_MODEL (list_store), column)); /* gperl_value_from_sv either succeeds or croaks. */ gperl_value_from_sv (&gvalue, ST (i+1)); gtk_list_store_set_value (GTK_LIST_STORE (list_store), iter, column, &gvalue); g_value_unset (&gvalue); } else { warn ("can't set value for column %d, model only has %d columns", column, ncols); } } ## see Gtk2::ListStore::set ## void gtk_list_store_set_valist (GtkListStore *list_store, GtkTreeIter *iter, va_list var_args) ### we're trying to hide things like GValue from the perl level! ### void gtk_list_store_set_value (GtkListStore *list_store, GtkTreeIter *iter, gint column, GValue *value) ## gboolean gtk_list_store_remove (GtkListStore *list_store, GtkTreeIter *iter) =for apidoc The return is always a boolean in the style of Gtk 2.2.x and up, even when running on Gtk 2.0.x. =cut gboolean gtk_list_store_remove (list_store, iter) GtkListStore *list_store GtkTreeIter *iter CODE: #if GTK_CHECK_VERSION(2,2,0) RETVAL = gtk_list_store_remove (list_store, iter); #else /* void return in 2.0.x; look for stamp is zapped to 0 if no more * rows, to emulate the return value of 2.2 and up */ gtk_list_store_remove (list_store, iter); RETVAL = (iter->stamp != 0); #endif OUTPUT: RETVAL ## void gtk_list_store_insert (GtkListStore *list_store, GtkTreeIter *iter, gint position) GtkTreeIter_copy * gtk_list_store_insert (list_store, position) GtkListStore *list_store gint position PREINIT: GtkTreeIter iter = {0,}; CODE: gtk_list_store_insert (list_store, &iter, position); RETVAL = &iter; /* the _copy on the return type means we'll copy * this before the function returns. */ OUTPUT: RETVAL ## void gtk_list_store_insert_before (GtkListStore *list_store, GtkTreeIter *iter, GtkTreeIter *sibling) ## void gtk_list_store_insert_after (GtkListStore *list_store, GtkTreeIter *iter, GtkTreeIter *sibling) GtkTreeIter_copy * gtk_list_store_insert_before (list_store, sibling) GtkListStore * list_store GtkTreeIter_ornull * sibling ALIAS: Gtk2::ListStore::insert_after = 1 PREINIT: GtkTreeIter iter; CODE: if (ix == 0) gtk_list_store_insert_before (list_store, &iter, sibling); else gtk_list_store_insert_after (list_store, &iter, sibling); RETVAL = &iter; OUTPUT: RETVAL #if GTK_CHECK_VERSION (2, 6, 0) ## void gtk_list_store_insert_with_values (GtkListStore *list_store, GtkTreeIter *iter, gint position, ...); =for apidoc =for arg position position to insert the new row =for arg ... pairs of column numbers and values Like doing insert followed by set, except that insert_with_values emits only the row-inserted signal, rather than row-inserted, row-changed, and, if the store is sorted, rows-reordered as in the multiple-operation case. Since emitting the rows-reordered signal repeatedly can affect the performance of the program, insert_with_values should generally be preferred when inserting rows in a sorted list store. =cut GtkTreeIter_copy * gtk_list_store_insert_with_values (GtkListStore *list_store, gint position, ...); PREINIT: gint n_cols, i; GtkTreeIter iter; gint * columns = NULL; GValue * values = NULL; gint n_values; const char * errfmt = "Usage: $iter = $liststore->insert_with_values ($position, column1, value1, ...)\n %s"; CODE: if (items < 2 || 0 != (items % 2)) croak (errfmt, "There must be a value for every column number"); /* * we could jump through hoops to prevent leaking arrays and * initialized GValues here on column validation croaks, but * since gperl_value_from_sv() croaks (and we can't catch it * without major work), and since column index validatio errors * mean there's a programming error anyway, we won't worry about * any of that. */ n_cols = gtk_tree_model_get_n_columns (GTK_TREE_MODEL (list_store)); n_values = (items - 2) / 2; if (n_values > 0) { columns = gperl_alloc_temp (sizeof (gint) * n_values); /* gperl_alloc_temp() calls memset(), so we don't need to do * anything else special to prepare these GValues. */ values = gperl_alloc_temp (sizeof (GValue) * n_values); for (i = 0 ; i < n_values ; i ++) { if (! looks_like_number (ST (2 + i*2))) croak (errfmt, "The first value in each pair must be a column index number"); columns[i] = SvIV (ST (2 + i*2)); if (! (columns[i] >= 0 && columns[i] < n_cols)) croak (errfmt, form ("Bad column index %d, model only has %d columns", columns[i], n_cols)); g_value_init (values + i, gtk_tree_model_get_column_type (GTK_TREE_MODEL (list_store), columns[i])); gperl_value_from_sv (values + i, ST (2 + i*2 + 1)); } } gtk_list_store_insert_with_valuesv (list_store, &iter, position, columns, values, n_values); for (i = 0 ; i < n_values ; i++) g_value_unset (values + i); RETVAL = &iter; OUTPUT: RETVAL #endif ## void gtk_list_store_prepend (GtkListStore *list_store, GtkTreeIter *iter) ## void gtk_list_store_append (GtkListStore *list_store, GtkTreeIter *iter) GtkTreeIter_copy * gtk_list_store_prepend (list_store) GtkListStore *list_store ALIAS: Gtk2::ListStore::append = 1 PREINIT: GtkTreeIter iter; CODE: if (ix == 0) gtk_list_store_prepend (list_store, &iter); else gtk_list_store_append (list_store, &iter); RETVAL = &iter; OUTPUT: RETVAL ## void gtk_list_store_clear (GtkListStore *list_store) void gtk_list_store_clear (list_store) GtkListStore *list_store #if GTK_CHECK_VERSION(2,2,0) ## warning, slow, use only for debugging ## gboolean gtk_list_store_iter_is_valid (GtkListStore *list_store, GtkTreeIter *iter) gboolean gtk_list_store_iter_is_valid (list_store, iter) GtkListStore *list_store GtkTreeIter *iter ## void gtk_list_store_reorder (GtkListStore *store, gint *new_order) =for apidoc =for arg ... of integers the reordered posistions Reorders store to follow the order indicated by new_order. Note that this function only works with unsorted stores. A list of position should be passed, one for each item in the list. =cut void gtk_list_store_reorder (store, ...) GtkListStore * store PREINIT: gint * new_order; CODE: if( (items-1) != store->length ) croak("xs: gtk_list_store_reorder: wrong number of " "positions passed"); items--; new_order = (gint*)g_new(gint, items); for( ; items > 0; items-- ) new_order[items-1] = SvIV(ST(items)); gtk_list_store_reorder(store, new_order); g_free(new_order); ## void gtk_list_store_swap (GtkListStore *store, GtkTreeIter *a, GtkTreeIter *b) void gtk_list_store_swap (store, a, b) GtkListStore * store GtkTreeIter * a GtkTreeIter * b ## void gtk_list_store_move_after (GtkListStore *store, GtkTreeIter *iter, GtkTreeIter *position) void gtk_list_store_move_after (store, iter, position) GtkListStore * store GtkTreeIter * iter GtkTreeIter_ornull * position ## void gtk_list_store_move_before (GtkListStore *store, GtkTreeIter *iter, GtkTreeIter *position) void gtk_list_store_move_before (store, iter, position) GtkListStore * store GtkTreeIter * iter GtkTreeIter_ornull * position #endif /* >= 2.2.0 */ Gtk2-1.2498/xs/GtkMenu.xs000644 001750 000024 00000021710 11664366546 016125 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003-2005, 2010 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" #include /* * yet another special case that isn't appropriate for either * GPerlClosure or GPerlCallback --- the menu position function has * mostly output parameters, so we need to change the callbacks's * signature for perl, getting multiple return values from the stack. * this one's easy, though. */ /* this is public so that other extensions which use GtkMenuPosFunc (e.g. * libgnomeui) don't need to reimplement it. */ void gtk2perl_menu_position_func (GtkMenu * menu, gint * x, gint * y, gboolean * push_in, GPerlCallback * callback) { int n; dGPERL_CALLBACK_MARSHAL_SP; GPERL_CALLBACK_MARSHAL_INIT (callback); ENTER; SAVETMPS; PUSHMARK (SP); EXTEND (SP, 3); PUSHs (sv_2mortal (newSVGtkMenu (menu))); PUSHs (sv_2mortal (newSViv (*x))); PUSHs (sv_2mortal (newSViv (*y))); if (callback->data) XPUSHs (sv_2mortal (newSVsv (callback->data))); /* A die() from callback->func is suspected to be bad or very bad. Circa Gtk 2.18 a jump out of $menu->popup seems to leave an X grab with no way to get rid of it (no keyboard Esc, and no mouse click handlers). The position func can also be called later for things like resizing or move to a different GdkScreen, and such a call might come straight from the main loop, where a die() would jump out of Gtk2->main. */ PUTBACK; n = call_sv (callback->func, G_ARRAY | G_EVAL); SPAGAIN; if (SvTRUE (ERRSV)) { g_warning ("menu position callback ignoring error: %s", SvPVutf8_nolen (ERRSV)); } else if (n < 2 || n > 3) { g_warning ("menu position callback must return two integers " "(x, and y) or two integers and a boolean " "(x, y, and push_in)"); } else { /* POPs and POPi take things off the *end* of the stack! */ if (n > 2) { SV *sv = POPs; *push_in = sv_2bool (sv); } if (n > 1) *y = POPi; if (n > 0) *x = POPi; } PUTBACK; FREETMPS; LEAVE; } static GPerlCallback * gtk2perl_menu_detach_func_create (SV *func, SV *data) { GType param_types [2]; param_types[0] = GTK_TYPE_WIDGET; param_types[1] = GTK_TYPE_MENU; return gperl_callback_new (func, data, G_N_ELEMENTS (param_types), param_types, 0); } static void gtk2perl_menu_detach_func (GtkWidget *attach_widget, GtkMenu *menu) { GPerlCallback *callback; callback = g_object_get_data (G_OBJECT (attach_widget), "__gtk2perl_menu_detach_func__"); if (callback) { gperl_callback_invoke (callback, NULL, attach_widget, menu); /* free the handler after it's been called */ g_object_set_data (G_OBJECT (attach_widget), "__gtk2perl_menu_detach_func__", NULL); } } MODULE = Gtk2::Menu PACKAGE = Gtk2::Menu PREFIX = gtk_menu_ GtkWidget* gtk_menu_new (class) C_ARGS: /* void */ =for apidoc If C<$menu_pos_func> is not C it's called as ($x, $y, $push_in) = &$menu_pos_func ($menu, $x, $y, $data) C<$x>,C<$y> inputs are a proposed position based on the mouse pointer (not actually documented in the Gtk manuals). The return should be a desired C<$x>,C<$y>, and an optional C<$push_in> flag. If C<$push_in> is true then Gtk will adjust C<$x>,C<$y> if necessary so the menu is fully visible in the screen width and height. C<$menu_pos_func> and C<$data> are stored in C<$menu> and may be called again later for a C<< $menu->reposition >> or some obscure things like a changed C while torn-off. A further C<< $menu->popup >> call replaces C<$menu_pos_func> and C<$data>. =cut void gtk_menu_popup (menu, parent_menu_shell, parent_menu_item, menu_pos_func, data, button, activate_time) GtkMenu * menu GtkWidget_ornull * parent_menu_shell GtkWidget_ornull * parent_menu_item SV * menu_pos_func SV * data guint button guint activate_time ###guint32 activate_time CODE: if (!gperl_sv_is_defined (menu_pos_func)) { gtk_menu_popup (menu, parent_menu_shell, parent_menu_item, NULL, NULL, button, activate_time); g_object_set_data (G_OBJECT(menu), "_gtk2perl_menu_pos_callback", NULL); } else { GPerlCallback * callback; /* we don't need to worry about the callback arg types since * we already have to marshall this callback ourselves. */ callback = gperl_callback_new (menu_pos_func, data, 0, NULL, 0); gtk_menu_popup (menu, parent_menu_shell, parent_menu_item, (GtkMenuPositionFunc) gtk2perl_menu_position_func, callback, button, activate_time); /* The menu will store the callback we give it, and can * conceivably invoke the callback multiple times * (repositioning, changing screens, etc). Each call to * gtk_menu_popup() replaces the function pointer. So, * if we use a weak reference, we can leak multiple callbacks; * if we use object data, we can clean up the ones we install * and reinstall. Not likely, of course, but there are * pathological programmers out there. */ g_object_set_data_full (G_OBJECT (menu), "_gtk2perl_menu_pos_callback", callback, (GDestroyNotify) gperl_callback_destroy); } void gtk_menu_reposition (menu) GtkMenu * menu void gtk_menu_popdown (menu) GtkMenu *menu GtkWidget * gtk_menu_get_active (menu) GtkMenu *menu void gtk_menu_set_active (menu, index) GtkMenu *menu guint index void gtk_menu_set_accel_group (menu, accel_group) GtkMenu * menu GtkAccelGroup * accel_group GtkAccelGroup* gtk_menu_get_accel_group (menu) GtkMenu *menu void gtk_menu_set_accel_path (menu, accel_path) GtkMenu *menu const gchar *accel_path =for apidoc Attach C<$menu> to C<$attach_widget>. C<$menu> must not be currently attached to any other widget, including not a submenu of a C. If C<$menu> is later detached from the widget with C<< $menu->detach >> then the C<$detach_func> is called as &$detach_func ($attach_widget, $menu) =cut void gtk_menu_attach_to_widget (menu, attach_widget, detach_func) GtkMenu *menu GtkWidget *attach_widget SV *detach_func PREINIT: GPerlCallback *callback; CODE: callback = gtk2perl_menu_detach_func_create (detach_func, NULL); g_object_set_data_full (G_OBJECT (attach_widget), "__gtk2perl_menu_detach_func__", callback, (GDestroyNotify) gperl_callback_destroy); gtk_menu_attach_to_widget (menu, attach_widget, gtk2perl_menu_detach_func); void gtk_menu_detach (menu) GtkMenu *menu GtkWidget * gtk_menu_get_attach_widget (menu) GtkMenu * menu void gtk_menu_set_tearoff_state (menu, torn_off) GtkMenu *menu gboolean torn_off gboolean gtk_menu_get_tearoff_state (menu) GtkMenu *menu void gtk_menu_set_title (menu, title) GtkMenu * menu const gchar * title ## void gtk_menu_reorder_child (GtkMenu *menu, GtkWidget *child, gint position) void gtk_menu_reorder_child (menu, child, position) GtkMenu *menu GtkWidget *child gint position ##gchar * gtk_menu_get_title (GtkMenu *menu) const gchar * gtk_menu_get_title (menu) GtkMenu * menu #if GTK_CHECK_VERSION(2,2,0) ##void gtk_menu_set_screen (GtkMenu *menu, GdkScreen *screen) void gtk_menu_set_screen (menu, screen) GtkMenu * menu GdkScreen_ornull * screen #endif #if GTK_CHECK_VERSION(2,4,0) void gtk_menu_attach (GtkMenu *menu, GtkWidget *child, guint left_attach, guint right_attach, guint top_attach, guint bottom_attach); void gtk_menu_set_monitor (GtkMenu *menu, gint monitor_num); #endif #if GTK_CHECK_VERSION(2,6,0) ## GList* gtk_menu_get_for_attach_widget (GtkWidget *widget); void gtk_menu_get_for_attach_widget (class, widget) GtkWidget *widget PREINIT: GList *list, *i; PPCODE: list = gtk_menu_get_for_attach_widget (widget); for (i = list; i; i = i->next) XPUSHs (sv_2mortal (newSVGtkMenu (i->data))); #endif #if GTK_CHECK_VERSION (2, 14, 0) const gchar* gtk_menu_get_accel_path (GtkMenu *menu); gint gtk_menu_get_monitor (GtkMenu *menu); #endif /* 2.14 */ #if GTK_CHECK_VERSION (2, 18, 0) void gtk_menu_set_reserve_toggle_size (GtkMenu *menu, gboolean reserve_toggle_size); gboolean gtk_menu_get_reserve_toggle_size (GtkMenu *menu); #endif Gtk2-1.2498/xs/GtkMenuBar.xs000644 001750 000024 00000002723 11664366546 016555 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003-2005 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" MODULE = Gtk2::MenuBar PACKAGE = Gtk2::MenuBar PREFIX = gtk_menu_bar_ ## GtkWidget* gtk_menu_bar_new (void) GtkWidget * gtk_menu_bar_new (class) C_ARGS: /* void */ #if GTK_CHECK_VERSION (2, 8, 0) GtkPackDirection gtk_menu_bar_get_child_pack_direction (GtkMenuBar *menubar); void gtk_menu_bar_set_child_pack_direction (GtkMenuBar *menubar, GtkPackDirection child_pack_dir); GtkPackDirection gtk_menu_bar_get_pack_direction (GtkMenuBar *menubar); void gtk_menu_bar_set_pack_direction (GtkMenuBar *menubar, GtkPackDirection pack_dir); #endif ##void _gtk_menu_bar_cycle_focus (GtkMenuBar *menubar, GtkDirectionType dir Gtk2-1.2498/xs/GtkMenuItem.xs000644 001750 000024 00000012203 11664366546 016741 0ustar00bdmanningstaff000000 000000 /* * Copyright (c) 2003, 2010 by the gtk2-perl team (see the file AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307 USA. * * $Id$ */ #include "gtk2perl.h" #include /* void (* toggle_size_request) (GtkMenuItem *menu_item, gint *requisition); */ static void gtk2perl_menu_item_toggle_size_request_marshal (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) { gint * requisition; dGPERL_CLOSURE_MARSHAL_ARGS; GPERL_CLOSURE_MARSHAL_INIT (closure, marshal_data); PERL_UNUSED_VAR (return_value); PERL_UNUSED_VAR (n_param_values); PERL_UNUSED_VAR (invocation_hint); ENTER; SAVETMPS; PUSHMARK (SP); GPERL_CLOSURE_MARSHAL_PUSH_INSTANCE (param_values); requisition = g_value_get_pointer (param_values+1); GPERL_CLOSURE_MARSHAL_PUSH_DATA; PUTBACK; GPERL_CLOSURE_MARSHAL_CALL (G_SCALAR); if (count == 1) { *requisition = POPi; } else { /* NOTE: croaking here can cause bad things to happen to the * app, because croaking in signal handlers is bad juju. */ croak ("an toggle-size-request signal handler must return one " "item (the requisition), but the callback returned %d " "items", count); } PUTBACK; FREETMPS; LEAVE; } MODULE = Gtk2::MenuItem PACKAGE = Gtk2::MenuItem PREFIX = gtk_menu_item_ =for position DESCRIPTION =head1 DESCRIPTION If a MenuItem is created with a C<$label> string, or if the C