Gtk2-1.24993/000755 001750 000024 00000000000 13531134103 012737 5ustar00brianstaff000000 000000 Gtk2-1.24993/maps-2.0000644 001750 000024 00000050224 13110362136 014124 0ustar00brianstaff000000 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., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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.24993/gtk2perl.h000644 001750 000024 00000016447 13110362136 014660 0ustar00brianstaff000000 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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.24993/gtk-demo/000755 001750 000024 00000000000 13531134103 014446 5ustar00brianstaff000000 000000 Gtk2-1.24993/maps-2.8000644 001750 000024 00000000621 11664366546 014155 0ustar00brianstaff000000 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.24993/maps-2.6000644 001750 000024 00000001435 11664366546 014157 0ustar00brianstaff000000 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.24993/copyright.pod000644 001750 000024 00000000172 11664366546 015502 0ustar00brianstaff000000 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.24993/tools/000755 001750 000024 00000000000 13531134102 014076 5ustar00brianstaff000000 000000 Gtk2-1.24993/LICENSE000644 001750 000024 00000063502 13110362136 013754 0ustar00brianstaff000000 000000 GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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.24993/AUTHORS000644 001750 000024 00000004133 11664366546 014037 0ustar00brianstaff000000 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.24993/xs_files-2.4000644 001750 000024 00000000763 11664366546 015034 0ustar00brianstaff000000 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.24993/gtk2perl-private.h000644 001750 000024 00000004227 13110362136 016321 0ustar00brianstaff000000 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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.24993/xs_files-2.2000644 001750 000024 00000000317 11664366546 015025 0ustar00brianstaff000000 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.24993/MANIFEST000644 001750 000024 00000025576 13531134103 014107 0ustar00brianstaff000000 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.24993/maps-2.16000644 001750 000024 00000000433 11664366546 014235 0ustar00brianstaff000000 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.24993/xs_files-2.14000644 001750 000024 00000000056 11664366546 015110 0ustar00brianstaff000000 000000 xs/GtkHSV.xs xs/GtkShow.xs xs/GtkToolShell.xs Gtk2-1.24993/maps-2.20000644 001750 000024 00000000727 11664366546 014236 0ustar00brianstaff000000 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.24993/maps-2.18000644 001750 000024 00000000177 11664366546 014244 0ustar00brianstaff000000 000000 GTK_TYPE_INFO_BAR GtkInfoBar GtkObject Gtk2::InfoBar GTK_TYPE_ENTRY_BUFFER GtkEntryBuffer GObject Gtk2::EntryBuffer Gtk2-1.24993/maps_pango-1.8000644 001750 000024 00000000343 11664366546 015341 0ustar00brianstaff000000 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.24993/perl-Gtk2.spec.in000644 001750 000024 00000005506 13110362136 015777 0ustar00brianstaff000000 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., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Gtk2-1.24993/maps_pango-1.6000644 001750 000024 00000002041 13110362136 015307 0ustar00brianstaff000000 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., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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.24993/t/000755 001750 000024 00000000000 13531134103 013202 5ustar00brianstaff000000 000000 Gtk2-1.24993/maps-2.10000644 001750 000024 00000005354 11664366546 014236 0ustar00brianstaff000000 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.24993/gtk.typemap000644 001750 000024 00000001750 13110362136 015132 0ustar00brianstaff000000 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., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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.24993/doctypes000644 001750 000024 00000001542 11664366546 014545 0ustar00brianstaff000000 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.24993/xs_files-2.12000644 001750 000024 00000000166 11664366546 015110 0ustar00brianstaff000000 000000 xs/GtkBuildable.xs xs/GtkBuilder.xs xs/GtkRecentAction.xs xs/GtkScaleButton.xs xs/GtkTooltip.xs xs/GtkVolumeButton.xs Gtk2-1.24993/maps_pango-1.0000644 001750 000024 00000006016 13110362136 015307 0ustar00brianstaff000000 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., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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.24993/constants-2.0000644 001750 000024 00000000313 11664366546 015217 0ustar00brianstaff000000 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.24993/xt/000755 001750 000024 00000000000 13531134102 013371 5ustar00brianstaff000000 000000 Gtk2-1.24993/README000644 001750 000024 00000006200 13110362136 013617 0ustar00brianstaff000000 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # $Id$ Gtk2-1.24993/xs/000755 001750 000024 00000000000 13531134103 013371 5ustar00brianstaff000000 000000 Gtk2-1.24993/TODO000644 001750 000024 00000001037 11664366546 013457 0ustar00brianstaff000000 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.24993/maps-2.4000644 001750 000024 00000005265 11664366546 014162 0ustar00brianstaff000000 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.24993/gdk.typemap000644 001750 000024 00000002770 13110362136 015115 0ustar00brianstaff000000 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., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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.24993/NEWS000644 001750 000024 00000175406 13531133722 013461 0ustar00brianstaff000000 000000 Overview of changes in Gtk2 1.24993 =================================== ∗ Fix two test failures on newer versions of gtk+/gnome-shell/mutter Overview of changes in Gtk2 1.24992 =================================== ∗ Handle removing '.' from @INC for perl-5.26.0 compatibility * Updated FSF Address; resolves RT#89038 Overview of changes in Gtk2 1.24991 =================================== * Fix typos in POD (Bugzilla #772333) Overview of changes in Gtk2 1.2499 ================================== * Rename an internal variable to avoid confusion * Make the Gtk2::StatusIcon::position_menu tests more robust/lenient * Fix typos in POD (Bugzilla #760067) 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.24993/maps-2.2000644 001750 000024 00000002062 13110362136 014123 0ustar00brianstaff000000 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., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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.24993/MANIFEST.SKIP000644 001750 000024 00000000206 11664366546 014662 0ustar00brianstaff000000 000000 ~$ \.bak$ blib \.bs$ build \.c$ \.git \.gitignore$ gtk2perl.h.gch$ Makefile$ Makefile\.old$ MYMETA\..* \.o$ \.spec$ \.sw.$ \.tar\.gz$ Gtk2-1.24993/examples/000755 001750 000024 00000000000 13531134103 014555 5ustar00brianstaff000000 000000 Gtk2-1.24993/META.yml000644 001750 000024 00000002227 13531134103 014213 0ustar00brianstaff000000 000000 --- abstract: 'Perl interface to the 2.x series of the Gimp Toolkit library' author: - unknown - '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.34, CPAN::Meta::Converter version 2.150010' license: unknown 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.24993' x_serialization_backend: 'CPAN::Meta::YAML version 0.018' Gtk2-1.24993/maps_pango-1.18000644 001750 000024 00000000234 11664366546 015421 0ustar00brianstaff000000 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.24993/constants-2.18000644 001750 000024 00000000042 11664366546 015307 0ustar00brianstaff000000 000000 GTK_ENTRY_BUFFER_MAX_SIZE newSVuv Gtk2-1.24993/maps_pango-1.16000644 001750 000024 00000000334 11664366546 015420 0ustar00brianstaff000000 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.24993/perl-Gtk2.doap000644 001750 000024 00000001622 13526545604 015374 0ustar00brianstaff000000 000000 Gtk2 Perl bindings for gtk+ 2.x muppet sarringt Torsten Schönfeld tsch Gtk2-1.24993/lib/000755 001750 000024 00000000000 13531134102 013504 5ustar00brianstaff000000 000000 Gtk2-1.24993/maps_pango-1.10000644 001750 000024 00000000246 11664366546 015414 0ustar00brianstaff000000 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.24993/Makefile.PL000644 001750 000024 00000033641 13110362136 014722 0ustar00brianstaff000000 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., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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.24993/xs_files-2.0000644 001750 000024 00000006167 11664366546 015034 0ustar00brianstaff000000 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.24993/Gtk2.exports000644 001750 000024 00000002253 13110362136 015200 0ustar00brianstaff000000 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., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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.24993/xs_files-2.8000644 001750 000024 00000000051 11664366546 015026 0ustar00brianstaff000000 000000 xs/GdkCairo.xs xs/GdkPixbufSimpleAnim.xs Gtk2-1.24993/xs_files-2.6000644 001750 000024 00000000264 11664366546 015032 0ustar00brianstaff000000 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.24993/maps-2.12000644 001750 000024 00000000644 11664366546 014235 0ustar00brianstaff000000 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.24993/ChangeLog.pre-git000644 001750 000024 00001114562 11705716775 016117 0ustar00brianstaff000000 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.24993/xs_files-2.10000644 001750 000024 00000000657 11664366546 015113 0ustar00brianstaff000000 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.24993/maps_pango-1.4000644 001750 000024 00000001733 13110362136 015314 0ustar00brianstaff000000 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., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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.24993/xs_files-2.20000644 001750 000024 00000000163 11664366546 015104 0ustar00brianstaff000000 000000 xs/GtkCellRendererSpinner.xs xs/GtkOffscreenWindow.xs xs/GtkSpinner.xs xs/GtkToolItemGroup.xs xs/GtkToolPalette.xs Gtk2-1.24993/xs_files-2.18000644 001750 000024 00000000046 11664366546 015113 0ustar00brianstaff000000 000000 xs/GtkInfoBar.xs xs/GtkEntryBuffer.xs Gtk2-1.24993/META.json000644 001750 000024 00000003732 13531134103 014365 0ustar00brianstaff000000 000000 { "abstract" : "Perl interface to the 2.x series of the Gimp Toolkit library", "author" : [ "unknown", "gtk2-perl Team " ], "dynamic_config" : 1, "generated_by" : "ExtUtils::MakeMaker version 7.34, CPAN::Meta::Converter version 2.150010", "license" : [ "unknown", "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.24993", "x_serialization_backend" : "JSON::PP version 2.97001" } Gtk2-1.24993/maps-2.14000644 001750 000024 00000000253 11664366546 014233 0ustar00brianstaff000000 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.24993/xs_files-2.16000644 001750 000024 00000000051 11664366546 015105 0ustar00brianstaff000000 000000 xs/GtkActivatable.xs xs/GtkOrientable.xs Gtk2-1.24993/lib/Gtk2.pm000644 001750 000024 00000033531 13531133752 014670 0ustar00brianstaff000000 000000 # # Copyright (C) 2003-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., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # $Id$ # package Gtk2; # Gtk uses unicode strings; thus we require perl>=5.8.x, # which is unicode internally. use 5.008; use strict; use warnings; use Glib; use Pango; # Backwards compatibility: create Gtk2::Pango aliases for everything in Pango # that was originally in Gtk2::Pango. { no strict 'refs'; my @pango_keys = qw( AttrBackground:: AttrColor:: AttrFallback:: AttrFamily:: AttrFontDesc:: AttrForeground:: AttrGravity:: AttrGravityHint:: Attribute:: AttrInt:: AttrIterator:: AttrLanguage:: AttrLetterSpacing:: AttrList:: AttrRise:: AttrScale:: AttrShape:: AttrSize:: AttrStretch:: AttrStrikethrough:: AttrStrikethroughColor:: AttrString:: AttrStyle:: AttrUnderline:: AttrUnderlineColor:: AttrVariant:: AttrWeight:: Cairo:: Color:: Context:: Font:: FontDescription:: FontFace:: FontFamily:: FontMap:: FontMask:: FontMetrics:: Fontset:: GlyphString:: Gravity:: Language:: Layout:: LayoutIter:: LayoutLine:: Matrix:: Renderer:: Script:: ScriptIter:: TabArray:: extents_to_pixels find_base_dir parse_markup pixels scale scale_large scale_medium scale_small scale_x_large scale_x_small scale_xx_large scale_xx_small units_from_double units_to_double PANGO_PIXELS CHECK_VERSION GET_VERSION_INFO VERSION ISA ); foreach my $key (@pango_keys) { # Avoid warnings about names that are used only once by checking for # definedness here. if (defined *{'Pango::' . $key}) { *{'Gtk2::Pango::' . $key} = *{'Pango::' . $key}; } } } # if the gtk+ we've been compiled against is at 2.8.0 or newer or if pango is # at 1.10.0 or newer, we need to import the Cairo module for the cairo glue in # gtk+ and pango. eval "use Cairo;"; use Exporter; require DynaLoader; our $VERSION = '1.24993'; our @ISA = qw(DynaLoader Exporter); # this is critical -- tell dynaloader to load the module so that its # symbols are available to all other modules. without this, nobody # else can use important functions like gtk2perl_new_object! # # hrm. win32 doesn't really use this, because we have to link the whole # thing at compile time to ensure all the symbols are defined. # # on darwin, at least with the particular 5.8.0 binary i'm using, perl # complains "Can't make loaded symbols global on this platform" when this # is set to 0x01, but goes on to work fine. returning 0 here avoids the # warning and doesn't appear to break anything. sub dl_load_flags { $^O eq 'darwin' ? 0x00 : 0x01 } # now load the XS code. Gtk2->bootstrap ($VERSION); # %Gtk2::EXPORT_TAGS is filled from the constants-x.y files by the generated XS # code in build/constants.xs our @EXPORT_OK = map { @$_ } values %Gtk2::EXPORT_TAGS; $Gtk2::EXPORT_TAGS{all} = \@EXPORT_OK; # Compatibility with perl 5.20 and non-dot locales. Wrap all functions that # might end up calling setlocale() such that POSIX::setlocale() is also called # to ensure perl knows about the current locale. See the discussion in # , # , # . if ($^V ge v5.20.0) { require POSIX; no strict 'refs'; no warnings 'redefine'; my $disable_setlocale = 0; my $orig_setlocale = \&Gtk2::disable_setlocale; *{Gtk2::disable_setlocale} = sub { $disable_setlocale = 1; $orig_setlocale->(@_); }; # gtk_init_with_args is not wrapped. foreach my $function (qw/Gtk2::init Gtk2::init_check Gtk2::parse_args/) { my $orig_function = \&{$function}; *{$function} = sub { if (!$disable_setlocale) { POSIX::setlocale (POSIX::LC_ALL (), ''); } $orig_function->(@_); }; } } # Names "STOP" and "PROPAGATE" here are per the GtkWidget event signal # descriptions. In some other flavours of signals the jargon is "handled" # instead of "stop". "Handled" matches g_signal_accumulator_true_handled(), # though that function doesn't rate a mention in the Gtk docs. There's # nothing fixed in the idea of "true means cease emission" (whether it's # called "stop" or "handled"). You can just as easily have false for cease # (the way the underlying GSignalAccumulator func in fact operates). The # upshot being don't want to attempt to be too universal with the names # here; "EVENT" is meant to hint at the context or signal flavour they're # for use with. use constant { EVENT_STOP => 1, EVENT_PROPAGATE => !1, }; sub import { my $class = shift; # threads' init needs to be called before the main init and we don't # want to force the order those options are passed to us so we need to # cache the choices in booleans and (optionally) do them in the corect # order afterwards my $init = 0; my $threads_init = 0; my @unknown_args = ($class); foreach (@_) { if (/^-?init$/) { $init = 1; } elsif (/-?threads-init$/) { $threads_init = 1; } else { push @unknown_args, $_; } } Gtk2::Gdk::Threads->init if ($threads_init); Gtk2->init if ($init); # call into Exporter for the unrecognized arguments; handles exporting # and version checking Gtk2->export_to_level (1, @unknown_args); } # Preloaded methods go here. package Gtk2::Gdk; sub CHARS { 8 }; sub SHORTS { 16 }; sub LONGS { 32 }; sub USHORTS { 16 }; sub ULONGS { 32 }; package Gtk2::Gdk::Atom; use overload '==' => \&Gtk2::Gdk::Atom::eq, '!=' => \&Gtk2::Gdk::Atom::ne, fallback => 1; package Gtk2::CellLayout::DataFunc; use overload '&{}' => sub { my ($func) = @_; return sub { Gtk2::CellLayout::DataFunc::invoke($func, @_) } }, fallback => 1; package Gtk2::TreeSortable::IterCompareFunc; use overload '&{}' => sub { my ($func) = @_; return sub { Gtk2::TreeSortable::IterCompareFunc::invoke($func, @_) }; }, fallback => 1; package Gtk2::TreeModelSort; # We forgot to prepend Gtk2::TreeModel to @Gtk2::TreeModelSort::ISA. So this # hack is here to make sure that $model_sort->get resolves to # Gtk2::TreeModel::get when appropriate and to Glib::Object::get otherwise, so # we stay backwards compatible. sub get { if (@_ > 1 and ref $_[1] eq 'Gtk2::TreeIter') { # called as $model->get ($iter, columns...); return Gtk2::TreeModel::get (@_); } else { # called as $model->get (names...); return Glib::Object::get (@_); } } package Gtk2::Builder; sub _do_connect { my ($object, $signal_name, $user_data, $connect_object, $flags, $handler) = @_; my $func = ($flags & 'after') ? 'signal_connect_after' : 'signal_connect'; # we get connect_object when we're supposed to call # signal_connect_object, which ensures that the data (an object) # lives as long as the signal is connected. the bindings take # care of that for us in all cases, so we only have signal_connect. # if we get a connect_object, just use that instead of user_data. $object->$func($signal_name => $handler, $connect_object ? $connect_object : $user_data); } sub connect_signals { my $builder = shift; my $user_data = shift; # $builder->connect_signals ($user_data) # $builder->connect_signals ($user_data, $package) if ($#_ <= 0) { my $package = shift; $package = caller unless defined $package; $builder->connect_signals_full(sub { my ($builder, $object, $signal_name, $handler_name, $connect_object, $flags) = @_; no strict qw/refs/; my $handler = $handler_name; if (ref $package) { $handler = sub { $package->$handler_name(@_) }; } else { if ($package && $handler !~ /::/) { $handler = $package.'::'.$handler_name; } } _do_connect ($object, $signal_name, $user_data, $connect_object, $flags, $handler); }); } # $builder->connect_signals ($user_data, %handlers) else { my %handlers = @_; $builder->connect_signals_full(sub { my ($builder, $object, $signal_name, $handler_name, $connect_object, $flags) = @_; return unless exists $handlers{$handler_name}; _do_connect ($object, $signal_name, $user_data, $connect_object, $flags, $handlers{$handler_name}); }); } } package Gtk2; 1; __END__ # documentation is a good thing. =head1 NAME Gtk2 - Perl interface to the 2.x series of the Gimp Toolkit library =head1 SYNOPSIS use Gtk2 -init; # Gtk2->init; works if you didn't use -init on use my $window = Gtk2::Window->new ('toplevel'); my $button = Gtk2::Button->new ('Quit'); $button->signal_connect (clicked => sub { Gtk2->main_quit }); $window->add ($button); $window->show_all; Gtk2->main; =head1 ABSTRACT 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. =head1 DESCRIPTION The Gtk2 module allows a Perl developer to use the Gtk+ graphical user interface library. Find out more about Gtk+ at http://www.gtk.org. The GTK+ Reference Manual is also a handy companion when writing Gtk programs in any language. http://developer.gnome.org/doc/API/2.0/gtk/ The Perl bindings follow the C API very closely, and the C reference documentation should be considered the canonical source. 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 =head1 INITIALIZATION use Gtk2 qw/-init/; use Gtk2 qw/-init -threads-init/; =over =item -init Equivalent to Gtk2->init, called to initialize GLIB and GTK+. Just about every Gtk2-Perl script should do "use Gtk2 -init"; This initialization should take place before using any other Gtk2 functions in your GUI applications. It will initialize everything needed to operate the toolkit and parses some standard command line options. @ARGV is adjusted accordingly so your own code will never see those standard arguments. =item -threads-init Equivalent to Gtk2::Gdk::Threads->init, called to initialze/enable gdk's thread safety mechanisms so that gdk can be accessed from multiple threads when used in conjunction with Gtk2::Gdk::Threads->enter and Gtk2::Gdk::Threads->leave. If invoked as Gtk2::Gdk::Threads->init it should be done before Gtk2->init is called, if done by "use Gtk2 -init -threads-init" order does not matter. =back =head1 EXPORTS Gtk2 exports nothing by default, but some constants are available upon request. =over =item Tag: constants 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 GDK_PRIORITY_EVENTS GDK_PRIORITY_REDRAW GDK_CURRENT_TIME =back See L for other standard priority levels. =head1 SEE ALSO L(1), L(3pm), L(3pm). L(3pm) contains a hash of key codes, culled from gdk/gdkkeysyms.h L(3pm) describes how to map the C API into Perl, and some of the important differences in the Perl bindings. L(3pm) contains stuff that makes writing Gtk2 programs a little easier. L(3pm) makes the GtkListStore and GtkTreeModel a I easier to use. L(3pm) exports various little-used but important constants you may need to work with pango directly. L(3pm) lists the autogenerated api documentation pod files for Gtk2. Gtk2 also provides code to make it relatively painless to create Perl wrappers for other GLib/Gtk-based libraries. See L, L, and L. If you're writing bindings, you'll probably also be interested in L, which is a supplement to L and L. The Binding Howto, at http://gtk2-perl.sourceforge.net/doc/binding_howto.pod.html, ties it all together. =head1 AUTHORS =encoding utf8 The gtk2-perl team: muppet Ross McFarland Torsten Schoenfeld Marc Lehmann Göran Thyni Jörn Reder Chas Owens Guillaume Cottenceau =head1 COPYRIGHT AND LICENSE Copyright 2003-2011 by the gtk2-perl team. 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 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. =cut Gtk2-1.24993/lib/Gtk2/000755 001750 000024 00000000000 13531134102 014313 5ustar00brianstaff000000 000000 Gtk2-1.24993/lib/Gtk2/Pango.pm000644 001750 000024 00000006540 13110362136 015725 0ustar00brianstaff000000 000000 # # $Id$ # package Gtk2::Pango; our $VERSION = '0.01'; use strict; require Exporter; our @ISA = qw/Exporter/; our @EXPORT = qw( PANGO_WEIGHT_ULTRALIGHT PANGO_WEIGHT_LIGHT PANGO_WEIGHT_NORMAL PANGO_WEIGHT_BOLD PANGO_WEIGHT_ULTRABOLD PANGO_WEIGHT_HEAVY PANGO_SCALE_XX_SMALL PANGO_SCALE_X_SMALL PANGO_SCALE_SMALL PANGO_SCALE_MEDIUM PANGO_SCALE_LARGE PANGO_SCALE_X_LARGE PANGO_SCALE_XX_LARGE PANGO_SCALE ); use constant PANGO_WEIGHT_ULTRALIGHT => 200; use constant PANGO_WEIGHT_LIGHT => 300; use constant PANGO_WEIGHT_NORMAL => 400; use constant PANGO_WEIGHT_BOLD => 700; use constant PANGO_WEIGHT_ULTRABOLD => 800; use constant PANGO_WEIGHT_HEAVY => 900; use constant PANGO_SCALE_XX_SMALL => 0.5787037037037; use constant PANGO_SCALE_X_SMALL => 0.6444444444444; use constant PANGO_SCALE_SMALL => 0.8333333333333; use constant PANGO_SCALE_MEDIUM => 1.0; use constant PANGO_SCALE_LARGE => 1.2; use constant PANGO_SCALE_X_LARGE => 1.4399999999999; use constant PANGO_SCALE_XX_LARGE => 1.728; use constant PANGO_SCALE => 1024; 1; =head1 NAME Gtk2::Pango - constants for use with Pango =head1 SYNOPSIS use Gtk2; # gets the actual Pango objects and methods use Gtk2::Pango; # load extra constants =head1 DESCRIPTION To use Pango effectively, you need a few extra constants that are not supplied in normal ways by the type system or by other means. This module exports all of those extra constants when you load it. They use the fully-prefixed names from the C documentation. =head1 EXPORT PangoWeight is indeed defined as an enumerated type whose values can be used as nickname strings in the perl bindings, but in several places where a weight is needed, a gint is requested instead. This is because PangoWeight is actually just a set of predefined values for an integer-valued property. The PANGO_WEIGHT_* constants give you the predefined values: PANGO_WEIGHT_ULTRALIGHT PANGO_WEIGHT_LIGHT PANGO_WEIGHT_NORMAL PANGO_WEIGHT_BOLD PANGO_WEIGHT_ULTRABOLD PANGO_WEIGHT_HEAVY These are #defined in the C source, and thus are not available anywhere except here: PANGO_SCALE_XX_SMALL PANGO_SCALE_X_SMALL PANGO_SCALE_SMALL PANGO_SCALE_MEDIUM PANGO_SCALE_LARGE PANGO_SCALE_X_LARGE PANGO_SCALE_XX_LARGE PANGO_SCALE is needed to convert between Pango units and pixels. It is also available as Gtk2::Pango->scale. PANGO_SCALE =head1 BUGS This module shouldn't exist, but some parts of the API just aren't clean. This stuff is hardcoded directly from the headers of pango 1.2.1. =head1 SEE ALSO L(1), L(3pm) =head1 AUTHOR muppet Escott AT asofyet.orgE =head1 COPYRIGHT AND LICENSE Copyright 2003 by muppet 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. =cut Gtk2-1.24993/lib/Gtk2/SimpleMenu.pm000644 001750 000024 00000020336 13110362136 016736 0ustar00brianstaff000000 000000 # # $Id$ # package Gtk2::SimpleMenu; use strict; use warnings; use Carp; use Gtk2; our @ISA = 'Gtk2::ItemFactory'; our $VERSION = 0.50; sub new { my $class = shift; my %opts = ( @_ ); # create an accel group to pass to the item factory call, it's later # stored so that our owner can add the accel group to something my $accel_group = Gtk2::AccelGroup->new; # create the item factory providing a accel_group. my $self = Gtk2::ItemFactory->new('Gtk2::MenuBar', '
', $accel_group); # put the options into the simple item object foreach (keys %opts) { $self->{$_} = $opts{$_}; } bless($self, $class); # convert our menu_tree into a set of entries for itemfactory $self->parse; # create the entries foreach (@{$self->{entries}}) { $self->create_item ($_, $_->[6] || $self->{user_data}); } # store the widget so our owner can easily get to it $self->{widget} = $self->get_widget('
'); # cache the accel_group so the user can add it to something, # the window, if they so choose $self->{accel_group} = $accel_group; delete $self->{entries} unless( $self->{keep_entries} ); delete $self->{menu_tree} unless( $self->{keep_menu_tree} ); return $self; } sub parse { my $self = shift; our @entries = (); our @groups = (); our $default_callback = $self->{default_callback}; # called below (for 'root' branch) and the recusively for each branch sub parse_level { my $path = shift; my $label = shift; my $itms = shift; # we need a type to test to prevent warnings, # just use one that will fall through to defaul $itms->{item_type} = '' unless( exists($itms->{item_type}) ); if( $itms->{item_type} eq 'root' ) { # special type for first call, doesn't add entry my $i = 0; for($i = 0; $i < scalar(@{$itms->{children}}); $i += 2) { parse_level ('/', $itms->{children}[$i], $itms->{children}[$i+1]); } } elsif( $itms->{item_type} =~ /Branch/ ) { # add the branch item push @entries, [ $path.$label, undef, undef, undef, $itms->{item_type}, ]; # remove mnemonics from path $label =~ s/_//g; # then for each of its children parse that level my $i = 0; for( $i = 0; $i < scalar(@{$itms->{children}}); $i += 2) { parse_level ($path.$label.'/', $itms->{children}[$i], $itms->{children}[$i+1]); } } elsif( $itms->{item_type} =~ /Radio/ ) { # cache the groupid my $grp = $itms->{groupid}; # add this radio item to the existing group, if one, # otherwise use item_type push @entries, [ $path.$label, $itms->{accelerator}, (exists($itms->{callback}) ? $itms->{callback} : $default_callback ), $itms->{callback_action}, (exists($groups[$grp]) ? $groups[$grp] : $itms->{item_type}), $itms->{extra_data}, $itms->{callback_data} ]; # create the group identifier (path) # so that next button in this group will # be added to existing group unless( exists($groups[$grp]) ) { $groups[$grp] = $path.$label; $groups[$grp] =~ s/_//g; } } else { # everything else just gets created with its values push @entries, [ $path.$label, $itms->{accelerator}, (exists($itms->{callback}) ? $itms->{callback} : $default_callback ), $itms->{callback_action}, $itms->{item_type}, $itms->{extra_data}, $itms->{callback_data} ]; } } # fake up a root branch with the menu_tree as it's children parse_level (undef, undef, { item_type => 'root', children => $self->{menu_tree} }); # store the itemfactory entries array $self->{entries} = \@entries; } 1; __END__ # documentation is a good thing. =head1 NAME Gtk2::SimpleMenu - A simple interface to Gtk2's ItemFactory for creating application menus =head1 SYNOPSIS use Gtk2 '-init'; use Gtk2::SimpleMenu; my $menu_tree = [ _File => { item_type => '', children => [ _New => { callback => \&new_cb, callback_action => 0, accelerator => 'N', }, _Save => { callback_action => 1, callback_data => 'per entry cbdata', accelerator => 'S', }, _Exec => { item_type => '', callback_action => 2, extra_data => 'gtk-execute', }, _Quit => { callback => sub { Gtk2->main_quit; }, callback_action => 3, accelerator => 'Q', }, ], }, _Mode => { _First => { item_type => '', callback => \&mode_callback, callback_action => 4, groupid => 1, }, _Second => { item_type => '', callback => \&mode_callback, callback_action => 5, groupid => 1, }, _Third => { item_type => '', callback => \&mode_callback, callback_action => 6, groupid => 1, }, } _Help => { children => [ _Tearoff => { item_type => '', }, _CheckItem => { item_type => '', callback_action => 7, }, Separator => { item_type => '', }, _Contents => { callback_action => 8, }, _About => { callback_action => 9, }, ] } ]; my $menu = Gtk2::SimpleMenu->new ( menu_tree => $menu_tree, default_callback => \&default_callback, user_data => 'user_data', ); # an example of how to get to the menuitems. $menu->get_widget('/File/Save')->activate; $container->add ($menu->{widget}); =head1 ABSTRACT SimpleMenu is an interface for creating application menubars in as simple a manner as possible. Its main benefit is that the menu is specified as a tree, which is the natural representation of such a menu. =head1 DESCRIPTION SimpleMenu aims to simplify the design and management of a complex application menu bar by allowing the structure to be specified as a multi-rooted tree. Much the same functionality is provided by Gtk2::ItemFactory, but the data provided as input is a 1-D array and the hierarchy of the menu is controlled entirely by the path components. This is not ideal when languages such as Perl provide for simple nested data structures. Another advantage of the SimpleMenu widget is that it simplifies the creation and use of accelerators. SimpleMenu is a child of Gtk2::ItemFactory, so that it may be treated as such. Any method that can be called on a ItemFactory can be called on a SimpleMenu. =head1 OBJECT HIERARCHY Glib::Object +--- Gtk2::Object +--- Gtk2::ItemFactory +--- Gtk2::SimpleMenu =head1 FUNCTIONS =over =item $menu = Gtk2::SimpleMenu->new (menu_tree => $menu_tree, ...) Creates a new Gtk2::SimpleMenu object with the specified tree. Optionally key value paris providing a default_callback and user_data can be provided as well. After creating the menu object all of the subsequent widgets will have been created and are ready for use. =back =head1 MEMBER VARIABLES =over =item $menu->{widget} The Gtk2::MenuBar root of the SimpleMenu. This is what should be added to the widget which will contain the SimpleMenu. $container->add ($menu->{widget}); =item $menu->{accel_group} The Gtk2::AccellGroup created by the menu tree. Normally accell_group would be added to the main window of an application, but this is only necessary if accelerators are being used in the menu tree's items. $win->add_accel_group ($menu->{accel_group}); =back =head1 SEE ALSO Perl(1), Glib(3pm), Gtk2(3pm), examples/simple_menu.pl. Note: Gtk2::SimpleMenu is deprecated in favor of Gtk2::Ex::Simple::Menu, part of the Gtk2-Perl-Ex project at L . =head1 AUTHORS Ross McFarland =head1 COPYRIGHT AND LICENSE Copyright 2003 by the Gtk2-Perl team. 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. =cut Gtk2-1.24993/lib/Gtk2/TestHelper.pm000644 001750 000024 00000012526 11706215603 016746 0ustar00brianstaff000000 000000 # # $Id$ # package Gtk2::TestHelper; use strict; use warnings; use Test::More; use Carp; our $VERSION = '0.02'; sub import { shift; my %opts = (@_); plan skip_all => $opts{skip_all} if ($opts{skip_all}); croak "tests must be provided at import" unless (exists ($opts{tests})); if ($opts{nowin32} && $^O eq 'MSWin32') { plan skip_all => "not appliciable on win32"; } if ($opts{at_least_version}) { my ($rmajor, $rminor, $rmicro, $text) = @{$opts{at_least_version}}; unless (Gtk2->CHECK_VERSION ($rmajor, $rminor, $rmicro)) { plan skip_all => $text; } } # gtk+ 2.0.x can use X fonts, and requires a connection to the # display at all times; so, ignore noinit for those versions. delete $opts{noinit} unless Gtk2->CHECK_VERSION (2, 2, 0); if( $opts{noinit} || Gtk2->init_check ) { plan tests => $opts{tests}; } else { plan skip_all => 'Gtk2->init_check failed, probably ' .'unable to open DISPLAY'; } # ignore keyboard Gtk2->key_snooper_install (sub { 1; }); # turn on strict and warnings in caller $^W = 1; @_ = (); goto &strict::import; } package main; # go ahead and use Gtk2 for them. use Gtk2; # and obviously they'll need Test::More use Test::More; # encourage use of these constants in tests use Glib qw(TRUE FALSE); # useful wrappers sub run_main (;&) { my $callback = shift; Glib::Idle->add (sub { if ($callback) { #print "# Entering run_main shutdown callback\n"; $callback->(); #print "# Leaving run_main shutdown callback\n"; } Gtk2->main_quit; FALSE; }); #print "# Entering main loop (run_main)\n"; Gtk2->main; #print "# Leaving main loop (run_main)\n"; } sub ok_idle ($;$) { my ($testsub, $test_name) = @_; run_main sub { # 0 Test::More::ok # 1 this block's ok() call # 2 idle callback in run_main # 3 Gtk2::main call in run_main # 4 Gtk2::main call in run_main (again) # 5 ok_idle # 6 the caller we want to print local $Test::Builder::Level = 6; ok ($testsub->(), $test_name); } } sub is_idle ($$;$) { my ($asub, $b, $test_name) = @_; run_main sub { local $Test::Builder::Level = 6; # see ok_idle() is ($asub->(), $b, $test_name); } } sub ginterfaces_ok { my ($object_or_package) = @_; my $type = ref $object_or_package || $object_or_package; my $i = 0; my @ifaces = Glib::Type->list_interfaces ($type); foreach my $iface (@ifaces) { if ($object_or_package->isa ($iface)) { $i++; } else { warn "GType $type is supposed to implement $iface, " . "but \@type\::ISA doesn't contain $iface!\n"; } } is ($i, scalar(@ifaces), "GInterface versus \@ISA for $type"); } # Inspired by Test::Number::Delta sub delta_ok ($$;$) { my ($a, $b, $msg) = @_; ok (abs ($a - $b) < 1e-6, $msg); } 1; __END__ =head1 NAME Gtk2::TestHelper - Code to make testing Gtk2 and friends simpler. =head1 SYNOPSIS use Gtk2::TestHelper tests => 10; =head1 DESCRIPTION A simplistic module that brings together code that would otherwise have to be copied into each and every test. The magic happens during the importing process and therefore all options are passed to the use call. The module also use's strict, warnings, Gtk2, and Test::More so that the individual tests will not have to. The only required option is the number of tests. The module installs a key snooper that causes all keyboard input to be ignored. =head1 OPTIONS =over =item tests The number of tests to be completed. =item noinit Do not call Gtk2->init_check, assume that it is not necessary. =item nowin32 Set to true if all tests are to be skipped on the win32 platform. =item at_least_version A reference to a list that is checked with Gtk2->CHECK_VERSION. =item skip_all Simply skip all tests with the reason provided. =back =head1 "EXPORTED" FUNCTIONS This module also defines a few utility functions for use in tests; since we already override import and pull the dirty trick of calling use in the package main, these are defined in the package main rather than exported by Exporter. =over =item run_main =item run_main (CODEREF) =item run_main BLOCK Run a main loop, and stop when all pending events are handled. This is useful if you have a test that needs a main loop to run properly, because it allows your program to remain noninteractive. Important for a test suite. If the optional I is supplied, it will be run right before killing the mainloop. The function is prototyped to allow two styles of invocation: run_main (\&some_sub); # explicit code reference run_main { print "hi" }; # callback as a block =item ok_idle (TEST_SUB [, TEST_NAME]) Run Test::Simple's ok() on the return value of I after handling pending events. Implemented with C and other special trickery. =item is_idle (THIS_SUB, THAT [, NAME]) Like ok_idle(), but compares the return value of I with I using Test::More's is(). =item ginterfaces_ok (GOBJECT_OR_PACKAGE) Verify that the GObject subclass I's @ISA is set up properly with all of the GInterfaces that the type system claims it supports. Something like an isa_ok() in steroids. =item delta_ok (A, B [, NAME]) Checks that the absolute difference of the numbers A and B is smaller than 1e-6. =back =head1 SEE ALSO L(1), L(3pm). =head1 AUTHORS The Gtk2-Perl Team. =head1 COPYRIGHT AND LICENSE Copyright 2003-2005, 2012 by the gtk2-perl team. LGPL, See LICENSE file for more information. Gtk2-1.24993/lib/Gtk2/api.pod000644 001750 000024 00000037760 13110362136 015610 0ustar00brianstaff000000 000000 =head1 NAME Gtk2::api - Mapping the Gtk+ C API to perl =head1 ABSTRACT The Gtk2 module attempts to stick as close as is reasonable to the C API, to minimize the need to maintain documentation which is nearly a copy of the C API reference documentation. However, the world is not perfect, and the mappings between C and perl are not as clean and predictable as you might wish. Thus, this page described the basics of how to map the C API to the perl API, and lists various points in the API which follow neither the C API documentation nor the mapping principles. =head1 DESCRIPTION The canonical documentation is the C API reference at http://developer.gnome.org/doc/API/gtk/ and http://developer.gnome.org/doc/API/gdk/ There are two main sections: 'BINDING BASICS' describes the principles on which the bindings work; understanding these can lead you to guess the proper syntax to use for any given function described in the C API reference. The second section lists various specific points of difference which don't necessarily correspond with what you expect; this section is in three main parts: missing methods, renamed methods, and different call signatures. =head1 BINDING BASICS We avoid deprecated APIs. Many functions refer to C concepts which are alien to the bindings. Many things have replacements. =head2 Deprecated Stuff Isn't Bound Things that were marked as deprecated at gtk+ 2.0.0 do not appear in the bindings. This means that gtk+-1.x's GtkCList, GtkTree, and GtkText are not available. The notable exception is GtkList, which is available solely in support of GtkCombo (which was itself replaced by GtkComboBox in 2.4); it should not be used under any other circumstances. If you I need access to these old widgets, search the web for C. Some other things were deprecated during the gtk+ 2.x series, e.g. GtkOptionMenu was deprecated in favor of GtkComboBox in 2.4. Things that were marked as deprecated during the 2.x series will not be removed, basically because older versions do not have the replacements, and removing them would break backward compatibility. =head2 Namespaces and Objects The namespaces of the C libraries are mapped to perl packages according to scope, although in some cases the distinction may seem rather arbitrary: g_ => Glib (the Glib module - distributed separately) gtk_ => Gtk2 gdk_ => Gtk2::Gdk gdk_pixbuf_ => Gtk2::Gdk::Pixbuf pango_ => Gtk2::Pango Objects get their own namespaces, in a way, as the concept of the GType is completely replaced in the perl bindings by the perl package name. This goes for GBoxed, GObject, and even things like Glib::String and Glib::Int (which are needed for specifying column types in the Gtk2::TreeModel). (Flags and enums are special -- see below.) GtkButton => Gtk2::Button GdkPixbuf => Gtk2::Gdk::Pixbuf GtkScrolledWindow => Gtk2::ScrolledWindow PangoFontDescription => Gtk2::Pango::FontDescription With this package mapping and perl's built-in method lookup, the bindings can do object casting for you. This gives us a rather comfortably object-oriented syntax, using normal perl syntax semantics: in C: GtkWidget * b; b = gtk_check_button_new_with_mnemonic ("_Something"); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (b), TRUE); gtk_widget_show (b); in perl: my $b = Gtk2::CheckButton->new ('_Something'); $b->set_active (1); $b->show; You see from this that constructors for most widgets which allow mnemonics will use mnemonics by default in their "new" methods. For those who don't guess this right off, Gtk2::Button->new_with_mnemonic is also available. Cast macros are not necessary, and your code is a lot shorter. =head2 Flags and Enums Constants are handled as strings, because it's much more readable than numbers, and because it's automagical thanks to the GType system. Constants are referred to by their nicknames; basically, strip the common prefix, lower-case it, and optionally convert '_' to '-': GTK_WINDOW_TOPLEVEL => 'toplevel' GTK_BUTTONS_OK_CANCEL => 'ok-cancel' (or 'ok_cancel') Flags are a special case. You can't (sensibly) bitwise-or these string-constants, so you provide a reference to an array of them instead. Anonymous arrays are useful here, and an empty anonymous array is a simple way to say 'no flags'. FOO_BAR_BAZ | FOO_BAR_QUU | FOO_BAR_QUUX => [qw/baz quu qux/] 0 => [] In some cases you need to see if a bit is set in a bitfield; methods returning flags therefore return an overloaded object. See L for more details on which operations are allowed on these flag objects, but here is a quick example: in C: /* event->state is a bitfield */ if (event->state & GDK_CONTROL_MASK) g_printerr ("control was down\n"); in perl: # $event->state is a special object warn "control was down\n" if $event->state & "control-mask"; But this also works: warn "control was down\n" if $event->state * "control-mask"; warn "control was down\n" if $event->state >= "control-mask"; warn "control and shift were down\n" if $event->state >= ["control-mask", "shift-mask"]; And treating it as an array of strings (as in older versions) is still supported: warn "control was down\n" if grep /control-mask/, @{ $event->state }; The gtk stock item stuff is a little different -- the GTK_STOCK_* constants are actually macros which evaluate to strings, so they aren't handled by the mechanism described above; you just specify the string, e.g., GTK_STOCK_OK => 'gtk-ok'. The full list of stock items can be found at http://developer.gnome.org/doc/API/2.0/gtk/gtk-Stock-Items.html =head2 Memory Handling The functions for ref'ing and unref'ing objects and free'ing boxed structures are not even mapped to perl, because it's all handled automagically by the bindings. I could write a treatise on how we're handling reference counts and object lifetimes, but all you need to know as perl developer is that it's handled for you, and the object will be alive so long as you have a perl scalar pointing to it or the object is referenced in another way, e.g. from a container. The only thing you have to be careful about is the lifespan of non reference counted structures, which means most things derived from C. If it comes from a signal callback it might be good only until you return, or if it's the insides of another object then it might be good only while that object lives. If in doubt you can C. Structs from C or C are yours and live as long as referred to from Perl. =head2 Callbacks Use normal perl callback/closure tricks with callbacks. The most common use you'll have for callbacks is with the Glib C method: $widget->signal_connect (event => \&event_handler, $user_data); $button->signal_connect (clicked => sub { warn "hi!\n" }); $user_data is optional, and with perl closures you don't often need it (see L). The userdata is held in a scalar, initialized from what you give in C etc. It's passed to the callback in usual Perl "call by reference" style which means the callback can modify its last argument, ie. $_[-1], to modify the held userdata. This is a little subtle, but you can use it for some "state" associated with the connection. $widget->signal_connect (activate => \&my_func, 1); sub my_func { print "activation count: $_[-1]\n"; $_[-1] ++; } Because the held userdata is a new scalar there's no change to the variable (etc) you originally passed to C. If you have a parent object in the userdata (or closure) you have to be careful about circular references preventing parent and child being destroyed. See L about this generally. In Gtk2-Perl toplevel widgets like C always need an explicit C<< $widget->destroy >> so their C signal is a good place to break circular references. But for other widgets it's usually friendliest to avoid circularities in the first place, either by using weak references in the userdata, or possibly locating a parent dynamically with C<< $widget->get_ancestor >>. A major change from gtk-perl (the bindings for Gtk+-1.x) is that callbacks take their arguments in the order proscribed by the C documentation, and only one value is available for user data. gtk-perl allowed you to pass multiple values for user_data, and always brought in the user_data immediately after the instance reference; this proved to be rather confusing, and did not follow the C API reference, so we decided not to do that for gtk2-perl. =head2 Miscellaneous In C you can only return one value from a function, and it is a common practice to modify pointers passed in to simulate returning multiple values. In perl, you can return lists; any functions which modify arguments have been changed to return them instead. A common idiom in gtk is returning gboolean, and modifying several arguments if the function returns TRUE; for such functions, the perl wrapper just returns an empty list on failure. in C: foo_get_baz_and_quux (foo, &baz, &quux); in perl: ($baz, $quux) = $foo->get_baz_and_quux; Most things that take or return a GList, GSList, or array of values will use native perl arrays (or the argument stack) instead. You don't need to specify string lengths, although string length parameters should still be available for functions dealing with binary strings. You can always use C to pass different parts of a string. Anything that uses GError in C will C on failure, setting $@ to a magical exception object, which is overloaded to print as the returned error message. The ideology here is that GError is to be used for runtime exceptions, and C is how you do that in perl. You can catch a croak very easily by wrapping the function in an eval: eval { my $pixbuf = Gtk2::Gdk::Pixbuf->new_from_file ($filename); $image->set_from_pixbuf ($pixbuf); }; if ($@) { print "$@\n"; # prints the possibly-localized error message if (Glib::Error::matches ($@, 'Gtk2::Gdk::Pixbuf::Error', 'unknown-format')) { change_format_and_try_again (); } elsif (Glib::Error::matches ($@, 'Glib::File::Error', 'noent')) { change_source_dir_and_try_again (); } else { # don't know how to handle this die $@; } } This has the added advantage of letting you bunch things together as you would with a try/throw/catch block in C++ -- you get cleaner code. By using Glib::Error exception objects, you don't have to rely on string matching on a possibly localized error message; you can match errors by explicit and predictable conditions. See L for more information. =head1 MISSING METHODS =over =item g_object_ref => no replacement =item g_object_unref => no replacement =item g_boxed_free => no replacement The bindings do automatic memory management. You should never need to use these. =item gtk_timeout_add => Glib::Timeout->add =item gtk_timeout_remove => Glib::Source->remove =item gtk_idle_add => Glib::Idle->add =item gtk_idle_remove => Glib::Source->remove =item gtk_input_add => Glib::IO->add_watch =item gtk_input_remove => Glib::Source->remove The gtk_* functions are deprecated in favor of the g_* ones. Gtk2::Helper has a wrapper for Glib::IO->add_watch which makes it behave more like gtk_input_add. =item gtk_accel_group_from_accel_closure => no replacement Because of the use of Perl subroutine references in place of GClosures, there is no way to preserve at the Perl level the one-to-one mapping between GtkAccelGroups and GClosures. Without that mapping, this function is useless. =back =head1 RENAMED METHODS =over =item gtk_aspect_frame_set => $aspect_frame->set_params Avoid a clash with $gobject->set. =back =head1 DIFFERENT CALL SIGNATURES OR SEMANTICS As a general rule function that take a pair of parameters, a list and the number of elements in that list, will normally omit the number of elements and just accept a variable number of arguments that will be converted into the list and number of elements. In many instances parameters have been reordered so that this will work. See below for exceptions and specific cases that are not detailed in the generated Perl API reference. =over =item Gtk2::ScrollBar vs. GtkScrollbar These classes were incorrectly written with a capital C in version 1.00 and below. They have been renamed in version 1.01 and the old way to write them is deprecated, but supported. =item Gtk2::ItemFactory::create_items The n_entries parameter has been omitted and callback_data is accepted as the first parameter. All parameters after that are considered to be entries. =item Gtk2::List::insert_items Position and items parameters flipped order so that an open ended parameter list could be used. C<< $list->insert_items($position, $item1, $item2, ...) >> (Note that GtkList and GtkListItem are deprecated and only included because GtkCombo still makes use of them, they are subject to removal at any point so you should not utilize them unless absolutely necessary.) =item Gtk2::Notebook::append_page =item Gtk2::Notebook::prepend_page =item Gtk2::Notebook::insert_page The C API for these functions requires a GtkWidget for the tab_label, since you can set any widget you like to be the tab label. However, the most common use is a plain Gtk2::Label; so these three functions will stringify anything passed to tab_label that's not a GtkWidget and wrap a Gtk2::Label around it for you. Note that the C<_menu> versions of these functions do I do this. =item Gtk2::AccelGroup::connect =item Gtk2::AccelGroup::disconnect Where a GClosure is wanted by the C stuff, a perl subroutine reference suffices. However, because of this, there are a few subtle differences in semantics. a GClosure may be connected to only one GtkAccelGroup; however, a perl subroutine may be connected to many GtkAccelGroups (because at the binding level, a new GClosure is created on each call to ->connect). Thus, $accel_group->disconnect will disconnect the first group it finds to be connected to the given perl subroutine. To disconnect all groups attached to a subroutine, you can call disconnect with the same subroutine reference (or name) until it stops returning true. =item Gtk2::Clipboard::set_with_data =item Gtk2::Clipboard::set_with_owner In C, these functions take an array of GtkTargetEntries and the number of elements in that array as the second and third parameters. In Perl, the number of target entries is implied by the number of items on the stack, and the target entries are supplied as a list at the end of the parameter list: $clipboard->set_with_data (\&get_func, \&clear_func, $user_data, @target_entries); $clipboard->set_with_owner (\&get_func, \&clear_func, $owner, @target_entries); =back =head1 SEE ALSO The canonical documentation is the C API reference at http://developer.gnome.org/doc/API/gtk/ and http://developer.gnome.org/doc/API/gdk/ Gtk2 includes a full suite of automatically-generated API reference POD for the Perl API -- see L for the starting point. There should be a similar document for Glib --- link to it here when it exists. =head1 AUTHOR muppet Escott at asofyet dot orgE =head1 COPYRIGHT 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. =cut Gtk2-1.24993/lib/Gtk2/Helper.pm000644 001750 000024 00000012421 13110362136 016073 0ustar00brianstaff000000 000000 # # $Id$ # package Gtk2::Helper; our $VERSION = '0.02'; use Carp; use strict; use Glib; sub add_watch { shift; # lose the class my ($fd, $cond, $callback, $data) = @_; # map 'in' and 'out' to GIO enums $cond = $cond eq 'in' ? 'G_IO_IN' : $cond eq 'out' ? 'G_IO_OUT' : croak "Invalid condition flag. Expecting: 'in' / 'out'"; # In Gtk 1.x the callback was called also for the eof() / pipe close # events, but Gtk 2.x doesn't. We need to connect to the G_IO_HUP # event also to get this convenient behaviour again. my $tag = { io_id => Glib::IO->add_watch ($fd, $cond, $callback, $data), hup_id => Glib::IO->add_watch ($fd, 'G_IO_HUP', $callback, $data), }; return $tag; } sub remove_watch { shift; # lose the class my ($tag) = @_; my $rc_io = Glib::Source->remove ($tag->{io_id}); my $rc_hup = Glib::Source->remove ($tag->{hup_id}); return ($rc_io && $rc_hup); } 1; __END__ =head1 NAME Gtk2::Helper - Convenience functions for the Gtk2 module =head1 SYNOPSIS use Gtk2::Helper; # Handle I/O watchers easily, like Gtk 1.x did $tag = Gtk2::Helper->add_watch ( $fd, $cond, $callback, $data ) $rc = Gtk2::Helper->remove_watch ( $tag ) =head1 ABSTRACT This module collects Gtk2 helper functions, which should make implementing some common tasks easier. =head1 DESCRIPTION =head2 Gtk2::Helper->add_watch ( ... ) $tag = Gtk2::Helper->add_watch ( $fd, $cond, $callback, $data ) This method is a wrapper for Glib::IO->add_watch. The callback is called every time when it's safe to read from or write to the watched filehandle. =over 4 =item $fd Unix file descriptor to be watched. If you use the FileHandle module you get this value from the FileHandle->fileno() method. =item $cond May be either 'in' or 'out', depending if you want to read from the filehandle ('in') or write to it ('out'). =item $callback A subroutine reference or closure, which is called, if you can safely operate on the filehandle, without the risk of blocking your application, because the filehandle is not ready for reading resp. writing. But aware: you should not use Perl's builtin read and write functions here because these operate always with buffered I/O. Use low level sysread() and syswrite() instead. Otherwise Perl may read more data into its internal buffer as your callback actually consumes. But Glib won't call the callback on data which is already in Perl's buffer, only when events on the the underlying Unix file descriptor occur. The callback subroutine should return always true. Two signal watchers are connected internally (the I/O watcher, and a HUP watcher, which is called on eof() or other exceptions). Returning false from a watcher callback, removes the correspondent watcher automatically. Because we have two watchers internally, only one of them is removed, but probably not both. So always return true and use Gtk2::Helper->remove_watch to disable a watcher, which was installed with Gtk2::Helper->add_watch. (Gtk2::Helper could circumvent this by wrapping your callback with a closure returning always true. But why adding another level of indirection if writing a simple "1;" at the end of your callback solves this problem? ;) =item $data This data is passed to the callback. =item $tag The method returns a tag which represents the created watcher. Later you need to pass this tag to Gtk2::Helper->remove_watch to remove the watcher. =back B # open a pipe to a ls command use FileHandle; my $fh = FileHandle->new; open ($fh, "ls -l |") or die "can't fork"; # install a read watcher for this pipe my $tag; $tag = Gtk2::Helper->add_watch ( $fh->fileno, 'in', sub { watcher_callback( $fh, $tag ); }); sub watcher_callback { my ($fh, $tag) = @_; # we safely can read a chunk into $buffer my $buffer; if ( not sysread($fh, $buffer, 4096) ) { # obviously the connected pipe was closed Gtk2::Helper->remove_watch ($tag) or die "couldn't remove watcher"; close($fh); return 1; } # do something with $buffer ... print $buffer; # *always* return true return 1; } =head2 Gtk2::Helper->remove_watch ( ... ) $rc = Gtk2::Helper->remove_watch ( $tag ) This method removes a watcher, which was created using Gtk2::Helper->add_watch(). =over 4 =item $tag This is the tag returned from Gtk2::Helper->add_watch(). =item $rc The method returns true, if the watcher could be removed successfully, and false if not. =back =head1 SEE ALSO perl(1), Gtk2(1) =head1 AUTHOR =encoding utf8 Jörn Reder Ejoern AT zyn.deE =head1 COPYRIGHT AND LICENSE Copyright 2003 by Jörn Reder 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. =cut Gtk2-1.24993/lib/Gtk2/CodeGen.pm000644 001750 000024 00000036061 13110362136 016166 0ustar00brianstaff000000 000000 package Gtk2::CodeGen; use strict; use warnings; use Carp; use IO::File; use base 'Glib::CodeGen'; our $VERSION = '0.03'; Glib::CodeGen->add_type_handler (GtkObject => \&gen_gtkobject_stuff); Glib::CodeGen->add_type_handler (GEnumAlias => \&gen_fundamental_alias_stuff); Glib::CodeGen->add_type_handler (GFlagsAlias => \&gen_fundamental_alias_stuff); Glib::CodeGen->add_type_handler (GBoxedAlias => \&gen_boxed_alias_stuff); Glib::CodeGen->add_type_handler (GObjectAlias => \&gen_object_alias_stuff); Glib::CodeGen->add_type_handler (GInterfaceAlias => \&gen_object_alias_stuff); =head1 NAME Gtk2::CodeGen - code generation utilities for Glib-based bindings. =head1 SYNOPSIS # usually in Makefile.PL use Gtk2::CodeGen; # most common, use all defaults Gtk2::CodeGen->parse_maps ('myprefix'); Gtk2::CodeGen->write_boot; # more exotic, change everything Gtk2::CodeGen->parse_maps ('foo', input => 'foo.maps', header => 'foo-autogen.h', typemap => 'foo.typemap', register => 'register-foo.xsh'); Gtk2::CodeGen->write_boot (filename => 'bootfoo.xsh', glob => 'Foo*.xs', ignore => '^(Foo|Foo::Bar)$'); =head1 DESCRIPTION This module packages some of the boilerplate code needed for performing code generation typically used by perl bindings for gobject-based libraries, using the Glib module as a base. The default output filenames are in the subdirectory 'build', which usually will be present if you are using ExtUtils::Depends (as most Glib-based extensions probably should). =head2 METHODS =over =item Gtk2::CodeGen->write_boot; =item Gtk2::CodeGen->write_boot (KEY => VAL, ...) Many GObject-based libraries to be bound to perl will be too large to put in a single XS file; however, a single PM file typically only bootstraps one XS file's code. C generates an XSH file to be included from the BOOT section of that one bootstrapped module, calling the boot code for all the other XS files in the project. Options are passed to the function in a set of key/val pairs, and all options may default. filename the name of the output file to be created. the default is 'build/boot.xsh'. glob a glob pattern that specifies the names of the xs files to scan for MODULE lines. the default is 'xs/*.xs'. xs_files use this to supply an explicit list of file names (as an array reference) to use instead of a glob pattern. the default is to use the glob pattern. ignore regular expression matching any and all module names which should be ignored, i.e. NOT included in the list of symbols to boot. this parameter is extremely important for avoiding infinite loops at startup; see the discussion for an explanation and rationale. the default is '^[^:]+$', or, any name that contains no colons, i.e., any toplevel package name. This function performs a glob (using perl's builtin glob operator) on the pattern specified by the 'glob' option to retrieve a list of file names. It then scans each file in that list for lines matching the pattern "^MODULE" -- that is, the MODULE directive in an XS file. The module name is pulled out and matched against the regular expression specified by the ignore parameter. If this module is not to be ignored, we next check to see if the name has been seen. If not, the name will be converted to a boot symbol (basically, s/:/_/ and prepend "boot_") and this symbol will be added to a call to GPERL_CALL_BOOT in the generated file; it is then marked as seen so we don't call it again. What is this all about, you ask? In order to bind an XSub to perl, the C function must be registered with the interpreter. This is the function of the "boot" code, which is typically called in the bootstrapping process. However, when multiple XS files are used with only one PM file, some other mechanism must call the boot code from each XS file before any of the function therein will be available. A typical setup for a multiple-XS, single-PM module will be to call the various bits of boot code from the BOOT: section of the toplevel module's XS file. To use Gtk2 as an example, when you do 'use Gtk2', Gtk2.pm calls bootstrap on Gtk2, which calls the C function boot_Gtk2. This function calls the boot symbols for all the other xs files in the module. The distinction is that the toplevel module, Gtk2, has no colons in its name. C generates the boot function's name by replacing the colons in the MODULE name with underscores and prepending "boot_". We need to be careful not to include the boot code for the bootstrapped module, (say Toplevel, or Gtk2, or whatever) because the bootstrap code in Toplevel.pm will call boot_Toplevel when loaded, and boot_Toplevel should actually include the file we are creating here. The default value for the ignore parameter ignores any name not containing colons, because it is assumed that this will be a toplevel module, and any other packages/modules it boots will be I this namespace, i.e., they will contain colons. This assumption holds true for Gtk2 and Gnome2, but obviously fails for something like Gnome2::Canvas. To boot that module properly, you must use a regular expression such as "^Gnome2::Canvas$". Note that you can, of course, match more than just one name, e.g. "^(Foo|Foo::Bar)$", if you wanted to have Foo::Bar be included in the same dynamically loaded object but only be booted when absolutely necessary. (If you get that to work, more power to you.) Also, since this code scans for ^MODULE, you must comment the MODULE section out with leading # marks if you want to hide it from C. =cut # sub write_boot is inherited from Glib::CodeGen. =item Gtk2::CodeGen->parse_maps (PREFIX, [KEY => VAL, ...]) Convention within Glib/Gtk2 and friends is to use preprocessor macros in the style of SvMyType and newSVMyType to get values in and out of perl, and to use those same macros from both hand-written code as well as the typemaps. However, if you have a lot of types in your library (such as the nearly 200 types in Gtk+ 2.x), then writing those macros becomes incredibly tedious, especially so when you factor in all of the variants and such. So, this function can turn a flat file containing terse descriptions of the types into a header containing all the cast macros, a typemap file using them, and an XSH file containing the proper code to register each of those types (to be included by your module's BOOT code). The I is mandatory, and is used in some of the resulting filenames, You can also override the defaults by providing key=>val pairs: input input file name. default is 'maps'. if this key's value is an array reference, all the filenames in the array will be scanned. header name of the header file to create, default is build/$prefix-autogen.h typemap name of the typemap file to create, default is build/$prefix.typemap register name of the xsh file to contain all of the type registrations, default is build/register.xsh the maps file is a table of type descriptions, one per line, with fields separated by whitespace. the fields should be: TYPE macro e.g., GTK_TYPE_WIDGET class name e.g. GtkWidget, name of the C type base type one of GObject, GBoxed, GEnum, GFlags. GtkObject is also supported, but the distinction is no longer necessary as of Glib 0.26. package name of the perl package to which this class name should be mapped, e.g. Gtk2::Widget As a special case, you can also use this same format to register error domains; in this case two of the four columns take on slightly different meanings: domain macro e.g., GDK_PIXBUF_ERROR enum type macro e.g., GDK_TYPE_PIXBUF_ERROR base type GError package name of the Perl package to which this class name should be mapped, e.g., Gtk2::Gdk::Pixbuf::Error. =cut # sub parse_maps is inherited from Glib::CodeGen. # # GtkObject has different reference-counting semantics than GObject; # in particular, the _noinc variant is meaningless for GtkObjects, # as the bindings register gtk_object_sink(). # sub gen_gtkobject_stuff { my ($typemacro, $classname, $root, $package) = @_; Glib::CodeGen::add_typemap "$classname *", "T_GPERL_GENERIC_WRAPPER"; Glib::CodeGen::add_typemap "const $classname *", "T_GPERL_GENERIC_WRAPPER"; Glib::CodeGen::add_typemap "$classname\_ornull *", "T_GPERL_GENERIC_WRAPPER"; Glib::CodeGen::add_typemap "const $classname\_ornull *", "T_GPERL_GENERIC_WRAPPER"; Glib::CodeGen::add_register "#ifdef $typemacro gperl_register_object ($typemacro, \"$package\"); #endif /* $typemacro */"; my $get_wrapper = 'gtk2perl_new_gtkobject (GTK_OBJECT (val))'; Glib::CodeGen::add_header "#ifdef $typemacro /* $root derivative $classname */ # define Sv$classname(sv) (($classname*)gperl_get_object_check (sv, $typemacro)) # define newSV$classname(val) ($get_wrapper) typedef $classname $classname\_ornull; # define Sv$classname\_ornull(sv) (gperl_sv_is_defined (sv) ? Sv$classname(sv) : NULL) # define newSV$classname\_ornull(val) (((val) == NULL) ? &PL_sv_undef : $get_wrapper) #endif /* $typemacro */ "; } sub gen_alias_stuff { my ($typemacro, $func, $package) = @_; Glib::CodeGen::add_register "#ifdef $typemacro $func ($typemacro, \"$package\"); #endif /* $typemacro */"; } sub gen_fundamental_alias_stuff { my ($typemacro, $classname, $root, $package) = @_; gen_alias_stuff ($typemacro, 'gperl_register_fundamental_alias', $package); } sub gen_boxed_alias_stuff { my ($typemacro, $classname, $root, $package) = @_; gen_alias_stuff ($typemacro, 'gperl_register_boxed_alias', $package); } sub gen_object_alias_stuff { my ($typemacro, $classname, $root, $package) = @_; gen_alias_stuff ($typemacro, 'gperl_register_object_alias', $package); } =item Gtk2::CodeGen->generate_constants_wrappers (KEY => VAL, ...) Generates an XS file with XSUB wrappers for C constants. The key-value pairs may contain one or more of the following keys: =over =item I: Specifies the package name the functions should be put into. =item I: Reference to an array of filenames which specify the constants that should be wrapped. =item I: The name of the XS file that should be created. =item I
: The name of the header file that should be included in the generated XS file. =item I: The name of the L tag that should be used for the constants wrappers. =back All of the keys have mostly sane defaults. Don't forget to add the generated XS file to the list of XS files to be compiled. The lists describing the constants to be wrapped should have the following format: CONSTANT_NAME [ \t+ CONSTANT_CONVERTER ] That is, the constant's name optionally followed by a tab and the converter that is to be used to convert the constant to a Perl scalar. If CONSTANT_CONVERTER is a simple string like 'newSViv' it will be used as follows to get a Perl scalar: CONSTANT_CONVERTER (CONSTANT_NAME). If it contains '$var', as in 'newSVpv ($var, 0)', then '$var' will be replaced with CONSTANT_NAME and the resulting string will be used for conversion. The default for CONSTANT_CONVERTER is 'newSViv'. =cut sub generate_constants_wrappers { my $class = shift @_; require File::Spec; my %options = ( prefix => 'Glib', lists => ['constants'], xs_file => File::Spec->catfile ('build', 'constants.xs'), header => 'gperl.h', export_tag => 'constants', @_, ); my $xsub_code = ''; my @constants = (); foreach my $list (@{ $options{lists} }) { open my $list_fh, '<', $list or croak "Unable to open `$list´ for reading: $!"; DESCRIPTION: while (my $description = <$list_fh>) { chomp $description; # skip comments and blanks next DESCRIPTION if $description =~ m/\A#|\A\s*\z/; my ($constant, $converter) = split /\t+/, $description; push @constants, [$constant, $converter]; } close $list_fh or croak "Unable to close `$list´: $!"; } my $boot_code = <<"__EOD__"; { HV *stash = gv_stashpv ("$options{prefix}", TRUE); /* create if needed */ HV *tags_hv = get_hv ("$options{prefix}::EXPORT_TAGS", 1); AV *constants_av = NULL; SV *constants_ref_sv = NULL; SV **constants_svp = hv_fetch (tags_hv, "$options{export_tag}", strlen ("$options{export_tag}"), 0); if (constants_svp && gperl_sv_is_array_ref (*constants_svp)) { constants_av = (AV *) SvRV (*constants_svp); constants_ref_sv = *constants_svp; } else { constants_av = newAV (); constants_ref_sv = newRV_noinc ((SV *) constants_av); } __EOD__ foreach my $pair (@constants) { my ($constant, $converter) = @$pair; # default to ints $converter = 'newSViv' unless defined $converter; my $conversion; if ($converter =~ m/\$var/) { ($conversion = $converter) =~ s/\$var/$constant/; } else { $conversion = "$converter ($constant)"; } $boot_code .= <<"__EOD__"; newCONSTSUB (stash, "$constant", $conversion); av_push (constants_av, newSVpv ("$constant", 0)); __EOD__ } if (!@constants) { $boot_code .= <<'__EOD__'; PERL_UNUSED_VAR (stash); __EOD__ } $boot_code .= <<"__EOD__"; gperl_hv_take_sv_s (tags_hv, "$options{export_tag}", constants_ref_sv); } __EOD__ open my $xs_fh, '>', $options{xs_file} or croak "Unable to open `$options{xs_file}´ for writing: $!"; print $xs_fh <<"__EOD__"; /** * This is a generated file. Do not edit. */ #include "$options{header}" MODULE = $options{prefix}::Constants PACKAGE = $options{prefix} BOOT: $boot_code __EOD__ close $xs_fh or croak "Unable to close `$options{xs_file}´: $!"; } 1; __END__ =back =head1 SEE ALSO L does the actual work; Gtk2::CodeGen is now just a wrapper which adds support for gtk-specific types. =head1 AUTHOR muppet =head1 COPYRIGHT Copyright (C) 2003-2005, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. =cut Gtk2-1.24993/lib/Gtk2/devel.pod000644 001750 000024 00000023244 13110362136 016126 0ustar00brianstaff000000 000000 =head1 NAME Gtk2::devel - The internal workings of the gtk2-perl language bindings =head1 DESCRIPTION This document is a supplement to L, and assumes you have read and understood all about how the base Glib bindings work. Most of this will seem like nonsense, otherwise. Here we focus on the ways in which Gtk2 extends Glib's concepts for binding the Gtk+ C libraries to perl, a methodology and set of tools you can use to wrap your own GObject-based libraries. =head1 GtkObject GtkObject adds the idea of a floating reference to GObject. A GObject is created with one reference which must be explicitly removed by its owner. GtkObject has a floating reference which is sunk by the code which wants to own it. This makes it less painful to create lots of objects in a row (you don't have to unref them). To allow for this difference in procedure for taking ownership of an object, Glib allows you to register a "sink" function for a particular class. When asked to create a wrapper that owns the object, gperl_new_object will compare the list of registered sink functions with the type of the object; if the object is descended from a type, that sink function will be run on the object. The default one is g_object_unref(), of course. (this is inspired by pygtk.) Thus, in Gtk2::Object's boot code, we register gtk_object_sink as the sink func for types derived from GtkObject. Now all wrappers for these types will be owned the proper way. Of course, since gtk_object_sink() does nothing if the object isn't floating, it doesn't hurt anything if you always call gperl_new_object with "own" set to TRUE. So, to make life a little easier, Gtk2 defines another function SV * gtk2perl_new_gtkobject (GtkObject * o); Which does nothing more than { return gperl_new_object (G_OBJECT (o), TRUE); } It's also important to know that this is largely done for you by the typemap. =head1 Typemap scheme In the same way that the Glib module uses explicit one-to-one GType to package registrations, it is most foolproof to use an explicit, even exhaustive XS typemap. In this way we avoid problems such as finding the proper set of regexes to map $var to the type macro and all sort of other problems of extensibility. This of course means it must be autogenerated, but that's easy (and is described in the next section). The other main feature of the typemap is that it masks in a very sensible way the differences between GObject and GtkObject, and makes it very easy to specify whether a wrapper owns the object it wraps. This is handled through the idea of a "variant", which is a term I made up just now because it sounds about right. Basically, a variant is the name of the class with some suffix. For example, for the a GBoxed subclass such as GdkEvent, a header would do this: typedef GdkEvent GdkEvent_ornull; typedef GdkEvent GdkEvent_own; #define SvGdkEvent(s) (gperl_get_boxed_check ((s), GDK_TYPE_EVENT)) #define SvGdkEvent_ornull(s) ((s)==&PL_sv_undef ? NULL : SvGdkEvent(s)) #define newSVGdkEvent(e) (gperl_new_boxed ((e), GDK_TYPE_EVENT, FALSE)) #define newSVGdkEvent_own(e) (gperl_new_boxed ((e), GDK_TYPE_EVENT, TRUE)) #define newSVGdkEvent_ornull(e) (e == NULL ? &PL_sv_undef ? newSVGdkEvent (e)) Then the typemap entries for its various variants would look like this: TYPEMAP GdkEvent * T_GDK_TYPE_EVENT GdkEvent_ornull * T_GDK_TYPE_EVENT_ORNULL GdkEvent_own * T_GDK_TYPE_EVENT_OWN INPUT T_GDK_TYPE_EVENT $var = SvGdkEvent ($arg); T_GDK_TYPE_EVENT_ORNULL $var = SvGdkEvent_ornull ($arg); OUTPUT T_GDK_TYPE_EVENT $arg = newSVGdkEvent ($var); T_GDK_TYPE_EVENT_ORNULL $arg = newSVGdkEvent_ornull ($var); T_GDK_TYPE_EVENT_OWN $arg = newSVGdkEvent_own ($var); And with that, your XS wrapper code can look as simple as this: GdkEvent_own * gdk_get_event (class) SV * class C_ARGS: /*void*/ guint gdk_event_get_time (event) GdkEvent * event Isn't that nice and simple? We have different variants for different types, and some are applicable only to input or output. The ones used by gtk2-perl generally follow the convention outlined in this table: Variant I O Description ------------ - - ------------------------------------------- GBoxed /* no ext */ * * object will not be destroyed with wrapper _own * object will be destroyed with wrapper _copy * object will be copied (and copy will be owned) _ornull * * undef/NULL is legal _own_ornull * if object not NULL, wrapper will own object GObject /* no ext */ * * object's refcount will be increased (=>not owned) _noinc * object's refcount will not be increased (=>owned) _ornull * * undef/NULL is legal GtkObject /* no ext */ * * everything is peachy _ornull * * undef/NULL is legal =head1 Autogeneration The typemap scheme described above is great, but involves creating a lot of typedefs and macros. For a large library like Gtk, with over three hundred types to bind, you'd have to be crazy to write all of those by hand. Gtk2 handles this by using a code generation module to write the code for us as part of the Makefile.PL configuration step. See L for details on how to use the generators. Here I'll describe what gets generated and why. =head2 maps This is the starting point for autogeneration, the input for the code generator. This map lists the TYPE macro for each of the GObject types in all of the gtk headers (including gdk, gdk-pixbuf, atk, and pango), along with the actual name of the class, name of the package into which it is to be blessed, and the base type (not exactly the fundamental type). Most of those should be obvious except for the base type. The base type is one of GEnum, GFlags, GBoxed, GObject, GInterface, or GtkObject. This is the important flag which determines what kind of code gets created for each record; GObjects must be handled by completely different code than GBoxed objects, for instance. As noted elsewhere, the distinction between GObject and GtkObject is not strictly necessary, but is kept for historical and aesthetic reasons. In this file, you can change the explicit name of an object. If you don't like PangoFontDescription being Gtk2::Pango::FontDescription, you can change it to Gtk2::Pango::Font::Desc::ription if you were so inclined (but please don't). If you wish to use Gtk2's autogeneration tools in your own project, you'll need to create a maps file. This can be done by hand, but that's tedious and error-prone; I used a script (called genmaps.pl in CVS) that actually scans the gtk header files and creates and runs a small program to generate the maps file. The advantage here is that the type information comes directly from the code and I don't have to worry about clerical errors making the software incorrect. In practice, this should need to be run only when new classes are added to the base libraries. =head2 gtk2perl-autogen.h This file contains the generated typedefs and cast macros. This includes all the variant stuff described above. =head2 gtk2perl.typemap The exhaustive typemap uses the macros defined in gtk2perl-autogen.h so that you are assured to get the same results from typemap generated code as from hand-written perl stack manipulation. =head2 register.xsh Included from the BOOT section of the toplevel Gtk2 module (xs/Gtk2.xs), this file lists all of the types in the maps file as a series of calls to the appropriate package registration functions (gperl_register_boxed, gperl_register_object, or gperl_register_fundamental). This is done before the boot code below so that hand-written code may override it. This code gets executed when your perl script does a "use Gtk2". =head2 boot.xsh The Gtk2 module is made up of dozens of XS files but only one PM file. Gtk2.pm calls bootstrap on Gtk2, but not on any of the others (because it doesn't know about them). It is a module's boot code which binds the xsubs into perl, so it's imperative that the modules get booted! So, C<< Gtk2::CodeGen->write_boot >> (called from Makefile.PL) scans the xs/ subdirectory for all the "MODULE = ..." lines in the XS files. It maps these to boot code symbols, and generates code to call these symbols in boot.xsh, which is then included by the BOOT: section for the toplevel module, right after register.xsh. (The generation code takes steps to avoid spitting out the same symbol more than once, and will not emit code to boot the toplevel module (or else you get an infinite loop).) Just a point of style; you can change packages in an XS file by repeating the MODULE = ... line with a different PACKAGE (and possibly PREFIX) value. It's a good idea, however, to keep the MODULE the same, so that only one boot symbol gets generated per file. =head1 SEE ALSO perl(1), perlxs(1), Gtk2(3pm), Glib(3pm), Glib::devel(3pm), Glib::xsapi(3pm), Gtk2::CodeGen(3pm) =head1 AUTHOR muppet Escott at asofyet dot orgE =head1 COPYRIGHT 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. =cut Gtk2-1.24993/lib/Gtk2/SimpleList.pm000644 001750 000024 00000057703 13110362136 016755 0ustar00brianstaff000000 000000 # # $Id$ # ######################### package Gtk2::SimpleList; use strict; use Carp; use Gtk2; our @ISA = 'Gtk2::TreeView'; our $VERSION = '0.15'; our %column_types = ( 'hidden' => {type=>'Glib::String', attr=>'hidden'}, 'text' => {type=>'Glib::String', renderer=>'Gtk2::CellRendererText', attr=>'text'}, 'markup' => {type=>'Glib::String', renderer=>'Gtk2::CellRendererText', attr=>'markup'}, 'int' => {type=>'Glib::Int', renderer=>'Gtk2::CellRendererText', attr=>'text'}, 'double' => {type=>'Glib::Double', renderer=>'Gtk2::CellRendererText', attr=>'text'}, 'bool' => {type=>'Glib::Boolean', renderer=>'Gtk2::CellRendererToggle', attr=>'active'}, 'scalar' => {type=>'Glib::Scalar', renderer=>'Gtk2::CellRendererText', attr=> sub { my ($tree_column, $cell, $model, $iter, $i) = @_; my ($info) = $model->get ($iter, $i); $cell->set (text => $info || '' ); } }, 'pixbuf' => {type=>'Gtk2::Gdk::Pixbuf', renderer=>'Gtk2::CellRendererPixbuf', attr=>'pixbuf'}, ); # this is some cool shit sub add_column_type { shift; # don't want/need classname my $name = shift; $column_types{$name} = { @_ }; } sub text_cell_edited { my ($cell_renderer, $text_path, $new_text, $slist) = @_; my $path = Gtk2::TreePath->new_from_string ($text_path); my $model = $slist->get_model; my $iter = $model->get_iter ($path); $model->set ($iter, $cell_renderer->{column}, $new_text); } sub new { croak "Usage: $_[0]\->new (title => type, ...)\n" . " expecting a list of column title and type name pairs.\n" . " can't create a SimpleList with no columns" unless @_ >= 3; # class, key1, val1 return shift->new_from_treeview (Gtk2::TreeView->new (), @_); } sub new_from_treeview { my $class = shift; my $view = shift; croak "treeview is not a Gtk2::TreeView" unless defined ($view) and UNIVERSAL::isa ($view, 'Gtk2::TreeView'); croak "Usage: $class\->new_from_treeview (treeview, title => type, ...)\n" . " expecting a treeview reference and list of column title and type name pairs.\n" . " can't create a SimpleList with no columns" unless @_ >= 2; # key1, val1 my @column_info = (); for (my $i = 0; $i < @_ ; $i+=2) { my $typekey = $_[$i+1]; croak "expecting pairs of title=>type" unless $typekey; croak "unknown column type $typekey, use one of " . join(", ", keys %column_types) unless exists $column_types{$typekey}; my $type = $column_types{$typekey}{type}; if (not defined $type) { $type = 'Glib::String'; carp "column type $typekey has no type field; did you" . " create a custom column type incorrectly?\n" . "limping along with $type"; } push @column_info, { title => $_[$i], type => $type, rtype => $column_types{$_[$i+1]}{renderer}, attr => $column_types{$_[$i+1]}{attr}, }; } my $model = Gtk2::ListStore->new (map { $_->{type} } @column_info); # just in case, 'cause i'm paranoid like that. map { $view->remove_column ($_) } $view->get_columns; $view->set_model ($model); for (my $i = 0; $i < @column_info ; $i++) { if( 'CODE' eq ref $column_info[$i]{attr} ) { $view->insert_column_with_data_func (-1, $column_info[$i]{title}, $column_info[$i]{rtype}->new, $column_info[$i]{attr}, $i); } elsif ('hidden' eq $column_info[$i]{attr}) { # skip hidden column } else { my $column = Gtk2::TreeViewColumn->new_with_attributes ( $column_info[$i]{title}, $column_info[$i]{rtype}->new, $column_info[$i]{attr} => $i, ); $view->append_column ($column); if ($column_info[$i]{attr} eq 'active') { # make boolean columns respond to editing. my $r = $column->get_cell_renderers; $r->set (activatable => 1); $r->{column_index} = $i; $r->signal_connect (toggled => sub { my ($renderer, $row, $slist) = @_; my $col = $renderer->{column_index}; my $model = $slist->get_model; my $iter = $model->iter_nth_child (undef, $row); my $val = $model->get ($iter, $col); $model->set ($iter, $col, !$val); }, $view); } elsif ($column_info[$i]{attr} eq 'text') { # attach a decent 'edited' callback to any # columns using a text renderer. we do NOT # turn on editing by default. my $r = $column->get_cell_renderers; $r->{column} = $i; $r->signal_connect (edited => \&text_cell_edited, $view); } } } my @a; tie @a, 'Gtk2::SimpleList::TiedList', $model; $view->{data} = \@a; return bless $view, $class; } sub set_column_editable { my ($self, $index, $editable) = @_; my $column = $self->get_column ($index); croak "invalid column index $index" unless defined $column; my $cell_renderer = $column->get_cell_renderers; $cell_renderer->set (editable => $editable); } sub get_column_editable { my ($self, $index, $editable) = @_; my $column = $self->get_column ($index); croak "invalid column index $index" unless defined $column; my $cell_renderer = $column->get_cell_renderers; return $cell_renderer->get ('editable'); } sub get_selected_indices { my $self = shift; my $selection = $self->get_selection; return () unless $selection; # warning: this assumes that the TreeModel is actually a ListStore. # if the model is a TreeStore, get_indices will return more than one # index, which tells you how to get all the way down into the tree, # but all the indices will be squashed into one array... so, ah, # don't use this for TreeStores! map { $_->get_indices } $selection->get_selected_rows; } sub select { my $self = shift; my $selection = $self->get_selection; my @inds = (@_ > 1 && $selection->get_mode ne 'multiple') ? $_[0] : @_; my $model = $self->get_model; foreach my $i (@inds) { my $iter = $model->iter_nth_child (undef, $i); next unless $iter; $selection->select_iter ($iter); } } sub unselect { my $self = shift; my $selection = $self->get_selection; my @inds = (@_ > 1 && $selection->get_mode ne 'multiple') ? $_[0] : @_; my $model = $self->get_model; foreach my $i (@inds) { my $iter = $model->iter_nth_child (undef, $i); next unless $iter; $selection->unselect_iter ($iter); } } sub set_data_array { @{$_[0]->{data}} = @{$_[1]}; } sub get_row_data_from_path { my ($self, $path) = @_; # $path->get_depth always 1 for SimpleList # my $depth = $path->get_depth; # array has only one member for SimpleList my @indices = $path->get_indices; my $index = $indices[0]; return $self->{data}->[$index]; } ################################## package Gtk2::SimpleList::TiedRow; use strict; use Gtk2; use Carp; # TiedRow is the lowest-level tie, allowing you to treat a row as an array # of column data. sub TIEARRAY { my $class = shift; my $model = shift; my $iter = shift; croak "usage tie (\@ary, 'class', model, iter)" unless $model && UNIVERSAL::isa ($model, 'Gtk2::TreeModel'); return bless { model => $model, iter => $iter, }, $class; } sub FETCH { # this, index return $_[0]->{model}->get ($_[0]->{iter}, $_[1]); } sub STORE { # this, index, value return $_[0]->{model}->set ($_[0]->{iter}, $_[1], $_[2]) if defined $_[2]; # allow 0, but not undef } sub FETCHSIZE { # this return $_[0]{model}->get_n_columns; } sub EXISTS { return( $_[1] < $_[0]{model}->get_n_columns ); } sub EXTEND { } # can't change the length, ignore sub CLEAR { } # can't change the length, ignore sub new { my ($class, $model, $iter) = @_; my @a; tie @a, __PACKAGE__, $model, $iter; return \@a; } sub POP { croak "pop called on a TiedRow, but you can't change its size"; } sub PUSH { croak "push called on a TiedRow, but you can't change its size"; } sub SHIFT { croak "shift called on a TiedRow, but you can't change its size"; } sub UNSHIFT { croak "unshift called on a TiedRow, but you can't change its size"; } sub SPLICE { croak "splice called on a TiedRow, but you can't change its size"; } #sub DELETE { croak "delete called on a TiedRow, but you can't change its size"; } sub STORESIZE { carp "STORESIZE operation not supported"; } ################################### package Gtk2::SimpleList::TiedList; use strict; use Gtk2; use Carp; # TiedList is an array in which each element is a row in the liststore. sub TIEARRAY { my $class = shift; my $model = shift; croak "usage tie (\@ary, 'class', model)" unless $model && UNIVERSAL::isa ($model, 'Gtk2::TreeModel'); return bless { model => $model, }, $class; } sub FETCH { # this, index my $iter = $_[0]->{model}->iter_nth_child (undef, $_[1]); return undef unless defined $iter; my @row; tie @row, 'Gtk2::SimpleList::TiedRow', $_[0]->{model}, $iter; return \@row; } sub STORE { # this, index, value my $iter = $_[0]->{model}->iter_nth_child (undef, $_[1]); $iter = $_[0]->{model}->insert ($_[1]) if not defined $iter; my @row; tie @row, 'Gtk2::SimpleList::TiedRow', $_[0]->{model}, $iter; if ('ARRAY' eq ref $_[2]) { @row = @{$_[2]}; } else { $row[0] = $_[2]; } return $_[2]; } sub FETCHSIZE { # this return $_[0]->{model}->iter_n_children (undef); } sub PUSH { # this, list my $model = shift()->{model}; my $iter; foreach (@_) { $iter = $model->append; my @row; tie @row, 'Gtk2::SimpleList::TiedRow', $model, $iter; if ('ARRAY' eq ref $_) { @row = @$_; } else { $row[0] = $_; } } return $model->iter_n_children (undef); } sub POP { # this my $model = $_[0]->{model}; my $index = $model->iter_n_children-1; my $iter = $model->iter_nth_child(undef, $index); return undef unless $iter; my $ret = [ $model->get ($iter) ]; $model->remove($iter) if( $index >= 0 ); return $ret; } sub SHIFT { # this my $model = $_[0]->{model}; my $iter = $model->iter_nth_child(undef, 0); return undef unless $iter; my $ret = [ $model->get ($iter) ]; $model->remove($iter) if( $model->iter_n_children ); return $ret; } sub UNSHIFT { # this, list my $model = shift()->{model}; my $iter; foreach (@_) { $iter = $model->prepend; my @row; tie @row, 'Gtk2::SimpleList::TiedRow', $model, $iter; if ('ARRAY' eq ref $_) { @row = @$_; } else { $row[0] = $_; } } return $model->iter_n_children (undef); } # note: really, arrays aren't supposed to support the delete operator this # way, but we don't want to break existing code. sub DELETE { # this, key my $model = $_[0]->{model}; my $ret; if ($_[1] < $model->iter_n_children (undef)) { my $iter = $model->iter_nth_child (undef, $_[1]); return undef unless $iter; $ret = [ $model->get ($iter) ]; $model->remove ($iter); } return $ret; } sub CLEAR { # this $_[0]->{model}->clear; } # note: arrays aren't supposed to support exists, either. sub EXISTS { # this, key return( $_[1] < $_[0]->{model}->iter_n_children ); } # we can't really, reasonably, extend the tree store in one go, it will be # extend as items are added sub EXTEND {} sub get_model { return $_[0]{model}; } sub STORESIZE { carp "STORESIZE: operation not supported"; } sub SPLICE { # this, offset, length, list my $self = shift; # get the model and the number of rows my $model = $self->{model}; # get the offset my $offset = shift || 0; # if offset is neg, invert it $offset = $model->iter_n_children (undef) + $offset if ($offset < 0); # get the number of elements to remove my $length = shift; # if len was undef, not just false, calculate it $length = $self->FETCHSIZE() - $offset unless (defined ($length)); # get any elements we need to insert into their place my @list = @_; # place to store any returns my @ret = (); # remove the desired elements my $ret; for (my $i = $offset; $i < $offset+$length; $i++) { # things will be shifting forward, so always delete at offset $ret = $self->DELETE ($offset); push @ret, $ret if defined $ret; } # insert the passed list at offset in reverse order, so the will # be in the correct order foreach (reverse @list) { # insert a new row $model->insert ($offset); # and put the data in it $self->STORE ($offset, $_); } # return deleted rows in array context, the last row otherwise # if nothing deleted return empty return (@ret ? (wantarray ? @ret : $ret[-1]) : ()); } 1; __END__ # documentation is a good thing. =head1 NAME Gtk2::SimpleList - A simple interface to Gtk2's complex MVC list widget =head1 SYNOPSIS use Glib qw(TRUE FALSE); use Gtk2 '-init'; use Gtk2::SimpleList; my $slist = Gtk2::SimpleList->new ( 'Text Field' => 'text', 'Markup Field' => 'markup', 'Int Field' => 'int', 'Double Field' => 'double', 'Bool Field' => 'bool', 'Scalar Field' => 'scalar', 'Pixbuf Field' => 'pixbuf', ); @{$slist->{data}} = ( [ 'text', 1, 1.1, TRUE, $var, $pixbuf ], [ 'text', 2, 2.2, FALSE, $var, $pixbuf ], ); # (almost) anything you can do to an array you can do to # $slist->{data} which is an array reference tied to the list model push @{$slist->{data}}, [ 'text', 3, 3.3, TRUE, $var, $pixbuf ]; # mess with selections $slist->get_selection->set_mode ('multiple'); $slist->get_selection->unselect_all; $slist->select (1, 3, 5..9); # select rows by index $slist->unselect (3, 8); # unselect rows by index @sel = $slist->get_selected_indices; # simple way to make text columns editable $slist->set_column_editable ($col_num, TRUE); # Gtk2::SimpleList derives from Gtk2::TreeView, so all methods # on a treeview are available. $slist->set_rules_hint (TRUE); $slist->signal_connect (row_activated => sub { my ($sl, $path, $column) = @_; my $row_ref = $sl->get_row_data_from_path ($path); # $row_ref is now an array ref to the double-clicked row's data. }); # turn an existing TreeView into a SimpleList; useful for # Glade-generated interfaces. $simplelist = Gtk2::SimpleList->new_from_treeview ( $glade->get_widget ('treeview'), 'Text Field' => 'text', 'Int Field' => 'int', 'Double Field' => 'double', ); =head1 ABSTRACT SimpleList is a simple interface to the powerful but complex Gtk2::TreeView and Gtk2::ListStore combination, implementing using tied arrays to make thing simple and easy. =head1 DESCRIPTION Gtk2 has a powerful, but complex MVC (Model, View, Controller) system used to implement list and tree widgets. Gtk2::SimpleList automates the complex setup work and allows you to treat the list model as a more natural list of lists structure. After creating a new Gtk2::SimpleList object with the desired columns you may set the list data with a simple Perl array assignment. Rows may be added or deleted with all of the normal array operations. You can treat the C member of the list simplelist object as an array reference, and manipulate the list data with Perl's normal array operators. A mechanism has also been put into place allowing columns to be Perl scalars. The scalar is converted to text through Perl's normal mechanisms and then displayed in the list. This same mechanism can be expanded by defining arbitrary new column types before calling the new function. =head1 OBJECT HIERARCHY Glib::Object +--- Gtk2::Object +--- Gtk2::Widget +--- Gtk2::TreeView +--- Gtk2::SimpleList =head1 METHODS =over =item $slist = Gtk2::SimpleList->new ($cname, $ctype, ...) =over =over =item * $cname (string) =item * $ctype (string) =back =back Creates a new Gtk2::SimpleList object with the specified columns. The parameter C is the name of the column, what will be displayed in the list headers if they are turned on. The parameter ctype is the type of the column, one of: text normal text strings markup pango markup strings int integer values double double-precision floating point values bool boolean values, displayed as toggle-able checkboxes scalar a perl scalar, displayed as a text string by default pixbuf a Gtk2::Gdk::Pixbuf or the name of a custom type you add with C. These should be provided in pairs according to the desired columns for your list. =item $slist = Gtk2::SimpleList->new_from_treeview ($treeview, $cname, $ctype, ...) =over =over =item * $treeview (Gtk2::TreeView) =item * $cname (string) =item * $ctype (string) =back =back Like C<< Gtk2::SimpleList->new() >>, but turns an existing Gtk2::TreeView into a Gtk2::SimpleList. This is intended mostly for use with stuff like Glade, where the widget is created for you. This will create and attach a new model and remove any existing columns from I. Returns I, re-blessed as a Gtk2::SimpleList. =item $slist->set_data_array ($arrayref) =over =over =item * $arrayref (array reference) =back =back Set the data in the list to the array reference $arrayref. This is completely equivalent to @{$list->{data}} = @{$arrayref} and is only here for convenience and for those programmers who don't like to type-cast and have static, set once data. =item @indices = $slist->get_selected_indices Return the indices of the selected rows in the ListStore. =item $slist->get_row_data_from_path ($path) =over =over =item * $path (Gtk2::TreePath) the path of the desired row =back =back Returns an array ref with the data of the row indicated by $path. =item $slist->select ($index, ...); =item $slist->unselect ($index, ...); =over =over =item * $index (integer) =back =back Select or unselect rows in the list by index. If the list is set for multiple selection, all indices in the list will be set/unset; otherwise, just the first is used. If the list is set for no selection, then nothing happens. To set the selection mode, or to select all or none of the rows, use the normal TreeView/TreeSelection stuff, e.g. $slist->get_selection and the TreeSelection methods C, C, C, and C. =item $slist->set_column_editable ($index, $editable) =over =over =item * $index (integer) =item * $editable (boolean) =back =back =item boolean = $slist->get_column_editable ($index) =over =over =item * $index (integer) =back =back This is a very simple interface to Gtk2::TreeView's editable text column cells. All columns which use the attr "text" (basically, any text or number column, see C) automatically have callbacks installed to update data when cells are edited. With C, you can enable the in-place editing. C tells you if column I is currently editable. =item Gtk2::SimpleList->add_column_type ($type_name, ...) =over =over =item $type_name (string) =back =back Add a new column type to the list of possible types. Initially six column types are defined, text, int, double, bool, scalar, and pixbuf. The bool column type uses a toggle cell renderer, the pixbuf uses a pixbuf cell renderer, and the rest use text cell renderers. In the process of adding a new column type you may use any cell renderer you wish. The first parameter is the column type name, the list of six are examples. There are no restrictions on the names and you may even overwrite the existing ones should you choose to do so. The remaining parameters are the type definition consisting of key value pairs. There are three required: type, renderer, and attr. The type key determines what actual datatype will be stored in the underlying model representation; this is a package name, e.g. Glib::String, Glib::Int, Glib::Boolean, but in general if you want an arbitrary Perl data structure you will want to use 'Glib::Scalar'. The renderer key should hold the class name of the cell renderer to create for this column type; this may be any of Gtk2::CellRendererText, Gtk2::CellRendererToggle, Gtk2::CellRendererPixbuf, or some other, possibly custom, cell renderer class. The attr key is magical; it may be either a string, in which case it specifies the attribute which will be set from the specified column (e.g. 'text' for a text renderer, 'active' for a toggle renderer, etc), or it may be a reference to a subroutine which will be called each time the renderer needs to draw the data. This function, described as a GtkTreeCellDataFunc in the API reference, will receive 5 parameters: $treecol, $cell, $model, $iter, $col_num (when SimpleList hooks up the function, it sets the column number to be passed as the user data). The data value for the particular cell in question is available via $model->get ($iter, $col_num); you can then do whatever it is you have to do to render the cell the way you want. Here are some examples: # just displays the value in a scalar as # Perl would convert it to a string Gtk2::SimpleList->add_column_type( 'a_scalar', type => 'Glib::Scalar', renderer => 'Gtk2::CellRendererText', attr => sub { my ($treecol, $cell, $model, $iter, $col_num) = @_; my $info = $model->get ($iter, $col_num); $cell->set (text => $info); } ); # sums up the values in an array ref and displays # that in a text renderer Gtk2::SimpleList->add_column_type( 'sum_of_array', type => 'Glib::Scalar', renderer => 'Gtk2::CellRendererText', attr => sub { my ($treecol, $cell, $model, $iter, $col_num) = @_; my $sum = 0; my $info = $model->get ($iter, $col_num); foreach (@$info) { $sum += $_; } $cell->set (text => $sum); } ); =back =head1 MODIFYING LIST DATA After creating a new Gtk2::SimpleList object there will be a member called C which is a tied array. That means data may be treated as an array, but in reality the data resides in something else. There is no need to understand the details of this it just means that you put data into, take data out of, and modify it just like any other array. This includes using array operations like push, pop, unshift, and shift. For those of you very familiar with perl this section will prove redundant, but just in case: Adding and removing rows: # push a row onto the end of the list push @{$slist->{data}}, [col1_data, col2_data, ..., coln_data]; # pop a row off of the end of the list $rowref = pop @{$slist->{data}}; # unshift a row onto the beginning of the list unshift @{$slist->{data}}, [col1_data, col2_data, ..., coln_data]; # shift a row off of the beginning of the list $rowref = shift @{$slist->{data}}; # delete the row at index $n, 0 indexed splice @{ $slist->{data} }, $n, 1; # set the entire list to be the data in a array @{$slist->{data}} = ( [row1, ...], [row2, ...], [row3, ...] ); Getting at the data in the list: # get an array reference to the entire nth row $rowref = $slist->{data}[n]; # get the scalar in the mth column of the nth row, 0 indexed $val = $slist->{data}[n][m]; # set an array reference to the entire nth row $slist->{data}[n] = [col1_data, col2_data, ..., coln_data]; # get the scalar in the mth column of the nth row, 0 indexed $slist->{data}[n][m] = $rowm_coln_value; =head1 SEE ALSO Perl(1), Glib(3pm), Gtk2(3pm), Gtk2::TreeView(3pm), Gtk2::TreeModel(3pm), Gtk2::ListStore(3pm). Note: Gtk2::SimpleList is deprecated in favor of Gtk2::Ex::Simple::List, part of the Gtk2-Perl-Ex project at http://gtk2-perl-ex.sf.net . =head1 AUTHORS muppet Ross McFarland Gavin Brown =head1 COPYRIGHT AND LICENSE Copyright 2003-2004 by the Gtk2-Perl team. 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. =cut Gtk2-1.24993/examples/customtree.pl000755 001750 000024 00000014774 11664366546 017353 0ustar00brianstaff000000 000000 #!/usr/bin/perl use strict; use warnings; use Glib qw(TRUE FALSE); use Gtk2 '-init'; use HTML::TreeBuilder; my $NODE_POS = 0; my $NODE_DATA = $NODE_POS++; my $NODE_NAME = $NODE_POS++; exit main() unless caller; sub main { local $| = 1; my ($html) = @ARGV; $html = \qq{

Hello world

link bold italic } unless $html; my $document = parse_html($html); my $model = my::HtmlTreeModel->new($document); my $window = Gtk2::Window->new(); $window->set_size_request(200, 200); my $view = create_tree_view(); $view->set_model($model); $window->add(scrollify($view)); $window->signal_connect(destroy => sub {Gtk2->main_quit(); }); $window->show_all(); Gtk2->main(); return 0; } sub create_tree_view { my $view = Gtk2::TreeView->new(); $view->set_fixed_height_mode(TRUE); my $cell = Gtk2::CellRendererText->new(); my $column = Gtk2::TreeViewColumn->new(); $column->pack_end($cell, TRUE); $column->set_title('Element'); $column->set_resizable(TRUE); $column->set_sizing('fixed'); $column->set_fixed_width(150); $column->set_attributes($cell, text => $NODE_NAME); $view->append_column($column); return $view; } sub scrollify { my ($widget, $width, $height) = @_; $width = -1 unless defined $width; $height = -1 unless defined $height; my $scroll = Gtk2::ScrolledWindow->new(); $scroll->set_policy('automatic', 'automatic'); $scroll->set_shadow_type('in'); $scroll->set_size_request($width, $height); $scroll->add($widget); return $scroll; } sub parse_html { my ($html) = @_; if (ref $html) { return HTML::TreeBuilder->new_from_content($$html); } return HTML::TreeBuilder->new_from_file($html); } package my::HtmlTreeModel; ## ## Implementation of a TreeModel that wraps a HTML::TreeBuilder tree. This tree ## model shows only the element nodes and hides all content nodes (the text ## inside an element node). ## ## This TreeModel has 2 columns per row: the element's name and the actual node. ## At the moment only the name field is used. ## use Glib qw(TRUE FALSE); use Carp; use Scalar::Util 'refaddr'; use Glib::Object::Subclass 'Glib::Object' => interfaces => [ 'Gtk2::TreeModel' ] ; sub new { my $class = shift; my ($node) = @_ or croak "Usage: ${class}->new(node)"; my $self = $class->SUPER::new(); $self->{stamp} = sprintf '%d', rand (1<<31); $self->{node} = $node; $self->{types} = [ 'Glib::Scalar', 'Glib::String' ]; return $self; } sub GET_FLAGS { [ 'iters-persist' ] } sub GET_N_COLUMNS { 2 } sub GET_COLUMN_TYPE { my ($self, $index) = @_; return $self->{types}[$index]; } sub GET_ITER { my ($self, $path) = @_; # We don't need the first level my (undef, @pos) = split /:/, $path->to_string; my $node = $self->{node}; foreach my $pos (@pos) { # We keep only the element nodes, this tree doesn't show the content nodes my @nodes = grep { is_element($_) } $node->content_list; $node = $nodes[$pos]; } return $self->new_iter($node); } sub GET_PATH { my ($self, $iter) = @_; my $path = Gtk2::TreePath->new(); my $node = $self->get_node($iter) or return undef; my @indexes; for (; $node; $node = $node->parent) { my $index = 0; # We must use a list context here otherwise we could get a content node and # we will not be able to perform a call to . foreach my $left ($node->left) { # Because we want only the elements to appear in the tree we have to # exclude some nodes next unless is_element($left); ++$index; } push @indexes, $index; } foreach my $index (reverse @indexes) { $path->append_index($index); } return $path; } sub GET_VALUE { my ($self, $iter, $column) = @_; my $node = $self->get_node($iter) or return "broken iter?"; if ($column == 0) { return $node; } elsif ($column == 1) { return $node->tag; } return "Which column?"; } sub ITER_NEXT { my ($self, $iter) = @_; my $node = $self->get_node($iter) or return undef; # We have to get the list of nodes because calling node->right is scalar # context can return a content node and then we lose the capability to go to # the next node. foreach my $next ($node->right) { return $self->new_iter($next) if is_element($next); } return undef; } sub ITER_CHILDREN { my ($self, $iter) = @_; if ($iter) { my $node = $self->get_node($iter) or return undef; foreach my $child ($node->content_list) { return $self->new_iter($child) if is_element($child); } return undef; } return $self->new_iter($self->{node}); } sub ITER_HAS_CHILD { my ($self, $iter) = @_; my $node = $self->get_node($iter) or return FALSE; foreach my $child ($node->content_list) { return TRUE if is_element($child); } return FALSE; } sub ITER_N_CHILDREN { my ($self, $iter) = @_; my $node = $iter ? $self->get_node($iter) : $self->{node}; return undef unless $node; my $count = 0; foreach my $child ($node->content_list) { # We only want element nodes ++$count if is_element($child); } return $count; } sub ITER_NTH_CHILD { my ($self, $iter, $n) = @_; # Special case: if iter == NULL, return number of top-level rows my $node = $iter ? $self->get_node($iter) : $self->{node}; return undef unless $node; # Get the nodes in list context because if we are given a content node we will # no be able to todo $node->right. my @nodes = $node->right; for (my $i = 0; $i < $n;) { $node = shift @nodes or return undef; ++$i if is_element($node); } return $self->new_iter($node); } sub ITER_PARENT { my ($self, $iter) = @_; my $node = $self->get_node($iter) or return undef; return $self->new_iter($node->parent); } # Returns TRUE if the given node is and element. HTML::Tree has to types of # nodes: Elements and cotent (text strings). sub is_element { my $ref = ref $_[0]; return ($ref eq 'HTML::Element' || $ref eq 'HTML::TreeBuilder'); } # Builds the arrayref that most methods should return. sub new_iter { my ($self, $node) = @_; return $node ? [ $self->{stamp}, 0, $node, undef ] : undef; } # Returns a node from a given iter. This method complements . If the # iter has no node then undef is returned instead. sub get_node { my ($self, $iter) = @_; return undef if $iter->[0] == 0 and $iter->[1] == 0 and ! defined $iter->[2] and ! defined $iter->[3] ; my $node = $iter->[2]; if (! $node) { Carp::cluck "Iter has no node: ", iter_dumper($iter); return undef; } return $node; } # Used for debugging purposes. sub iter_dumper { my ($iter) = @_; return is_element($iter->[2]) ? $iter->[2] . " - " . $iter->[2]->tag : $iter->[2]; } Gtk2-1.24993/examples/cairo-rendering.pl000644 001750 000024 00000003254 11664366546 020215 0ustar00brianstaff000000 000000 #!/usr/bin/perl use strict; use warnings; use Math::Trig qw(pi); use Cairo; use Glib qw(TRUE FALSE); use Gtk2 -init; use Gtk2::Pango; use constant RADIUS => 150; use constant N_WORDS => 10; use constant FONT => "Sans Bold 27"; sub draw_text { my ($cr) = @_; $cr -> translate(RADIUS, RADIUS); my $layout = Gtk2::Pango::Cairo::create_layout($cr); $layout -> set_text("Text"); my $desc = Gtk2::Pango::FontDescription -> from_string(FONT); $layout -> set_font_description($desc); # Draw the layout N_WORDS times in a circle foreach (0 .. N_WORDS) { my $angle = (360. * $_) / N_WORDS; $cr -> save(); # Gradient from red at angle == 60 to blue at angle == 300 my $red = (1 + cos(($angle - 60) * pi / 180.)) / 2; $cr -> set_source_rgb($red, 0, 1.0 - $red); $cr -> rotate($angle * pi / 180.); # Inform Pango to re-layout the text with the new transformation Gtk2::Pango::Cairo::update_layout($cr, $layout); my ($width, $height) = $layout -> get_size(); $cr -> move_to(- ($width / PANGO_SCALE) / 2, - RADIUS); Gtk2::Pango::Cairo::show_layout($cr, $layout); $cr -> restore(); } } my $window = Gtk2::Window -> new(); $window -> signal_connect(delete_event => sub { Gtk2 -> main_quit(); }); my $area = Gtk2::DrawingArea -> new(); $area -> signal_connect(expose_event => sub { my ($widget, $event) = @_; my $cr = Gtk2::Gdk::Cairo::Context -> create($widget -> window()); $cr -> set_source_rgb(1.0, 1.0, 1.0); $cr -> rectangle(0, 0, 2 * RADIUS, 2 * RADIUS); $cr -> fill(); draw_text($cr); return FALSE; }); $window -> set_default_size(2 * RADIUS, 2 * RADIUS); $window -> add($area); $window -> show_all(); Gtk2 -> main(); Gtk2-1.24993/examples/testdnd.pl000644 001750 000024 00000051661 13110362136 016572 0ustar00brianstaff000000 000000 #!/usr/bin/perl -w =doc This is a direct port from C to Perl of the testdnd program in the gtk+ source distribution. YMMV. =cut # 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., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # $Id$ # # TITLE: DND # REQUIRES: Gtk2 use Gtk2; @drag_icon_xpm = ( '36 48 9 1', ' c None', '. c #020204', '+ c #8F8F90', '@ c #D3D3D2', '# c #AEAEAC', '$ c #ECECEC', '% c #A2A2A4', '& c #FEFEFC', '* c #BEBEBC', ' .....................', ' ..&&&&&&&&&&&&&&&&&&&.', ' ...&&&&&&&&&&&&&&&&&&&.', ' ..&.&&&&&&&&&&&&&&&&&&&.', ' ..&&.&&&&&&&&&&&&&&&&&&&.', ' ..&&&.&&&&&&&&&&&&&&&&&&&.', ' ..&&&&.&&&&&&&&&&&&&&&&&&&.', ' ..&&&&&.&&&@&&&&&&&&&&&&&&&.', ' ..&&&&&&.*$%$+$&&&&&&&&&&&&&.', ' ..&&&&&&&.%$%$+&&&&&&&&&&&&&&.', ' ..&&&&&&&&.#&#@$&&&&&&&&&&&&&&.', ' ..&&&&&&&&&.#$**#$&&&&&&&&&&&&&.', ' ..&&&&&&&&&&.&@%&%$&&&&&&&&&&&&&.', ' ..&&&&&&&&&&&.&&&&&&&&&&&&&&&&&&&.', ' ..&&&&&&&&&&&&.&&&&&&&&&&&&&&&&&&&.', '................&$@&&&@&&&&&&&&&&&&.', '.&&&&&&&+&&#@%#+@#@*$%$+$&&&&&&&&&&.', '.&&&&&&&+&&#@#@&&@*%$%$+&&&&&&&&&&&.', '.&&&&&&&+&$%&#@&#@@#&#@$&&&&&&&&&&&.', '.&&&&&&@#@@$&*@&@#@#$**#$&&&&&&&&&&.', '.&&&&&&&&&&&&&&&&&&&@%&%$&&&&&&&&&&.', '.&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&.', '.&&&&&&&&$#@@$&&&&&&&&&&&&&&&&&&&&&.', '.&&&&&&&&&+&$+&$&@&$@&&$@&&&&&&&&&&.', '.&&&&&&&&&+&&#@%#+@#@*$%&+$&&&&&&&&.', '.&&&&&&&&&+&&#@#@&&@*%$%$+&&&&&&&&&.', '.&&&&&&&&&+&$%&#@&#@@#&#@$&&&&&&&&&.', '.&&&&&&&&@#@@$&*@&@#@#$#*#$&&&&&&&&.', '.&&&&&&&&&&&&&&&&&&&&&$%&%$&&&&&&&&.', '.&&&&&&&&&&$#@@$&&&&&&&&&&&&&&&&&&&.', '.&&&&&&&&&&&+&$%&$$@&$@&&$@&&&&&&&&.', '.&&&&&&&&&&&+&&#@%#+@#@*$%$+$&&&&&&.', '.&&&&&&&&&&&+&&#@#@&&@*#$%$+&&&&&&&.', '.&&&&&&&&&&&+&$+&*@&#@@#&#@$&&&&&&&.', '.&&&&&&&&&&$%@@&&*@&@#@#$#*#&&&&&&&.', '.&&&&&&&&&&&&&&&&&&&&&&&$%&%$&&&&&&.', '.&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&.', '.&&&&&&&&&&&&&&$#@@$&&&&&&&&&&&&&&&.', '.&&&&&&&&&&&&&&&+&$%&$$@&$@&&$@&&&&.', '.&&&&&&&&&&&&&&&+&&#@%#+@#@*$%$+$&&.', '.&&&&&&&&&&&&&&&+&&#@#@&&@*#$%$+&&&.', '.&&&&&&&&&&&&&&&+&$+&*@&#@@#&#@$&&&.', '.&&&&&&&&&&&&&&$%@@&&*@&@#@#$#*#&&&.', '.&&&&&&&&&&&&&&&&&&&&&&&&&&&$%&%$&&.', '.&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&.', '.&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&.', '.&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&.', '....................................'); @trashcan_closed_xpm = ( q{64 80 17 1}, q{ c None}, q{. c #030304}, q{+ c #5A5A5C}, q{@ c #323231}, q{# c #888888}, q{$ c #1E1E1F}, q{% c #767677}, q{& c #494949}, q{* c #9E9E9C}, q{= c #111111}, q{- c #3C3C3D}, q{; c #6B6B6B}, q{> c #949494}, q{, c #282828}, q{' c #808080}, q{) c #545454}, q{! c #AEAEAC}, q{ }, q{ }, q{ }, q{ }, q{ }, q{ }, q{ }, q{ }, q{ }, q{ }, q{ }, q{ }, q{ }, q{ }, q{ }, q{ }, q{ }, q{ }, q{ }, q{ }, q{ }, q{ }, q{ ==......=$$...=== }, q{ ..$------)+++++++++++++@$$... }, q{ ..=@@-------&+++++++++++++++++++-.... }, q{ =.$$@@@-&&)++++)-,$$$$=@@&+++++++++++++,..$ }, q{ .$$$$@@&+++++++&$$$@@@@-&,$,-++++++++++;;;&.. }, q{ $$$$,@--&++++++&$$)++++++++-,$&++++++;%%'%%;;$@ }, q{ .-@@-@-&++++++++-@++++++++++++,-++++++;''%;;;%*-$ }, q{ +------++++++++++++++++++++++++++++++;;%%%;;##*!. }, q{ =+----+++++++++++++++++++++++;;;;;;;;;;;;%'>>). }, q{ .=)&+++++++++++++++++;;;;;;;;;;;;;;%''>>#>#@. }, q{ =..=&++++++++++++;;;;;;;;;;;;;%###>>###+%== }, q{ .&....=-+++++%;;####''''''''''##'%%%)..#. }, q{ .+-++@....=,+%#####'%%%%%%%%%;@$-@-@*++!. }, q{ .+-++-+++-&-@$$=$=......$,,,@;&)+!++!++!. }, q{ .+-++-+++-+++++++++!++++!++++!+++!++!++!. }, q{ .+-++-+++-+++++++++!++++!++++!+++!++!++!. }, q{ .+-++-+++-+++++++++!++++!++++!+++!++!++!. }, q{ .+-++-+++-+++++++++!++++!++++!+++!++!++!. }, q{ .+-++-+++-+++++++++!++++!++++!+++!++!++!. }, q{ .+-++-+++-+++++++++!++++!++++!+++!++!++!. }, q{ .+-++-+++-+++++++++!++++!++++!+++!++!++!. }, q{ .+-++-+++-+++++++++!++++!++++!+++!++!++!. }, q{ .+-++-+++-+++++++++!++++!++++!+++!++!++!. }, q{ .+-++-+++-+++++++++!++++!++++!+++!++!++!. }, q{ .+-++-+++-+++++++++!++++!++++!+++!++!++!. }, q{ .+-++-+++-+++++++++!++++!++++!+++!++!++!. }, q{ .+-++-+++-+++++++++!++++!++++!+++!++!++!. }, q{ .+-++-+++-+++++++++!++++!++++!+++!++!++!. }, q{ .+-++-+++-+++++++++!++++!++++!+++!++!++!. }, q{ .+-++-+++-+++++++++!++++!++++!+++!++!++!. }, q{ .+-++-+++-+++++++++!++++!++++!+++!++!++!. }, q{ .+-++-+++-+++++++++!++++!++++!+++!++!++!. }, q{ .+-++-+++-+++++++++!++++!++++!+++!++!++!. }, q{ .+-++-+++-+++++++++!++++!++++!+++!++!++!. }, q{ .+-++-+++-+++++++++!++++!++++!+++!++!++!. }, q{ .+-++-+++-+++++++++!++++!++++!+++!++!++!. }, q{ .+-++-+++-+++++++++!++++!++++!+++!++!++!. }, q{ .+-++-+++-+++++++++!++++!++++!+++!++!++!. }, q{ .+-++-+++-+++++++++!++++!++++!+++!++!++!. }, q{ .+-++-+++-+++++++++!++++!++++!+++!++!++!. }, q{ .+-++-+++-+++++++++!++++!++++!+++!++!++!. }, q{ .+-++-+++-+++++++++!++++!++++!+++!++!++!. }, q{ .+-++-+++-+++++++++!++++!++++!+++!++!++!. }, q{ .+-++-+++-+++++++++!++++!++++!+++!++!++!. }, q{ =+-++-+++-+++++++++!++++!++++!+++!++!+++= }, q{ $.++-+++-+++++++++!++++!++++!+++!++!+.$ }, q{ =.++++++++++++++!++++!++++!+++!++.= }, q{ $..+++++++++++++++!++++++...$ }, q{ $$=.............=$$ }, q{ }, q{ }, q{ }, q{ }, q{ }, q{ }, q{ }, q{ }, q{ }); @trashcan_open_xpm = ( q{64 80 17 1}, q{ c None}, q{. c #030304}, q{+ c #5A5A5C}, q{@ c #323231}, q{# c #888888}, q{$ c #1E1E1F}, q{% c #767677}, q{& c #494949}, q{* c #9E9E9C}, q{= c #111111}, q{- c #3C3C3D}, q{; c #6B6B6B}, q{> c #949494}, q{, c #282828}, q{' c #808080}, q{) c #545454}, q{! c #AEAEAC}, q{ }, q{ }, q{ }, q{ }, q{ }, q{ }, q{ .=.==.,@ }, q{ ==.,@-&&&)-= }, q{ .$@,&++;;;%>*- }, q{ $,-+)+++%%;;'#+. }, q{ =---+++++;%%%;%##@. }, q{ @)++++++++;%%%%'#%$ }, q{ $&++++++++++;%%;%##@= }, q{ ,-++++)+++++++;;;'#%) }, q{ @+++&&--&)++++;;%'#'-. }, q{ ,&++-@@,,,,-)++;;;'>'+, }, q{ =-++&@$@&&&&-&+;;;%##%+@ }, q{ =,)+)-,@@&+++++;;;;%##%&@ }, q{ @--&&,,@&)++++++;;;;'#)@ }, q{ ---&)-,@)+++++++;;;%''+, }, q{ $--&)+&$-+++++++;;;%%'';- }, q{ .,-&+++-$&++++++;;;%''%&= }, q{ $,-&)++)-@++++++;;%''%), }, q{ =,@&)++++&&+++++;%'''+$@&++++++ }, q{ .$@-++++++++++++;'#';,........=$@&++++ }, q{ =$@@&)+++++++++++'##-.................=&++ }, q{ .$$@-&)+++++++++;%#+$.....................=)+ }, q{ $$,@-)+++++++++;%;@=........................,+ }, q{ .$$@@-++++++++)-)@=............................ }, q{ $,@---)++++&)@===............................,. }, q{ $-@---&)))-$$=..............................=)!. }, q{ --&-&&,,$=,==...........................=&+++!. }, q{ =,=$..=$+)+++++&@$=.............=$@&+++++!++!. }, q{ .)-++-+++++++++++++++++++++++++++!++!++!. }, q{ .+-++-+++++++++++++++++++++++!+++!++!++!. }, q{ .+-++-+++-+++++++++!+++!!++++!+++!++!++!. }, q{ .+-++-+++-+++++++++!++++!++++!+++!++!++!. }, q{ .+-++-+++-+++++++++!++++!++++!+++!++!++!. }, q{ .+-++-+++-+++++++++!++++!++++!+++!++!++!. }, q{ .+-++-+++-+++++++++!++++!++++!+++!++!++!. }, q{ .+-++-+++-+++++++++!++++!++++!+++!++!++!. }, q{ .+-++-+++-+++++++++!++++!++++!+++!++!++!. }, q{ .+-++-+++-+++++++++!++++!++++!+++!++!++!. }, q{ .+-++-+++-+++++++++!++++!++++!+++!++!++!. }, q{ .+-++-+++-+++++++++!++++!++++!+++!++!++!. }, q{ .+-++-+++-+++++++++!++++!++++!+++!++!++!. }, q{ .+-++-+++-+++++++++!++++!++++!+++!++!++!. }, q{ .+-++-+++-+++++++++!++++!++++!+++!++!++!. }, q{ .+-++-+++-+++++++++!++++!++++!+++!++!++!. }, q{ .+-++-+++-+++++++++!++++!++++!+++!++!++!. }, q{ .+-++-+++-+++++++++!++++!++++!+++!++!++!. }, q{ .+-++-+++-+++++++++!++++!++++!+++!++!++!. }, q{ .+-++-+++-+++++++++!++++!++++!+++!++!++!. }, q{ .+-++-+++-+++++++++!++++!++++!+++!++!++!. }, q{ .+-++-+++-+++++++++!++++!++++!+++!++!++!. }, q{ .+-++-+++-+++++++++!++++!++++!+++!++!++!. }, q{ .+-++-+++-+++++++++!++++!++++!+++!++!++!. }, q{ .+-++-+++-+++++++++!++++!++++!+++!++!++!. }, q{ .+-++-+++-+++++++++!++++!++++!+++!++!++!. }, q{ .+-++-+++-+++++++++!++++!++++!+++!++!++!. }, q{ .+-++-+++-+++++++++!++++!++++!+++!++!++!. }, q{ .+-++-+++-+++++++++!++++!++++!+++!++!++!. }, q{ .+-++-+++-+++++++++!++++!++++!+++!++!++!. }, q{ .+-++-+++-+++++++++!++++!++++!+++!++!++!. }, q{ .+-++-+++-+++++++++!++++!++++!+++!++!++!. }, q{ .+-++-+++-+++++++++!++++!++++!+++!++!++!. }, q{ =+-++-+++-+++++++++!++++!++++!+++!++!+++= }, q{ $.++-+++-+++++++++!++++!++++!+++!++!+.$ }, q{ =.++++++++++++++!++++!++++!+++!++.= }, q{ $..+++++++++++++++!++++++...$ }, q{ $$==...........==$$ }, q{ }, q{ }, q{ }, q{ }, q{ }, q{ }, q{ }, q{ }, q{ }); #' my ($have_drag); use constant TARGET_STRING => 0; use constant TARGET_ROOTWIN => 1; @target_table = ( {'target' => "STRING", 'flags' => [], 'info' => TARGET_STRING}, {'target' => "text/plain", 'flags' => [], 'info' => TARGET_STRING}, {'target' => "application/x-rootwin-drop", 'flags' => [], 'info' => TARGET_ROOTWIN}, ); sub target_drag_leave { my ($widget, $context, $time) = @_; print "leave\n"; $have_drag = 0; $widget->set_from_pixmap ($trashcan_closed, $trashcan_closed_mask); } sub target_drag_motion { my ($widget, $context, $x, $y, $time) = @_; my ($source_widget); if (!$have_drag) { $have_drag = 1; $widget->set_from_pixmap ($trashcan_open, $trashcan_open_mask); } $source_widget = $context->get_source_widget (); printf("motion, source %s\n", $source_widget ? ref($source_widget) : "unknown"); $context->status ($context->suggested_action, $time); return 1; } sub target_drag_drop { my ($widget, $context, $x, $y, $time) = @_; my ($atom); print "drop\n"; $have_drag = 0; $widget->set_from_pixmap ($trashcan_closed, $trashcan_closed_mask); if (($atom=$context->targets)) { $widget->drag_get_data($context, $atom, $time); return 1; } print "no targets in drop\n"; return 0; } sub target_drag_data_received { my ($widget, $context, $x, $y, $data, $info, $time) = @_; print "Receiving $data in trashcan\n"; print "\$data->length = ".$data->length."\n"; print "\$data->format = ".$data->format."\n"; if (($data->length >= 0) && ($data->format == 8)) { printf ("Received \"%s\" in trashcan\n", $data->data); $context->finish (1, 0, $time); return; } $context->finish (0, 0, $time); } sub label_drag_data_received { my ($widget, $context, $x, $y, $data, $info, $time) = @_; if (($data->length >= 0) && ($data->format == 8)) { printf ("Received \"%s\" in label\n", $data->data); $context->finish (1, 0, $time); return; } $context->finish (0, 0, $time); } sub source_drag_data_get { my ($widget, $context, $data, $info, $time) = @_; if ($info == TARGET_ROOTWIN) { print ("I was dropped on the rootwin\n"); } else { print "\$data is $data\n"; $data->set ($data->target, 8, "I'm Data!"); } } #/* The following is a rather elaborate example demonstrating/testing # * changing of the window heirarchy during a drag - in this case, # * via a "spring-loaded" popup window. # */ $popup_window = undef; $popped_up = 0; $in_popup = 0; $popdown_timer = 0; $popup_timer = 0; sub popdown_cb { $popdown_timer = 0; $popup_window->hide(); $popped_up = 0; return 0; } sub popup_motion { my ($widget, $context, $x, $y, $time) = @_; if (!$in_popup) { $in_popup = 1; if ($popdown_timer) { print ("removed popdown\n"); Glib::Source->remove ($popdown_timer); $popdown_timer = 0; } } return 1; } sub popup_leave { my ($widget, $context, $time) = @_; if ($in_popup) { $in_popup = 0; if ($popdown_timer) { print ("added popdown\n"); $popdown_timer = Gtk2::Timeout->add (500, \&popdown_cb); } } } sub popup_cb { if (!$popped_up) { if (!$popup_window) { my ($button, $table, $i, $j); $popup_window = Gtk2::Window->new ('popup'); $popup_window->set_position('mouse'); $table = Gtk2::Table->new (3, 3, 0); for ($i=0; $i<3; $i++) { for ($j=0; $j<3; $j++) { $button = new Gtk2::Button ("$i,$j"); $table->attach ($button, $i, $i+1, $j, $j+1, ['expand','fill'],['expand','fill'], 0, 0); $button->drag_dest_set ('all', ['copy', 'move'], @target_table[0..1]); # no rootwin $button->signal_connect ("drag_motion", \&popup_motion); $button->signal_connect ("drag_leave", \&popup_leave); } } $table->show_all (); $popup_window->add($table); } $popup_window->show; $popped_up = 1; } $popdown_timer = Glib::Timeout->add (500, \&popdown_cb); print ("added popdown\n"); $popup_timer = 0; return 0; } sub popsite_motion { my ($widget, $context, $x, $y, $time) = @_; if (!$popup_timer) { $popup_timer = Glib::Timeout->add (500, \&popup_cb); } return 1; } sub popsite_leave { my ($widget, $context, $time) = @_; if ($popup_timer) { Glib::Source->remove ($popup_timer); $popup_timer = 0; } } sub source_drag_data_delete { my ($widget, $context, $data) = @_; print ("Delete the data!\n"); } init Gtk2; $window = new Gtk2::Window; $window->signal_connect('destroy', sub {Gtk2->main_quit}); $table = new Gtk2::Table(2, 2, 0); $window->add($table); ($drag_icon, $drag_mask) = Gtk2::Gdk::Pixmap->colormap_create_from_xpm_d ( undef, $window->get_colormap(), undef, @drag_icon_xpm); ($trashcan_open, $trashcan_open_mask) = Gtk2::Gdk::Pixmap->colormap_create_from_xpm_d ( undef, $window->get_colormap(), undef, @trashcan_open_xpm); ($trashcan_closed, $trashcan_closed_mask) = Gtk2::Gdk::Pixmap->colormap_create_from_xpm_d ( undef, $window->get_colormap(), undef, @trashcan_closed_xpm); $label = new Gtk2::Label("Drop Here\n"); $label->drag_dest_set('all', ['copy', 'move'], @target_table[0..1]); # no rootwin $label->signal_connect("drag_data_received", \&label_drag_data_received); $table->attach ($label, 0, 1, 0, 1, ['expand', 'fill'], ['expand', 'fill'], 0, 0); $label = new Gtk2::Label("Popup\n"); $label->drag_dest_set('all', ['copy', 'move'], @target_table[0..1]); # no rootwin $table->attach ($label, 1, 2, 1, 2, ['expand', 'fill'], ['expand', 'fill'], 0, 0); $label->signal_connect ("drag_motion", \&popsite_motion); $label->signal_connect ("drag_leave", \&popsite_leave); $pixmap = Gtk2::Image->new_from_pixmap ($trashcan_closed, $trashcan_closed_mask); $pixmap->drag_dest_set ([], []); $table->attach ($pixmap, 1, 2, 0, 1, ['expand', 'fill'], ['expand', 'fill'], 0, 0); $pixmap->signal_connect ("drag_leave", \&target_drag_leave); $pixmap->signal_connect ("drag_motion", \&target_drag_motion); $pixmap->signal_connect ("drag_drop", \&target_drag_drop); $pixmap->signal_connect ("drag_data_received", \&target_drag_data_received); # Drag site $button = new Gtk2::Button ("Drag Here\n"); $button->drag_source_set (['button1_mask', 'button3_mask'], ['copy', 'move'], @target_table); $button->drag_source_set_icon ($window->get_colormap, $drag_icon, $drag_mask); $table->attach ($button, 0, 1, 1, 2, ['expand', 'fill'], ['expand', 'fill'], 0, 0); $button->signal_connect ("drag_data_get", \&source_drag_data_get); $button->signal_connect ("drag_data_delete", \&source_drag_data_delete); $window->show_all; Gtk2->main (); exit(0); Gtk2-1.24993/examples/cairo-clock.pl000644 001750 000024 00000007331 11664366546 017333 0ustar00brianstaff000000 000000 # This is a Perl port of the EggClockFace code by Davyd Madeley presented in # , # and # . # # For the original C code: # Copyright (c) 2005-2006, Davyd Madeley # # Unfortunately, I don't remember who wrote the Perl port. package Egg::ClockFace; use warnings; use strict; use Glib qw/TRUE FALSE/; use Gtk2; use Cairo; use Math::Trig; use Glib::Object::Subclass Gtk2::DrawingArea::, signals => { expose_event => \&expose, }; sub min { return ($_[0] < $_[1] ? $_[0] : $_[1]); } sub draw { my $self = shift; my $cr = $self->{cr}; return FALSE unless $cr; my $width = $self->allocation->width; my $height = $self->allocation->height; $cr->scale($width, $height); $cr->translate(0.5, 0.5); $cr->set_line_width($self->{line_width}); $cr->save; $cr->set_source_rgba (0.337, 0.612, 0.117, 0.9); $cr->paint; $cr->restore; $cr->arc (0, 0, $self->{radius}, 0, 2 * Math::Trig::pi); $cr->save; $cr->set_source_rgba (1.0, 1.0, 1.0, 0.8); $cr->fill_preserve; $cr->restore; $cr->stroke_preserve; $cr->clip; for (1 .. 12) { my $inset = 0.05; $cr->save; $cr->set_line_cap('round'); if ($_ % 3 != 0) { $inset *= 0.8; $cr->set_line_width(0.03); } $cr->move_to(($self->{radius} - $inset) * cos ($_ * Math::Trig::pi / 6), ($self->{radius} - $inset) * sin ($_ * Math::Trig::pi / 6)); $cr->line_to($self->{radius} * cos ($_ * Math::Trig::pi / 6), $self->{radius} * sin ($_ * Math::Trig::pi / 6)); $cr->stroke; $cr->restore; } my @time = localtime; my $hours = $time[2] * Math::Trig::pi / 6; my $minutes = $time[1] * Math::Trig::pi / 30; my $seconds = $time[0] * Math::Trig::pi / 30; $cr->save; $cr->set_line_cap('round'); # seconds $cr->save; $cr->set_line_width($self->{line_width} / 3); $cr->set_source_rgba(1.0, 0.0, 0.0, 0.8); $cr->move_to(0, 0); $cr->line_to( sin($seconds) * ($self->{radius} * .9), -1 * cos($seconds) * ($self->{radius} * .9)); $cr->stroke; $cr->restore; # minutes; $cr->set_source_rgba(0.7, 0.7, 0.7, 0.8); $cr->move_to(0, 0); $cr->line_to( sin($minutes + $seconds / 60) * ($self->{radius} * 0.8), -1 * cos($minutes + $seconds / 60) * ($self->{radius} * 0.8)); $cr->stroke; # hours $cr->set_source_rgba(0.117, 0.337, 0.612, 0.9); $cr->move_to(0, 0); $cr->line_to( sin($hours + $minutes / 12.0) * ($self->{radius} * 0.5), -1 * cos($hours + $minutes / 12.0) * ($self->{radius} * 0.5)); $cr->stroke; $cr->restore; # dot $cr->arc(0, 0, $self->{line_width} / 3.0, 0, 2 * Math::Trig::pi); $cr->fill; return TRUE; } sub expose { my ($self, $event) = @_; my $cr = Gtk2::Gdk::Cairo::Context->create($self->window); $cr->rectangle ($event->area->x, $event->area->y, $event->area->width, $event->area->height); $cr->clip; $self->{cr} = $cr; $self->draw; $self->{timeout} = Glib::Timeout->add(1000, sub { my $self = shift; my $alloc = $self->allocation; my $rect = Gtk2::Gdk::Rectangle->new(0, 0, $alloc->width, $alloc->height); $self->window->invalidate_rect($rect, FALSE); return TRUE; }, $self) unless $self->{timeout}; return FALSE; } sub INIT_INSTANCE { my $self = shift; $self->{line_width} = 0.05; $self->{radius} = 0.42; } sub FINALIZE_INSTANCE { my $self = shift; Glib::Source->remove($self->{timeout}) if $self->{timeout}; } 1; package main; use Gtk2 '-init'; my $window = Gtk2::Window->new('toplevel'); my $clock = Egg::ClockFace->new; $window->add($clock); $window->signal_connect(destroy => sub { Gtk2->main_quit; }); $window->show_all; Gtk2->main; 0; Gtk2-1.24993/examples/insert-text-test.pl000644 001750 000024 00000002570 11664366546 020410 0ustar00brianstaff000000 000000 =doc Use the insert-text signal to trap and possibly mangle text as the user types, but before it is committed and displayed. =cut use Gtk2 -init; use Data::Dumper; $dialog = Gtk2::Dialog->new; $dialog->add_button ('gtk-close' => 'close'); $entry = Gtk2::Entry->new; $entry->set_activates_default (1); $entry->signal_connect ('insert-text' => sub { my ($widget, $string, $len, $position) = @_; if ($string eq '-') { $_[1] = '_'; $_[3]--; } elsif ($string eq 'ee') { $_[1] = ' '; } elsif ($string eq '#') { # just can't insert these. $entry->signal_stop_emission_by_name ('insert-text'); warn "NOSOUPFORYOU!!\n"; } () # this callback must return either 2 or 0 items. }); $dialog->vbox->pack_start ($entry, 0, 0, 0); $entry->show; $label = Gtk2::Label->new; $label->set_markup ('using a handler for insert-text, this entry turns dashes into underscores (moved back one space), turns the string "ee" into something else (you\'ll have to paste it), and won\'t let you type a #.'); $dialog->vbox->pack_start ($label, 1,1, 0); $label->show; # while we're testing custom marshallers, connect to dialog's response # signal, which also has a custom marshaller. if the blue smoke gets # out, then something i broken deep inside. $dialog->signal_connect (response => sub { print Dumper(\@_); Gtk2->main_quit; }); $dialog->show; Gtk2->main; Gtk2-1.24993/examples/customlist.pl000644 001750 000024 00000031034 11664366546 017350 0ustar00brianstaff000000 000000 # ported from Tim-Phillip Mueller's Tree View tutorial, # http://scentric.net/tutorial/sec-custom-models.html # package CustomList; use Glib qw(TRUE FALSE); use Gtk2; use Carp; use Data::Dumper; use strict; use warnings; # maybe bad style, but makes life a lot easier use base Exporter::; our @EXPORT = qw/ CUSTOM_LIST_COL_RECORD CUSTOM_LIST_COL_NAME CUSTOM_LIST_COL_YEAR_BORN CUSTOM_LIST_N_COLUMNS /; # The data columns that we export via the tree model interface use constant { CUSTOM_LIST_COL_RECORD => 0, CUSTOM_LIST_COL_NAME => 1, CUSTOM_LIST_COL_YEAR_BORN => 2, CUSTOM_LIST_N_COLUMNS => 3, }; # # here we register our new type and its interfaces with the type system. # If you want to implement additional interfaces like GtkTreeSortable, # you will need to do it here. # use Glib::Object::Subclass Glib::Object::, interfaces => [ Gtk2::TreeModel:: ], ; # # this is called everytime a new custom list object # instance is created (we do that in custom_list_new). # Initialise the list structure's fields here. # sub INIT_INSTANCE { my $self = shift; $self->{n_columns} = CUSTOM_LIST_N_COLUMNS; $self->{column_types} = [ 'Glib::Scalar', # CUSTOM_LIST_COL_RECORD 'Glib::String', # CUSTOM_LIST_COL_NAME 'Glib::Uint', # CUSTOM_LIST_COL_YEAR_BORN ]; $self->{rows} = []; # Random int to check whether an iter belongs to our model $self->{stamp} = sprintf '%d', rand (1<<31); } # # this is called just before a custom list is # destroyed. Free dynamically allocated memory here. # sub FINALIZE_INSTANCE { my $self = shift; # free all records and free all memory used by the list #warning IMPLEMENT } # # tells the rest of the world whether our tree model has any special # characteristics. In our case, we have a list model (instead of a tree). # Note that unlike the C version of this custom model, our iters do NOT # persist. # #sub GET_FLAGS { [qw/list-only iters-persist/] } sub GET_FLAGS { [qw/list-only/] } # # tells the rest of the world how many data # columns we export via the tree model interface # sub GET_N_COLUMNS { shift->{n_columns}; } # # tells the rest of the world which type of # data an exported model column contains # sub GET_COLUMN_TYPE { my ($self, $index) = @_; # and invalid index will send undef back to the calling XS layer, # which will croak. return $self->{column_types}[$index]; } # # converts a tree path (physical position) into a # tree iter structure (the content of the iter # fields will only be used internally by our model). # We simply store a pointer to our CustomRecord # structure that represents that row in the tree iter. # sub GET_ITER { my ($self, $path) = @_; die "no path" unless $path; my @indices = $path->get_indices; my $depth = $path->get_depth; # we do not allow children # depth 1 = top level; a list only has top level nodes and no children die "depth != 1" unless $depth == 1; my $n = $indices[0]; # the n-th top level row return undef if $n >= @{$self->{rows}} || $n < 0; my $record = $self->{rows}[$n]; die "no record" unless $record; die "bad record" unless $record->{pos} == $n; # We simply store a pointer to our custom record in the iter return [ $self->{stamp}, $n, $record, undef ]; } # # custom_list_get_path: converts a tree iter into a tree path (ie. the # physical position of that row in the list). # sub GET_PATH { my ($self, $iter) = @_; die "no iter" unless $iter; my $record = $iter->[2]; my $path = Gtk2::TreePath->new; $path->append_index ($record->{pos}); return $path; } # # custom_list_get_value: Returns a row's exported data columns # (_get_value is what gtk_tree_model_get uses) # sub GET_VALUE { my ($self, $iter, $column) = @_; die "bad iter" unless $iter; return undef unless $column < @{$self->{column_types}}; my $record = $iter->[2]; return undef unless $record; die "bad iter" if $record->{pos} >= @{$self->{rows}}; if ($column == CUSTOM_LIST_COL_RECORD) { return $record; } elsif ($column == CUSTOM_LIST_COL_NAME) { return $record->{name}; } elsif ($column == CUSTOM_LIST_COL_YEAR_BORN) { return $record->{year_born}; } } # # iter_next: Takes an iter structure and sets it to point to the next row. # sub ITER_NEXT { my ($self, $iter) = @_; return undef unless $iter && $iter->[2]; my $record = $iter->[2]; # Is this the last record in the list? return undef if $record->{pos} >= @{ $self->{rows} }; my $nextrecord = $self->{rows}[$record->{pos} + 1]; return undef unless $nextrecord; die "invalid record" unless $nextrecord->{pos} == ($record->{pos} + 1); return [ $self->{stamp}, $nextrecord->{pos}, $nextrecord, undef ]; } # # iter_children: Returns TRUE or FALSE depending on whether the row # specified by 'parent' has any children. If it has # children, then 'iter' is set to point to the first # child. Special case: if 'parent' is undef, then the # first top-level row should be returned if it exists. # sub ITER_CHILDREN { my ($self, $parent) = @_; ### return undef unless $parent and $parent->[1]; # this is a list, nodes have no children return undef if $parent; # parent == NULL is a special case; we need to return the first top-level row # No rows => no first row return undef unless @{ $self->{rows} }; # Set iter to first item in list return [ $self->{stamp}, 0, $self->{rows}[0] ]; } # # iter_has_child: Returns TRUE or FALSE depending on whether # the row specified by 'iter' has any children. # We only have a list and thus no children. # sub ITER_HAS_CHILD { FALSE } # # iter_n_children: Returns the number of children the row specified by # 'iter' has. This is usually 0, as we only have a list # and thus do not have any children to any rows. # A special case is when 'iter' is undef, in which case # we need to return the number of top-level nodes, ie. # the number of rows in our list. # sub ITER_N_CHILDREN { my ($self, $iter) = @_; # special case: if iter == NULL, return number of top-level rows return scalar @{$self->{rows}} if ! $iter; return 0; # otherwise, this is easy again for a list } # # iter_nth_child: If the row specified by 'parent' has any children, # set 'iter' to the n-th child and return TRUE if it # exists, otherwise FALSE. A special case is when # 'parent' is NULL, in which case we need to set 'iter' # to the n-th row if it exists. # sub ITER_NTH_CHILD { my ($self, $parent, $n) = @_; # a list has only top-level rows return undef if $parent; # special case: if parent == NULL, set iter to n-th top-level row return undef if $n >= @{$self->{rows}}; my $record = $self->{rows}[$n]; die "no record" unless $record; die "bad record" unless $record->{pos} == $n; return [ $self->{stamp}, $n, $record ]; } # # iter_parent: Point 'iter' to the parent node of 'child'. As we have a # a list and thus no children and no parents of children, # we can just return FALSE. # sub ITER_PARENT { FALSE } # # ref_node and unref_node get called as the model manages the lifetimes # of nodes in the model. you normally don't need to do anything for these, # but may want to if you plan to implement data caching. # #sub REF_NODE { warn "REF_NODE @_\n"; } #sub UNREF_NODE { warn "UNREF_NODE @_\n"; } # # new: This is what you use in your own code to create a # new custom list tree model for you to use. # # we inherit new from Glib::Object::Subclass # # set: It's always nice to be able to update the data stored in a data # structure. So, here's a method to let you do that. We emit the # 'row-changed' signal to notify all who care that we've updated # something. # sub set { my $self = shift; my $treeiter = shift; # create (col, value) pairs to update. my %vals = @_; # Convert the Gtk2::TreeIter to a more useable array reference. # Note that the model's stamp must be passed in as an argument. # This is so we can avoid trying to extract the guts of an iter # that we did not create in the first place. my $iter = $treeiter->to_arrayref($self->{stamp}); my $record = $iter->[2]; while (my ($col, $val) = each %vals) { if ($col == CUSTOM_LIST_COL_NAME) { $record->{name} = $val; } elsif ($col == CUSTOM_LIST_COL_YEAR_BORN) { $record->{year_born} = $val; } elsif ($col == CUSTOM_LIST_COL_RECORD) { warn "Can't update the value of the Record column!"; } else { warn "Invalid column used in set method!"; } } $self->row_changed ($self->get_path ($treeiter), $treeiter); } # # get_iter_from_name: Sometimes, you have a bit of information that # uniquely identifies a record in your TreeModel, # but it doesn't convert easily to a TreePath, # so it's hard to get a TreeIter out of it. This # is an example of how to make a TreeModel that # can get iterators without having to find the path # first. # sub get_iter_from_name { my $self = shift; my $name = shift; my ($record, $n); for (0..scalar (@{$self->{rows}})) { if ($self->{rows}[$_]->{name} eq $name) { $record = $self->{rows}[$_]; $n = $_; last; } } return Gtk2::TreeIter->new_from_arrayref([$self->{stamp}, $n, $record, undef]); } # # append_record: Empty lists are boring. This function can be used in your # own code to add rows to the list. Note how we emit the # "row-inserted" signal after we have appended the row # so the tree view and other interested objects know about # the new row. # sub append_record { my ($self, $name, $year_born) = @_; croak "usage: \$list->append_record (NAME, YEAR_BORN)" unless $name; my $newrecord = { name => $name, # name_collate_key => g_utf8_collate_key(name,-1), # for fast sorting, used later year_born => $year_born, }; push @{ $self->{rows} }, $newrecord; $newrecord->{pos} = @{$self->{rows}} - 1; # inform the tree view and other interested objects # (e.g. tree row references) that we have inserted # a new row, and where it was inserted my $path = Gtk2::TreePath->new; $path->append_index ($newrecord->{pos}); $self->row_inserted ($path, $self->get_iter ($path)); } ############################################################################ ############################################################################ ############################################################################ package main; no strict 'subs'; use Glib qw(TRUE FALSE); use Gtk2 -init; import CustomList; sub fill_model { my $customlist = shift; my @firstnames = qw(Joe Jane William Hannibal Timothy Gargamel); my @surnames = qw(Grokowich Twitch Borheimer Bork); foreach my $sname (@surnames) { foreach my $fname (@firstnames) { $customlist->append_record ("$fname $sname", 1900 + rand (103.0)) } } } sub create_view_and_model { my $customlist = CustomList->new; fill_model ($customlist); my $view = Gtk2::TreeView->new ($customlist); my $renderer = Gtk2::CellRendererText->new; my $col = Gtk2::TreeViewColumn->new; $col->pack_start ($renderer, TRUE); $col->add_attribute ($renderer, text => &CustomList::CUSTOM_LIST_COL_NAME); $col->set_title ("Name"); $view->append_column ($col); $renderer->set (editable => TRUE); $renderer->signal_connect (edited => sub { my ($cell, $pathstring, $newtext, $model) = @_; my $path = Gtk2::TreePath->new_from_string ($pathstring); my $iter = $model->get_iter ($path); $model->set ($iter, &CustomList::CUSTOM_LIST_COL_NAME, $newtext); }, $customlist); $renderer = Gtk2::CellRendererText->new; $col = Gtk2::TreeViewColumn->new; $col->pack_start ($renderer, TRUE); $col->add_attribute ($renderer, text => &CustomList::CUSTOM_LIST_COL_YEAR_BORN); $col->set_title ("Year Born"); $view->append_column ($col); return $view; } { my $window = Gtk2::Window->new; $window->set_default_size (200, 400); $window->signal_connect (delete_event => sub {Gtk2->main_quit; 0}); my $view = create_view_and_model(); my $scrollwin = Gtk2::ScrolledWindow->new; $scrollwin->add ($view); $window->add ($scrollwin); $window->show_all; Gtk2->main; exit 0; } ############################################################################ ############################################################################ ############################################################################ Gtk2-1.24993/examples/dialog.pl000644 001750 000024 00000005715 11664366546 016410 0ustar00brianstaff000000 000000 #!/usr/bin/perl =doc gtk+ 2.x provides a nice enhancement to the Dialog API, allowing you to use the idea of responses instead of just connecting to buttons, and making modal dialogs very easy. There are two ways to use the Gtk2::Dialog -- by calling $dialog->run() for modal dialogs, or by connecting to the response signal and handling things yourself, usually for modeless dialogs. =cut use strict; use warnings; use Glib qw(TRUE FALSE); use Gtk2 '-init'; ### begin run type dialog # if you want to pop up a simple dialog to get or provide some information this # is probably the way you want to go. my $dialog = Gtk2::Dialog->new ('Run Dialog Demo', undef, 'modal', 'gtk-ok' => 'ok', # response ids may be one of the built-in enums... '_Reset' => 2, # or any positive integer. ); # put an hbox with a label and entry into the dialog's vbox area. my $hbox = Gtk2::HBox->new (FALSE, 6); $hbox->pack_start (Gtk2::Label->new ('Test:'), TRUE, TRUE, 0); my $entry = Gtk2::Entry->new; $hbox->pack_start ($entry, TRUE, TRUE, 0); $hbox->show_all; # the dialog provides a vbox for the area at the top, where your # own widgets go. $dialog->vbox->pack_start ($hbox, TRUE, TRUE, 0); # Set which response is the default: $dialog->set_default_response ('ok'); # A very common usability enhancement is to allow hitting Enter in the # entry to activate the default response. This turns that on: $entry->set_activates_default (TRUE); # run the dialog. this will show for you. my $response = $dialog->run; # when a button is clicked the dialog will go away and the response (clicked # button) will be returned from the call to run print "The user clicked: $response\n"; print 'The text entry was: '.$entry->get_text."\n"; ### begin callback type dialog # we'll reuse the same dialog, but use it differently. this time only the ok # button will exit the dialog, the reset button will empty the text entry. this # type of dialog is useful in cases where persistence is desired. # change the dialog's title $dialog->set (title => 'Callback Dialog Demo'); # connect a signal to the dialog's response signal. $dialog->signal_connect (response => sub { # get our params shift; # we don't need the dialog $response = shift; # the clicked button print "The user clicked: $response\n"; print 'The text entry was: '.$entry->get_text."\n"; if ($response eq 'ok') { # the user clicked ok Gtk2->main_quit; } elsif ($response eq 'delete-event') { # Because we didn't connect anything to delete-event # directly, the default handler will still destroy # the window. By the time we get here, the window # will be gone already, and the only thing for it in # this example is to quit. Gtk2->main_quit; } else # if ($response == 2) { # the user clicked reset $entry->set_text (''); } }); # show the dialog $dialog->show; # and enter a main loop so that it will become interactive, the main loop will # be quit by the callback attached to response. Gtk2->main; Gtk2-1.24993/examples/attributes.pl000644 001750 000024 00000001462 11664366546 017332 0ustar00brianstaff000000 000000 #!/usr/bin/perl use strict; use warnings; use Glib qw(TRUE FALSE); use Gtk2 -init; my $window = Gtk2::Window->new; my $box = Gtk2::VBox->new; my @labels = ( ["Light, Oblique" => ['light', 'oblique']], ["Normal, Normal" => ['normal', 'normal']], ["Bold, Italic" => ['bold', 'italic']], ); foreach (@labels) { my ($string, $attrs) = @{$_}; my ($weight, $style) = @{$attrs}; my $list = Gtk2::Pango::AttrList->new; $list->insert ( Gtk2::Pango::AttrWeight->new ($weight, 0, length $string)); $list->insert ( Gtk2::Pango::AttrStyle->new ($style, 0, length $string)); my $label = Gtk2::Label->new ($string); $label->set_attributes ($list); $box->add ($label); } $window->add ($box); $window->show_all; $window->signal_connect(delete_event => sub { Gtk2->main_quit; }); Gtk2->main; Gtk2-1.24993/examples/color_list.pl000644 001750 000024 00000005070 11664366546 017314 0ustar00brianstaff000000 000000 #!/usr/bin/perl =doc This example shows one way to colorize rows in a SimpleList. The basic approach is to add a color attribute to the columns in the TreeView (remember that a SimpleList is a TreeView), and store the color information in a hidden column in the model. Since the Glib type system will be used to fetch the color attribute, the hidden column must be of type Gtk2::Gdk::Color, which requires us to add a custom column type to SimpleList. =cut use strict; use warnings; use Glib qw/TRUE FALSE/; use Gtk2 -init; use Gtk2::SimpleList; # in gtk+ 2.0.x, the cell renderers don't have the cell_background_gdk # property, so this test doesn't work right and spews messages. object # properties require no extra binding glue, so if you've upgraded to # gtk+ 2.2.x or newer after installing Gtk2-Perl, this test will magically # start to work. thus, this is one of those rare times when we need to # use the lower-case runtime version check. my $msg = Gtk2->check_version (2,2,0); die "This example requires gtk+ 2.2.0, but we're linked against " . join (".", Gtk2->get_version_info)."\n" . "$msg\n" if $msg; # add a new hidden column that holds a Gtk2::Gdk::Color. Gtk2::SimpleList->add_column_type( 'color', type => 'Gtk2::Gdk::Color', renderer => 'Gtk2::CellRendererText', attr => 'hidden', ); my $slist = Gtk2::SimpleList->new ( 'Text Field' => 'text', 'Int Field' => 'int', 'Bool Field' => 'bool', 'row color' => 'color', ); # # add a color attribute to each column, getting the color information # from the hidden column. # foreach my $col ($slist->get_columns) { foreach my $cell ($col->get_cell_renderers) { $col->add_attribute ($cell, cell_background_gdk => 3); } } # # now put some data into the list; note the data for the hidden column. # we'll leave a couple of rows uncolored. # @{$slist->{data}} = ( [ 'Red', 1, FALSE, Gtk2::Gdk::Color->new (0xFFFF, 0, 0) ], [ 'Green', 2, TRUE, Gtk2::Gdk::Color->new (0, 0xFFFF, 0) ], [ 'Blue', 3, FALSE, Gtk2::Gdk::Color->new (0, 0, 0xFFFF) ], [ 'Cyan', 4, TRUE, Gtk2::Gdk::Color->new (0, 0xFFFF, 0xFFFF) ], [ 'Magenta', 5, FALSE, Gtk2::Gdk::Color->new (0xFFFF, 0, 0xFFFF) ], [ 'Yellow', 6, TRUE, Gtk2::Gdk::Color->new (0xFFFF, 0xFFFF, 0) ], [ 'plain', 7, FALSE, undef ], [ 'plain', 8, TRUE, undef ], ); # the rest is uninteresting. my $win = Gtk2::Window->new; $win->set_title ('Colorizing A List'); $win->set_border_width (6); $win->signal_connect (delete_event => sub { Gtk2->main_quit; }); $win->add ($slist); $win->show_all; Gtk2->main; Gtk2-1.24993/examples/offscreen_rotation.pl000644 001750 000024 00000014460 11664366546 021037 0ustar00brianstaff000000 000000 #!/usr/bin/perl use strict; use warnings; use Glib qw(TRUE FALSE); use Gtk2 '-init'; use Cairo; my $window = Gtk2::Window->new; $window->set_title("Rotation example"); $window->signal_connect( delete_event => sub { exit } ); $window->set_border_width(5); my $rotated= Gtk2::Ex::RotatedBin->new; my $entry=Gtk2::Entry->new; my $button=Gtk2::Button->new_from_stock('gtk-ok'); $button->signal_connect(clicked=>sub {warn "clicked\n";}); my $checkh=Gtk2::CheckButton->new('mirror horizontally'); $checkh->signal_connect(toggled=>sub { $rotated->set_mirror( horizontal=> $_[0]->get_active ) }); my $checkv=Gtk2::CheckButton->new('mirror vertically'); $checkv->signal_connect(toggled=>sub { $rotated->set_mirror( vertical=> $_[0]->get_active ) }); my $adj=Gtk2::Adjustment->new(10, 0, 360, 1,10,0); $adj->signal_connect(value_changed=> sub { $rotated->set_angle( $_[0]->value ); }); my $scale=Gtk2::HScale->new($adj); my $vbox=Gtk2::VBox->new; $vbox->add($_) for $entry,$button,$checkh,$checkv,$scale; $rotated->add($vbox); $window->add($rotated); $window->show_all; #Gtk2::Gdk::Window->set_debug_updates(1); Gtk2->main; #FIXME the child needs to be added before the RotatedBin is realized # I haven't managed to make it work if the child is added or replaced after package Gtk2::Ex::RotatedBin; use Gtk2; use List::Util qw/min max/; use Glib::Object::Subclass Gtk2::EventBox::, signals => { size_allocate => \&do_size_allocate, size_request => \&do_size_request, }; use constant PI => 4 * atan2(1,1); # needed for the rotation sub INIT_INSTANCE { my $self=shift; $self->{angle}=10; $self->signal_connect( expose_event => \&expose_cb); $self->signal_connect( damage_event => \&damage_cb); $self->signal_connect( realize => \&realize_cb); return $self; } sub do_size_request { my ($self,$req)=@_; my $border= $self->get_border_width; my $child_req=$self->child->size_request; my $w= $child_req->width; my $h= $child_req->height; my $diag= sqrt( $w**2 + $h**2 ); $diag= 1+int $diag unless int($diag)==$diag; #round up # request enough to satisfy the child request for any angle $req->width( $diag+$border*2 ); $req->height( $diag+$border*2 ); } sub do_size_allocate { my ($self,$alloc)=@_; my $border= $self->get_border_width; my ($x,$y,$w,$h)=$alloc->values; my $olda=$self->allocation; $olda->x($x); $olda->width($w); $olda->y($y); $olda->height($h); $w-= 2*$border; $h-= 2*$border; $self->window->move_resize($x+$border,$y+$border,$w,$h) if $self->window; $self->update_matrix; } sub set_angle { my ($self,$angle)=@_; $self->{angle}=$angle; $self->update_matrix; $self->queue_resize; } sub set_mirror { my ($self,$h_or_v,$on)=@_; my $key= $h_or_v eq 'vertical' ? 'vmirror' : 'hmirror'; $self->{$key}=$on; $self->update_matrix; $self->queue_draw; } # transform the rectangle and find a rectangle containing the transformed rectangle sub transform_expose_rectangle { my ($self,$rect,$inv)=@_; my ($x,$y,$w,$h)=$rect->values; my $matrix= $inv ? $self->{imatrix} : $self->{matrix}; my ($xa,$ya)=$matrix->transform_point($x, $y); my ($xb,$yb)=$matrix->transform_point($x+$w,$y); my ($xc,$yc)=$matrix->transform_point($x, $y+$h); my ($xd,$yd)=$matrix->transform_point($x+$w,$y+$h); $x= min($xa,$xb,$xc,$xd); $y= min($ya,$yb,$yc,$yd); $w= max($xa,$xb,$xc,$xd) -$x; $h= max($ya,$yb,$yc,$yd) -$y; return Gtk2::Gdk::Rectangle->new($x,$y,$w,$h); } sub update_matrix { my $self=shift; my ($x,$y,$w,$h)= $self->allocation->values; my $border= $self->get_border_width; $x+=$border; $w-=2*$border; $y+=$border; $h-=2*$border; my $angle= $self->{angle}*PI/180; my $matrix0=Cairo::Matrix->init_rotate($angle); my ($xa,$ya)=$matrix0->transform_distance(0,0); my ($xb,$yb)=$matrix0->transform_distance($w,0); my ($xc,$yc)=$matrix0->transform_distance(0,$h); my ($xd,$yd)=$matrix0->transform_distance($w,$h); my $rw= $w / ( max($xa,$xb,$xc,$xd) - min($xa,$xb,$xc,$xd) ); my $rh= $h / ( max($ya,$yb,$yc,$yd) - min($ya,$yb,$yc,$yd) ); my $r= min($rw,$rh); my $cw= $w*$r; my $ch= $h*$r; my $matrix=Cairo::Matrix->init_identity; $matrix->translate($w/2,$h/2); $matrix->rotate($angle); $matrix->translate( -$cw/2,-$ch/2 ); if ($self->{hmirror}) { $matrix->scale(-1,1); $matrix->translate( -$cw,0 ); } if ($self->{vmirror}) { $matrix->scale(1,-1); $matrix->translate( 0,-$ch ); } $self->{matrix}=$matrix; my $imatrix= $matrix->multiply( Cairo::Matrix->init_identity ); #copy matrix $imatrix->invert; $self->{imatrix}= $imatrix; if (my $o=$self->{offscreen}) { $o->{matrix}= $self->{matrix}; $o->{imatrix}=$self->{imatrix}; $o->move_resize(0,0,$cw,$ch); $o->geometry_changed; } if (my $child=$self->child) { my $rect=Gtk2::Gdk::Rectangle->new(0,0, $cw,$ch); $self->child->size_allocate($rect); } } sub damage_cb { my ($self,$event)=@_; my $rect= transform_expose_rectangle($self,$event->area); $self->window->invalidate_rect( $rect, 0); 1; } sub realize_cb { my ($self)=@_; my ($x,$y,$w,$h)=$self->allocation->values; my %attr= ( window_type => 'offscreen', wclass => 'output', event_mask => [qw/pointer-motion-mask button-press-mask button-release-mask exposure_mask/], ); $self->{offscreen}= my $offscreen= Gtk2::Gdk::Window->new($self->get_root_window,\%attr); $self->update_matrix; # will resize $offscreen to the correct size $offscreen->set_user_data($self->Glib::Object::get_pointer()); $self->window->signal_connect( pick_embedded_child =>sub { return $offscreen; }); #could check if transformed position is inside offscreen window $self->child->set_parent_window($offscreen) if $self->child; $offscreen->set_embedder($self->window); $offscreen->signal_connect( to_embedder => sub { return $_[0]{ matrix}->transform_point($_[1],$_[2]); }); $offscreen->signal_connect( from_embedder=> sub { return $_[0]{imatrix}->transform_point($_[1],$_[2]); }); $self->style->set_background($offscreen,'normal'); $offscreen->show; } sub expose_cb { my ($self,$event)=@_; my $offscreen= $self->{offscreen}; if ($event->window == $self->window) { my $pixmap = $offscreen->get_pixmap; return 1 unless $pixmap; my $cr=Gtk2::Gdk::Cairo::Context->create($self->window); $cr->rectangle($event->area); $cr->clip; $cr->set_matrix( $self->{matrix} ); $cr->set_source_pixmap($pixmap,0,0); $cr->paint; } elsif ($event->window == $offscreen) { $self->propagate_expose($self->child,$event) if $self->child; } 1; } Gtk2-1.24993/examples/offscreen_reflection.pl000644 001750 000024 00000011156 11664366546 021331 0ustar00brianstaff000000 000000 #!/usr/bin/perl use strict; use warnings; use Glib qw(TRUE FALSE); use Gtk2 '-init'; use Cairo; my $window = Gtk2::Window->new; $window->set_title("Reflection example"); $window->signal_connect( delete_event => sub { exit } ); $window->set_border_width(10); my $reflected= Gtk2::Ex::ReflectBin->new; my $entry=Gtk2::Entry->new; my $button1=Gtk2::Button->new; $button1->add( Gtk2::Image->new_from_stock('gtk-go-back','button') ); $button1->signal_connect(clicked=>sub {warn "button 1 clicked\n";}); my $button2=Gtk2::Button->new; $button2->add( Gtk2::Image->new_from_stock('gtk-apply','button') ); $button2->signal_connect(clicked=>sub {warn "button 2 clicked\n";}); my $hbox=Gtk2::HBox->new; $hbox->pack_start($button1,FALSE,FALSE,2); $hbox->add($entry); $hbox->pack_start($button2,FALSE,FALSE,2); $reflected->add($hbox); $window->add($reflected); $window->show_all; Gtk2->main; package Gtk2::Ex::ReflectBin; use Gtk2; use Glib::Object::Subclass Gtk2::EventBox::, signals => { size_allocate => \&do_size_allocate, size_request => \&do_size_request, }; sub INIT_INSTANCE { my $self=shift; $self->signal_connect( expose_event => \&expose_cb); $self->signal_connect( damage_event => \&damage_cb); $self->signal_connect( realize => \&realize_cb); return $self; } sub do_size_request { my ($self,$req)=@_; my $border= $self->get_border_width; return unless $self->child; my $child_req=$self->child->size_request; my $w= $child_req->width; my $h= $child_req->height; $req->width( $w +$border*2 ); $req->height( $h*2 +$border*2 ); } sub do_size_allocate { my ($self,$alloc)=@_; my $border= $self->get_border_width; my ($x,$y,$w,$h)=$alloc->values; my $olda=$self->allocation; $olda->x($x); $olda->width($w); $olda->y($y); $olda->height($h); $w-= 2*$border; $h-= 2*$border; $self->window->move_resize($x+$border,$y+$border,$w,$h) if $self->window; if (my $child=$self->child) { my $req= $child->size_request; my $rect=Gtk2::Gdk::Rectangle->new(0,0,$w,$h/2); $self->child->size_allocate($rect); } if (my $offscreen= $self->{offscreen}) { $offscreen->move_resize(0,0,$w,$h/2); $offscreen->geometry_changed; } } sub damage_cb { my ($self,$event)=@_; # invalidate the whole window, it could be better to invalidate $event->area and the rectangle containing its reflection $self->window->invalidate_rect(undef,0); return 1; } sub realize_cb { my ($self)=@_; my $border= $self->get_border_width; my ($x,$y,$w,$h)=$self->allocation->values; my %attr= ( window_type => 'offscreen', wclass => 'output', x => 0, y => 0, width => $w-$border*2, height => ($h-$border*2)/2, event_mask => [qw/pointer-motion-mask button-press-mask button-release-mask exposure_mask/], ); $self->{offscreen}= my $offscreen= Gtk2::Gdk::Window->new($self->get_root_window,\%attr); $offscreen->set_user_data($self->Glib::Object::get_pointer()); $self->window->signal_connect( pick_embedded_child =>sub { return $offscreen; }); $self->child->set_parent_window($offscreen) if $self->child; $offscreen->set_embedder($self->window); $offscreen->signal_connect( to_embedder => sub {my ($offscreen,$x,$y)=@_; return $x,$y }); $offscreen->signal_connect( from_embedder=> sub {my ($offscreen,$x,$y)=@_; return $x,$y }); $self->style->set_background($offscreen,'normal'); $offscreen->show; } sub expose_cb { my ($self,$event)=@_; my $offscreen= $self->{offscreen}; if ($event->window == $self->window) { my $pixmap = $offscreen->get_pixmap; return 1 unless $pixmap && $self->child; my (undef,$height)= $pixmap->get_size; my $cr=Gtk2::Gdk::Cairo::Context->create($self->window); my $child_alloc= $self->child->allocation; $cr->rectangle($event->area); $cr->clip; $cr->save; # the above clip is used for both draw # draw normal version on upper half (0..$height) $cr->rectangle($child_alloc); $cr->clip; $cr->set_source_pixmap($pixmap,0,0); $cr->paint; $cr->restore; # draw reflection on lower half ($height..$height*2) my $mask= Cairo::LinearGradient->create(0,$height,0,$height*2); $mask->add_color_stop_rgba(0, 0, 0, 0, 1 ); $mask->add_color_stop_rgba(0.25, 0, 0, 0, 0.5 ); $mask->add_color_stop_rgba(0.5, 0, 0, 0, 0.25); $mask->add_color_stop_rgba(0.75, 0, 0, 0, 0.1 ); $mask->add_color_stop_rgba(1.0, 0, 0, 0, 0 ); my $matrix= Cairo::Matrix->init(1, 0, .3, 1, 0, 0); $matrix->translate(-10,$height*2); $matrix->scale(1,-1); $cr->transform($matrix); $mask->set_matrix($matrix); $cr->rectangle($child_alloc); $cr->clip; $cr->set_source_pixmap($pixmap,0,0); $cr->mask($mask); } elsif ($event->window == $offscreen) { $self->propagate_expose($self->child,$event) if $self->child; } 1; } Gtk2-1.24993/examples/timeouttest.pl000644 001750 000024 00000005137 13110362136 017510 0ustar00brianstaff000000 000000 #!/usr/bin/perl -w # # 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., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # $Id$ # use Gtk2; use Data::Dumper; Gtk2->init; my $str = 'aaa0'; my $window = Gtk2::Window->new ('toplevel'); $window->signal_connect (delete_event => sub { Gtk2->main_quit; 1 }); $window->set_title ('Timeout Test'); $window->set_border_width (6); $window->set_default_size (200, 200); my $vbox = Gtk2::VBox->new (0,0); $window->add ($vbox); my $label = Gtk2::Label->new ($str); $vbox->pack_start ($label, 1, 1, 0); my $button = Gtk2::ToggleButton->new ('Go'); $vbox->pack_start ($button, 0, 0, 6); $button->signal_connect (toggled => sub { if ($_[0]->get_active) { $_[0]->child->set_text ('Stop'); } else { $_[0]->child->set_text ('Go'); } }); # # here's a timeout that is always running, but only does something if # $button is toggled on. # my $id = Glib::Timeout->add (100, sub { if ($_[0][1]->get_active) { $str++; $_[0][0]->set_text ($str); } 1; }, [$label, $button]); # # now let's test timeouts that uninstall themselves. # we'll have a 'sticky' toggle button -- it turns itself off after a delay # (much like the cruise control in the car i got from my sister, where she'd # spilled so much soda on the switch that it was all gummy and took a while # to pop out). # # if the user clicks again before it has a chance to run, we'll uninstall # it by the id. # my $button2 = Gtk2::ToggleButton->new ('click me'); $vbox->pack_start ($button2, 0, 0, 5); my $id2 = undef; $button2->signal_connect (toggled => sub { if (!$_[0]->get_active) { # user turned us off before the callback ran warn "uninstalling $id2"; Glib::Source->remove ($id2); $id2 = undef; } else { $id2 = Glib::Timeout->add (1000, sub { warn "callback, $_[0]"; $_[0]->set_active (0); 0; # don't run again }, $_[0]); } }); $window->show_all; Gtk2->main; Gtk2-1.24993/examples/simple_menu.pl000644 001750 000024 00000007255 13110362136 017442 0ustar00brianstaff000000 000000 #!/usr/bin/perl -w # 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., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # $Id$ # # r.m. # use strict; use Gtk2 '-init'; use Gtk2::SimpleMenu; use Data::Dumper; sub callback { print "Callback:\n"; print Dumper(@_); } sub default_callback { print "Default Callback:\n"; print Dumper(@_); } my $action = 0; my $menu_tree = [ _File => { item_type => '', children => [ _New => { callback => \&callback, callback_action => $action++, accelerator => 'N', }, _Save => { callback_action => $action++, callback_data => 'cbdata 1', accelerator => 'S', }, 'Save _As' => { callback => \&callback, callback_action => $action++, callback_data => 'cbdata 2', accelerator => 'A', }, _Exit => { callback => sub { Gtk2->main_quit; }, callback_action => $action++, accelerator => 'E', }, ], }, _Edit => { item_type => '', children => [ _Copy => { callback => \&callback, callback_action => $action++, }, _Paste => { callback_action => $action++, }, ], }, _Tools => { item_type => '', children => [ _Tearoff => { item_type => '', }, _CheckItem => { callback => \&callback, callback_action => $action++, item_type => '', }, _ToggleItem => { callback_action => $action++, item_type => '', }, _StockItem => { callback => \&callback, callback_action => $action++, item_type => '', extra_data => 'gtk-execute', }, _Radios => { item_type => '', children => [ 'Radio _1' => { callback => \&callback, callback_action => $action++, item_type => '', groupid => 1, }, 'Radio _2' => { callback => \&callback, callback_action => $action++, item_type => '', groupid => 1, }, 'Radio _3' => { callback => \&callback, callback_action => $action++, item_type => '', groupid => 1, }, ], }, Separator => { item_type => '', }, # image menu item types are not supported at this point # _Image => { # callback => \&callback, # callback_action => $action++, # item_type => '', # }, ], }, _Help => { item_type => '', children => [ _Introduction => { callback => \&callback, callback_action => $action++, }, _About => { callback_action => $action++, } ], }, ]; my $menu = Gtk2::SimpleMenu->new( menu_tree => $menu_tree, default_callback => \&default_callback, user_data => 'user data', ); $menu->get_widget('/Tools/Radios/Radio 2')->set_active(1); my $win = Gtk2::Window->new; $win->signal_connect(delete_event => sub { exit }); $win->add($menu->{widget}); $win->add_accel_group($menu->{accel_group}); $win->show_all; Gtk2->main; Gtk2-1.24993/examples/rulers.pl000644 001750 000024 00000004153 11664366546 016460 0ustar00brianstaff000000 000000 #!/usr/bin/perl -w # this example came from Stephen Wilhelm's gtk-perl tutorial, # http://personal.riverusers.com/~swilhelm/gtkperl-tutorial/ # which was derived from the original gtk tutorial, # http://gtk.org/tutorial/ # # ported to gtk2-perl (which wan't hard) by muppet use strict; use Glib qw/FALSE/; use Gtk2 -init; my $xsize = 600; my $ysize = 400; my $window; my $table; my $area; my $hrule; my $vrule; # Create the window $window = new Gtk2::Window ( "toplevel" ); $window->signal_connect ("delete_event", sub { Gtk2->main_quit; }); $window->set_border_width (10); # Create a table for placing the ruler and the drawing area $table = new Gtk2::Table (3, 2, FALSE); $window->add ($table); # Create the drawing area. $area = new Gtk2::DrawingArea; $area->size ($xsize, $ysize); $table->attach ($area, 1, 2, 1, 2, ['expand', 'fill'], ['expand', 'fill'], 0, 0); $area->set_events (['pointer_motion_mask', 'pointer_motion_hint_mask']); # The horizontal ruler goes on top. As the mouse moves across the # drawing area, a motion_notify_event event is propagated to the # ruler so that the ruler can update itself properly. $hrule = new Gtk2::HRuler; $hrule->set_metric ('pixels'); $hrule->set_range (7, 13, 0, 20); $area->signal_connect (motion_notify_event => sub { $hrule->event ($_[1]) }); $table->attach ($hrule, 1, 2, 0, 1, ['expand', 'shrink', 'fill'], [], 0, 0 ); # The vertical ruler goes on the left. As the mouse moves across the # drawing area, a motion_notify_event event is propagated to the # ruler so that the ruler can update itself properly. $vrule = new Gtk2::VRuler; $vrule->set_metric ('pixels'); $vrule->set_range (0, $ysize, 10, $ysize); $area->signal_connect (motion_notify_event => sub { $vrule->event ($_[1]) }); $table->attach ($vrule, 0, 1, 1, 2, [], ['fill', 'expand', 'shrink'], 0, 0 ); # Now show everything $window->show_all; main Gtk2; # END EXAMPLE PROGRAM Gtk2-1.24993/examples/layout.pl000644 001750 000024 00000003736 13110362136 016442 0ustar00brianstaff000000 000000 #!/usr/bin/perl -w # 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., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # $Id$ # use strict; use Gtk2; use Glib ':constants'; # Initialize GTK Gtk2->init; my $window = Gtk2::Window->new("toplevel"); $window->set_title("Damnit"); $window->set_default_size(640,480); my $scwin = Gtk2::ScrolledWindow->new(undef, undef); $scwin->set_policy('automatic', 'automatic'); $window->add($scwin); $window->signal_connect( "destroy" => sub { Gtk2->main_quit; }); $window->set_border_width(10); my $layout = Gtk2::Layout->new(undef,undef); $layout->set_size(640, 480); $scwin->add($layout); my $btn = Gtk2::Button->new_from_stock("gtk-quit"); $btn->set_size_request(100, 50); $layout->put($btn, 100, 120); my $i = 1; $btn->signal_connect( 'enter' => sub { if( $i > 14 ) { $_[0]->set_label("Ok, Fine Then."); $_[0]->signal_connect( "clicked" => sub { Gtk2->main_quit; }); return 1; } elsif( $i > 9 ) { $_[0]->set_label("Quit Already!"); } elsif( $i > 4 ) { $_[0]->set_label("Perhaps, X"); } elsif( $i > 0 ) { $_[0]->set_label("Ha-Ha"); } $_[1][1]->move($_[0], rand(520), rand(410)); $i++; 1; }, [ $window, $layout ] ); $window->show_all; # Enter the event loop Gtk2->main; exit 0; Gtk2-1.24993/examples/table_packing.pl000644 001750 000024 00000006566 11664366546 017741 0ustar00brianstaff000000 000000 #!/usr/bin/perl -w =doc Gtk2::Table's horizontal and vertical packing options can be a little confusing at first. This example gives you a way to get a feel for them interactively. Hint: resize the window and stretch the hpaned's gutter. This program also illustrates using container child properties, making a hpaned's second child sticky, using named colors, vectorization of operations, and using multiple columns in a combo box model but not in the view. Originally from the thread "Alignment of labels in table", http://mail.gnome.org/archives/gtk-perl-list/2005-November/msg00029.html =cut use strict; use Glib qw(:constants); use Gtk2 -init; # # Create a basic window, with a table on the left and some controls on the # right, separated by a draggable gutter. # my $window = Gtk2::Window->new; $window->signal_connect (destroy => sub {Gtk2->main_quit}); my $hpaned = Gtk2::HPaned->new; $window->add ($hpaned); my $table = Gtk2::Table->new (2, 2); $hpaned->add1 ($table); my $vbox = Gtk2::VBox->new; $hpaned->add2 ($vbox); # Now that we have children in the HPaned, tell it to keep child2 at its # current size when resizing the window. $hpaned->child1_resize (TRUE); $hpaned->child2_resize (FALSE); # Initialize the model we'll use for all of the combo boxes, below. my $combo_model = Gtk2::ListStore->new ('Gtk2::AttachOptions', 'Glib::String'); foreach ({name => 'expand', value => ['expand'] }, {name => 'fill', value => ['fill'] }, {name => 'shrink', value => ['shrink'] }, {name => 'expand+fill', value => ['expand', 'fill']}) { $combo_model->set ($combo_model->append, 0, $_->{value}, 1, $_->{name}); } # Set up each cell of the table and its corresponding row of controls. foreach ([0, 1, 0, 1, "red"], [0, 1, 1, 2, "green"], [1, 2, 0, 1, "blue"], [1, 2, 1, 2, "orange"]) { my ($left, $right, $top, $bottom, $color_name) = @$_; my $color = Gtk2::Gdk::Color->parse ($color_name); my $event_box = Gtk2::EventBox->new; my $label = Gtk2::Label->new ("$left $right $top $bottom"); $event_box->modify_bg (normal => $color); $event_box->add ($label); $label->show; $table->attach_defaults ($event_box, $left, $right, $top, $bottom); my $hbox = Gtk2::HBox->new; $vbox->pack_start ($hbox, FALSE, FALSE, 0); $label = Gtk2::Label->new ("$left $right $top $bottom"); $label->modify_fg (normal => $color); $hbox->pack_start ($label, FALSE, FALSE, 0); my $combo_box = Gtk2::ComboBox->new ($combo_model); my $cell = Gtk2::CellRendererText->new; $combo_box->pack_start ($cell, TRUE); $combo_box->add_attribute ($cell, text => 1); $combo_box->signal_connect (changed => sub { my ($combo_box, $child) = @_; my $new_x_options = $combo_box->get_model->get ($combo_box->get_active_iter, 0); $table->child_set ($child, x_options => $new_x_options); }, $event_box); $combo_box->set_active (0); $hbox->pack_start ($combo_box, FALSE, FALSE, 0); $combo_box = Gtk2::ComboBox->new ($combo_model); $cell = Gtk2::CellRendererText->new; $combo_box->pack_start ($cell, TRUE); $combo_box->add_attribute ($cell, text => 1); $combo_box->signal_connect (changed => sub { my ($combo_box, $child) = @_; my $new_y_options = $combo_box->get_model->get ($combo_box->get_active_iter, 0); $table->child_set ($child, y_options => $new_y_options); }, $event_box); $combo_box->set_active (0); $hbox->pack_start ($combo_box, FALSE, FALSE, 0); } $window->show_all; Gtk2->main; Gtk2-1.24993/examples/assistant.pl000644 001750 000024 00000032621 13110362136 017131 0ustar00brianstaff000000 000000 #!/usr/bin/perl -w # # GTK - The GIMP Toolkit # Copyright (C) 1999 Red Hat, Inc. # Copyright (C) 2002 Anders Carlsson # Copyright (C) 2003 Matthias Clasen # Copyright (C) 2005 Carlos Garnacho Parro # Copyright (C) 2006 muppet # # All rights reserved. # # 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., 51 Franklin Street, Fifth Floor, # Boston, MA 02110-1301, USA. # use strict; use Gtk2 -init; use Glib ':constants'; sub get_test_page { return Gtk2::Label->new (shift); } sub complete_cb { my ($check, $data) = @_; $data->{assistant}->set_page_complete ($data->{page}, $check->get_active); } sub add_completion_test_page { my ($assistant, $text, $visible, $complete) = @_; my $page = Gtk2::VBox->new; my $check = Gtk2::CheckButton->new_with_label ("Complete"); $page->add (Gtk2::Label->new ($text)); $page->add ($check); $check->set_active ($complete); my %pdata = ( assistant => $assistant, page => $page, ); $check->signal_connect (toggled => \&complete_cb, \%pdata); $page->show_all if $visible; $assistant->append_page ($page); $assistant->set_page_title ($page, $text); $assistant->set_page_complete ($page, $complete); return $page; } sub cancel_callback { my $widget = shift; print "cancel\n"; $widget->hide; } sub close_callback { my $widget = shift; print "close\n"; $widget->hide; } sub apply_callback { my $widget = shift; print "apply\n"; } sub progress_timeout { my $assistant = shift; my $current_page = $assistant->get_current_page; my $page = $assistant->get_nth_page ($current_page); my $progress = $page->child; my $value = $progress->get_fraction; $value += 0.1; $progress->set_fraction ($value); if ($value >= 1.0) { $assistant->set_page_complete ($page, TRUE); return FALSE; } return TRUE; } sub prepare_callback { my ($assistant, $page) = @_; if ($page->isa ('Gtk2::Label')) { print "prepare: ".$page->get_text."\n"; } elsif ($assistant->get_page_type ($page) eq 'progress') { my $progress = $page->child; $assistant->set_page_complete ($page, FALSE); $progress->set_fraction (0.0); Glib::Timeout->add (300, \&progress_timeout, $assistant); } else { print "prepare: ".$assistant->get_current_page,"\n"; } } sub create_simple_assistant { my $widget = shift; my $assistant = $widget->{assistant}; if (!$assistant) { $assistant = Gtk2::Assistant->new; $assistant->set_default_size (400, 300); $assistant->signal_connect (cancel => \&cancel_callback); $assistant->signal_connect (close => \&close_callback); $assistant->signal_connect (apply => \&apply_callback); $assistant->signal_connect (prepare => \&prepare_callback); my $page = get_test_page ("Page 1"); $page->show; $assistant->append_page ($page); $assistant->set_page_title ($page, "Page 1"); $assistant->set_page_complete ($page, TRUE); $page = get_test_page ("Page 2"); $page->show; $assistant->append_page ($page); $assistant->set_page_title ($page, "Page 2"); $assistant->set_page_type ($page, 'confirm'); $assistant->set_page_complete ($page, TRUE); } if (!$assistant->visible) { $assistant->show; } else { $assistant->destroy; $assistant = undef; } $widget->{assistant} = $assistant; } sub visible_cb { my ($check, $page) = @_; $page->set (visible => $check->get_active); } sub create_generous_assistant { my ($widget) = @_; my $assistant = $widget->{assistant}; if (!$assistant) { $assistant = Gtk2::Assistant->new; $assistant->set_default_size (400, 300); $assistant->signal_connect (cancel => \&cancel_callback); $assistant->signal_connect (close => \&close_callback); $assistant->signal_connect (apply => \&apply_callback); $assistant->signal_connect (prepare => \&prepare_callback); my $page = get_test_page ("Introduction"); $page->show; $assistant->append_page ($page); $assistant->set_page_title ($page, "Introduction"); $assistant->set_page_type ($page, 'intro'); $assistant->set_page_complete ($page, TRUE); $page = add_completion_test_page ($assistant, "Content", TRUE, FALSE); my $next = add_completion_test_page ($assistant, "More Content", TRUE, TRUE); my $check = Gtk2::CheckButton->new ("Next page visible"); $check->set_active (TRUE); $check->signal_connect (toggled => \&visible_cb, $next); $check->show; $page->add ($check); add_completion_test_page ($assistant, "Even More Content", TRUE, TRUE); $page = get_test_page ("Confirmation"); $page->show; $assistant->append_page ($page); $assistant->set_page_title ($page, "Confirmation"); $assistant->set_page_type ($page, 'confirm'); $assistant->set_page_complete ($page, TRUE); $page = Gtk2::Alignment->new (0.5, 0.5, 0.9, 0.0); $page->add (Gtk2::ProgressBar->new ()); $page->show_all; $assistant->append_page ($page); $assistant->set_page_title ($page, "Progress"); $assistant->set_page_type ($page, 'progress'); $page = get_test_page ("Summary"); $page->show; $assistant->append_page ($page); $assistant->set_page_title ($page, "Summary"); $assistant->set_page_type ($page, 'summary'); $assistant->set_page_complete ($page, TRUE); } if (!$assistant->visible) { $assistant->show; } else { $assistant->destroy; $assistant = undef; } $widget->{assistant} = $assistant; } my $selected_branch = 'A'; sub select_branch { my ($widget, $branch) = @_; $selected_branch = $branch; } sub nonlinear_assistant_forward_page { my ($current_page, $data) = @_; if ($current_page == 0) { return $selected_branch eq 'A' ? 1 : 2; } elsif ($current_page == 1 || $current_page == 2) { return 3; } else { return -1; } } sub create_nonlinear_assistant { my ($widget) = @_; my $assistant = $widget->{assistant}; if (!$assistant) { $assistant = Gtk2::Assistant->new (); $assistant->set_default_size (400, 300); $assistant->signal_connect (cancel => \&cancel_callback); $assistant->signal_connect (close => \&close_callback); $assistant->signal_connect (apply => \&apply_callback); $assistant->signal_connect (prepare => \&prepare_callback); $assistant->set_forward_page_func (\&nonlinear_assistant_forward_page); my $page = Gtk2::VBox->new (FALSE, 6); my $button = Gtk2::RadioButton->new_with_label (undef, "branch A"); $page->pack_start ($button, FALSE, FALSE, 0); $button->signal_connect (toggled => \&select_branch, 'A'); $button->set_active (TRUE); $button = Gtk2::RadioButton->new_with_label ($button->get_group, "branch B"); $page->pack_start ($button, FALSE, FALSE, 0); $button->signal_connect (toggled => \&select_branch, 'B'); $page->show_all; $assistant->append_page ($page); $assistant->set_page_title ($page, "Page 1"); $assistant->set_page_complete ($page, TRUE); $page = get_test_page ("Page 2A"); $page->show; $assistant->append_page ($page); $assistant->set_page_title ($page, "Page 2A"); $assistant->set_page_complete ($page, TRUE); $page = get_test_page ("Page 2B"); $page->show; $assistant->append_page ($page); $assistant->set_page_title ($page, "Page 2B"); $assistant->set_page_complete ($page, TRUE); $page = get_test_page ("Confirmation"); $page->show; $assistant->append_page ($page); $assistant->set_page_title ($page, "Confirmation"); $assistant->set_page_type ($page, 'confirm'); $assistant->set_page_complete ($page, TRUE); } if (!$assistant->visible) { $assistant->show; } else { $assistant->destroy; $assistant = undef; } $widget->{assistant} = $assistant; } sub looping_assistant_forward_page { my ($current_page, $assistant) = @_; print "@_\n"; if ($current_page == 0) { return 1; } elsif ($current_page == 1) { return 2; } elsif ($current_page == 2) { return 3; } elsif ($current_page == 3) { my $page = $assistant->get_nth_page ($current_page); return $page->get_active ? 0 : 4; } else { return -1; } } sub create_looping_assistant { my $widget = shift; my $assistant = $widget->{assistant}; if (!$assistant) { $assistant = Gtk2::Assistant->new (); $assistant->set_default_size (400, 300); $assistant->signal_connect (cancel => \&cancel_callback); $assistant->signal_connect (close => \&close_callback); $assistant->signal_connect (apply => \&apply_callback); $assistant->signal_connect (prepare => \&prepare_callback); $assistant->set_forward_page_func (\&looping_assistant_forward_page, $assistant); my $page = get_test_page ("Introduction"); $page->show; $assistant->append_page ($page); $assistant->set_page_title ($page, "Introduction"); $assistant->set_page_type ($page, 'intro'); $assistant->set_page_complete ($page, TRUE); $page = get_test_page ("Content"); $page->show; $assistant->append_page ($page); $assistant->set_page_title ($page, "Content"); $assistant->set_page_complete ($page, TRUE); $page = get_test_page ("More content"); $page->show; $assistant->append_page ($page); $assistant->set_page_title ($page, "More content"); $assistant->set_page_complete ($page, TRUE); $page = Gtk2::CheckButton->new_with_label ("Loop?"); $page->show; $assistant->append_page ($page); $assistant->set_page_title ($page, "Loop?"); $assistant->set_page_complete ($page, TRUE); $page = get_test_page ("Confirmation"); $page->show; $assistant->append_page ($page); $assistant->set_page_title ($page, "Confirmation"); $assistant->set_page_type ($page, 'confirm'); $assistant->set_page_complete ($page, TRUE); } if (!$assistant->visible) { $assistant->show; } else { $assistant->destroy; $assistant = undef; } $widget->{assistant} = $assistant; } sub create_full_featured_assistant { my $widget = shift; my $assistant = $widget->{assistant}; if (!$assistant) { $assistant = Gtk2::Assistant->new (); $assistant->set_default_size (400, 300); my $button = Gtk2::Button->new_from_stock ('stop'); $button->show; $assistant->add_action_widget ($button); $assistant->signal_connect (cancel => \&cancel_callback); $assistant->signal_connect (close => \&close_callback); $assistant->signal_connect (apply => \&apply_callback); $assistant->signal_connect (prepare => \&prepare_callback); my $page = get_test_page ("Page 1"); $page->show; $assistant->append_page ($page); $assistant->set_page_title ($page, "Page 1"); $assistant->set_page_complete ($page, TRUE); # set a side image my $pixbuf = $page->render_icon ('gtk-dialog-warning', 'dialog'); $assistant->set_page_side_image ($page, $pixbuf); # set a header image $pixbuf = $page->render_icon ('gtk-dialog-info', 'dialog'); $assistant->set_page_header_image ($page, $pixbuf); $page = get_test_page ("Invisible page"); $assistant->append_page ($page); $page = get_test_page ("Page 3"); $page->show; $assistant->append_page ($page); $assistant->set_page_title ($page, "Page 3"); $assistant->set_page_type ($page, 'confirm'); $assistant->set_page_complete ($page, TRUE); # set a header image $pixbuf = $page->render_icon ('gtk-dialog-info', 'dialog'); $assistant->set_page_header_image ($page, $pixbuf); } if (!$assistant->visible) { $assistant->show; } else { $assistant->destroy; $assistant = undef; } $widget->{assistant} = $assistant; } { Gtk2::Widget->set_default_direction ('rtl') if $ENV{'RTL'}; my $window = Gtk2::Window->new; $window->signal_connect (destroy => sub { Gtk2->main_quit }); $window->signal_connect (delete_event => sub { FALSE }); my $box = Gtk2::VBox->new; $window->add ($box); my @tests = ( { text => "simple assistant", func => \&create_simple_assistant }, { text => "generous assistant", func => \&create_generous_assistant }, { text => "nonlinear assistant", func => \&create_nonlinear_assistant }, { text => "looping assistant", func => \&create_looping_assistant }, { text => "full featured assistant", func => \&create_full_featured_assistant }, ); foreach my $test (@tests) { my $button = Gtk2::Button->new ($test->{text}); $button->signal_connect (clicked => $test->{func}); $box->pack_start ($button, TRUE, TRUE, 0); } $window->show_all; Gtk2->main (); } Gtk2-1.24993/examples/cellrenderer_date.pl000644 001750 000024 00000024255 13110362136 020567 0ustar00brianstaff000000 000000 #!/usr/bin/perl -w # # Copyright (C) 2003 by Torsten Schoenfeld # # 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., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # $Id$ # use strict; use Gtk2 -init; package Kaf::CellRendererDate; use Glib::Object::Subclass "Gtk2::CellRenderer", signals => { edited => { flags => [qw(run-last)], param_types => [qw(Glib::String Glib::Scalar)], }, }, properties => [ Glib::ParamSpec -> boolean("editable", "Editable", "Can I change that?", 0, [qw(readable writable)]), Glib::ParamSpec -> string("date", "Date", "What's the date again?", "", [qw(readable writable)]), ] ; use constant x_padding => 2; use constant y_padding => 3; use constant arrow_width => 15; use constant arrow_height => 15; sub hide_popup { my ($cell) = @_; Gtk2 -> grab_remove($cell -> { _popup }); $cell -> { _popup } -> hide(); } sub get_today { my ($cell) = @_; my ($day, $month, $year) = (localtime())[3, 4, 5]; $year += 1900; $month += 1; return ($year, $month, $day); } sub get_date { my ($cell) = @_; my $text = $cell -> get("date"); my ($year, $month, $day) = $text ? split(/[\/-]/, $text) : $cell -> get_today(); return ($year, $month, $day); } sub add_padding { my ($cell, $year, $month, $day) = @_; return ($year, sprintf("%02d", $month), sprintf("%02d", $day)); } sub INIT_INSTANCE { my ($cell) = @_; my $popup = Gtk2::Window -> new ('popup'); my $vbox = Gtk2::VBox -> new(0, 0); my $calendar = Gtk2::Calendar -> new(); my $hbox = Gtk2::HBox -> new(0, 0); my $today = Gtk2::Button -> new('Today'); my $none = Gtk2::Button -> new('None'); $cell -> {_arrow} = Gtk2::Arrow -> new("down", "none"); # We can't just provide the callbacks now because they might need access to # cell-specific variables. And we can't just connect the signals in # START_EDITING because we'd be connecting many signal handlers to the same # widgets. $today -> signal_connect(clicked => sub { $cell -> { _today_clicked_callback } -> (@_) if (exists($cell -> { _today_clicked_callback })); }); $none -> signal_connect(clicked => sub { $cell -> { _none_clicked_callback } -> (@_) if (exists($cell -> { _none_clicked_callback })); }); $calendar -> signal_connect(day_selected_double_click => sub { $cell -> { _day_selected_double_click_callback } -> (@_) if (exists($cell -> { _day_selected_double_click_callback })); }); $calendar -> signal_connect(month_changed => sub { $cell -> { _month_changed } -> (@_) if (exists($cell -> { _month_changed })); }); $hbox -> pack_start($today, 1, 1, 0); $hbox -> pack_start($none, 1, 1, 0); $vbox -> pack_start($calendar, 1, 1, 0); $vbox -> pack_start($hbox, 0, 0, 0); # Find out if the click happended outside of our window. If so, hide it. # Largely copied from Planner (the former MrProject). # Implement via Gtk2::get_event_widget? $popup -> signal_connect(button_press_event => sub { my ($popup, $event) = @_; if ($event -> button() == 1) { my ($x, $y) = ($event -> x_root(), $event -> y_root()); my ($xoffset, $yoffset) = $popup -> window() -> get_root_origin(); my $allocation = $popup -> allocation(); my $x1 = $xoffset + 2 * $allocation -> x(); my $y1 = $yoffset + 2 * $allocation -> y(); my $x2 = $x1 + $allocation -> width(); my $y2 = $y1 + $allocation -> height(); unless ($x > $x1 && $x < $x2 && $y > $y1 && $y < $y2) { $cell -> hide_popup(); return 1; } } return 0; }); $popup -> add($vbox); $cell -> { _popup } = $popup; $cell -> { _calendar } = $calendar; } sub START_EDITING { my ($cell, $event, $view, $path, $background_area, $cell_area, $flags) = @_; my $popup = $cell -> { _popup }; my $calendar = $cell -> { _calendar }; # Specify the callbacks. Will be called by the signal handlers set up in # INIT_INSTANCE. $cell -> { _today_clicked_callback } = sub { my ($button) = @_; my ($year, $month, $day) = $cell -> get_today(); $cell -> signal_emit(edited => $path, join("-", $cell -> add_padding($year, $month, $day))); $cell -> hide_popup(); }; $cell -> { _none_clicked_callback } = sub { my ($button) = @_; $cell -> signal_emit(edited => $path, ""); $cell -> hide_popup(); }; $cell -> { _day_selected_double_click_callback } = sub { my ($calendar) = @_; my ($year, $month, $day) = $calendar -> get_date(); $cell -> signal_emit(edited => $path, join("-", $cell -> add_padding($year, ++$month, $day))); $cell -> hide_popup(); }; $cell -> { _month_changed } = sub { my ($calendar) = @_; my ($selected_year, $selected_month) = $calendar -> get_date(); my ($current_year, $current_month, $current_day) = $cell -> get_today(); if ($selected_year == $current_year && ++$selected_month == $current_month) { $calendar -> mark_day($current_day); } else { $calendar -> unmark_day($current_day); } }; my ($year, $month, $day) = $cell -> get_date(); $calendar -> select_month($month - 1, $year); $calendar -> select_day($day); # Figure out where to put the popup - i.e., don't put it offscreen, # as it's not movable (by the user). $popup -> get_child -> show_all(); # all but $popup itself $popup -> realize; my ($requisition) = $popup->size_request; my ($popup_width, $popup_height) = ($requisition->width, $requisition->height); my $screen_height = $popup->get_screen->get_height; my ($x_origin, $y_origin) = $view -> get_bin_window() -> get_origin(); my $popup_x = $x_origin + $cell_area->x + $cell_area->width - $popup_width; if ($popup_x < 0) { $popup_x = 0; } my $popup_y = $y_origin + $cell_area->y + $cell_area->height; if ($popup_y + $popup_height > $screen_height) { $popup_y = $y_origin + $cell_area->y - $popup_height; } $popup -> move($popup_x, $popup_y); $popup -> show(); # Grab the focus and the pointer. Gtk2 -> grab_add($popup); $popup -> grab_focus(); Gtk2::Gdk -> pointer_grab($popup -> window(), 1, [qw(button-press-mask button-release-mask pointer-motion-mask)], undef, undef, 0); return; } sub get_date_string { my $cell = shift; return $cell->get ('date'); } sub calc_size { my ($cell, $layout) = @_; my ($width, $height) = $layout -> get_pixel_size(); return (0, 0, $width + x_padding * 2 + arrow_width, $height + y_padding * 2); } sub GET_SIZE { my ($cell, $widget, $cell_area) = @_; my $layout = $cell -> get_layout($widget); $layout -> set_text($cell -> get_date_string()); return $cell -> calc_size($layout); } sub get_layout { my ($cell, $widget) = @_; return $widget -> create_pango_layout(""); } sub RENDER { my ($cell, $window, $widget, $background_area, $cell_area, $expose_area, $flags) = @_; my $state; if ($flags & 'selected') { $state = $widget -> has_focus() ? 'selected' : 'active'; } else { $state = $widget -> state() eq 'insensitive' ? 'insensitive' : 'normal'; } my $layout = $cell -> get_layout($widget); $layout -> set_text($cell -> get_date_string()); my ($x_offset, $y_offset, $width, $height) = $cell -> calc_size($layout); $widget -> get_style -> paint_layout($window, $state, 1, $cell_area, $widget, "cellrenderertext", $cell_area -> x() + $x_offset + x_padding, $cell_area -> y() + $y_offset + y_padding, $layout); $widget -> get_style -> paint_arrow ($window, $widget->state, 'none', $cell_area, $cell -> { _arrow }, "", "down", 1, $cell_area -> x + $cell_area -> width - arrow_width, $cell_area -> y + $cell_area -> height - arrow_height - 2, arrow_width - 3, arrow_height); } ############################################################################### package main; my $window = Gtk2::Window -> new("toplevel"); $window -> set_title ("CellRendererDate"); $window -> signal_connect (delete_event => sub { Gtk2 -> main_quit(); }); my $model = Gtk2::ListStore -> new(qw(Glib::String)); my $view = Gtk2::TreeView -> new($model); foreach (qw(2003-10-1 2003-10-2 2003-10-3)) { $model -> set($model -> append(), 0 => $_); } my $renderer = Kaf::CellRendererDate -> new(); $renderer -> set(mode => "editable"); $renderer -> signal_connect(edited => sub { my ($cell, $path, $new_date) = @_; $model -> set($model -> get_iter(Gtk2::TreePath -> new_from_string($path)), 0 => $new_date); }); my $column = Gtk2::TreeViewColumn -> new_with_attributes ("Date", $renderer, date => 0); $view -> append_column($column); $window -> add($view); $window -> show_all(); Gtk2 -> main(); Gtk2-1.24993/examples/cellrenderer_progress.pl000644 001750 000024 00000011055 11664366546 021535 0ustar00brianstaff000000 000000 #!/usr/bin/perl -w # ported from Tim-Philipp Meuller's Tree View tutorial, # http://scentric.net/tutorial/sec-custom-cell-renderers.html#sec-custom-cell-renderer-example-body # by muppet, 6 feb 04. # # This is based mainly on GtkCellRendererProgress # in GAIM, written and (c) 2002 by Sean Egan # (Licensed under the GPL), which in turn is # based on Gtk's GtkCellRenderer[Text|Toggle|Pixbuf] # implementation by Jonathan Blandford */ package Mup::CellRendererProgress; use strict; use warnings; use Glib qw(G_PARAM_READWRITE); use Gtk2; use Glib::Object::Subclass Gtk2::CellRenderer::, properties => [ Glib::ParamSpec->double ('percentage', 'Percentage', 'The fractional progress to display', 0.0, 1.0, 0.0, G_PARAM_READWRITE), ], ; sub INIT_INSTANCE { my $self = shift; $self->set (mode => 'inert', xpad => 2, ypad => 2); $self->{percentage} = 0.0; } # we'll use the default new, GET_PROPERTY and SET_PROPERTY provided by # Glib::Object::Subclass. # # calculate the size of our cell, taking into account padding and # alignment properties of parent. # use constant FIXED_WIDTH => 100; use constant FIXED_HEIGHT => 10; sub MAX { $_[0] > $_[1] ? $_[0] : $_[1] } sub GET_SIZE { my ($cell, $widget, $cell_area) = @_; my ($x_offset, $y_offset) = (0, 0); my $width = int ($cell->get ('xpad') * 2 + FIXED_WIDTH); my $height = int ($cell->get ('ypad') * 2 + FIXED_HEIGHT); if ($cell_area) { $x_offset = $cell->get ('xalign') * ($cell_area->width - $width); $x_offset = MAX ($x_offset, 0); $y_offset = $cell->get ('yalign') * ($cell_area->height - $height); $y_offset = MAX ($y_offset, 0); } return ($x_offset, $y_offset, $width, $height); } sub RENDER { my ($cell, $window, $widget, $background_area, $cell_area, $expose_area, $flags) = @_; # invoke GET_SIZE directly to avoid a lot of marshalling overhead. my ($x_offset, $y_offset, $width, $height) = $cell->GET_SIZE ($widget, $cell_area); my $state = $widget->has_focus ? 'active' : 'normal'; my ($xpad, $ypad) = $cell->get (qw(xpad ypad)); $width -= $xpad*2; $height -= $ypad*2; my $style = $widget->style; $style->paint_box ($window, 'normal', 'in', undef, $widget, "trough", $cell_area->x + $x_offset + $xpad, $cell_area->y + $y_offset + $ypad, $width - 1, $height - 1); $style->paint_box ($window, $state, 'out', undef, $widget, "bar", $cell_area->x + $x_offset + $xpad, $cell_area->y + $y_offset + $ypad, $width * $cell->{percentage}, $height - 1); } package main; use strict; use Glib qw(TRUE FALSE); use Gtk2 -init; my $liststore; my $increasing = TRUE; # direction of progress bar change use constant { COL_PERCENTAGE => 0, COL_TEXT => 1, NUM_COLS => 2, STEP => 0.01, }; sub increase_progress_timeout { my $renderer = shift; my $iter = $liststore->get_iter_first; # first and only row my $perc = $liststore->get ($iter, COL_PERCENTAGE); if ($perc > (1.0 - STEP) || ($perc < STEP && $perc > 0.0) ) { $increasing = (!$increasing); } if ($increasing) { $perc += STEP; } else { $perc -= STEP; } my $buf = sprintf '%u %%', $perc*100; $liststore->set ($iter, COL_PERCENTAGE, $perc, COL_TEXT, $buf); return TRUE; # Call again } sub create_view_and_model { $liststore = Gtk2::ListStore->new (qw(Glib::Double Glib::String)); my $iter = $liststore->append; $liststore->set ($iter, COL_PERCENTAGE, 0.5); # start at 50% my $view = Gtk2::TreeView->new ($liststore); my $renderer = Gtk2::CellRendererText->new; my $col = Gtk2::TreeViewColumn->new; $col->pack_start ($renderer, TRUE); $col->add_attribute ($renderer, text => COL_TEXT); $col->set_title ("Progress"); $view->append_column ($col); $renderer = Mup::CellRendererProgress->new; $col = Gtk2::TreeViewColumn->new; $col->pack_start ($renderer, TRUE); $col->add_attribute ($renderer, percentage => COL_PERCENTAGE); $col->set_title ("Progress"); $view->append_column ($col); Glib::Timeout->add (50, \&increase_progress_timeout); return $view; } my $window = Gtk2::Window->new; $window->set_default_size (150, 100); $window->signal_connect (delete_event => sub {Gtk2->main_quit}); my $view = create_view_and_model(); $window->add ($view); $window->show_all; Gtk2->main; Gtk2-1.24993/examples/filesel_multisel.pl000644 001750 000024 00000000547 11664366546 020510 0ustar00brianstaff000000 000000 #!/usr/bin/perl -w # using a Gtk2::FileSelection to get multiple files is really easy. use Data::Dumper; use Gtk2 -init; my $fs = Gtk2::FileSelection->new ('pick something'); # tell it to allow multiple selections... $fs->set_select_multiple (TRUE); if ('ok' eq $fs->run) { # and then fetch the selections as a list. print Dumper($fs->get_selections); } Gtk2-1.24993/examples/accel_groups.pl000644 001750 000024 00000004543 13110362136 017570 0ustar00brianstaff000000 000000 #!/usr/bin/perl -w # # 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., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # $Id$ # use Gtk2 -init; # how to set up accelerators by hand sub cb_new { warn "new\n" } sub cb_open { warn "open\n" } sub cb_save { warn "save\n" } sub cb_close { warn "close\n"; Gtk2->main_quit; } sub cb_cut { warn "cut\n"; my $n = 0; while ($accel_group->disconnect (\&cb_paste)) { $n++; } warn " removed $n accelerators connected to cb_paste\n"; } sub cb_copy { warn "copy\n" } sub cb_paste { warn "paste\n" } @accels = ( { key => 'N', mod => 'control-mask', func => \&cb_new }, { key => 'O', mod => 'control-mask', func => \&cb_open }, { key => 'S', mod => 'control-mask', func => \&cb_save }, { key => 'S', mod => [qw/control-mask shift-mask/], func => sub { warn "cb_save_as\n" }, }, { key => 'W', mod => 'control-mask', func => 'cb_close' }, { key => 'X', mod => 'control-mask', func => 'cb_cut' }, { key => 'C', mod => 'control-mask', func => \&cb_copy }, { key => 'V', mod => 'control-mask', func => \&cb_paste }, { key => 'F3', mod => [], func => \&cb_paste }, { key => 'equal', mod => [], func => sub { warn "zoom in\n"} }, { key => 'minus', mod => [], func => sub { warn "zoom out\n"} }, ); $accel_group = Gtk2::AccelGroup->new; use Gtk2::Gdk::Keysyms; foreach my $a (@accels) { $accel_group->connect ($Gtk2::Gdk::Keysyms{$a->{key}}, $a->{mod}, 'visible', $a->{func}); } $window = Gtk2::Window->new; $window->add_accel_group ($accel_group); $window->signal_connect (delete_event => sub {Gtk2->main_quit; 1}); $window->show_now; Gtk2->main; undef $accel_group; undef $window; Gtk2-1.24993/examples/combo_box.pl000644 001750 000024 00000003222 11664366546 017107 0ustar00brianstaff000000 000000 #!/usr/bin/perl -w =doc Contrived example showing off the new ComboBox and Expander in gtk+-2.4. =cut use Gtk2 -init; die "This example requires gtk+ 2.4.0, but Gtk2 has been compiled for " . join (".", Gtk2->GET_VERSION_INFO)."\n" unless Gtk2->CHECK_VERSION (2, 4, 0); $window = Gtk2::Window->new; $window->signal_connect (delete_event => sub { Gtk2->main_quit; 1 }); $expander = Gtk2::Expander->new ('There are Combo Boxes in here!'); $window->add ($expander); $vbox = Gtk2::VBox->new; $expander->add ($vbox); $model = Gtk2::ListStore->new ('Glib::String'); foreach (qw/this is a test of the emergency broadcast system/) { $model->set ($model->append, 0, $_); } $combo = Gtk2::ComboBoxEntry->new ($model, 0); $vbox->add ($combo); $combo = Gtk2::ComboBox->new_text; foreach (qw/this is a test of the emergency broadcast system/) { $combo->append_text ($_); } $vbox->add ($combo); # # now for something a little more sophisticated: we'll have a combo that # lists all the stock ids to do with go/goto, with their icons. # $model = Gtk2::ListStore->new ('Glib::String'); foreach (grep /gtk-go/, Gtk2::Stock->list_ids) { $model->set ($model->append, 0, $_); } $combo = Gtk2::ComboBox->new ($model); # a ComboBox implements the CellLayout interface; that is, we can pack # CellRenderers into the ComboBox to control how the items are displayed. my $renderer = Gtk2::CellRendererPixbuf->new; $combo->pack_start ($renderer, FALSE); $combo->set_attributes ($renderer, 'stock-id' => 0); $renderer = Gtk2::CellRendererText->new; $combo->pack_start ($renderer, FALSE); $combo->set_attributes ($renderer, text => 0); $vbox->add ($combo); $window->show_all; Gtk2->main; Gtk2-1.24993/examples/file_chooser.pl000644 001750 000024 00000004571 11664366546 017611 0ustar00brianstaff000000 000000 #!/usr/bin/perl -w =doc Gtk+ 2.4 introduces a new file dialog to replace the aged Gtk2::FileSelection. This new widget is actually an interface known as Gtk2::FileChooser; the most-commonly-used implementation of that interface would be Gtk2::FileChooserDialog, a Gtk2::Dialog which has all the methods defined by Gtk2::FileChooser. This example shows how to use the file chooser to ask the user for a file name; we also add a preview widget and a shortcut, because we can. =cut use Glib qw(TRUE); use Gtk2 -init; die "This example requires gtk+ 2.4.0, but we're compiled for " . join (".", Gtk2->GET_VERSION_INFO)."\n" unless Gtk2->CHECK_VERSION (2,4,0); my $file_chooser = Gtk2::FileChooserDialog->new ('This is the spiffy new file chooser!', undef, 'open', 'gtk-cancel' => 'cancel', 'gtk-ok' => 'ok'); # create a preview widget, which will show a quick summary of information # about the selected file, updated whenever the selection changes. # note that this assumes you're on a unix-like system with the 'file' # utility installed. my $preview_widget = Gtk2::Label->new ('wheeeee'); $preview_widget->set_line_wrap (TRUE); $preview_widget->set_size_request (150, -1); $file_chooser->set (preview_widget => $preview_widget, preview_widget_active => TRUE); $file_chooser->signal_connect (selection_changed => sub { my $filename = $file_chooser->get_preview_filename; # we'll hide the preview widget if the selected item is a directory. # in practice, you may find this really annoying, as it causes the # window to change size. my $active = defined $filename && not -d $filename; if ($active) { my $size = sprintf '%.1fK', (-s $filename) / 1024; my $desc = `file '$filename'`; $desc =~ s/^$filename:\s*//; $preview_widget->set_text ("$size\n$desc"); } $file_chooser->set (preview_widget_active => $active); }); # add an app-specific entry to the shortcut list. $file_chooser->add_shortcut_folder ('/tmp'); eval { $file_chooser->add_shortcut_folder_uri ('http://localhost/'); }; warn "couldn't add shortcut: $@\n" if $@; if ('ok' eq $file_chooser->run) { # you can get the user's selection as a filename or a uri. my $uri = $file_chooser->get_uri; print "uri $uri\n"; my $filename = $file_chooser->get_filename; print "filename $filename\n"; } $file_chooser->destroy; Gtk2-1.24993/examples/calendar.pl000644 001750 000024 00000016044 13110362136 016672 0ustar00brianstaff000000 000000 #!/usr/bin/perl -w # # Copyright (C) 1998 Cesar Miquel, Shawn T. Amundson, Mattias Grnlund # Copyright (C) 2000 Tony Gale # # 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., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # $Id$ # # this was originally gtk-2.2.1/examples/calendar/calendar.c # ported to gtk2-perl (and perl-ized) by rm use strict; use Gtk2; use Glib ':constants'; use constant DEF_PAD => 10; use constant DEF_PAD_SMALL => 5; use constant TM_YEAR_BASE => 1900; sub calendar_select_font { my $calendar = shift; my $fsd = Gtk2::FontSelectionDialog->new ('Font Selection Dialog'); $fsd->set_position('mouse'); $fsd->set_font_name ($calendar->get_style->font_desc->to_string); $fsd->signal_connect ('response' => sub { my (undef, $response) = @_; if ($response eq 'ok') { my $font_name = $fsd->get_font_name; return unless $font_name; $calendar->modify_font (Gtk2::Pango::FontDescription->from_string ($font_name)); } $fsd->destroy; }); $fsd->show; } sub calendar_set_signal_strings { my $sig_ref = shift; my $new_sig = shift; $sig_ref->{prev2}->set_text($sig_ref->{prev}->get_text); $sig_ref->{prev}->set_text($sig_ref->{curr}->get_text); $sig_ref->{curr}->set_text($new_sig); } sub create_calendar { my $window; my $vbox; my $vbox2; my $vbox3; my $hbox; my $hbbox; my $calendar; my @toggles; my $button; my $frame; my $separator; my $label; my $bbox; my $i; my %signals = (); $window = Gtk2::Window->new("toplevel"); $window->set_title('GtkCalendar Example'); $window->set_border_width(5); $window->signal_connect( 'destroy' => sub { Gtk2->main_quit; } ); $window->set_resizable(FALSE); $vbox = Gtk2::VBox->new(FALSE, DEF_PAD); $window->add($vbox); # # The top part of the window, Calendar, flags and fontsel. # $hbox = Gtk2::HBox->new(FALSE, DEF_PAD); $vbox->pack_start($hbox, TRUE, TRUE, DEF_PAD); $hbbox = Gtk2::HButtonBox->new; $hbox->pack_start($hbbox, FALSE, FALSE, DEF_PAD); $hbbox->set_layout('spread'); $hbbox->set_spacing(5); # Calendar widget $frame = Gtk2::Frame->new('Calendar'); $hbbox->pack_start($frame, FALSE, TRUE, DEF_PAD); $calendar = Gtk2::Calendar->new; $calendar->mark_day(19); $frame->add($calendar); $calendar->display_options([]); $calendar->signal_connect( 'month_changed' => sub { my ($year, $month, $day) = $calendar->get_date; calendar_set_signal_strings($_[1], 'month changed: '. sprintf("%02d/%d/%d", $month+1, $day, $year) ); }, \%signals ); $calendar->signal_connect( 'day_selected' => sub { my ($year, $month, $day) = $calendar->get_date; calendar_set_signal_strings($_[1], 'day selected: '. sprintf("%02d/%d/%d", $month+1, $day, $year) ); }, \%signals ); $calendar->signal_connect( 'day_selected_double_click' => sub { my ($year, $month, $day) = $calendar->get_date; calendar_set_signal_strings($_[1], 'day selected double click: '. sprintf("%02d/%d/%d", $month+1, $day, $year) ); }, \%signals ); $calendar->signal_connect( 'prev_month' => sub { my ($year, $month, $day) = $calendar->get_date; calendar_set_signal_strings($_[1], 'prev month: '. sprintf("%02d/%d/%d", $month+1, $day, $year) ); }, \%signals ); $calendar->signal_connect( 'next_month' => sub { my ($year, $month, $day) = $calendar->get_date; calendar_set_signal_strings($_[1], 'next month: '. sprintf("%02d/%d/%d", $month+1, $day, $year) ); }, \%signals ); $calendar->signal_connect( 'prev_year' => sub { my ($year, $month, $day) = $calendar->get_date; calendar_set_signal_strings($_[1], 'prev year: '. sprintf("%02d/%d/%d", $month+1, $day, $year) ); }, \%signals ); $calendar->signal_connect( 'next_year' => sub { my ($year, $month, $day) = $calendar->get_date; calendar_set_signal_strings($_[1], 'next year: '. sprintf("%02d/%d/%d", $month+1, $day, $year) ); }, \%signals ); $separator = Gtk2::VSeparator->new; $hbox->pack_start($separator, FALSE, TRUE, 0); $vbox2 = Gtk2::VBox->new(FALSE, DEF_PAD); $hbox->pack_start($vbox2, FALSE, FALSE, DEF_PAD); # Build the Right frame with the flags in $frame = Gtk2::Frame->new('Flags'); $vbox2->pack_start($frame, TRUE, TRUE, DEF_PAD); $vbox3= Gtk2::VBox->new(TRUE, DEF_PAD_SMALL); $frame->add($vbox3); my @flags = ( 'Show Heading', 'Show Day Names', 'No Month Change', 'Show Week Numbers', 'Week Start Monday', ); for( $i = 0; $i < 5; $i++ ) { $toggles[$i] = Gtk2::CheckButton->new($flags[$i]); $toggles[$i]->signal_connect( 'toggled' => sub { my $j; my $opts = []; for($j = 0; $j < scalar(@flags); $j++ ) { if( $toggles[$j]->get_active ) { push @$opts, $flags[$j]; } } $calendar->display_options($opts); }); $vbox3->pack_start($toggles[$i], TRUE, TRUE, 0); } foreach (@flags) { $_ =~ s/\s/-/g; $_ = lc($_); } # Build the right font-button $button = Gtk2::Button->new('Font...'); $button->signal_connect( 'clicked' => sub { calendar_select_font($_[1]); }, $calendar ); $vbox2->pack_start($button, FALSE, FALSE, 0); # # Build the Signal-event part. # $frame = Gtk2::Frame->new('Signal events'); $vbox->pack_start($frame, TRUE, TRUE, DEF_PAD); $vbox2 = Gtk2::VBox->new(TRUE, DEF_PAD_SMALL); $frame->add($vbox2); $hbox = Gtk2::HBox->new(FALSE, 3); $vbox2->pack_start($hbox, FALSE, TRUE, 0); $label = Gtk2::Label->new('Signal:'); $hbox->pack_start($label, FALSE, TRUE, 0); $signals{curr} = Gtk2::Label->new(''); $hbox->pack_start($signals{curr}, FALSE, TRUE, 0); $hbox = Gtk2::HBox->new(FALSE, 3); $vbox2->pack_start($hbox, FALSE, TRUE, 0); $label = Gtk2::Label->new('Previous Signal:'); $hbox->pack_start($label, FALSE, TRUE, 0); $signals{prev} = Gtk2::Label->new(''); $hbox->pack_start($signals{prev}, FALSE, TRUE, 0); $hbox = Gtk2::HBox->new(FALSE, 3); $vbox2->pack_start($hbox, FALSE, TRUE, 0); $label = Gtk2::Label->new('Second Previous Signal:'); $hbox->pack_start($label, FALSE, TRUE, 0); $signals{prev2} = Gtk2::Label->new(''); $hbox->pack_start($signals{prev2}, FALSE, TRUE, 0); $bbox = Gtk2::HButtonBox->new; $vbox->pack_start($bbox, FALSE, FALSE, 0); $bbox->set_layout('end'); $button = Gtk2::Button->new('Close'); $button->signal_connect( 'clicked' => sub { Gtk2->main_quit; } ); $bbox->add($button); $button->set_flags('can-default'); $button->grab_default; $window->show_all; } Gtk2->init; create_calendar; Gtk2->main; exit 0; Gtk2-1.24993/examples/thread_usage.pl000644 001750 000024 00000010310 11664366546 017567 0ustar00brianstaff000000 000000 #!/usr/bin/perl # # $Id$ # # -rm # use strict; use warnings; use Data::Dumper; use Glib qw(TRUE FALSE); use Gtk2 qw/-init -threads-init 1.050/; die "Glib::Object thread safetly failed" unless Glib::Object->set_threadsafe (TRUE); my $win = Gtk2::Window->new; $win->signal_connect (destroy => sub { Gtk2->main_quit; }); $win->set_title ($0); $win->set_border_width (6); $win->set_default_size (640, 480); my $hbox = Gtk2::HBox->new (FALSE, 6); $win->add ($hbox); my $vbox = Gtk2::VBox->new (FALSE, 6); $hbox->pack_start ($vbox, FALSE, FALSE, 0); my $worklog = Log->new; $hbox->pack_start ($worklog, TRUE, TRUE, 0); my @workers; my $worker; foreach (1..5) { $worker = Worker->new ($worklog); $vbox->pack_start ($worker, FALSE, FALSE, 0); $worker->set_worker_label ('Worker '.$_); push @workers, $worker; } my $pending = Gtk2::Label->new ('0 jobs pending'); $vbox->pack_start ($pending, FALSE, FALSE, 0); Glib::Timeout->add (500, sub { $pending->set_text (Worker->jobs_pending.' jobs pending'); 1; }); my $count = 0; my $go = Gtk2::Button->new ('_Go'); $vbox->pack_start ($go, FALSE, FALSE, 0); $go->signal_connect (clicked => sub { foreach (@workers) { Worker->do_job ($count + rand); $count++; } }); my $quit = Gtk2::Button->new_from_stock ('gtk-quit'); $vbox->pack_start ($quit, FALSE, FALSE, 0); $quit->signal_connect (clicked => sub { $go->set_sensitive (FALSE); $quit->set_sensitive (FALSE); Worker->all_fired; Gtk2->main_quit; }); $win->show_all; Gtk2->main; package Worker; use strict; use warnings; use Data::Dumper; use threads; use threads::shared; use Thread::Queue; use Glib qw(TRUE FALSE); use base 'Gtk2::HBox'; our $_nworkers : shared = 0; my $_jobs; BEGIN { $_jobs = Thread::Queue->new; } sub do_job { shift; # class $_jobs->enqueue (shift); } sub all_fired { shift; # class # put on a quit command for each worker foreach (1..$_nworkers) { $_jobs->enqueue (undef); } while ($_nworkers) { Gtk2->main_iteration; } } sub jobs_pending { return $_jobs->pending; } sub new { my $class = shift; my $worklog = shift; my $self = Gtk2::HBox->new (FALSE, 6); # rebless to a worker bless $self, $class; # gui section my $label = Gtk2::Label->new ('Worker:'); $self->pack_start ($label, FALSE, FALSE, 0); my $progress = Gtk2::ProgressBar->new; $self->pack_start ($progress, FALSE, FALSE, 0); $progress->set_text ('Idle'); $self->{label} = $label; $self->{progress} = $progress; $self->{worklog} = $worklog; # thread section $self->{child} = threads->new (\&_worker_thread, $self); $_nworkers++; return $self; } sub set_worker_label { my $self = shift; my $name = shift; $self->{label}->set_text ($name); } sub _worker_thread { my $self = shift; my $progress = $self->{progress}; my $worklog = $self->{worklog}; my $i; my $job; my $sleep; # undef job means quit while (defined ($job = $_jobs->dequeue)) { $worklog->insert_msg ($self->{label}->get_text ." is doing job ($job)\n"); if (rand > 0.5) { $sleep = 1 + rand; } else { $sleep = 1 - rand; } for ($i = 0; $i < 1.1; $i += 0.25) { Gtk2::Gdk::Threads->enter; $progress->set_fraction ($i); $progress->set_text ($i * 100 .'%'); Gtk2::Gdk::Threads->leave; # we're state employee's, so let's do some 'work'... sleep $sleep; } $worklog->insert_msg ($self->{label}->get_text ." done with job ($job)\n"); } $_nworkers--; } package Log; use strict; use warnings; use Glib qw(TRUE FALSE); use base 'Gtk2::ScrolledWindow'; sub new { my $class = shift; my $self = Gtk2::ScrolledWindow->new; my $buffer = Gtk2::TextBuffer->new; my $view = Gtk2::TextView->new_with_buffer ($buffer); $self->add ($view); $view->set (editable => FALSE, cursor_visible => FALSE); $self->{view} = $view; $self->{buffer} = $buffer; bless $self, $class; $self->insert_msg ("Start...\n-------------------------------------\n"); return $self; } sub insert_msg { my $self = shift; my $msg = shift; my $buffer = $self->{buffer}; Gtk2::Gdk::Threads->enter; my $iter = $buffer->get_end_iter; $buffer->insert ($iter, $msg); $iter = $buffer->get_end_iter; $self->{view}->scroll_to_iter ($iter, 0.0, FALSE, 0.0, 0.0); Gtk2::Gdk::Threads->leave; } Gtk2-1.24993/examples/item_factory_demo.pl000644 001750 000024 00000005041 13110362136 020605 0ustar00brianstaff000000 000000 #!/usr/bin/perl # # GTK - The GIMP Toolkit # Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald # # 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., 51 Franklin Street, Fifth Floor, # Boston, MA 02110-1301, USA. # # $Id$ # # based strongly on a script by gavin brown posted on the gtk-perl mailling # list. use Gtk2; use strict; Gtk2->init; my $window = Gtk2::Window->new('toplevel'); $window->signal_connect('delete_event', sub { exit }); my @items = ( [ '/_Menu', undef, undef, undef, '', ], [ '/_Menu/Run _Galeon', # menu path 'G', # accel, see $accel_groups \&callback, # callback func 1, # callback id '', # type 'gtk-execute' # extra, in this case stock id ], [ '/_Menu/Run _Terminal', 'T', sub { print STDERR "you found the magic menu item\n"; }, 2, '', 'gtk-execute' ], [ '/_Menu/Run GIM_P', undef, \&callback, 3, '', 'gtk-execute' ], [ '/_Menu/_Editors', undef, undef, undef, '', ], [ '/_Menu/Editors/Run _Gedit', undef, \&callback, 4, '', 'gtk-execute' ], [ '/_Menu/Editors/Run _Emacs', undef, \&callback, 5, '', 'gtk-execute' ], [ '/_Menu/Editors/Run _nipples', 'n', \&callback, 6, '', 'gtk-execute' ], ); use Data::Dumper; sub callback { print STDERR Dumper( @_ ); } # create an accel group to catch our item's accelerators my $accel_group = Gtk2::AccelGroup->new; # create the factory, passing the accel_group my $factory = Gtk2::ItemFactory->new('Gtk2::MenuBar', '
', $accel_group); # pass the items, creating them. $factory->create_items('foo', @items); # get the root of the menu, widget, out of the factory my $menu = $factory->get_widget('
'); $window->add($menu); # add the accel group to the window so they can be caught. $window->add_accel_group($accel_group); $window->show_all; Gtk2->main; Gtk2-1.24993/examples/buttonbox.pl000644 001750 000024 00000007253 13110362136 017147 0ustar00brianstaff000000 000000 #!/usr/bin/perl -w # # GTK - The GIMP Toolkit # Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald # # 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., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # $Id$ # # this was originally gtk-2.2.1/examples/buttonbox/buttonbox.c # ported to gtk2-perl by rm use strict; use Glib qw(TRUE FALSE); use Gtk2 -init; # Create a Button Box with the specified parameters sub create_bbox { my $horizontal = shift; my $title = shift; my $spacing = shift; my $child_w = shift; my $child_h = shift; my $layout = shift; my $frame = Gtk2::Frame->new($title); my $bbox; if( $horizontal ) { $bbox = Gtk2::HButtonBox->new; } else { $bbox = Gtk2::VButtonBox->new; } $bbox->set_border_width(5); $frame->add($bbox); # Set the appearance of the Button Box $bbox->set_layout($layout); $bbox->set_spacing($spacing); #gtk_button_box_set_child_size (GTK_BUTTON_BOX (bbox), child_w, child_h); my $button = Gtk2::Button->new_from_stock('gtk-ok'); $button->signal_connect( 'clicked' => sub { print "$title ok clicked\n"; } ); $bbox->add($button); $button = Gtk2::Button->new_from_stock('gtk-cancel'); $button->signal_connect( 'clicked' => sub { print "$title cancel clicked\n"; } ); $bbox->add($button); $button = Gtk2::Button->new_from_stock('gtk-help'); $button->signal_connect( 'clicked' => sub { print "$title help clicked\n"; } ); $bbox->add($button); return($frame); } # Initialize GTK Gtk2->init; my $window = Gtk2::Window->new("toplevel"); $window->set_title("Button Boxes"); $window->signal_connect( "destroy" => sub { Gtk2->main_quit; }); $window->set_border_width(10); my $main_vbox = Gtk2::VBox->new("false", 0); $window->add($main_vbox); my $frame_horz = Gtk2::Frame->new("Horizontal Button Boxes"); $main_vbox->pack_start($frame_horz, TRUE, TRUE, 10); my $vbox = Gtk2::VBox->new(FALSE, 0); $vbox->set_border_width(10); $frame_horz->add($vbox); $vbox->pack_start( create_bbox(TRUE, 'Spread (spacing 40)', 40, 85, 20, 'spread'), TRUE, TRUE, 0); $vbox->pack_start( create_bbox(TRUE, 'Edge (spacing 30)', 30, 85, 20, 'edge'), TRUE, TRUE, 5); $vbox->pack_start( create_bbox(TRUE, 'Start (spacing 20)', 20, 85, 20, 'start'), TRUE, TRUE, 5); $vbox->pack_start( create_bbox(TRUE, 'End (spacing 10)', 10, 85, 20, 'end'), TRUE, TRUE, 5); my $frame_vert = Gtk2::Frame->new("Vertical Button Boxes"); $main_vbox->pack_start($frame_vert, TRUE, TRUE, 10); my $hbox = Gtk2::HBox->new(FALSE, 0); $hbox->set_border_width(10); $frame_vert->add($hbox); $hbox->pack_start( create_bbox(FALSE, 'Spread (spacing 5)', 5, 85, 20, 'spread'), TRUE, TRUE, 0); $hbox->pack_start( create_bbox(FALSE, 'Edge (spacing 30)', 30, 85, 20, 'edge'), TRUE, TRUE, 0); $hbox->pack_start( create_bbox(FALSE, 'Start (spacing 20)', 20, 85, 20, 'start'), TRUE, TRUE, 0); $hbox->pack_start( create_bbox(FALSE, 'End (spacing 20)', 20, 85, 20, 'end'), TRUE, TRUE, 0); $window->show_all; # Enter the event loop Gtk2->main; exit 0; Gtk2-1.24993/examples/scribble.pl000644 001750 000024 00000010664 13110362136 016710 0ustar00brianstaff000000 000000 #!/usr/bin/perl -w # # GTK - The GIMP Toolkit # Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald # # 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., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # $Id$ # # this was originally gtk-2.2.0/examples/scribble-simple/scribble-simple.c # ported to gtk2-perl by muppet use strict; use Glib qw/TRUE FALSE/; use Gtk2; # Backing pixmap for drawing area my $pixmap = undef; # Create a new backing pixmap of the appropriate size sub configure_event { my $widget = shift; # GtkWidget *widget my $event = shift; # GdkEventConfigure *event $pixmap = Gtk2::Gdk::Pixmap->new ($widget->window, $widget->allocation->width, $widget->allocation->height, -1); $pixmap->draw_rectangle ($widget->style->white_gc, TRUE, 0, 0, $widget->allocation->width, $widget->allocation->height); return TRUE; } # Redraw the screen from the backing pixmap sub expose_event { my $widget = shift; # GtkWidget *widget my $event = shift; # GdkEventExpose *event $widget->window->draw_drawable ( $widget->style->fg_gc($widget->state), $pixmap, $event->area->x, $event->area->y, $event->area->x, $event->area->y, $event->area->width, $event->area->height); return FALSE; } # Draw a rectangle on the screen sub draw_brush { my ($widget, $x, $y) = @_; # this is not a real GdkRectangle structure; we don't actually need one. my @update_rect; $update_rect[0] = $x - 5; $update_rect[1] = $y - 5; $update_rect[2] = 10; $update_rect[3] = 10; $pixmap->draw_rectangle ($widget->style->black_gc, TRUE, @update_rect); $widget->queue_draw_area (@update_rect); } sub button_press_event { my $widget = shift; # GtkWidget *widget my $event = shift; # GdkEventButton *event if ($event->button == 1 && defined $pixmap) { draw_brush ($widget, $event->coords); } return TRUE; } sub motion_notify_event { my $widget = shift; # GtkWidget *widget my $event = shift; # GdkEventMotion *event my ($x, $y, $state); if ($event->is_hint) { (undef, $x, $y, $state) = $event->window->get_pointer; } else { $x = $event->x; $y = $event->y; $state = $event->state; } if ($state >= "button1-mask" && defined $pixmap) { draw_brush ($widget, $x, $y); } return TRUE; } { Gtk2->init; my $window = Gtk2::Window->new ('toplevel'); $window->set_name ("Test Input"); my $vbox = Gtk2::VBox->new (FALSE, 0); $window->add ($vbox); $vbox->show; $window->signal_connect ("destroy", sub { exit(0); }); # Create the drawing area my $drawing_area = Gtk2::DrawingArea->new; $drawing_area->set_size_request (200, 200); $vbox->pack_start ($drawing_area, TRUE, TRUE, 0); $drawing_area->show; # Signals used to handle backing pixmap $drawing_area->signal_connect (expose_event => \&expose_event); $drawing_area->signal_connect (configure_event => \&configure_event); # Event signals $drawing_area->signal_connect (motion_notify_event => \&motion_notify_event); $drawing_area->signal_connect (button_press_event => \&button_press_event); $drawing_area->set_events ([qw/exposure-mask leave-notify-mask button-press-mask pointer-motion-mask pointer-motion-hint-mask/]); # .. And a quit button my $button = Gtk2::Button->new ("Quit"); $vbox->pack_start ($button, FALSE, FALSE, 0); $button->signal_connect_swapped (clicked => sub { $_[0]->destroy; }, $window); $button->show; $window->show; Gtk2->main; } Gtk2-1.24993/examples/color_snooper.pl000644 001750 000024 00000011561 11664366546 020030 0ustar00brianstaff000000 000000 #!/usr/bin/perl =pod GdkPixbuf is a client-side image data object; in C you just deal with 24-bit RGB or 32-bit RGBA image data, but in Perl such things are a little difficult. This code shows how to find pixels within a GdkPixbuf, as well as how to create new GdkCursors. -- muppet, 3 March 04 =cut use strict; use warnings; use Glib qw(FALSE TRUE); use Gtk2 -init; die "Usage: $0 imagefile\n" unless @ARGV; my $pixbuf = Gtk2::Gdk::Pixbuf->new_from_file ($ARGV[0]); # grab this now, so we only keep one copy of it. my $pixels = $pixbuf->get_pixels; # create a bunch of widgets... my $window = Gtk2::Window->new; my $hbox = Gtk2::HBox->new; my $ebox = Gtk2::EventBox->new; my $align = Gtk2::Alignment->new (0.5, 0.5, 0.0, 0.0); my $image = Gtk2::Image->new_from_pixbuf ($pixbuf); my $frame = Gtk2::Frame->new ('Color'); my $vbox = Gtk2::VBox->new; my $label = Gtk2::Label->new; my $darea = Gtk2::DrawingArea->new; # lay 'em out... $window->add ($hbox); $ebox->add ($image); $align->add ($ebox); $hbox->add ($align); $hbox->pack_start ($frame, FALSE, FALSE, 0); $frame->add ($vbox); $vbox->pack_start ($label, FALSE, FALSE, 0); $vbox->pack_start ($darea, FALSE, FALSE, 0); # hook 'em up... $window->set_title ("Color Snooper"); $window->show_all; $window->signal_connect (delete_event => sub {Gtk2->main_quit;}); $darea->set_size_request (64, 64); $ebox->window->set_cursor (create_cursor()); $ebox->add_events (['pointer-motion-mask', 'pointer-motion-hint-mask']); $ebox->signal_connect (motion_notify_event => sub { my ($widget, $event) = @_; # this is so we keep getting pointer events. $widget->window->get_pointer; # the Gtk2::Image is a no-window widget; translate its coords. # it should be packed tightly in the event box, thanks to the # alignment, but this is for paranoia's sake. my ($x, $y) = $widget->translate_coordinates ($image, $event->x, $event->y); # the image data is packed RGB or RGBA data. if we can calculate # the location of our pixel-of-interest, then we can use substr # and unpack to get to its values. my ($r, $g, $b, $a) = unpack "C*", substr $pixels, $pixbuf->get_rowstride * $y + $pixbuf->get_n_channels * $x, $pixbuf->get_n_channels; $label->set_text ("x,y: ".$event->x.", ".$event->y."\n" ."R: $r\n" ."G: $g\n" ."B: $b" .($pixbuf->get_has_alpha ? "\nA: $a" : "")); # GdkColors use 16-bit color values, but GdkPixbufs use 8-bit. # note the bitshifts to account for that. my $color = Gtk2::Gdk::Color->new ($r << 8, $g << 8, $b << 8); $darea->modify_bg ('normal', $color); $darea->queue_draw; }); # and go. Gtk2->main; sub create_cursor { # these icons borrowed from the gimp. use constant width => 32; use constant height => 32; use constant x_hot => 13; # the tip of the dropper, coords use constant y_hot => 30; # picked out by hand. my $dropper_small_bits = pack 'C*', 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0xc0, 0xa1, 0x00, 0x00, 0x20, 0xbc, 0x00, 0x00, 0x40, 0xbb, 0x00, 0x00, 0x80, 0x44, 0x00, 0x00, 0x40, 0x34, 0x00, 0x00, 0x20, 0x13, 0x00, 0x00, 0x90, 0x15, 0x00, 0x00, 0xc8, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x80, 0x0c, 0x00, 0x00, 0x40, 0x06, 0x00, 0x00, 0x40, 0x03, 0x00, 0x00, 0xe0, 0x01, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00; my $dropper_small_mask_bits = pack 'C*', 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0xc0, 0xff, 0x00, 0x00, 0xe0, 0xff, 0x00, 0x00, 0xc0, 0xff, 0x00, 0x00, 0xc0, 0x7f, 0x00, 0x00, 0xe0, 0x3f, 0x00, 0x00, 0xf0, 0x1f, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0xc0, 0x1f, 0x00, 0x00, 0xe0, 0x0f, 0x00, 0x00, 0xe0, 0x07, 0x00, 0x00, 0xf0, 0x03, 0x00, 0x00, 0xe0, 0x01, 0x00, 0x00, 0x40, 0x00, 0x00; my $icon = Gtk2::Gdk::Bitmap->create_from_data (undef, $dropper_small_bits, width, height); my $mask = Gtk2::Gdk::Bitmap->create_from_data (undef, $dropper_small_mask_bits, width, height); return Gtk2::Gdk::Cursor->new_from_pixmap ($icon, $mask, Gtk2::Gdk::Color->new (0, 0, 0), Gtk2::Gdk::Color->new (65535, 65535, 65535), x_hot, y_hot); } Gtk2-1.24993/examples/histogramplot.pl000644 001750 000024 00000047576 13110362136 020033 0ustar00brianstaff000000 000000 #!/usr/bin/perl -w # # 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., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # $Id$ # # originally written in C by muppet in 2001 or 2002, i can't remember. # ported from C to gtk2-perl 2003 by muppet =doc Create a new, self-drawing widget in Perl code. This example shows how to subclass Glib::Object/Gtk2::Widget types, how to override class closures, how to define how much size you want to request for yourself, how to draw shapes and text with Gdk, how to handle mouse events, why you'd want to implement SET_PROPERTY for yourself, and how to emit signals. And the widget is actually functional, too. :-) =cut package Histogram::Plot; use warnings; use strict; use Glib qw/TRUE FALSE/; use Gtk2; use Gtk2::Gdk::Keysyms; use constant MIN_CHART_WIDTH => 256; use constant MIN_CHART_HEIGHT => 100; my %drag_info; use constant DRAG_PAD => 2; sub screen_to_threshold { my ($plot, $sx) = @_; my $val = ($sx - $plot->{chartleft}) * 256 / $plot->{chartwidth}; return $val < 0 ? 0 : $val > 255 ? 255 : $val; } sub threshold_to_screen { $_[1] / 256.0 * $_[0]->{chartwidth} + $_[0]->{chartleft} } # # Glib::Objects are special; they're not normal perl objects (although # the bindings go out of their way to make them act like it). # # if you just want to add a new function for yourself to a Gtk2::DrawingArea, # the stuff we're about to get into is not strictly necessary; you could just # re-bless the object reference into the decendent class and add an @ISA for # it, like normal perl. # # however, adding signals, properties, or virtual function overrides to a # GObject-based class requires fiddling with a GObjectClass structure # specific to that subclass. if you added a new property to a re-blessed # Glib::Object, *all* instances of that reblessed object's GObject parent # would have the new property! that's because you didn't create a new # GObjectClass for that new subclass. # # in order to create a new type to which you can add signals and properties, # and which will be indistinguishable from "normal" GObjects at the C level # (which means you can pass it to other gtk functions), you need to # register your subclass with the Glib::Type subsystem. # # here, we're registering the current package as a new subclass of # Gtk2::DrawingArea, and in the process adding a signal and a few # object properties. # use Glib::Object::Subclass 'Gtk2::DrawingArea', signals => { # # create a new signal... # threshold_changed => { method => 'do_threshold_changed', flags => [qw/run-first/], return_type => undef, # void return param_types => [], # instance and data are automatic }, # # override some built-ins... note that for this to work # there has to be a signal to go along with the virtual # function you want to override... # # i chose do_size_request to keep from having the normal # size_request method being called. size_request => \&do_size_request, # just to show it off... you can use names, but you have # to use a qualified name, or it looks in the current package # at runtime, not setup time. expose_event => __PACKAGE__.'::expose_event', configure_event => \&configure_event, motion_notify_event => \&motion_notify_event, button_press_event => \&button_press_event, button_release_event => \&button_release_event, key_press_event => \&key_press_event, focus_in_event => \&handle_focus, focus_out_event => \&handle_focus, }, properties => [ Glib::ParamSpec->double ('threshold', 'Threshold', 'Diving line between above and below', 0.0, 255.0, 127.0, [qw/readable writable/]), Glib::ParamSpec->boxed ('histogram', 'Histogram Data', 'Array reference containing histogram data', 'Glib::Scalar', [qw/readable writable/]), Glib::ParamSpec->boolean ('continuous', 'Continuous updates', 'Emit the threshold_changed signal on every mouse event during drag, rather than just on release', FALSE, [qw/readable writable/]), ], ; # # at the lowest level, new Glib::Objects are created by Glib::Object::new. # that function creates the instance and calls the instance initializers # for all classes in the object's lineage, from the parent to the descendant. # if there's any setup you would need to do in a constructor, it goes here. # sub INIT_INSTANCE { my $plot = shift; warn "INIT_INSTANCE $plot"; $plot->can_focus (TRUE); $plot->{threshold} = 0; $plot->{histogram} = [ 0..255 ]; $plot->{pixmap} = undef; $plot->{th_gc} = undef; $plot->{dragging} = FALSE; $plot->{continuous} = FALSE; $plot->{origin_layout} = $plot->create_pango_layout ("0.0%"); $plot->{maxval_layout} = $plot->create_pango_layout ("100.0%"); $plot->{current_layout} = $plot->create_pango_layout ("0"); $plot->{maxscale_layout} = $plot->create_pango_layout ("255"); $plot->{minscale_layout} = $plot->create_pango_layout ("0"); $plot->{max} = 0; $plot->{chartwidth} = 0; $plot->{chartleft} = 0; $plot->{bottom} = 0; $plot->{height} = 0; $plot->set_events ([qw/exposure-mask leave-notify-mask button-press-mask button-release-mask pointer-motion-mask pointer-motion-hint-mask/]); } # # whenever anybody tries to get the value of a gobject property belonging # to this class, this function will be called. note that this call # signature is different from the C version -- here we return the requested # value. # sub GET_PROPERTY { my ($plot, $pspec) = @_; if ($pspec->get_name eq 'threshold') { return $plot->{threshold}; } elsif ($pspec->get_name eq 'histogram') { return $plot->{histogram}; } elsif ($pspec->get_name eq 'continuous') { return $plot->{continuous}; } } # # whenever anybody tries to set the value of a gobject property belonging # to this class, this function will be called. the provided Glib::Object::Base # method just stores the value in a hash key, but here we need to do other # bits of work when a value is changed. # # note that this one also is changed from the C call signature; the order # of the arguments has been swizzled to be more consistent with GET_PROPERTY. # sub SET_PROPERTY { my ($plot, $pspec, $newval) = @_; if ($pspec->get_name eq 'threshold') { $plot->set_plot_data ($newval, ()); } elsif ($pspec->get_name eq 'histogram') { $plot->set_plot_data (undef, @$newval); } elsif ($pspec->get_name eq 'continuous') { $plot->{continuous} = $newval; } } sub calc_dims { my $plot = shift; my $context = $plot->{origin_layout}->get_context; my $fontdesc = $context->get_font_description; my $metrics = $context->get_metrics ($fontdesc, undef); $plot->{textwidth} = 5 * $metrics->get_approximate_digit_width / Gtk2::Pango->scale; #PANGO_SCALE; $plot->{textheight} = ($metrics->get_descent + $metrics->get_ascent) / Gtk2::Pango->scale; #PANGO_SCALE; $plot->{chartleft} = $plot->{textwidth} + 2; $plot->{chartwidth} = $plot->allocation->width - $plot->{chartleft}; $plot->{bottom} = $plot->allocation->height - $plot->{textheight} - 3; $plot->{height} = $plot->{bottom}; } # this gets called when the widget's parent container wants to know # how much space we want. it's important to note that this sub will be # called from deep within the gtk library, not from perl code, which is # why it had to be implemented as a class closure override. # we modify the requisition passed to us. sub do_size_request { my ($plot, $requisition) = @_; warn "in class override for $_[0]\::do_size_request"; $requisition->width ($plot->{textwidth} + 2 + MIN_CHART_WIDTH); $requisition->height ($plot->{textheight} + MIN_CHART_HEIGHT); # chain up to the parent class. shift->signal_chain_from_overridden (@_); } sub expose_event { my ($plot, $event) = @_; $plot->window->draw_drawable ($plot->style->fg_gc($plot->state), $plot->{pixmap}, $event->area->x, $event->area->y, $event->area->x, $event->area->y, $event->area->width, $event->area->height); return FALSE; } sub configure_event { my ($plot, $event) = @_; $plot->{pixmap} = Gtk2::Gdk::Pixmap->new ($plot->window, $plot->allocation->width, $plot->allocation->height, -1); # same depth as window # update dims $plot->calc_dims; $plot->histogram_draw; return TRUE; } sub draw_th_marker { my ($plot, $w, $draw_text) = @_; my $threshold_screen = $plot->threshold_to_screen ($plot->{threshold}); if (!$plot->{th_gc}) { $plot->{th_gc} = Gtk2::Gdk::GC->new ($plot->{pixmap}); $plot->{th_gc}->copy ($plot->style->fg_gc ($plot->state)); $plot->{th_gc}->set_function ('invert'); } $w->draw_line ($plot->{th_gc}, $threshold_screen, 0, $threshold_screen, $plot->{bottom}); $plot->{current_layout}->set_text (sprintf '%d', $plot->{threshold}); my ($textwidth, $textheight) = $plot->{current_layout}->get_pixel_size; $plot->{marker_textwidth} = $textwidth; # erase text $w->draw_rectangle ($plot->style->bg_gc($plot->state), TRUE, $threshold_screen - $plot->{marker_textwidth} - 1, $plot->{bottom} + 1, # the extra 1 in width erases the focus ring $plot->{marker_textwidth} + 2, $textheight); if ($draw_text) { $w->draw_layout ($plot->{th_gc}, $threshold_screen - $plot->{marker_textwidth}, $plot->{bottom} + 1, $plot->{current_layout}); $plot->style->paint_focus ($w, $plot->state, undef, # area $plot, undef, # detail $threshold_screen - $plot->{marker_textwidth}, $plot->{bottom} + 1, $plot->{marker_textwidth} + 1, $textheight) if $plot->has_focus; } } # # the user can click either very near the vertical line of the marker # or on (actually in the bbox of) the marker text. # sub marker_hit { my ($plot, $screen_x, $screen_y) = @_; my $screen_th = $plot->threshold_to_screen ($plot->{threshold}); if ($screen_y > $plot->{bottom}) { # check for hit on text if ($screen_x > $screen_th - $plot->{marker_textwidth} && $screen_x <= $screen_th) { return $screen_th; } } else { # check for hit on line if ($screen_x > $screen_th - DRAG_PAD && $screen_x < $screen_th + DRAG_PAD) { return $screen_th; } } return undef; } sub button_press_event { my ($plot, $event) = @_; $plot->grab_focus if $plot->can_focus and not $plot->has_focus; return FALSE if ($event->button != 1 || not defined $plot->{pixmap}); my $sx = $plot->marker_hit ($event->x, $event->y); return FALSE unless defined $sx; # erase the previous threshold line from the pixmap... $plot->{threshold_back} = $plot->{threshold}; $plot->draw_th_marker ($plot->{pixmap}, FALSE); $plot->window->draw_drawable ($plot->style->fg_gc($plot->state), $plot->{pixmap}, $plot->threshold_to_screen ($plot->{threshold}) - $plot->{marker_textwidth}, 0, $plot->threshold_to_screen ($plot->{threshold}) - $plot->{marker_textwidth}, 0, $plot->{marker_textwidth} + 1, $plot->allocation->height); # and draw the new one on the window. $plot->draw_th_marker ($plot->window, TRUE); $plot->{dragging} = TRUE; $drag_info{offset_x} = $plot->threshold_to_screen ($plot->{threshold}) - $event->x; return TRUE; } sub button_release_event { my ($plot, $event) = @_; return FALSE if ($event->button != 1 || !$plot->{dragging} || not defined $plot->{pixmap}); # erase the previous threshold line from the window... $plot->draw_th_marker ($plot->window, FALSE); $plot->{threshold} = $plot->screen_to_threshold ($event->x + $drag_info{offset_x}); # and draw the new one on the pixmap. $plot->draw_th_marker ($plot->{pixmap}, TRUE); $plot->window->draw_drawable ($plot->style->fg_gc ($plot->state), $plot->{pixmap}, 0, 0, 0, 0, $plot->allocation->width, $plot->allocation->height); $plot->{dragging} = FALSE; # let any listeners know that if the threshold has changed $plot->signal_emit ("threshold-changed") if $plot->{threshold_back} != $plot->{threshold} and not $plot->{continuous}; return TRUE; } sub key_press_event { my ($plot, $event) = @_; my $increment; my $keyval = $event->keyval; if ($keyval == $Gtk2::Gdk::Keysyms{Up} || $keyval == $Gtk2::Gdk::Keysyms{KP_Up} || $keyval == $Gtk2::Gdk::Keysyms{Left} || $keyval == $Gtk2::Gdk::Keysyms{KP_Left}) { # just a jump to the left... $increment = -1; } elsif ($keyval == $Gtk2::Gdk::Keysyms{Down} || $keyval == $Gtk2::Gdk::Keysyms{KP_Down} || $keyval == $Gtk2::Gdk::Keysyms{Right} || $keyval == $Gtk2::Gdk::Keysyms{KP_Right}) { # and a step to the ri-i-ight $increment = 1; } else { $increment = 0; } if ($increment) { if ($event->state >= 'control-mask') { # Ctrl+Arrow jumps to the relevant extreme. $increment *= 256; } elsif ($event->state >= 'shift-mask') { # Shift+Arrow bumps by a larger increment. $increment *= 10; } my $newthresh = $plot->{threshold} + $increment; $newthresh = 0 if $newthresh < 0; $newthresh = 255 if $newthresh > 255; if ($newthresh != $plot->{threshold}) { # use set so the redraw happens correctly. $plot->set (threshold => $newthresh); # always emit. $plot->signal_emit ('threshold-changed'); } return TRUE; } else { return FALSE; } } sub handle_focus { my $plot = shift; my $ret = $plot->signal_chain_from_overridden (@_); # erase $plot->draw_th_marker ($plot->{pixmap}, FALSE); # redraw $plot->draw_th_marker ($plot->{pixmap}, TRUE); return $ret; } my $sizer; sub motion_notify_event { my ($plot, $event) = @_; my ($x, $y, $state); if ($event->is_hint) { (undef, $x, $y, $state) = $event->window->get_pointer; } else { $x = $event->x; $y = $event->y; $state = $event->state; } if ($plot->{dragging}) { return FALSE unless $state >= 'button1-mask' and defined $plot->{pixmap}; $plot->draw_th_marker ($plot->window, FALSE); $x += $drag_info{offset_x}; # confine to valid region my $t = $plot->screen_to_threshold ($x); $x = $plot->threshold_to_screen (0) if $t < 0; $x = $plot->threshold_to_screen (255) if $t > 255; $plot->{threshold} = $plot->screen_to_threshold ($x); $plot->draw_th_marker ($plot->window, TRUE); $plot->signal_emit ("threshold-changed") if $plot->{continuous}; } else { my $c = undef; my $sx = $plot->marker_hit ($x, $y); if (defined $sx) { $sizer = Gtk2::Gdk::Cursor->new ('GDK_SB_H_DOUBLE_ARROW') if not defined $sizer; $c = $sizer; } $plot->window->set_cursor ($c); } return TRUE; } sub histogram_draw { my $plot = shift; my $gc = $plot->style->fg_gc ($plot->state); # erase (the hard way) $plot->{pixmap}->draw_rectangle ($plot->style->bg_gc ($plot->state), TRUE, 0, 0, $plot->allocation->width, $plot->allocation->height); if ($plot->{max} != 0 && scalar(@{$plot->{histogram}})) { ##GdkPoint points[256+2]; my @hist = @{ $plot->{histogram} }; my @points = (); for (my $i = 0; $i < 256; $i++) { push @points, $i/256.0 * $plot->{chartwidth} + $plot->{chartleft}, $plot->{bottom} - $plot->{height} * $hist[$i] / $plot->{max}; } $plot->{pixmap}->draw_polygon ($gc, TRUE, @points, $plot->allocation->width, $plot->{bottom} + 1, $plot->{chartleft}, $plot->{bottom} + 1); } # mark threshold # should draw this after the scale... draw_th_marker ($plot, $plot->{pixmap}, TRUE); # the annotations $plot->{pixmap}->draw_line ($gc, 0, 0, $plot->{chartleft}, 0); $plot->{pixmap}->draw_line ($gc, 0, $plot->{bottom}, $plot->{chartleft}, $plot->{bottom}); $plot->{pixmap}->draw_line ($gc, $plot->{chartleft}, $plot->{bottom}, $plot->{chartleft}, $plot->{bottom} + $plot->{textheight} + 1); $plot->{pixmap}->draw_line ($gc, $plot->allocation->width - 1, $plot->{bottom}, $plot->allocation->width - 1, $plot->{bottom} + $plot->{textheight} + 1); $plot->{pixmap}->draw_layout ($gc, $plot->{chartleft} - (1 + $plot->{textwidth}), 1, $plot->{maxval_layout}); $plot->{pixmap}->draw_layout ($gc, $plot->{chartleft} - (1 + $plot->{textwidth}), $plot->{bottom} - 1 - $plot->{textheight}, $plot->{origin_layout}); $plot->{pixmap}->draw_layout ($gc, $plot->{chartleft} + 2, $plot->{bottom} + 1, $plot->{minscale_layout}); } # # change the data displayed in the window, with all the necessary # work to get it properly updated. # # @threshold: new threshold. ignored if undef. # @histogram: new histogram. if not empty, copy to the histwin's # internal histogram cache. MUST be 256 items long. # sub set_plot_data { my ($plot, $threshold, @hist) = @_; $plot->{threshold} = $threshold if defined $threshold; if (@hist) { my $total = 0; my $max = 0; for (my $i = 0; $i < 256; $i++) { $total += $hist[$i]; $max = $hist[$i] if $hist[$i] > $max; } $plot->{max} = $max; $plot->{histogram} = \@hist; $plot->{maxval_layout}->set_text ( sprintf "%4.1f%%", (100.0 * $plot->{max}) / $total ); } # update dims since text may have changed $plot->calc_dims; # if the pixmap doesn't exist, we haven't been put on screen yet. # don't bother drawing anything. if ($plot->{pixmap}) { $plot->histogram_draw; $plot->queue_draw; } } sub do_threshold_changed { warn "default threshold handler\n"; } ################ # # public methods # # we inherit new from Glib::Object::Subclass, and all the stuff we'd need # to get to is available as object properties, so, well, there's no work # to do here. :-) # ########################################################################## # now let's take that code for a test drive... # package main; use Glib qw/TRUE FALSE/; use Gtk2 qw/-init/; my $window = Gtk2::Window->new; $window->signal_connect (delete_event => sub { Gtk2->main_quit; FALSE }); my $vbox = Gtk2::VBox->new; $window->add ($vbox); $window->set_border_width (6); # # a nicely framed histogram plot with some cheesy data # my $plot = Histogram::Plot->new ( threshold => 64, histogram => [ map { sin $_/256*3.1415 } (0..255) ] ); my $frame = Gtk2::Frame->new; $vbox->pack_start ($frame, TRUE, TRUE, 0); $frame->add ($plot); $frame->set_shadow_type ('in'); # # a way to manipulate one of the properties... # my $check = Gtk2::CheckButton->new ("Continuous"); $vbox->pack_start ($check, FALSE, FALSE, 0); $check->set_active ($plot->get ('continuous')); $check->signal_connect (toggled => sub { $plot->set (continuous => $check->get_active); 1; }); # # do something fun when the threshold changes. # my $label = Gtk2::Label->new (sprintf 'threshold: %d', $plot->get ('threshold')); $vbox->pack_start ($label, FALSE, FALSE, 0); $plot->signal_connect (threshold_changed => sub { $label->set_text (sprintf 'threshold: %d', $plot->get('threshold')); }); # # all systems go! # $window->show_all; Gtk2->main; # explicit clean up makes us see various messages on a debug build. undef $plot; undef $window; Gtk2-1.24993/examples/cellrenderer_popup.pl000644 001750 000024 00000025406 13110362136 021014 0ustar00brianstaff000000 000000 #!/usr/bin/perl -w =doc This is an example of creating a custom cell renderer. The code isn't terribly pretty, but you should be able to get the gist. If you want to use this object, then go ahead, but remember the gpl. =cut # # Copyright (C) 2003-2004 by muppet # # 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., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # $Id$ # # we require things from 1.04. use Gtk2 1.04, -init; package Mup::CellRendererPopup; use Glib qw(TRUE FALSE); use Glib::Object::Subclass Gtk2::CellRenderer::, signals => { edited => { flags => [qw/run-last/], # path index param_types => [qw/Glib::String Glib::Int/], }, }, properties => [ Glib::ParamSpec->boolean ('show_box', 'Show Box', 'If true, draw an option menu-looking background on the cell', TRUE, ['readable', 'writable']), Glib::ParamSpec->boolean ('editable', 'Editable', 'Can i change that?', FALSE, ['readable', 'writable']), Glib::ParamSpec->int ('index', 'Index', 'Index of selected list item', 0, 65535, 0, [qw/readable writable/]), Glib::ParamSpec->boxed ('list', 'List', 'List of possible values', 'Glib::Scalar', [qw/readable writable/]), ], ; use Data::Dumper; use constant xpad => 3; use constant ypad => 2; # arrow will use text height use constant arrow_width => 15; sub INIT_INSTANCE { my $self = shift; $self->{show_box} = TRUE; } sub calc_size { my ($cell, $layout) = @_; my ($w, $h) = $layout->get_pixel_size; return (0, 0, $w + xpad * 2 + arrow_width, $h + ypad * 2); } sub GET_SIZE { my ($cell, $widget, $area) = @_; if ($area) { return (3, 3, $area->width - arrow_width - 2*xpad - 4, $area->height - 6); } my $layout = $cell->get_layout ($widget); $layout->set_text ($cell->{list}[$cell->{index}] || ""); return $cell->calc_size ($layout); } sub get_layout { my ($cell, $widget) = @_; return $cell->{layout} if defined $cell->{layout}; return $cell->{layout} = $widget->create_pango_layout (""); } sub RENDER { my ($cell, $drawable, $widget, $background_area, $cell_area, $expose_area, $flags) = @_; my $state = 'normal'; if ($cell->{show_box}) { $widget->get_style->paint_box ($drawable, $widget->state, 'out', $cell_area, undef, "optionmenu", $cell_area->x, $cell_area->y, $cell_area->width, $cell_area->height); } else { if ($flags & 'selected') { $state = $widget->has_focus ? 'selected' : 'active'; } else { $state = $widget->state eq 'insensitive' ? 'insensitive' : 'normal'; } } my $layout = $cell->get_layout ($widget); $layout->set_text ($cell->{list}[$cell->{index}] || ""); my ($xoff, $yoff, $width, $height) = $cell->calc_size ($layout); $widget->get_style->paint_layout ($drawable, $state, 1, $cell_area, $widget, "cellrenderertext", $cell_area->x + $xoff + xpad, $cell_area->y + $yoff + ypad, $layout); $widget->get_style->paint_arrow ($drawable, $state, 'none', $cell_area, $widget, "", 'down', 0, $cell_area->x+$cell_area->width - arrow_width, $cell_area->y+$cell_area->height - ($cell_area->height - 2), arrow_width - 3, $cell_area->height - 2); } sub menu_pos_func { my ($menu, $x, $y, $data) = @_; my ($treeview, $cell_area) = @$data; # we need to figure out where the cell is in window coordinates, # so we can put the menu near it. tree_to_widget_coords() maps # the cell_area's x and y to widget coords, but this is in the # entire treeview's coordinate space; if it's inside a scrolled # window, then only part of it is visible. thus, we need to add # the offset of the visible portion of the treeview. we want the # menu to start xpad from the left of the cell (just like the # button graphic), and we'll start by centering it vertically. # got all that? my ($wx, $wy) = $treeview->get_bin_window->get_origin; my ($tx, $ty) = $treeview->tree_to_widget_coords($cell_area->x, $cell_area->y); my $visible = $treeview->get_visible_rect; $x = $wx + $visible->x + $tx + xpad; $y = $wy + $visible->y + $ty + $cell_area->height / 2 - 2; # center the menu vertically around the selected item. # this is inspired heavily by GtkOptionMenu. my $active = $menu->get_active; $y -= $active->get_child_requisition->height / 2 if $active; foreach my $i ($menu->get_children) { last if $i == $active; $y -= $i->get_child_requisition->height if $i->visible; } # play nicely with rtl languages if ($treeview->get_direction eq 'rtl') { $x = $wx + $tx + $cell_area->width - $menu->get_child_requisition->width; } return ($x, $y, 1); } sub editing_done { my ($item, $info) = @_; my ($cell, $editable) = @$info; $cell->signal_emit ('edited', $item->{path}, $item->{index}); # see the evil trick description below $editable->remove_widget; } sub START_EDITING { my ($cell, $event, $widget, $path, $background_area, $cell_area, $flags) = @_; my $menu = Gtk2::Menu->new; my @data = @{ $cell->{list} }; # this is an evil trick. we're creating a custom widget and handling # the editing ourselves, but the higher level code only thinks we're # editing if we return an editable. so we return an editable. of # course, we have to remove it in the menu activate callbacks so that # it doesn't stick around. my $editable = Gtk2::Entry->new; for (my $i = 0 ; $i < @data ; $i++) { my $item = Gtk2::MenuItem->new ($data[$i]); $item->show; $menu->append ($item); $item->{path} = $path; $item->{index} = $i; $item->{text} = $data[$i]; #$item->signal_connect (activate => \&editing_done, $cell); $item->signal_connect (activate => \&editing_done, [$cell, $editable]); } $menu->set_active ($cell->{index}); $menu->popup (undef, undef, \&menu_pos_func, [$widget, $cell_area], $event ? $event->button : 0, $event ? $event->time : 0); $item = $menu->get_active; $menu->select_item ($item) if $item; # see the evil trick mentioned above. $editable; } ########################################################################## # driver code package main; use Glib qw(FALSE TRUE); $window = Gtk2::Window->new; $window->set_title ('cell renderer test'); $window->signal_connect (delete_event => sub { Gtk2->main_quit; FALSE; }); $vbox = Gtk2::VBox->new; $window->add ($vbox); $label = Gtk2::Label->new; $label->set_markup ('F-Words'); $vbox->pack_start ($label, FALSE, FALSE, 0); # create and load the model $model = Gtk2::ListStore->new ('Glib::String', 'Glib::Scalar', 'Glib::Int'); foreach ([ 'foo', [qw/foo bar baz/]], [ 'fluffy', [qw/muffy tuffy buffy willow/]], [ 'flurble', [qw/murble swurble curble/]], [ 'frob', [qw/blob clob plob mob rob gob glob wob dob/]], [ 'frobnitz', [qw/fronbination that's sweepin' the nation/]], [ 'repeated', [qw/fronbination that's sweepin' the nation the the the the/]], # [ 'none', []], # [ 'verymany', [(1..50)]], [ 'ftang', [qw/quisinart/]], [ 'fire truck', [qw/red white green yellow polka-dot/]]) { my $iter = $model->append; $model->set ($iter, 0, $_->[0], 1, $_->[1], 2, rand (@{$_->[1]})); } # now a view $treeview = Gtk2::TreeView->new ($model); $treeview->set_rules_hint (TRUE); $treeview->set_reorderable (TRUE); # # regular editable text column for column 0, the string # $renderer = Gtk2::CellRendererText->new; $renderer->set (editable => TRUE);; $column = Gtk2::TreeViewColumn->new_with_attributes ('something', $renderer, text => 0); # this commits changes from the user's editing to the model. compare and # contrast with the one for the popup, below. $renderer->signal_connect (edited => sub { my ($cell, $text_path, $new_text, $model) = @_; my $path = Gtk2::TreePath->new_from_string ($text_path); my $iter = $model->get_iter ($path); $model->set ($iter, 0, $new_text); }, $model); $treeview->append_column ($column); # # text for col[1] # $renderer = Gtk2::CellRendererText->new; $column = Gtk2::TreeViewColumn->new_with_attributes ('list', $renderer,); # custom data func to show the list items from the scalar. $column->set_cell_data_func ($renderer, sub { my ($tree_column, $cell, $model, $iter) = @_; my ($info) = $model->get ($iter, 1); $cell->set (text => "[".join(", ", @$info)."]"); }); $treeview->append_column ($column); # # text for col[2] # $renderer = Gtk2::CellRendererText->new; $column = Gtk2::TreeViewColumn->new_with_attributes ('index', $renderer, text => 2); $treeview->append_column ($column); # # custom cell renderer for cols 1 and 2, an editable popup menu # $renderer = Mup::CellRendererPopup->new; $renderer->set (mode => 'editable'); $column = Gtk2::TreeViewColumn->new_with_attributes ('selector', $renderer, list => 1, 'index' => 2, ); # this handler commits the user's selection to the model. compare with # the one for the typical text renderer -- the only difference is a var name. $renderer->signal_connect (edited => sub { my ($cell, $text_path, $new_index, $model) = @_; my $path = Gtk2::TreePath->new_from_string ($text_path); my $iter = $model->get_iter ($path); $model->set ($iter, 2, $new_index); }, $model); $treeview->append_column ($column); my $scroll = Gtk2::ScrolledWindow->new; $scroll->set_policy ('never', 'automatic'); $scroll->add ($treeview); $vbox->pack_start ($scroll, TRUE, TRUE, 0); # since we have a scroller, we need to set some reasonable initial size. # i'll set one that should have the window scroll a bit, to make sure we # can easily test the popup behavior when the treeview is scrolled. $window->set_default_size (-1, 150); my $check = Gtk2::CheckButton->new ('_show boxes'); $check->set_active ($renderer->get ('show-box')); $check->signal_connect (toggled => sub { $renderer->set (show_box => $check->get_active); $treeview->queue_draw; }); $vbox->pack_start ($check, FALSE, FALSE, 0); $window->show_all; Gtk2->main; Gtk2-1.24993/examples/plug.pl000644 001750 000024 00000004123 13110362136 016063 0ustar00brianstaff000000 000000 #!/usr/bin/perl -w # GTK - The GIMP Toolkit # Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald # # 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., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # $Id$ # # this was originally gtk-2.2.1/examples/buttonbox/buttonbox.c # ported to gtk2-perl by rm use strict; use Gtk2; die "ERROR: give me a socket" unless( scalar($ARGV[0]) ); sleep(1); Gtk2->init; printf("socket_id: %X\n", $ARGV[0]); my $plug = Gtk2::Plug->new($ARGV[0]); $plug->set_border_width(10); my $hbox = Gtk2::HBox->new(0,5); $plug->add($hbox); my $state = 1; my $img = Gtk2::Image->new_from_stock("gtk-yes", "dialog"); $hbox->pack_start($img, 1, 1, 5); my $vbox = Gtk2::VBox->new(0,5); $hbox->pack_start($vbox, 1, 1, 5); my $btn = Gtk2::Button->new("Click me before exiting!"); $vbox->pack_start($btn, 1, 1, 5); $btn->signal_connect( "clicked" => sub { Gtk2->main_quit; }); my @array = ( $img, $state ); foreach (1..5) { my $btn = Gtk2::Button->new("Just a button $_"); $vbox->pack_start($btn, 1, 1, 5); $btn->signal_connect( "clicked" => sub { print STDERR 'btn: '.$_[0]->get_label.' state: '. $_[1][1]." \n"; if( $_[1][1] ) { $_[1][0]->set_from_stock('gtk-no', 'dialog'); $_[1][1] = 0; } else { $_[1][0]->set_from_stock('gtk-yes', 'dialog'); $_[1][1] = 1; } }, \@array ); } $plug->show_all; Gtk2->main; Gtk2-1.24993/examples/customrenderer.pl000644 001750 000024 00000011455 13110362136 020163 0ustar00brianstaff000000 000000 #!/usr/bin/perl -w =doc Implement a custom CellRenderer with a multi-line editor, by deriving a TextView subclass which implements the CellEditable GInterface. =cut # # Copyright (C) 2003 by muppet. # # 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., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # $Id$ # use strict; use Gtk2 -init; use Gtk2::Gdk::Keysyms; ############################################################################# # First, we need a TextView which implements CellEditable. package Mup::MultilineEntry; use Data::Dumper; use constant TRUE => 1; use constant FALSE => 0; use Glib::Object::Subclass Gtk2::TextView::, # tell Glib that this new type will implement the CellEditable # GInterface. interfaces => [ Gtk2::CellEditable:: ], ; sub set_text { shift->get_buffer->set_text (shift); } sub get_text { my $buffer = shift->get_buffer; $buffer->get_text ($buffer->get_start_iter, $buffer->get_end_iter, TRUE); } sub START_EDITING { warn "start editing\n"; } sub EDITING_DONE { warn "editing done\n"; } sub REMOVE_WIDGET { warn "remove widget\n"; } ############################################################################### # and now, a CellRenderer that uses Mup::MultilineEntry for editing. package Mup::CellRendererMultiline; use Glib qw(TRUE FALSE); use Glib::Object::Subclass "Gtk2::CellRendererText", ; sub START_EDITING { my ($cell, $event, $view, $path, $background_area, $cell_area, $flags) = @_; my $entry = Mup::MultilineEntry->new; $entry->set (border_width => $cell->get ('ypad')); $entry->set_text ($cell->get ('text')); $entry->grab_focus; $entry->signal_connect (key_press_event => sub { my ($widget, $event) = @_; if (($event->keyval == $Gtk2::Gdk::Keysyms{Return} || $event->keyval == $Gtk2::Gdk::Keysyms{KP_Enter}) and not $event->state & 'control-mask') { $cell->signal_emit (edited => $path, $entry->get_text); $entry->destroy; return TRUE; } return FALSE; }); # Make sure the entry has the correct height. On some versions of # gtk+, the entry would otherwise be just a few pixels tall. $entry->set (height_request => $cell_area->height); $entry->show; return $entry; } ############################################################################### # driver code. package main; use Glib qw(TRUE FALSE); my $window = Gtk2::Window->new; $window->set_title ("Multiline CellRenderer"); $window->signal_connect (delete_event => sub { Gtk2->main_quit; FALSE }); my $model = Gtk2::ListStore->new (qw(Glib::String)); my $view = Gtk2::TreeView->new ($model); foreach ('this is a test', "here's some text\nwith newlines in\nain't it cool\nno rubbish bin", "try editing with both\nrenderers.", "in the custom one\nuse Ctrl+Enter to\nadd a new line") { $model->set ($model->append, 0 => $_); } sub cell_edited { my ($cell, $path, $new_value) = @_; my $iter = Gtk2::TreePath->new_from_string ($path); $model->set ($model->get_iter ($iter), 0 => $new_value); } my $renderer = Mup::CellRendererMultiline->new; $renderer->set (editable => TRUE); $renderer->signal_connect (edited => \&cell_edited); my $column = Gtk2::TreeViewColumn->new_with_attributes ("custom renderer", $renderer, text => 0); $view->append_column ($column); $renderer = Gtk2::CellRendererText->new; $renderer->set (editable => TRUE); $renderer->signal_connect (edited => \&cell_edited); $column = Gtk2::TreeViewColumn->new_with_attributes ("standard renderer", $renderer, text => 0); $view->append_column ($column); my $scroller = Gtk2::ScrolledWindow->new; $scroller->set_policy (qw(automatic automatic)); $scroller->add ($view); my $check = Gtk2::CheckButton->new ('resizable columns'); $check->set_active (FALSE); $check->signal_connect (toggled => sub { map { $_->set_resizable ($check->get_active); } $view->get_columns; }); my $box = Gtk2::VBox->new; $box->add ($scroller); $box->pack_start ($check, FALSE, FALSE, 0); $window->add ($box); $window->set_default_size (300, 200); $window->show_all; Gtk2->main; Gtk2-1.24993/examples/multisel.pl000644 001750 000024 00000002743 11664366546 017005 0ustar00brianstaff000000 000000 #!/usr/bin/perl -w # A simple, contrived example of dealing with a TreeView/ListStore in # multiple selection mode. use Glib qw(TRUE); use Gtk2 -init; use constant STRING_COLUMN => 0; sub fill_store { my $store = Gtk2::ListStore->new ('Glib::String'); for ($i = 0 ; $i < 50 ; $i+=5) { my $iter = $store->append; $store->set ($iter, 0 => "$i"); } return $store; } my $window = Gtk2::Window->new; $window->set_size_request (150, 300); $window->set_border_width (6); $window->signal_connect (delete_event => sub { Gtk2->main_quit; TRUE }); my $vbox = Gtk2::VBox->new; $window->add ($vbox); my $sw = Gtk2::ScrolledWindow->new; $sw->set_shadow_type ('etched-in'); $sw->set_policy ('automatic', 'automatic'); $vbox->pack_start ($sw, TRUE, TRUE, 0); my $model = fill_store (); my $tree_view = Gtk2::TreeView->new_with_model ($model); $tree_view->set_reorderable (TRUE); $model->signal_connect (rows_reordered => sub {print "rows reordered\n"}); $tree_view->get_selection->set_mode ('multiple'); $tree_view->get_selection->signal_connect (changed => sub { my @sel = $_[0]->get_selected_rows; print "changed " . "[".$_[0]->count_selected_rows."] " . "[".scalar(@sel)."] " . join(",", map { $_->to_string } @sel) . "\n" }); $sw->add ($tree_view); my $renderer = Gtk2::CellRendererText->new; my $column = Gtk2::TreeViewColumn->new_with_attributes ("Some numbers", $renderer, text => 0); $tree_view->append_column ($column); $window->show_all; Gtk2->main; Gtk2-1.24993/examples/cellrenderer_spinbutton.pl000644 001750 000024 00000021347 13110362136 022056 0ustar00brianstaff000000 000000 #!/usr/bin/perl -w # # Copyright (C) 2003-2004 by Torsten Schoenfeld, with hacks by muppet, some # suggested by Jens Wilke. # # 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., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # $Id$ # use strict; use Gtk2 -init; use Gtk2::Gdk::Keysyms; package Kaf::CellRendererSpinButton; use POSIX qw(DBL_MAX UINT_MAX); use Glib qw(TRUE FALSE); use constant x_padding => 2; use constant y_padding => 3; use Glib::Object::Subclass "Gtk2::CellRenderer", signals => { edited => { flags => [qw(run-last)], param_types => [qw(Glib::String Glib::Double)], }, }, properties => [ Glib::ParamSpec -> double("xalign", "Horizontal Alignment", "Where am i?", 0.0, 1.0, 1.0, [qw(readable writable)]), Glib::ParamSpec -> boolean("editable", "Editable", "Can I change that?", 0, [qw(readable writable)]), Glib::ParamSpec -> uint("digits", "Digits", "How picky are you?", 0, UINT_MAX, 2, [qw(readable writable)]), map { Glib::ParamSpec -> double($_ -> [0], $_ -> [1], $_ -> [2], 0.0, DBL_MAX, $_ -> [3], [qw(readable writable)]) } (["value", "Value", "How much is the fish?", 0.0], ["min", "Min", "No way, I have to live!", 0.0], ["max", "Max", "Ah, you're too generous.", 100.0], ["step", "Step", "Okay.", 5.0]) ] ; sub INIT_INSTANCE { my $self = shift; $self->{editable} = 0; $self->{digits} = 2; $self->{value} = 0.0; $self->{min} = 0.0; $self->{max} = 100.0; $self->{step} = 5.0; $self->{xalign} = 1.0; } sub calc_size { my ($cell, $layout, $area) = @_; my ($width, $height) = $layout -> get_pixel_size(); return ($area ? $cell->{xalign} * ($area->width - ($width + 3 * x_padding)) : 0, $area ? ($area->height - $height) / 2 - y_padding : 0, $width + x_padding * 2, $height + y_padding * 2); } sub format_text { my $cell = shift; my $format = sprintf '%%.%df', $cell->{digits}; sprintf $format, $cell->{value}; } sub GET_SIZE { my ($cell, $widget, $area) = @_; my $layout = $cell -> get_layout($widget); $layout -> set_text($cell -> format_text); return $cell -> calc_size($layout, $area); } sub get_layout { my ($cell, $widget) = @_; return $widget -> create_pango_layout(""); } sub RENDER { my ($cell, $window, $widget, $background_area, $cell_area, $expose_area, $flags) = @_; my $state; if ($flags & 'selected') { $state = $widget -> has_focus() ? 'selected' : 'active'; } else { $state = $widget -> state() eq 'insensitive' ? 'insensitive' : 'normal'; } my $layout = $cell -> get_layout($widget); $layout -> set_text ($cell -> format_text); my ($x_offset, $y_offset, $width, $height) = $cell -> calc_size($layout, $cell_area); $widget -> get_style -> paint_layout($window, $state, 1, $cell_area, $widget, "cellrenderertext", $cell_area -> x() + $x_offset + x_padding, $cell_area -> y() + $y_offset + y_padding, $layout); } sub _cell_editing_done { my ($self, $path, $new_value) = @_; if ($self->{_focus_out_id}) { $self->signal_handler_disconnect($self->{_focus_out_id}); delete $self->{_focus_out_id}; } $self->signal_emit('edited', $path, $new_value); } sub START_EDITING { my ($cell, $event, $view, $path, $background_area, $cell_area, $flags) = @_; my $spin_button = Gtk2::SpinButton -> new_with_range($cell -> get(qw(min max step))); $spin_button -> set_value($cell -> get("value")); $spin_button -> set_digits($cell -> get("digits")); $spin_button -> grab_focus(); $spin_button -> signal_connect(key_press_event => sub { my ($spin_button, $event) = @_; if ($event -> keyval == $Gtk2::Gdk::Keysyms{ Return } || $event -> keyval == $Gtk2::Gdk::Keysyms{ KP_Enter }) { $spin_button -> update(); $cell -> _cell_editing_done($path, $spin_button -> get_value()); $spin_button -> destroy(); return TRUE; } elsif ($event -> keyval == $Gtk2::Gdk::Keysyms{ Up }) { $spin_button -> spin('step-forward', ($spin_button -> get_increments())[0]); return TRUE; } elsif ($event -> keyval == $Gtk2::Gdk::Keysyms{ Down }) { $spin_button -> spin('step-backward', ($spin_button -> get_increments())[0]); return TRUE; } return FALSE; }); $spin_button -> {_focus_out_id} = $spin_button -> signal_connect(focus_out_event => sub { my ($spin_button, undef) = @_; $cell -> _cell_editing_done($path, $spin_button -> get_value()); # the spinbutton needs the focus-out event, don't eat it. return FALSE; }); $spin_button -> show_all(); # we don't want the editor widget to be the full height of the cell; # if the cell is taller than the spinbutton, the entry will grow, but # the spinner buttons won't. tell the system that the cell is only # as tall as the spinbutton wants to be, and it will do the right thing. # this means we have to ask the spinbutton how big it wants to be; it # hasn't been mapped yet, so we'll have to trigger an actual size_request # calculation. my $requisition = $spin_button->size_request; $cell_area->y ($cell_area->y + ($cell_area->height - $requisition->height) / 2); $cell_area->height ($requisition->height); return $spin_button; } ############################################################################### package main; use Glib qw(TRUE FALSE); my $window = Gtk2::Window -> new("toplevel"); $window -> set_title ("CellRendererSpinButton"); $window -> signal_connect (delete_event => sub { Gtk2 -> main_quit(); }); my $model = Gtk2::ListStore -> new(qw(Glib::Double)); my $view = Gtk2::TreeView -> new($model); foreach (qw(12 12.1 12.12)) { $model -> set($model -> append(), 0 => $_); } sub cell_edited { my ($cell, $path, $new_value) = @_; $model -> set($model -> get_iter(Gtk2::TreePath -> new_from_string($path)), 0 => $new_value); } my $renderer = Kaf::CellRendererSpinButton -> new(); $renderer -> set(mode => "editable", min => 0, max => 1000, step => 2, digits => 0); $renderer -> signal_connect(edited => \&cell_edited); my $column = Gtk2::TreeViewColumn -> new_with_attributes ("no digits", $renderer, value => 0); $column->set_resizable (TRUE); $view -> append_column($column); # # another, centered # $renderer = Kaf::CellRendererSpinButton -> new(); $renderer -> set(mode => "editable", xalign => 0.5, min => 0, max => 1000, step => 0.1, digits => 1); $renderer -> signal_connect(edited => \&cell_edited); $column = Gtk2::TreeViewColumn -> new_with_attributes ("one digit", $renderer, value => 0); $column->set_resizable (TRUE); $view -> append_column($column); # # another, left-justified # $renderer = Kaf::CellRendererSpinButton -> new(); $renderer -> set(mode => "editable", xalign => 0.0, min => 0, max => 1000, step => 0.1, digits => 2); $renderer -> signal_connect(edited => \&cell_edited); $column = Gtk2::TreeViewColumn -> new_with_attributes ("two digits", $renderer, value => 0); $column->set_resizable (TRUE); $view -> append_column($column); $window -> add($view); $window -> show_all(); Gtk2 -> main(); Gtk2-1.24993/examples/socket.pl000644 001750 000024 00000003421 13110362136 016404 0ustar00brianstaff000000 000000 #!/usr/bin/perl -w # GTK - The GIMP Toolkit # Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald # # 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., 51 Franklin Street, Fifth Floor, # Boston, MA 02110-1301, USA. # # $Id$ # # this was originally gtk-2.2.1/examples/buttonbox/buttonbox.c # ported to gtk2-perl by rm use strict; use Glib qw/TRUE FALSE/; use Gtk2 -init; my $pid; my $socket; my $win = Gtk2::Window->new("toplevel"); $win->set_default_size(640, 480); $win->signal_connect( 'delete_event' => sub { Gtk2->main_quit; kill(2,$pid); 1; }); $socket = Gtk2::Socket->new; $win->add($socket); printf("win: 0x%X\n", $socket->get_id); $pid = fork; if( $pid < 0 ) { die "there's a problem here, fork"; } if( $pid == 0 ) { exec(sprintf("$^X plug.pl %d\n", $socket->get_id)); } my $quitbtn = Gtk2::Button->new_from_stock('gtk-quit'); $quitbtn->signal_connect( 'clicked' => sub { Gtk2->main_quit; 1; }); $socket->signal_connect('plug-removed' => sub { print STDERR "GtkPlug Disconnected\n"; $win->remove($socket); $win->add($quitbtn); $win->set_border_width(50); $quitbtn->show; 1; }); $win->show_all; Gtk2->main; waitpid($pid, 0); Gtk2-1.24993/examples/offscreen_scale.pl000644 001750 000024 00000007032 11664366546 020264 0ustar00brianstaff000000 000000 #!/usr/bin/perl use strict; use warnings; use Glib qw(TRUE FALSE); use Gtk2 '-init'; use Cairo; my $window = Gtk2::Window->new; $window->set_title("Resize me"); $window->signal_connect( delete_event => sub { exit } ); $window->set_border_width(5); my $scaled= Gtk2::Ex::ScaleBin->new; my $entry=Gtk2::Entry->new; my $button=Gtk2::Button->new_from_stock('gtk-ok'); $button->signal_connect(clicked=>sub {warn "clicked\n";}); my $vbox=Gtk2::VBox->new; $vbox->add($entry); $vbox->add($button); $scaled->add($vbox); $window->add($scaled); $window->show_all; Gtk2->main; package Gtk2::Ex::ScaleBin; use Gtk2; use Glib::Object::Subclass Gtk2::EventBox::, signals => { size_allocate => \&do_size_allocate, }; sub INIT_INSTANCE { my $self=shift; $self->signal_connect( expose_event => \&expose_cb); $self->signal_connect( damage_event => \&damage_cb); $self->signal_connect( realize => \&realize_cb); return $self; } sub do_size_allocate { my ($self,$alloc)=@_; my $border= $self->get_border_width; my ($x,$y,$w,$h)=$alloc->values; my $olda=$self->allocation; $olda->x($x); $olda->width($w); $olda->y($y); $olda->height($h); $w-= 2*$border; $h-= 2*$border; $self->window->move_resize($x+$border,$y+$border,$w,$h) if $self->window; my ($reqw,$reqh)= ($w,$h); if (my $child=$self->child) { my $req= $child->size_request; $reqw= $req->width; $reqh= $req->height; my $rect=Gtk2::Gdk::Rectangle->new(0, 0, $reqw, $reqh); $self->child->size_allocate($rect); } $self->{zoom_x}= $w / $reqw; $self->{zoom_y}= $h / $reqh; if (my $offscreen= $self->{offscreen}) { $offscreen->{zoom_x}= $self->{zoom_x}; $offscreen->{zoom_y}= $self->{zoom_y}; $offscreen->move_resize(0,0, $reqw, $reqh); $offscreen->geometry_changed; } } sub damage_cb { my ($self,$event)=@_; my ($x,$y,$w,$h)=$event->area->values; my $zx= $self->{zoom_x}; my $zy= $self->{zoom_y}; my $rect=Gtk2::Gdk::Rectangle->new($x*$zx, $y*$zy, $w*$zx, $h*$zy); $self->window->invalidate_rect($rect,0); 1; } sub realize_cb { my ($self)=@_; my ($x,$y,$w,$h)=$self->allocation->values; my %attr= ( window_type => 'offscreen', wclass => 'output', x => 0, y => 0, width => $w, height => $h, event_mask => [qw/pointer-motion-mask button-press-mask button-release-mask exposure_mask/], ); $self->{offscreen}= my $offscreen= Gtk2::Gdk::Window->new($self->get_root_window,\%attr); $offscreen->set_user_data($self->Glib::Object::get_pointer()); $self->window->signal_connect( pick_embedded_child =>sub { return $offscreen; }); $self->child->set_parent_window($offscreen) if $self->child; $offscreen->set_embedder($self->window); $offscreen->{zoom_x}= $self->{zoom_x}; $offscreen->{zoom_y}= $self->{zoom_y}; $offscreen->signal_connect( to_embedder => sub {my ($offscreen,$x,$y)=@_; return $x*$offscreen->{zoom_x},$y*$offscreen->{zoom_y} }); $offscreen->signal_connect( from_embedder=> sub {my ($offscreen,$x,$y)=@_; return $x/$offscreen->{zoom_x},$y/$offscreen->{zoom_y} }); $self->style->set_background($offscreen,'normal'); $offscreen->show; } sub expose_cb { my ($self,$event)=@_; my $offscreen= $self->{offscreen}; if ($event->window == $self->window) { my $pixmap = $offscreen->get_pixmap; return 1 unless $pixmap; my ($w,$h)= $pixmap->get_size; my $cr=Gtk2::Gdk::Cairo::Context->create($self->window); $cr->rectangle($event->area); $cr->clip; $cr->scale($self->{zoom_x},$self->{zoom_y}); $cr->set_source_pixmap($pixmap,0,0); $cr->paint; } elsif ($event->window == $offscreen) { $self->propagate_expose($self->child,$event) if $self->child; } 1; } Gtk2-1.24993/examples/inline-images.pl000644 001750 000024 00000012032 11664366546 017660 0ustar00brianstaff000000 000000 # # this is an example of various ways to include inline image data in your # gtk2-perl programs. # -- muppet, 29 nov 03 # use Gtk2 -init; # # This is the text of a regular XPM file, reformatted to be valid Perl syntax. # Note in particular the use of single quotes instead of double quotes; this # makes sure that Perl doesn't treat the embedded $ and @ characters as # special. # my @question_xpm = ( '32 32 17 1', ' c None', '. c #030303', '+ c #1A1A1A', '@ c #4A4A4A', '# c #616161', '$ c #939393', '% c #AAAAAA', '& c #D2D2D2', '* c #DCDCDC', '= c #E2E2E2', '- c #E6E6E6', '; c #EDEDED', '> c #343434', ', c #AEAEAE', 'x c #7B7B7B', ') c #C5C5C5', '! c #F3F3F3', ' ', ' ', ' ', ' )&&&&)), ', ' )=*=--=-=;*& ', ' )*-;;!;;!;;;** ', ' )=;!)x@>+>#)!;!* ', ' &*!;#.>x%%x..>&!!& ', ' =;!@.$!!;;!=+.+;;=& ', ' );!%..;!;--;!$..x!;& ', ' *;;#..&!-&*;!&..>!;& ', ' &=;#..x!=&*;!&..>!;& ', ' )*;*@>&;&)=;!$..@!;& ', ' &*;;;;=&=;!!+..,!;* ', ' &--***=;!*@..#!;= ', ' )&)&=;!$..+x!;=& ', ' %&;!#.@%;!!=& ', ' &&;$.x!!;;-* ', ' &-!#.!!;=&) ', ' )-!@@;;*) ', ' )*;x$;-) ', ' &;!!!;;* ', ' &*!&@@);=& ', ' *=;@..@;=) ', ' *-;@..>!;* ', ' )-;)>>&-*& ', ' )=!!;;=) ', ' &=-;=) ', ' )**) ', ' ', ' ', ' '); $pixbuf_from_xpm_data = Gtk2::Gdk::Pixbuf->new_from_xpm_data (@question_xpm); # # here we create a Pixbuf from raw rgba image data created on the fly. # beware that this isn't the most efficient thing to do; if you have # heavy bit-banging to do, you may be more interested in writing some # xs code to get direct access to the pixel data in C. # my ($width, $height) = (64, 64); my $data = pack "C*", map { ($_, $_/2, 64, $_) } map { ($_) x $width } (0..($height-1)); $pixbuf_from_raw_data = Gtk2::Gdk::Pixbuf->new_from_data ($data, # the data. this will be copied. 'rgb', # only currently supported colorspace 1, # true, because we do have alpha channel data 8, # gdk-pixbuf currently allows only 8-bit samples $width, # width in pixels $height, # height in pixels $width * 4); # rowstride -- we have RGBA data, so it's four # bytes per pixel. # # Gtk+ ships with a utility program called gdk-pixbuf-csource, which turns # any image understood by gdk-pixbuf into a C data structure that can be # parsed by gdk_pixbuf_new_from_inline(). here's an example of that output: # #---- #/* GdkPixbuf RGBA C-Source image dump */ # #static const guint8 my_pixbuf[] = #{ "" # /* Pixbuf magic (0x47646b50) */ # "GdkP" # /* length: header (24) + pixel_data (64) */ # "\0\0\0X" # /* pixdata_type (0x1010002) */ # "\1\1\0\2" # /* rowstride (16) */ # "\0\0\0\20" # /* width (4) */ # "\0\0\0\4" # /* height (4) */ # "\0\0\0\4" # /* pixel_data: */ # "\377\0\0\377\377\0\0\377\0\0\0\0\0\0\377\377\377\0\0\377\0\0\0\0\0\0" # "\377\377\0\0\377\377\0\0\0\0\0\0\377\377\0\0\377\377\377\0\0\377\0\0" # "\377\377\0\0\377\377\377\0\0\377\377\0\0\377"}; #---- # # obviously, this C syntax is not valid Perl. you can mangle that into Perl # code and create the proper binary string using pack, as shown below, but # in my experience, it's more trouble than it's worth. Since the data is in # a Perl scalar which will be garbage-collected, the image data must always # be copied, so you lose the ability to use static image data. Also, the # direct output from that tool is not useful. [FIXME perhaps we should make # a tool dedicated to gtk2-perl?] # my $my_pixbuf = pack "a4a4a4a4a4a4a64", "GdkP", # Pixbuf magic (0x47646b50) "\0\0\0X", # length: header (24) + pixel_data (64) "\1\1\0\2", # pixdata_type (0x1010002) "\0\0\0\20", # rowstride (16) "\0\0\0\4", # width (4) "\0\0\0\4", # height (4) # pixel_data: "\377\0\0\377\377\0\0\377\0\0\0\0\0\0\377\377\377\0\0\377\0\0\0\0\0\0" ."\377\377\0\0\377\377\0\0\0\0\0\0\377\377\0\0\377\377\377\0\0\377\0\0" ."\377\377\0\0\377\377\377\0\0\377\377\0\0\377"; $pixbuf_from_inline = Gtk2::Gdk::Pixbuf->new_from_inline ($my_pixbuf); $dlg = Gtk2::Dialog->new; $hbox = Gtk2::HBox->new (1, 6); $dlg->vbox->add ($hbox); $frame = Gtk2::Frame->new ('xpm data'); $frame->add (Gtk2::Image->new_from_pixbuf ($pixbuf_from_xpm_data)); $hbox->add ($frame); $frame = Gtk2::Frame->new ('raw data'); $frame->add (Gtk2::Image->new_from_pixbuf ($pixbuf_from_raw_data)); $hbox->add ($frame); $frame = Gtk2::Frame->new ('inline data'); $frame->add (Gtk2::Image->new_from_pixbuf ($pixbuf_from_inline)); $hbox->add ($frame); $dlg->add_button ('gtk-close' => 'close'); $dlg->show_all; $dlg->run; Gtk2-1.24993/examples/adding_stock_icons.pl000644 001750 000024 00000012177 11664366546 020775 0ustar00brianstaff000000 000000 #!/usr/bin/perl # # Copyright (C) 2003 by the gtk2-perl team (see the file AUTHORS for the full # list, See LICENSE for full terms.) # # -rm # # $Id$ # use strict; use warnings; use Gtk2 '-init'; use Gtk2::Gdk::Keysyms; # this image was yanked from a gnome icon, and then modified (by adding the P). # this is only an example of an inline image; the pixbuf data could come from # anywhere, perhaps more likely from a file using new_from_file(). my @letter_portrait = ( '48 48 9 1', ' c None', '. c #808080', '+ c #FFFFFF', '@ c #000000', '# c #E21818', '$ c #C0C0C0', '% c #0000FF', '& c #000080', '* c #00FFFF', ' ........................... ', ' .+++++++++++++++++++++++++.@ ', ' .+++++++++++++++++++++++++..@ ', ' .+++###########+++++++++++.$.@ ', ' .+++############%&%&%&%+++.+$.@ ', ' .+++#############+++++++++.++$.@ ', ' .+++####+++++#####++++++++.+++$.@ ', ' .+++####&%&%&%####&%&%%+++.++++$.@ ', ' .+++####++++++####++++++++.+++++$.@ ', ' .+++####++++++####++++++++.++++++$.@ ', ' .+++####%&%&%#####%&%&%+++.+++++++$.@ ', ' .+++#############+++++++++@@@@@@@@@@@@ ', ' .+++############+++++++++++..........@ ', ' .+++###########%&%&%&%&+++++$$$$$$$$$@ ', ' .+++####++++++++++++++++++++++++++++$@ ', ' .+++####++++++++++++++++++++++++++++$@ ', ' .+++####%&%&%&%&%&%&%&%&%&%&%&%&%+++$@ ', ' .+++####++++++++++++++++++++++++++++$@ ', ' .+++####++++++++++++++++++++++++++++$@ ', ' .+++####&%&%&%&%&%&%&%&%&%&%&%&%&+++$@ ', ' .+++####++++++++++++++++++++++++++++$@ ', ' .+++++++++++++++++++++++++++++++++++$@ ', ' .+++%&%&%&%&%&%&%&++.............+++$@ ', ' .+++++++++++++++++++.$$*******$$.+++$@ ', ' .+++++++++++++++++++.$$$+$+$+$$$.+++$@ ', ' .+++&%&%&%&%&%&%&%++.*$+$+$+$+$*.+++$@ ', ' .+++++++++++++++++++.*+$+$+$+$+*.+++$@ ', ' .+++++++++++++++++++.*$+$+$+$+$*.+++$@ ', ' .+++%&%&%&%&%&%&%&++.*+$+$+$+$+*.+++$@ ', ' .+++++++++++++++++++.*$+$+$+$+$*.+++$@ ', ' .+++++++++++++++++++.*+$+$+$+$+*.+++$@ ', ' .+++&%&%&%&%&%&%&%++.*$+$+$+$+$*.+++$@ ', ' .+++++++++++++++++++.$$$+$+$+$$$.+++$@ ', ' .+++++++++++++++++++.$$*******$$.+++$@ ', ' .+++%&%&%&%&%&%&%&++.............+++$@ ', ' .+++++++++++++++++++++++++++++++++++$@ ', ' .+++++++++++++++++++++++++++++++++++$@ ', ' .+++&%&%&%&%&%&%&%&%&%&%&%&%&%&%&+++$@ ', ' .+++++++++++++++++++++++++++++++++++$@ ', ' .+++++++++++++++++++++++++++++++++++$@ ', ' .+++%&%&%&%&%&%&%&%&%&%&%&++++++++++$@ ', ' .+++++++++++++++++++++++++++++++++++$@ ', ' .+++++++++++++++++++++++++++++++++++$@ ', ' .+++++++++++++++++++++++++++++++++++$@ ', ' .+++++++++++++++++++++++++++++++++++$@ ', ' .+++++++++++++++++++++++++++++++++++$@ ', ' .$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@ ', ' @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ' ); # the stock id our stock item will be accessed with my $stock_id = 'letter-portrait'; # add a new entry to the stock system with our id Gtk2::Stock->add ({ stock_id => $stock_id, label => '_Letter Portrait', modifier => [], keyval => $Gtk2::Gdk::Keysyms{L}, translation_domain => 'gtk2-perl-example', }); # create an icon set, with only one member in this particular case my $icon_set = Gtk2::IconSet->new_from_pixbuf ( Gtk2::Gdk::Pixbuf->new_from_xpm_data (@letter_portrait)); # create a new icon factory to handle rendering the image at various sizes... my $icon_factory = Gtk2::IconFactory->new; # add our new stock icon to it... $icon_factory->add ($stock_id, $icon_set); # and then add this custom icon factory to the list of default places in # which to search for stock ids, so any gtk+ code can find our stock icon. $icon_factory->add_default; # # rest is just an example of using the stock icon. # my $win = Gtk2::Window->new; $win->signal_connect (destroy => sub { Gtk2->main_quit; }); my $button = Gtk2::Button->new_from_stock ('letter-portrait'); $button->signal_connect (clicked => sub { Gtk2->main_quit; }); $win->add ($button); $win->show_all; Gtk2->main; Gtk2-1.24993/examples/linkbutton.pl000644 001750 000024 00000001327 11664366546 017335 0ustar00brianstaff000000 000000 #!/usr/bin/perl -w use strict; use Gtk2 -init; # you set one of these per app. Gtk2::LinkButton->set_uri_hook (sub { my ($button, $url) = @_; my $message = Gtk2::MessageDialog->new ($button->get_toplevel, [], 'info', 'ok', "In a real app, you'd figure out how to handle " ."opening urls, and do that here. This is just " ."an example of using the widget, so we don't " ."mess around with all of that.\n\nUrl: $url"); $message->run; $message->destroy; }); my $window = Gtk2::Window->new; my $button = Gtk2::LinkButton->new ("http://gtk2-perl.sf.net", "Gtk2-Perl Homepage"); $window->add ($button); $window->show_all; $window->signal_connect (destroy => sub { Gtk2->main_quit }); Gtk2->main; Gtk2-1.24993/examples/simplelist.pl000644 001750 000024 00000022625 13110362136 017310 0ustar00brianstaff000000 000000 #!/usr/bin/perl -w # # 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., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # $Id$ # use strict; use Data::Dumper; use Gtk2 -init; use Gtk2::SimpleList; # add a new type of column that reverses the text that's in a scalar Gtk2::SimpleList->add_column_type( 'ralacs', # think about it for a second... type => 'Glib::Scalar', renderer => 'Gtk2::CellRendererText', attr => sub { my ($tree_column, $cell, $model, $iter, $i) = @_; my $info = $model->get ($iter, $i); $info = join('',reverse(split('', $info || '' ))); $cell->set (text => $info); } ); # add a new type of column that sums up an array reference Gtk2::SimpleList->add_column_type( 'sum_of_array', type => 'Glib::Scalar', renderer => 'Gtk2::CellRendererText', attr => sub { my ($tree_column, $cell, $model, $iter, $i) = @_; my $sum = 0; my $info = $model->get ($iter, $i); foreach (@$info) { $sum += $_; } $cell->set (text => $sum); } ); my $win = Gtk2::Window->new; $win->set_title ('Gtk2::SimpleList exapmle'); $win->set_border_width (6); $win->set_default_size (700, 600); $win->signal_connect (delete_event => sub { Gtk2->main_quit; }); my $hbox = Gtk2::HBox->new (0, 6); $win->add ($hbox); my $scwin = Gtk2::ScrolledWindow->new; $hbox->pack_start ($scwin, 1, 1, 0); $scwin->set_policy (qw/automatic automatic/); # create a simple list widget with one of each column type my $slist = Gtk2::SimpleList->new ( 'Text Field' => 'text', 'Int Field' => 'int', 'Double Field' => 'double', 'Bool Field' => 'bool', 'Scalar Field' => 'scalar', 'Pixbuf Field' => 'pixbuf', 'Ralacs Field' => 'ralacs', 'Sum of Array' => 'sum_of_array', 'Markup Field' => 'markup', ); $scwin->add ($slist); my $vbox = Gtk2::VBox->new (0, 6); $hbox->pack_start($vbox, 0, 1, 0); # now lets create some buttons to push, pop, shift, and unshift, ... my $btn; my $tooltips = Gtk2::Tooltips->new; foreach ( [ 'Push', 'Push a row onto the list' ], [ 'Pop', 'Pop a row off of the list' ], [ 'Unshift', 'Unshift a row onto the list' ], [ 'Shift', 'Shift a row off of the list' ], [ 'Splice 1', 'splice @data, 2, 2, (5 new items)' ], [ 'Splice 2', 'splice @data, 2, 0, (5 new items)' ], [ 'Splice 3', 'splice @data, 2, 2' ], [ 'Splice 4', 'splice @data, 2' ], [ 'Change 1', 'Change all of the columns of row 1 with an array ref assignment' ], [ 'Change 2', 'Change all of the columns of row 1 with array element assignments' ], [ 'Change 3', 'Change the first column of row 1 with a scalar assignment, most useful with single column lists' ], [ 'Delete', 'Delete the ~middle element from the list' ], [ 'Empty', 'Delete all rows from the list with an empty array assignement' ], [ 'Fill', 'Fill the list with data using an array assignment' ], [ 'Many', 'Push and Unshift several data element onto the list' ], [ 'Dump List', 'Dump list data to stdout' ], [ 'Dump Sel', 'Dump index of selected item(s)' ], ) { $btn = Gtk2::Button->new ($_->[0]); $btn->signal_connect (clicked => \&btn_clicked, $_->[0]); $tooltips->set_tip ($btn, $_->[1]); $vbox->pack_start($btn, 0, 1, 0); } $tooltips->enable; # here's a little optionmenu to set the list's selection mode. my $opt = Gtk2::OptionMenu->new; my $menu = Gtk2::Menu->new; foreach (qw/none single browse multiple/) { my $item = Gtk2::MenuItem->new ($_); $item->signal_connect (activate => sub { $slist->get_selection->set_mode ($_[1]); }, $_); $item->show; $menu->append ($item); } $opt->set_menu ($menu); $opt->set_history (1); $vbox->pack_start ($opt, 0, 0, 0); $tooltips->set_tip ($opt, 'set the selection mode for the list'); # toggle the editable-ness of column 0 my $chk = Gtk2::CheckButton->new ('editable'); $chk->set_active (0); $chk->signal_connect (toggled => sub { $slist->set_column_editable (0, $_[0]->get_active); }); $vbox->pack_start ($chk, 0, 0, 0); $tooltips->set_tip ($chk, 'set whether column zero\'s text is editable'); # toggle the reorderable-ness of the view $chk = Gtk2::CheckButton->new ('reorderable'); $chk->set_active (0); $chk->signal_connect (toggled => sub { $slist->set_reorderable ($_[0]->get_active); }); $vbox->pack_start ($chk, 0, 0, 0); $tooltips->set_tip ($chk, 'set whether the list is reorderable'); # toggle the reorderable-ness of the columns $chk = Gtk2::CheckButton->new ('drag columns'); $chk->set_active (0); $chk->signal_connect (toggled => sub { foreach my $column ($slist->get_columns) { $column->set_reorderable ($_[0]->get_active); } }); $vbox->pack_start ($chk, 0, 0, 0); $tooltips->set_tip ($chk, 'set whether the list is reorderable'); # finally, a button to end it all $btn = Gtk2::Button->new_from_stock ('gtk-quit'); $btn->signal_connect (clicked => sub { Gtk2->main_quit; }); $vbox->pack_end($btn, 0, 1, 0); $slist->signal_connect (row_activated => sub { my ($slist, $path, $column) = @_; my $row_ref = $slist->get_row_data_from_path ($path); print 'act '.Dumper ($row_ref); }); # just for shorthand my $dslist = $slist->{data}; my $op_count = 0; my @pixbufs; foreach (qw/gtk-ok gtk-cancel gtk-quit gtk-apply gtk-clear gtk-delete gtk-execute gtk-dnd/) { push @pixbufs, $win->render_icon ($_, 'menu'); } # so some will be blank push @pixbufs, undef; sub btn_clicked { my ($button, $op) = @_; if( $op eq 'Push' ) { push @$dslist, [ 'pushed',5, 5.5, 0, 'scalar pushed', $pixbufs[rand($#pixbufs+1)], 'scalar pushed', [5, 6, 7], 'pushed' ]; } elsif( $op eq 'Pop' ) { pop @$dslist; } elsif( $op eq 'Unshift' ) { unshift @$dslist, [ 'unshifted', 6, 6.6, 1, 'scalar unshifted', $pixbufs[rand($#pixbufs+1)], 'scalar unshifted', [6, 7, 8], 'unshift' ]; } elsif( $op eq 'Shift' ) { shift @$dslist; } elsif( $op eq 'Change 1' ) { $dslist->[0] = [ 'changed1', 7, 7.7, 0, 'scalar changed1', $pixbufs[rand($#pixbufs+1)], 'scalar changed1', [7, 8, 9], 'changed1' ]; } elsif( $op eq 'Change 2' ) { $dslist->[0][0] = 'changed2'; $dslist->[0][1] = 8; $dslist->[0][2] = 8.8; $dslist->[0][3] = 1; $dslist->[0][4] = 'scalar changed2'; $dslist->[0][5] = $pixbufs[rand($#pixbufs+1)]; $dslist->[0][6] = 'scalar changed2'; $dslist->[0][7] = [8, 9, 10]; $dslist->[0][8] = 'changed2'; } elsif( $op eq 'Change 3' ) { # this is most useful if you've got a 1 column list $dslist->[0] = 'changed3'; } elsif ($op eq 'Splice 1') { splice @$dslist, 2, 2, (1..5), } elsif ($op eq 'Splice 2') { splice @$dslist, 2, 0, (1..5) } elsif ($op eq 'Splice 3') { splice @$dslist, 2, 2; } elsif ($op eq 'Splice 4') { splice @$dslist, 2; } elsif( $op eq 'Delete' ) { # delete the ~middle element delete $dslist->[$#$dslist/2]; } elsif( $op eq 'Empty' ) { # can't use shorthand on this b/c we're replacing the ref # in the simple list's data. @{$slist->{data}} = (); } elsif( $op eq 'Fill' ) { # can't use shorthand on this b/c we're replacing the ref # in the simple list's data. @{$slist->{data}} = ( [ 'one', 1, 1.1, 1, 'uno', undef, 'uno', [1, 2, 3], 'one' ], [ 'two', 2, 2.2, 0, 'dos', undef, 'dos', [2, 3, 4], 'two' ], [ 'three', 3, 3.3, 1, 'tres', undef, 'tres', [3, 4, 5], 'three' ], [ 'four', 4, 4.4, 0, 'quatro', undef, 'quatro', [4, 5, 6], 'four' ], ); } elsif( $op eq 'Many' ) { # can't use shorthand on this b/c we're replacing the ref # in the simple list's data. push @{$slist->{data}}, ( [ 'one', 1, 1.1, 1, 'uno', undef, 'uno', [1, 2, 3], 'one' ], [ 'two', 2, 2.2, 0, 'dos', undef, 'dos', [2, 3, 4], 'two' ], [ 'three', 3, 3.3, 1, 'tres', undef, 'tres', [3, 4, 5], 'three' ], [ 'four', 4, 4.4, 0, 'quatro', undef, 'quatro', [4, 5, 6], 'four' ], ); unshift @{$slist->{data}}, ( [ 'one', 1, 1.1, 1, 'uno', undef, 'uno', [1, 2, 3], 'one' ], [ 'two', 2, 2.2, 0, 'dos', undef, 'dos', [2, 3, 4], 'two' ], [ 'three', 3, 3.3, 1, 'tres', undef, 'tres', [3, 4, 5], 'three' ], [ 'four', 4, 4.4, 0, 'quatro', undef, 'quatro', [4, 5, 6], 'four' ], ); } elsif( $op eq 'Dump Sel' ) { print "selected indices: " . join(", ", $slist->get_selected_indices) . "\n"; } elsif( $op eq 'Dump List' ) { print "\n\nList Data\n".Dumper($slist->{data})."\n\n"; } 1; } $win->show_all; Gtk2->main; Gtk2-1.24993/examples/draw_text.pl000644 001750 000024 00000003032 11664366546 017140 0ustar00brianstaff000000 000000 #!/usr/bin/perl -w # # Here's a simple example of how to draw text with Gdk. # use strict; use Glib ':constants'; use Gtk2 -init; my $window = Gtk2::Window->new; $window->signal_connect (destroy => sub {Gtk2->main_quit}); # a widget we can draw on. has its own GdkWindow and therefore can # receive events. my $drawing_area = Gtk2::DrawingArea->new; $window->add ($drawing_area); # expose event is called when a repaint is needed. $drawing_area->signal_connect (expose_event => sub { # $event contains the area that actually needs updating. # for simplicity, we'll just paint the whole thing. you could # set up a clip region, but again, this is a simple example. my ($widget, $event) = @_; # we need a layout that contains the text we want to draw. my $layout = $widget->create_pango_layout ("Hello, world"); # clear the background. base_gc is the base color for text # widgets; in the default theme, this is the white background # of the TreeView, TextView, and Entry. $widget->window->draw_rectangle ($widget->get_style->base_gc ($widget->state), TRUE, 0, 0, $widget->allocation->width, $widget->allocation->height); # draw the text. text_gc is the foreground complement to # base_gc. we'll keep the text centered in the window. my ($text_width, $text_height) = $layout->get_pixel_size; $widget->window->draw_layout ($widget->get_style->text_gc ($widget->state), ($widget->allocation->width - $text_width) / 2, ($widget->allocation->height - $text_height) / 2, $layout); }); $window->show_all; Gtk2->main; Gtk2-1.24993/xs/Gtk2.xs000644 001750 000024 00000112655 13110362136 014570 0ustar00brianstaff000000 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., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 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.24993/xs/GtkHPaned.xs000644 001750 000024 00000001736 13110362136 015563 0ustar00brianstaff000000 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., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * * $Id$ */ #include "gtk2perl.h" MODULE = Gtk2::HPaned PACKAGE = Gtk2::HPaned PREFIX = gtk_hpaned_ GtkWidget * gtk_hpaned_new (class) C_ARGS: /* void */ Gtk2-1.24993/xs/GtkRecentChooserMenu.xs000644 001750 000024 00000001335 11664366546 020034 0ustar00brianstaff000000 000000 /* * Copyright (c) 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::RecentChooserMenu PACKAGE = Gtk2::RecentChooserMenu PREFIX = gtk_recent_chooser_menu_ BOOT: gperl_prepend_isa ("Gtk2::RecentChooserMenu", "Gtk2::RecentChooser"); GtkWidget * gtk_recent_chooser_menu_new (class) C_ARGS: /* void */ GtkWidget * gtk_recent_chooser_menu_new_for_manager (class, GtkRecentManager *manager) C_ARGS: manager gboolean gtk_recent_chooser_menu_get_show_numbers (GtkRecentChooserMenu *menu) void gtk_recent_chooser_menu_set_show_numbers (GtkRecentChooserMenu *menu, gboolean show_numbers) Gtk2-1.24993/xs/GtkMenuItem.xs000644 001750 000024 00000012207 13110362136 016142 0ustar00brianstaff000000 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., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 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