Codebase list libgtk2-perl / 68cb3fe
[svn-upgrade] Integrating new upstream version, libgtk2-perl (1.212) Ryan Niebur 15 years ago
21 changed file(s) with 378 addition(s) and 64 deletion(s). Raw diff Collapse all Expand all
0 2009-03-08 Torsten Schoenfeld <kaffeetisch@gmx.de>
1
2 * Gtk2.pm
3 * Makefile
4 * NEWS
5 * README: Unstable release 1.212.
6
7 2009-03-08 Torsten Schoenfeld <kaffeetisch@gmx.de>
8
9 * t/GtkHBox.t: Test that widgets packed into a box are completely
10 freed upon removal even if they previously appeared as a callback
11 argument. This is a test for a recent memory leak fix in Glib.
12
13 * t/GtkTreeModelIface.t: The leak fix mentioned above causes this
14 test to correctly run FINALIZE_INSTANCE now, so adjust the test
15 plan.
16
17 2009-03-08 Torsten Schoenfeld <kaffeetisch@gmx.de>
18
19 * t/GtkTreeModelFilter.t
20 * xs/GtkTreeModelFilter.xs: Take ownership of objects returned by
21 gtk_tree_model_filter_new to avoid leaking them. Patch by
22 Kevin Ryde.
23
24 2009-03-08 Torsten Schoenfeld <kaffeetisch@gmx.de>
25
26 * t/GtkStyle.t
27 * xs/GtkStyle.xs: Remove the get_property() alias for
28 Gtk2::Style::get() so that calling get_property() on a Gtk2::Style
29 resolves to Glib::Object::get_property().
30
31 2009-03-01 Torsten Schoenfeld <kaffeetisch@gmx.de>
32
33 * xs/GtkAccelGroup.xs: Remove two FIXME comments which turned out
34 to be incorrect. Patch by Kevin Ryde.
35
36 2009-02-22 Torsten Schoenfeld <kaffeetisch@gmx.de>
37
38 * t/GdkKeys.t: Skip most tests if we can't find a key entry to
39 test against.
40
41 2009-02-22 Torsten Schoenfeld <kaffeetisch@gmx.de>
42
43 * t/00.Gtk2.t: Don't fail if there is no valid DISPLAY.
44
45 2009-02-22 Torsten Schoenfeld <kaffeetisch@gmx.de>
46
47 * pm/TestHelper.pm
48 * pm/Helper.pm
49 * Gtk2.pm: Fix more POD errors.
50
51 2009-02-22 Torsten Schoenfeld <kaffeetisch@gmx.de>
52
53 * xs/Gtk2.xs
54 * xs/GtkTreeModel.xs
55 * xs/GtkWidget.xs
56 * xs/GtkWindow.xs: Fix POD errors reported by podchecker.
57
58 2009-02-21 Torsten Schoenfeld <kaffeetisch@gmx.de>
59
60 * t/GtkStyle.t
61 * xs/GtkStyle.xs: Wrap the gtk_style_get() family of methods as
62 Gtk2::Style::get(), and make Gtk2::Style::get_property() an alias
63 for get(). Patch by Emmanuel Rodriguez.
64
065 2009-02-13 Torsten Schoenfeld <kaffeetisch@gmx.de>
166
267 * Gtk2.pm
1515 # along with this library; if not, write to the Free Software Foundation, Inc.,
1616 # 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA.
1717 #
18 # $Id: Gtk2.pm 2142 2009-02-13 15:58:53Z tsch $
18 # $Id: Gtk2.pm 2155 2009-03-08 20:00:50Z tsch $
1919 #
2020
2121 package Gtk2;
7272 use Exporter;
7373 require DynaLoader;
7474
75 our $VERSION = '1.211';
75 our $VERSION = '1.212';
7676
7777 our @ISA = qw(DynaLoader Exporter);
7878
389389
390390 =head1 AUTHORS
391391
392 =encoding utf8
393
392394 The gtk2-perl team:
393395
394396 muppet <scott at asofyet dot org>
00 --- #YAML:1.0
11 name: Gtk2
2 version: 1.211
2 version: 1.212
33 abstract: Perl interface to the 2.x series of the Gimp Toolkit library
44 author: []
55 license: unknown
99 ExtUtils::Depends: 0.300
1010 ExtUtils::MakeMaker: 0
1111 ExtUtils::PkgConfig: 1.030
12 Glib: 1.212
12 Glib: 1.214
1313 Pango: 1.210
1414 requires:
1515 Cairo: 1.000
1616 ExtUtils::Depends: 0.300
1717 ExtUtils::PkgConfig: 1.030
18 Glib: 1.212
18 Glib: 1.214
1919 Pango: 1.210
2020 no_index:
2121 directory:
1414 # along with this library; if not, write to the Free Software Foundation, Inc.,
1515 # 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA.
1616 #
17 # $Id: Makefile.PL 2140 2009-02-13 15:36:37Z tsch $
17 # $Id: Makefile.PL 2155 2009-03-08 20:00:50Z tsch $
1818 #
1919
2020 BEGIN { require 5.008; }
3232 our %build_reqs = (
3333 'perl-ExtUtils-Depends' => '0.300',
3434 'perl-ExtUtils-PkgConfig' => '1.030',
35 'perl-Glib' => '1.212', # FIXME: 1.220
36 'perl-Pango' => '1.210',
35 'perl-Glib' => '1.214', # FIXME: Glib 1.220
36 'perl-Pango' => '1.210', # FIXME: Pango 1.220
3737 'perl-Cairo' => '1.000',
3838 'Gtk+' => '2.0.0',
3939 );
0 Overview of changes in Gtk2 1.212
1 =================================
2
3 * Wrap gtk_style_get.
4 * Fix a leak in Gtk2::TreeModelFilter::new.
5 * Fix a few POD errors.
6 * Fix some test suite issues.
7
08 Overview of changes in Gtk2 1.211
19 =================================
210
0 Gtk2 version 1.211
0 Gtk2 version 1.212
11 ==================
22
33 Perl bindings to the 2.x series of the Gtk+ graphical user interface library.
101101 with this library; if not, write to the Free Software Foundation, Inc., 59
102102 Temple Place - Suite 330, Boston, MA 02111-1307 USA.
103103
104 # $Id: README 2142 2009-02-13 15:58:53Z tsch $
104 # $Id: README 2155 2009-03-08 20:00:50Z tsch $
00 #
1 # $Id: Helper.pm 2054 2008-10-05 12:49:36Z tsch $
1 # $Id: Helper.pm 2148 2009-02-22 16:46:43Z tsch $
22 #
33
44 package Gtk2::Helper;
183183
184184 =head1 AUTHOR
185185
186 Jörn Reder E<lt>joern AT zyn.deE<gt>
186 =encoding utf8
187
188 Jörn Reder E<lt>joern AT zyn.deE<gt>
187189
188190 =head1 COPYRIGHT AND LICENSE
189191
190 Copyright 2003 by Jörn Reder
192 Copyright 2003 by Jörn Reder
191193
192194 This library is free software; you can redistribute it and/or
193195 modify it under the terms of the GNU Library General Public
00 #
1 # $Id: TestHelper.pm 2054 2008-10-05 12:49:36Z tsch $
1 # $Id: TestHelper.pm 2148 2009-02-22 16:46:43Z tsch $
22 #
33
44 package Gtk2::TestHelper;
218218 with all of the GInterfaces that the type system claims it supports. Something
219219 like an isa_ok() in steroids.
220220
221 =back
222
223221 =item delta_ok (A, B [, NAME])
224222
225223 Checks that the absolute difference of the numbers A and B is smaller than
00 #!/usr/bin/perl
11 #
2 # $Id: 00.Gtk2.t 2095 2008-11-22 14:49:27Z tsch $
2 # $Id: 00.Gtk2.t 2149 2009-02-22 17:32:48Z tsch $
33 #
44
55 use strict;
164164
165165 my $context = Glib::OptionContext->new ('- urgsify your life');
166166 $context->add_main_entries ($options, 'C');
167 $context->add_group (Gtk2->get_option_group (1));
167 $context->add_group (Gtk2->get_option_group (0));
168168
169169 @ARGV = qw(--name Foo --foos 23);
170170 $context->parse ();
11 use strict;
22 use Gtk2::TestHelper tests => 43;
33
4 # $Id: GdkKeys.t 2054 2008-10-05 12:49:36Z tsch $
4 # $Id: GdkKeys.t 2150 2009-02-22 17:33:48Z tsch $
55
66 use Gtk2::Gdk::Keysyms;
77
1717 }
1818
1919 my @keys = $map -> get_entries_for_keyval($Gtk2::Gdk::Keysyms{ Escape });
20
21 SKIP: {
22 skip 'No key entries for Escape found in the keymap', 41
23 unless scalar @keys;
24
2025 isa_ok($keys[0], "HASH");
2126 like($keys[0] -> { keycode }, qr/^\d+$/);
2227 like($keys[0] -> { group }, qr/^\d+$/);
97102 my $unicode = Gtk2::Gdk -> keyval_to_unicode($a);
98103 is(Gtk2::Gdk -> unicode_to_keyval($unicode), $a);
99104
105 }
106
100107 __END__
101108
102109 Copyright (C) 2003 by the gtk2-perl team (see the file AUTHORS for the
00 #!/usr/bin/perl -w
11 use strict;
2 use Gtk2::TestHelper tests => 1, noinit => 1;
2 use Gtk2::TestHelper tests => 3, noinit => 1;
33
4 # $Id: GtkHBox.t 2054 2008-10-05 12:49:36Z tsch $
4 # $Id: GtkHBox.t 2154 2009-03-08 18:40:43Z tsch $
55
66 my $box = Gtk2::HBox -> new();
77 isa_ok($box, "Gtk2::HBox");
88
9 {
10 my $label = Gtk2::Label->new ('hello');
11 $box->pack_start ($label, 0,0,0);
12 $box->remove($label);
13 require Scalar::Util;
14 Scalar::Util::weaken ($label);
15 is ($label, undef, 'child destroyed by weakening after being in box');
16 }
17 {
18 my $label = Gtk2::Label->new ('hello');
19 $box->pack_start ($label, 0,0,0);
20 $box->foreach (sub { });
21 $box->remove($label);
22 require Scalar::Util;
23 Scalar::Util::weaken ($label);
24 is ($label, undef,
25 'child destroyed by weakening after being in box -- and foreach()');
26 }
27
928 __END__
1029
11 Copyright (C) 2003 by the gtk2-perl team (see the file AUTHORS for the
30 Copyright (C) 2003, 2009 by the gtk2-perl team (see the file AUTHORS for the
1231 full list). See LICENSE for more information.
00 #!/usr/bin/perl -w
11 # vim: set ft=perl expandtab shiftwidth=2 softtabstop=2 :
22 use strict;
3 use Gtk2::TestHelper tests => 113;
4
5 # $Id: GtkStyle.t 2054 2008-10-05 12:49:36Z tsch $
3 use Gtk2::TestHelper tests => 124;
4 use Carp;
5
6 # $Id: GtkStyle.t 2152 2009-03-08 17:01:28Z tsch $
67
78 my $window = Gtk2::Window -> new();
89 $window -> realize();
132133 ok (1);
133134 }
134135
136 SKIP: {
137 skip("get is new in 2.16", 12)
138 unless (Gtk2->CHECK_VERSION(2, 15, 0)); # FIXME 2.16
139
140 # Test different properties (gint, gboolean, gchar* and GObject)
141 my $treeview = Gtk2::TreeView -> new();
142
143 # get gboolean
144 is (
145 $style -> get('Gtk2::TreeView', 'allow-rules'),
146 $treeview -> style_get_property('allow-rules'),
147 "get_property gboolean"
148 );
149
150 # get gint
151 is (
152 $style -> get('Gtk2::TreeView', 'expander-size'),
153 $treeview -> style_get_property('expander-size'),
154 "get_property gint"
155 );
156
157 # get gchar*
158 is (
159 $style -> get('Gtk2::TreeView', 'grid_line-pattern'),
160 $treeview -> style_get_property('grid_line-pattern'),
161 "get_property gchar*"
162 );
163
164 # get GObject (a color)
165 is (
166 $style -> get('Gtk2::TreeView', 'even-row-color'),
167 $treeview -> style_get_property('even-row-color'),
168 "get_property GObject*"
169 );
170
171
172
173 # Get multiple properties simultaneously
174 my @properties = $style -> get('Gtk2::TreeView', 'expander-size', 'even-row-color', 'grid_line-pattern');
175 is_deeply (
176 \@properties,
177 [
178 $treeview -> style_get_property('expander-size'),
179 $treeview -> style_get_property('even-row-color'),
180 $treeview -> style_get_property('grid_line-pattern'),
181 ],
182 'get multiple properties',
183 );
184
185
186
187 # Make sure that Glib::GObject::get() and Gtk2::Style::get() can coexist.
188 my $custom_style = Custom::Style -> new();
189 is ($custom_style -> Glib::Object::get('perl-string'), 'empty');
190 is ($custom_style -> get_property('perl-string'), 'empty');
191 is ($custom_style -> get('Gtk2::Button', 'image-spacing'), 2);
192
193
194
195 # Test for bad usage
196 # Bad class
197 test_die(
198 sub { $style -> get('wrong::class', 'border'); },
199 qr/^package wrong::class is not registered with GPerl/
200 );
201
202 # Non existing property
203 test_die(
204 sub { $style -> get('Gtk2::Button', 'image-spacing', 'perl-var', 'default-border'); },
205 qr/^type Gtk2::Button does not support style property 'perl-var'/
206 );
207
208 # Not a Gtk2::Widget
209 test_die(
210 sub { $style -> get('Glib::Object', 'prop'); },
211 qr/^Glib::Object is not a subclass of Gtk2::Widget/
212 );
213 }
214
215
216 # Test that an error is thrown
217 sub test_die {
218 my ($code, $regexp) = @_;
219 croak "usage(code, regexp)" unless ref $code eq 'CODE';
220
221 my $passed = FALSE;
222 eval {
223 $code->();
224 };
225 if (my $error = $@) {
226 if ($error =~ /$regexp/) {
227 $passed = TRUE;
228 }
229 else {
230 diag("Expected $regexp but got $error");
231 }
232 }
233
234 return Test::More->builder->ok($passed);
235 }
236
237
238 #
239 # Used to test if Gtk2::Style::get() conflicts with Glib::GObject::get(). A new
240 # package is needed because as of gtk+ 2.16, Gtk2::Style defines no properties.
241 #
242 package Custom::Style;
243
244 use Glib::Object::Subclass 'Gtk2::Style' =>
245
246 properties => [
247 Glib::ParamSpec->string(
248 'perl-string',
249 'Test string',
250 'A test string.',
251 'empty',
252 ['readable', 'writable'],
253 ),
254 ],
255 ;
256
257
135258 __END__
136259
137 Copyright (C) 2003-2006 by the gtk2-perl team (see the file AUTHORS for the
260 Copyright (C) 2003-2009 by the gtk2-perl team (see the file AUTHORS for the
138261 full list). See LICENSE for more information.
00 #!/usr/bin/perl -w
11 use strict;
22 use Gtk2::TestHelper
3 tests => 26,
3 tests => 27,
44 noinit => 1,
55 at_least_version => [2, 4, 0, "GtkTreeModelFilter is new in 2.4"];
66
7 # $Id: GtkTreeModelFilter.t 2054 2008-10-05 12:49:36Z tsch $
7 # $Id: GtkTreeModelFilter.t 2153 2009-03-08 17:59:16Z tsch $
88
99 my $list = Gtk2::ListStore -> new("Glib::Int", "Glib::String");
1010
7575
7676 $filter -> set_visible_column(0);
7777
78 {
79 require Scalar::Util;
80 my $f = Gtk2::TreeModelFilter->new($list);
81 Scalar::Util::weaken($f);
82 is ($f, undef, 'destroyed by weakening');
83 }
84
7885 __END__
7986
80 Copyright (C) 2003-2005 by the gtk2-perl team (see the file AUTHORS for the
87 Copyright (C) 2003-2009 by the gtk2-perl team (see the file AUTHORS for the
8188 full list). See LICENSE for more information.
00 #!/usr/bin/perl -w
11
2 # $Id: GtkTreeModelIface.t 2054 2008-10-05 12:49:36Z tsch $
2 # $Id: GtkTreeModelIface.t 2154 2009-03-08 18:40:43Z tsch $
33
44 package CustomList;
55
345345
346346 package main;
347347
348 use Gtk2::TestHelper tests => 179, noinit => 1;
348 use Gtk2::TestHelper tests => 180, noinit => 1;
349349 use strict;
350350 use warnings;
351351
455455 $model->sort(3);
456456 $model->sort(23);
457457
458 # This should result in a call to FINALIZE_INSTANCE
459 $model = undef;
460
458461 # Exercise Gtk2::TreeIter->set.
459462 { my $myvar;
460463 my $stamp = 123;
1515 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
1616 * Boston, MA 02111-1307 USA.
1717 *
18 * $Id: Gtk2.xs 2103 2009-01-01 21:40:13Z tsch $
18 * $Id: Gtk2.xs 2147 2009-02-22 16:12:47Z tsch $
1919 */
2020
2121 #include "gtk2perl.h"
166166 C<$Gtk2::VERSION> for the version of the bindings, all-caps
167167 (MAJOR|MINOR|MICRO)_VERSION functions for the bound version, and
168168 lower-case (major|minor|micro)_version functions for the runtime version.
169 See L<Glib::version> and http://developer.gnome.org/doc/API/2.0/gtk/gtk-Feature-Test-Macros.html for more information.
169 See L<Glib::version> and
170 L<http://developer.gnome.org/doc/API/2.0/gtk/gtk-Feature-Test-Macros.html>
171 for more information.
170172
171173 Note also that gtk_check_version() and GTK_CHECK_VERSION() have different
172174 semantics in C, and we have preserved those faithfully.
281283 PUSHs (sv_2mortal (newSViv (GTK_MICRO_VERSION)));
282284 PERL_UNUSED_VAR (ax);
283285
284 =for apidoc
286 =for apidoc
285287 Provides a mechanism for checking the version information that Gtk2 was
286288 compiled against. Essentially equvilent to the macro GTK_CHECK_VERSION. In most
287289 cases this function should be used rather than
288 L<check_version ()|Gtk2-E<gt>check_version>.
290 L<check_version ()|/"string = Gtk2-E<gt>B<check_version> ($required_major, $required_minor, $required_micro)">.
289291 =cut
290292 gboolean
291293 CHECK_VERSION (class, guint required_major, guint required_minor, guint required_micro)
00 /*
1 * Copyright (c) 2003 by the gtk2-perl team (see the file AUTHORS)
1 * Copyright (c) 2003, 2009 by the gtk2-perl team (see the file AUTHORS)
22 *
33 * This library is free software; you can redistribute it and/or
44 * modify it under the terms of the GNU Library General Public
1515 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
1616 * Boston, MA 02111-1307 USA.
1717 *
18 * $Id: GtkAccelGroup.xs 2067 2008-10-18 22:24:19Z tsch $
18 * $Id: GtkAccelGroup.xs 2151 2009-03-01 17:10:09Z tsch $
1919 */
2020
2121 #include "gtk2perl.h"
8383 PREINIT:
8484 GClosure * closure;
8585 CODE:
86 /* gtk_accel_group_connect() sinks the floating ref from creation in
87 * gperl_closure_new()
88 */
8689 closure = gperl_closure_new (func, NULL, FALSE);
8790 gtk_accel_group_connect (accel_group, accel_key, accel_mods,
8891 accel_flags, closure);
89 /* i would swear until i was blue in the face that this unref
90 * is the right thing to do, but with it in there i get a critical
91 * assertion failure from glib when i try to disconnect the closure,
92 * saying that the refcount was zero somehow. */
93 /* g_closure_unref (closure); FIXME */
9492
9593 ## void gtk_accel_group_connect_by_path (GtkAccelGroup *accel_group, const gchar *accel_path, GClosure *closure)
9694 void
10199 PREINIT:
102100 GClosure * closure;
103101 CODE:
102 /* gtk_accel_group_connect_by_path() sinks the floating ref from
103 * creation in gperl_closure_new()
104 */
104105 closure = gperl_closure_new (func, NULL, FALSE);
105106 gtk_accel_group_connect_by_path (accel_group, accel_path, closure);
106 /* i wonder if we get the same problem here as above? */
107 /* g_closure_unref (closure); FIXME */
108107
109108 # this will not work quite as advertised --- a GClosure can be
110109 # attached to only one GtkAccelGroup, but we'll be creating a new
00 /*
1 * Copyright (c) 2003-2006 by the gtk2-perl team (see the file AUTHORS)
1 * Copyright (c) 2003-2009 by the gtk2-perl team (see the file AUTHORS)
22 *
33 * This library is free software; you can redistribute it and/or
44 * modify it under the terms of the GNU Library General Public
1515 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
1616 * Boston, MA 02111-1307 USA.
1717 *
18 * $Id: GtkStyle.xs 2054 2008-10-05 12:49:36Z tsch $
18 * $Id: GtkStyle.xs 2152 2009-03-08 17:01:28Z tsch $
1919 */
2020
2121 #include "gtk2perl.h"
571571 RETVAL
572572
573573 #endif
574
575 #if GTK_CHECK_VERSION (2, 15, 0) /* FIXME 2.16 */
576
577 =for apidoc
578 =for signature list = $style->get (widget_package, ...)
579 =for arg widget_package (string) widget package name (ex: 'Gtk2::TreeView')
580 =for arg ... (list) list of property names
581
582 Fetch and return the values for the style properties named in I<...> for a
583 widget of type I<widget_package>.
584
585 B<Note>: This method shadows I<Glib::Object::get>. This shouldn't be a problem
586 since I<Gtk2::Style> defines no properties (as of gtk+ 2.16). If you have a
587 class that's derived from Gtk2::Style and adds a property or if a new version
588 of gtk+ adds a property to I<Gtk2::Style>, the property can be accessed with
589 I<get_property> which still resolves to I<Glib::Object::get_property>:
590
591 my $value = $style->get_property('property');
592
593 =cut
594 void
595 gtk_style_get (style, widget_package, ...)
596 GtkStyle *style
597 const char *widget_package
598 PREINIT:
599 int i;
600 GType widget_type;
601 gpointer class;
602 CODE:
603 /* Use CODE: instead of PPCODE: so we can handle the stack ourselves in
604 * order to avoid that xsubs called by gtk_style_get_property overwrite
605 * what we put on the stack. */
606
607 widget_type = gperl_type_from_package (widget_package);
608 if (widget_type == 0)
609 croak ("package %s is not registered with GPerl", widget_package);
610
611 if (! g_type_is_a (widget_type, GTK_TYPE_WIDGET))
612 croak ("%s is not a subclass of Gtk2::Widget", widget_package);
613
614
615 class = g_type_class_ref (widget_type);
616 if (class == NULL)
617 croak ("can't find type class for type %s", widget_package);
618
619 for (i = 2 ; i < items ; i++) {
620 GValue value = {0, };
621 gchar *name = SvGChar (ST (i));
622 GParamSpec *pspec =
623 gtk_widget_class_find_style_property (class, name);
624
625 if (pspec) {
626 g_value_init (&value, G_PARAM_SPEC_VALUE_TYPE (pspec));
627 gtk_style_get_property (style, widget_type, name, &value);
628 ST (i - 2) = sv_2mortal (gperl_sv_from_value (&value));
629 g_value_unset (&value);
630 }
631 else {
632 g_type_class_unref (class);
633 croak ("type %s does not support style property '%s'",
634 widget_package, name);
635 }
636 }
637
638 g_type_class_unref (class);
639
640 XSRETURN (items - 2);
641
642 #endif
22 *
33 * Licensed under the LGPL, see LICENSE file for more information.
44 *
5 * $Id: GtkTreeModel.xs 2100 2008-12-30 14:47:41Z tsch $
5 * $Id: GtkTreeModel.xs 2147 2009-02-22 16:12:47Z tsch $
66 */
77
88 #include "gtk2perl.h"
11071107
11081108 =for apidoc get_value
11091109 =for arg ... of column indices
1110 Alias for L<get|list = $tree_model-E<gt>get ($iter, ...)>.
1110 Alias for L<get|/"$tree_model-E<gt>B<get> ($iter, ...)">.
11111111 =cut
11121112
11131113 =for apidoc
00 /*
1 * Copyright (C) 2003-2005 by the gtk2-perl team (see the file AUTHORS for a
1 * Copyright (C) 2003-2009 by the gtk2-perl team (see the file AUTHORS for a
22 * full list)
33 *
44 * This library is free software; you can redistribute it and/or
6565 gperl_prepend_isa ("Gtk2::TreeModelFilter", "Gtk2::TreeModel");
6666
6767 ## GtkTreeModel *gtk_tree_model_filter_new (GtkTreeModel *child_model, GtkTreePath *root);
68 GtkTreeModel *gtk_tree_model_filter_new (class, GtkTreeModel *child_model, GtkTreePath_ornull *root=NULL);
69 C_ARGS:
70 child_model, root
68 ##
69 ## Use GtkTreeModelFilter_noinc return to take ownership of the
70 ## reference on the returned object. (GtkTreeModel is only a
71 ## GInterface and the typemaps for it don't include a _noinc or _own
72 ## variant.)
73 ##
74 GtkTreeModelFilter_noinc *
75 gtk_tree_model_filter_new (class, GtkTreeModel *child_model, GtkTreePath_ornull *root=NULL);
76 CODE:
77 RETVAL = (GtkTreeModelFilter *)
78 gtk_tree_model_filter_new(child_model, root);
79 OUTPUT:
80 RETVAL
7181
7282 ## void gtk_tree_model_filter_set_visible_func (GtkTreeModelFilter *filter, GtkTreeModelFilterVisibleFunc func, gpointer data, GtkDestroyNotify destroy);
7383 void
22 *
33 * Licensed under the LGPL, see LICENSE file for more information.
44 *
5 * $Id: GtkWidget.xs 2086 2008-11-01 19:13:31Z tsch $
5 * $Id: GtkWidget.xs 2147 2009-02-22 16:12:47Z tsch $
66 */
77 #include "gtk2perl.h"
88
570570 Also remember that the size request is not necessarily the size a widget will
571571 actually be allocated.
572572
573 See also L<get_child_requisition ()|requisistion = $widget-E<gt>get_child_requisition ()>
573 See also L<get_child_requisition ()|/"requisition = $widget-E<gt>B<get_child_requisition>">
574574 =cut
575575 GtkRequisition_copy *
576576 gtk_widget_size_request (widget)
599599 geometry instead of the widget's requisition.
600600
601601 This function differs from
602 L<size_request()|requisition = $widget-E<gt>size_request ()>
602 L<size_request()|/"requisition = $widget-E<gt>B<size_request>">
603603 in that it retrieves the last size request value from
604604 C<< $widget->requisition >>,
605605 while C<size_request()> actually calls the C<size_request> virtual method
787787 C<set_size_request()>. A value of -1 for I<width> or I<height> indicates
788788 that the dimension has not been explicitly set and the natural requisition
789789 of the widget will be used instead.
790 See L<set_size_request()|$widget-E<gt>set_size_request ($width-=1, $height=-1)>.
790 See L<set_size_request()|/"$widget-E<gt>B<set_size_request> ($width=-1, $height=-1)">.
791791 To get the size a widget will actually use, call
792 L<size_request()|requisition = $widget-E<gt>size_request ()> instead of
792 L<size_request()|/"requisition = $widget-E<gt>B<size_request>"> instead of
793793 this function.
794794 =cut
795795 void
1515 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
1616 * Boston, MA 02111-1307 USA.
1717 *
18 * $Id: GtkWindow.xs 2103 2009-01-01 21:40:13Z tsch $
18 * $Id: GtkWindow.xs 2147 2009-02-22 16:12:47Z tsch $
1919 */
2020
2121 #include "gtk2perl.h"
304304 environments may also place it in the window frame, or display it in other
305305 contexts.
306306
307 L<set_icon_list ()|$window-E<gt>set_icon_list> allows you to pass in the same icon in several
308 hand-drawn sizes. The list should contain the natural sizes your icon is
309 available in; that is, don't scale the image before passing it to GTK+.
310 Scaling is postponed until the last minute, when the desired final size is
311 known, to allow best quality.
307 L<set_icon_list ()|/"$window-E<gt>B<set_icon_list> (...)"> allows you to pass
308 in the same icon in several hand-drawn sizes. The list should contain the
309 natural sizes your icon is available in; that is, don't scale the image before
310 passing it to GTK+. Scaling is postponed until the last minute, when the
311 desired final size is known, to allow best quality.
312312
313313 By passing several sizes, you may improve the final image quality of the icon,
314314 by reducing or eliminating automatic image scaling.
332332
333333 # GList* gtk_window_get_icon_list (GtkWindow *window)
334334 =for apidoc
335 Retrieves the list of icons set by L<set_icon_list ()|$window-E<gt>set_icon_list>.
335 Retrieves the list of icons set by L<set_icon_list()|/"$window-E<gt>B<set_icon_list> (...)">.
336336 =cut
337337 void
338338 gtk_window_get_icon_list (window)