Compare commits

...

73 Commits

Author SHA1 Message Date
Mathias Hasselmann
48334023dd Make sure natural_delta is initialized.
2007-08-28  Mathias Hasselmann  <mathias.hasselmann@gmx.de>

	* gtk/gtktable.c: Make sure natural_delta is initialized.

svn path=/branches/extended-layout/; revision=18698
2007-08-28 21:04:21 +00:00
Mathias Hasselmann
865d99df04 Test size-for-allocation for GtkTable. Add orientation property needed for
2007-08-28  Mathias Hasselmann  <mathias.hasselmann@gmx.de>

	* tests/testextendedlayout.c: Test size-for-allocation for GtkTable.
	* gtk/gtk.symbols, gtk/gtktable.c, gtk/gtktable.h: Add orientation
	property needed for choosing a size-for-allocation strategy.

svn path=/branches/extended-layout/; revision=18697
2007-08-28 21:04:18 +00:00
Mathias Hasselmann
893bafd478 Consider width-for-height information. Move GtkChildSizeRequest to
2007-08-28  Mathias Hasselmann  <mathias.hasselmann@gmx.de>

	* gtk/gtkhbox.c: Consider width-for-height information.
	* gtk/gtkvbox.c, gtk/gtkprivate.h: Move GtkChildSizeRequest
	to gtkprivate.h.

svn path=/branches/extended-layout/; revision=18694
2007-08-28 16:06:16 +00:00
Mathias Hasselmann
c5f605deeb Properly calculate minimum_height in size-allocate. So I yell it into the
2007-08-20  Mathias Hasselmann  <mathias.hasselmann@gmx.de>

	* gtk/gtkvbox.c: Properly calculate minimum_height in size-allocate.
	So I yell it into the night: Height-for-width is shiny and bright!

svn path=/branches/extended-layout/; revision=18660
2007-08-20 18:54:48 +00:00
Mathias Hasselmann
ccacd597ad Announce size-for-allocation features only when ellipsis or wrapping with
2007-08-20  Mathias Hasselmann  <mathias.hasselmann@gmx.de>

	* gtk/gtklabel.c: Announce size-for-allocation features only when
	ellipsis or wrapping with full size allocation are active.
	* tests/testextendedlayout.c: Display size-for-allocation information
	in statusbar.

svn path=/branches/extended-layout/; revision=18659
2007-08-20 18:50:04 +00:00
Mathias Hasselmann
f8f1c9a18e Improve contrast for currently selected widget, show pointer address of
2007-08-20  Mathias Hasselmann  <mathias.hasselmann@gmx.de>

	* tests/testextendedlayout.c: Improve contrast for currently
	selected widget, show pointer address of widget in status bar.
	Provider names in size-for-allocation test.

svn path=/branches/extended-layout/; revision=18658
2007-08-20 18:42:26 +00:00
Mathias Hasselmann
ae24ffef8b Start real testing of height-for-width and width-for-height. Add
2007-08-20  Mathias Hasselmann  <mathias.hasselmann@gmx.de>

	* tests/testextendedlayout.c: Start real testing of height-for-width
	and width-for-height.
	* gtk/gtklabel.c, gtk/gtklabel.h, gtk/gtk.symbols: Add "full-size"
	property to be able to provide a meaningfull implementation of
	height-for-width and width-for-height.
	* gtk/gtkvbox.c: Consider height-for-width information.

svn path=/branches/extended-layout/; revision=18657
2007-08-20 17:59:44 +00:00
Mathias Hasselmann
85df623e78 Provide context menu to directly select testable widgets. Defer self
2007-08-13  Mathias Hasselmann  <mathias.hasselmann@gmx.de>

	* tests/testextendedlayout.c: Provide context menu to directly select
	testable widgets. Defer self invokation for socket testing until
	sockets are realized: Plugs cannot receive the "embedded" signal
	before their socket is realized.

svn path=/branches/extended-layout/; revision=18608
2007-08-13 10:36:34 +00:00
Mathias Hasselmann
5ac6a1fd29 Pimped the test for better demonstration. Correctly calulate layout width
2007-08-13  Mathias Hasselmann  <mathias.hasselmann@gmx.de>

	* tests/testellipsise.c: Pimped the test for better demonstration.
	* gtk/gtklabel.c: Correctly calulate layout width for rotated
	text when ellipses are used.

svn path=/branches/extended-layout/; revision=18607
2007-08-12 23:16:36 +00:00
Mathias Hasselmann
919243c5fc Filter feature set returned by the child to match the subset supported by
2007-08-12  Mathias Hasselmann  <mathias.hasselmann@gmx.de>

	* gtk/gtkbin.c: Filter feature set returned by the child to match
	the subset supported by bins. Ensure natural size matches at least
	the requested size.
	* gtk/gtkextendedlayout.c: Ensure natural size matches at least
	the requested size by considering explicit size requests.
	* gtk/gtkhbox.c, gtk/gtkvbox.c, gtk/gtktable.c, gtk/gtktable.h:
	Delegate natural size calculation to the (modified) size_request
	method for more accurate resutls. This trick was developed already
	for GtkLabel, but not recognized before working on GtkScrolledWindow.
	* gtk/gtktreeview.c: Skip invisible columns for natural size.
	* tests/autotestextendedlayout.c: Test natural size properties
	for all classes implementing GtkExtendLayout.

svn path=/branches/extended-layout/; revision=18606
2007-08-12 22:00:23 +00:00
Mathias Hasselmann
df2e3ed04c Practice consistent pixel rounding to avoid GtkLabel showing ellipses when
2007-08-06  Mathias Hasselmann  <mathias.hasselmann@gmx.de>

	* gtk/gtklabel.c: Practice consistent pixel rounding to avoid GtkLabel
	showing ellipses when PANGO_PIXELS and PANGO_PIXELS_FLOOR differ by
	less then 0.5 pixels.

svn path=/branches/extended-layout/; revision=18584
2007-08-06 14:30:48 +00:00
Mathias Hasselmann
1bebf4c606 Rename gtk_tree_view_column_cell_get_size_impl to
2007-08-06  Mathias Hasselmann  <mathias.hasselmann@gmx.de>

	* gtk/gtktreeviewcolumn.c:
	Rename gtk_tree_view_column_cell_get_size_impl
	to gtk_tree_view_column_cell_get_real_size to
	fit naming conventions.
	* gtk/gtkscrolledwindow.c:
	Provide and consider natural size information.
	* tests/testextendedlayout.c:
	Show natural size of the hovered widget in statusbar.

svn path=/branches/extended-layout/; revision=18583
2007-08-06 14:03:16 +00:00
Mathias Hasselmann
8cc13ff943 Introduce GtkTreeViewColumnPrivate. Provide and consider natural size
2007-08-06  Mathias Hasselmann  <mathias.hasselmann@gmx.de>

	* gtk/gtktreeprivate.h, gtk/gtktreeviewcolumn.h:
	Introduce GtkTreeViewColumnPrivate.
	* gtk/gtktreeview.c, gtk/gtktreeviewcolumn.c:
	Provide and consider natural size information.

svn path=/branches/extended-layout/; revision=18579
2007-08-06 13:36:28 +00:00
Mathias Hasselmann
52db2766c3 Use tree-view instead of notebook tabs for test case navigation. Support
2007-08-06  Mathias Hasselmann  <mathias.hasselmann@gmx.de>

	* tests/testextendedlayout.c: Use tree-view instead of notebook
	tabs for test case navigation. Support running a sub-set of tests.
	Display plug-id of sockets as tooltip.

svn path=/branches/extended-layout/; revision=18578
2007-08-06 13:36:09 +00:00
Mathias Hasselmann
5381af6306 Improve layout of natural size for various widgets test and add a test for
2007-08-06  Mathias Hasselmann  <mathias.hasselmann@gmx.de>

	* tests/testextendedlayout.c: Improve layout of natural size for
	various widgets test and add a test for GtkTreeViews within
	GtkScrolledWindows to it.

svn path=/branches/extended-layout/; revision=18577
2007-08-06 09:45:10 +00:00
Mathias Hasselmann
ce7d253c48 Repair sizing algorithm - gtk_socket_size_request and
2007-08-06  Mathias Hasselmann  <mathias.hasselmann@gmx.de>

	* gtk/gtksocket.c: Repair sizing algorithm - gtk_socket_size_request
	and gtk_socket_extended_layout_get_natural_size were calling each
	other's windowing backend function. Was I drunk when commiting the
	previous revision?

svn path=/branches/extended-layout/; revision=18576
2007-08-06 09:42:03 +00:00
Mathias Hasselmann
f1d13bd56b Provide natural size information. Consider and provide natural size
2007-08-01  Mathias Hasselmann  <mathias.hasselmann@gmx.de>

	* gtk/gtkcellrenderertext.c: Provide natural size information.
	* gtk/gtkcellview.c: Consider and provide natural size information.
	* tests/testextendedlayout.c: Change background of testing cell view.

svn path=/branches/extended-layout/; revision=18567
2007-08-01 15:53:34 +00:00
Mathias Hasselmann
0dd9d1d11c Seems there is no point in distinguishing between GTK_PACK_START and
2007-08-01  Mathias Hasselmann  <mathias.hasselmann@gmx.de>

	* gtk/gtkcellview.c: Seems there is no point in distinguishing between
	GTK_PACK_START and GTK_PACK_END during size allocation. The loops only
	differ in the packing check.

svn path=/branches/extended-layout/; revision=18564
2007-08-01 13:02:36 +00:00
Mathias Hasselmann
4a93ef5c4f Fix up the mess I commited before. Rule of the thumb: Never write code
2007-08-01  Mathias Hasselmann  <mathias.hasselmann@gmx.de>

	* gtk/gtkcellview.c: Fix up the mess I commited before.
	Rule of the thumb: Never write code when tired or in hurry.

svn path=/branches/extended-layout/; revision=18563
2007-08-01 13:02:33 +00:00
Mathias Hasselmann
65ab0fb100 Avoid rounding errors in size allocation by adopting the algorithm used by
2007-07-29  Mathias Hasselmann  <mathias.hasselmann@gmx.de>

	* gtk/gtkcellview.c: Avoid rounding errors in size
	allocation by adopting the algorithm used by GtkHBox.

svn path=/branches/extended-layout/; revision=18562
2007-08-01 11:19:44 +00:00
Mathias Hasselmann
1fbb28e857 Preparing natural size tests for GtkCellView and GtkTreeView.
2007-07-28  Mathias Hasselmann  <mathias.hasselmann@gmx.de>

	* tests/testextendedlayout.c: Preparing natural
	size tests for GtkCellView and GtkTreeView.

svn path=/branches/extended-layout/; revision=18554
2007-07-27 23:06:22 +00:00
Mathias Hasselmann
8a431e9707 Add paned widgets to the natural size test for GtkAlignment and GtkSocket.
2007-07-27  Mathias Hasselmann  <mathias.hasselmann@gmx.de>

	* tests/testextendedlayout.c: Add paned widgets to
	the natural size test for GtkAlignment and GtkSocket.
	* gtk/gtksocket-x11.c: Fix some cast.

svn path=/branches/extended-layout/; revision=18553
2007-07-27 23:06:19 +00:00
Mathias Hasselmann
c68c3fd9df Consider natural size of the child. Expose natural size via
2007-07-27  Mathias Hasselmann  <mathias.hasselmann@gmx.de>

	* gtk/gtkalignment.c, gtk/gtksocket.c, gtk/gtksocket-x11.c,
	gtk/gtksocketprivate.h: Consider natural size of the child.
	* gtk/gtkplug.c, gtk/gtkplug-x11.c, gtk/gtkplugprivate.h:
	Expose natural size via _GTK_NATURAL_SIZE window property.
	* tests/testextendedlayout.c: Test natural size handling
	of GtkAlignment, GtkPlug and GtkSocket.

svn path=/branches/extended-layout/; revision=18551
2007-07-27 18:36:20 +00:00
Mathias Hasselmann
c34223f9d8 Seems natural size for spanning cells worked already. Test spanning cells.
2007-07-26  Mathias Hasselmann  <mathias.hasselmann@gmx.de>

	* gtk/gtktable.c: Seems natural size for spanning cells worked already.
	* tests/testextendedlayout.c: Test spanning cells. Do not expand
	succeeded root nodes.

svn path=/branches/extended-layout/; revision=18545
2007-07-26 16:50:19 +00:00
Mathias Hasselmann
478b1a1191 Also apply natural size, when there are no expandable children. Fix
2007-07-24  Mathias Hasselmann  <mathias.hasselmann@gmx.de>

	* gtk/gtkhbox.c, gtk/gtktable.c, gtk/gtkvbox.c: Also apply natural
	size, when there are no expandable children. Fix natural size
	calculation for GtkVBox.
	* tests/testextendedlayout.c: More extensive natural size testing.
	Make sure that really all guide groups are tested. Add detail
	to test case label in results page.

svn path=/branches/extended-layout/; revision=18536
2007-07-24 08:36:25 +00:00
Mathias Hasselmann
d601bce003 Consider natural size to allocate widgets spanning a single, rename
2007-07-24  Mathias Hasselmann  <mathias.hasselmann@gmx.de>

	* gtk/gtktable.c, gtk/gtktable.h: Consider natural size to allocate
	widgets spanning a single, rename GtkTableRowCol::natural_size.
	Remove some lost g_print statements.
	* tests/testextendedlayout.c: Test natural size allocation in
	GtkTable for simple cases.

svn path=/branches/extended-layout/; revision=18532
2007-07-23 22:28:44 +00:00
Mathias Hasselmann
ea485139bf Provide natural size information. Implemented some initial natural size
2007-07-23  Mathias Hasselmann  <mathias.hasselmann@gmx.de>

	* gtk/gtktable.c, gtk/gtktable.h: Provide natural size information.
	* tests/autotestextendedlayout.c: Implemented some initial natural
	size tests for GtkTable.

svn path=/branches/extended-layout/; revision=18529
2007-07-23 17:19:46 +00:00
Mathias Hasselmann
5ef11313ba Make the type check part of the extended layout feature check macros.
2007-07-18  Mathias Hasselmann  <mathias.hasselmann@gmx.de>

	* gtk/gtkextendedlayout.h, gtk/gtkhbox.c, gtk/gtkvbox.c:
	Make the type check part of the extended layout feature check macros.

svn path=/branches/extended-layout/; revision=18528
2007-07-23 17:19:43 +00:00
Mathias Hasselmann
41818acb40 Extend the test to support rotations. Support ellipsizing and wrapping on
2007-07-16  Mathias Hasselmann  <mathias.hasselmann@gmx.de>

	* tests/testellipsise.c: Extend the test to support rotations.
	* gtk/gtklabel.c: Support ellipsizing and wrapping on labels
	rotated by multiples of 90°.

svn path=/branches/extended-layout/; revision=18493
2007-07-18 12:57:17 +00:00
Mathias Hasselmann
ffd0c38f91 Implement and test natural size support for GtkVBox. Cleanup issues found
2007-07-16  Mathias Hasselmann  <mathias.hasselmann@gmx.de>

	* gtk/gtkvbox.c, tests/testextendedlayout.c:
	Implement and test natural size support for GtkVBox.
	* gtk/gtkhbox.c: Cleanup issues found when implementing
	natural size for GtkVBox.

svn path=/branches/extended-layout/; revision=18492
2007-07-18 12:57:09 +00:00
Mathias Hasselmann
d89c5538cf Improve test result grouping.
2007-07-15  Mathias Hasselmann  <mathias.hasselmann@gmx.de>

	* tests/testextendedlayout.c: Improve test result grouping.

svn path=/branches/extended-layout/; revision=18491
2007-07-18 12:57:01 +00:00
Mathias Hasselmann
ca6a4fefa6 Propagate baseline offset to the child widget. Properly apply baseline
2007-07-04 Mathias Hasselmann <mathias.hasselmann@gmx.de>

	* gtk/gtkbin.c: Propagate baseline offset to the child widget.
	* gtk/gtkhbox.c: Properly apply baseline alignment by using the
	baseline found during requisition calculation for size allocation.
	* tests/testextendedlayout.c: Add yscale variantes of GtkAlignment
	to the baseline tests. Improve widget names. Split status message
	into two lines.

svn path=/branches/extended-layout/; revision=18444
2007-07-11 12:24:25 +00:00
Mathias Hasselmann
8260ef870f Allow choosing initially active notebook page from command line and create
2007-07-03  Mathias Hasselmann  <mathias.hasselmann@gmx.de>

	* tests/testextendedlayout.c: Allow choosing initially active
	notebook page from command line and create more sane widget names
	for the sake of g_print-debugging.

svn path=/branches/extended-layout/; revision=18354
2007-07-03 15:42:03 +00:00
Mathias Hasselmann
24b2fa20f1 Properly evaluate natural size. Consider natural size for child placement.
2007-07-02  Mathias Hasselmann  <mathias.hasselmann@gmx.de>

	* gtk/gtkbin.c: Properly evaluate natural size.
	* gtk/gtkhbox.c: Consider natural size for child placement.
	* gtk/gtklabel.c: Drop any PangoLayout width assigned during the
	size allocation process to get proper natural size readings.
	* tests/testextendedlayout.c: Add some GtkHPaned to the natural
	size test for dynamic evaluation of the algorithm.

svn path=/branches/extended-layout/; revision=18339
2007-07-02 10:26:15 +00:00
Mathias Hasselmann
f568484846 Add gtk_extended_layout_set_baseline_offset to allow widget to adjust
2007-07-01  Mathias Hasselmann  <mathias.hasselmann@gmx.de>

	* gtk/gtk.symbols, gtk/gtkextendedlayout.c, gtk/gtkextendedlayout.h:
	Add gtk_extended_layout_set_baseline_offset to allow widget to adjust
	their baselines to the findings of their parent container.
	* gtk/gtkhbox.c: Use gtk_extended_layout_set_baseline_offset to obey
	the uniform height constraint of the horizontal box. Do not cache
	baselines found during requisition evaluation, as baselines can
	change, when assigning a widget more space than requested.
	* gtk/gtklabel.c: Implement gtk_extended_layout_set_baseline_offset.

svn path=/branches/extended-layout/; revision=18330
2007-07-01 21:12:21 +00:00
Mathias Hasselmann
0869a5b9f5 Invalidate previously selected widget when choosing another one, to avoid
2007-07-01  Mathias Hasselmann  <mathias.hasselmann@gmx.de>

	* tests/testextendedlayout.c: Invalidate previously selected
	widget when choosing another one, to avoid drawing artifacts.

svn path=/branches/extended-layout/; revision=18329
2007-07-01 21:12:13 +00:00
Mathias Hasselmann
0013cf7e73 Improve drawing of baseline guides.
2007-07-01  Mathias Hasselmann  <mathias.hasselmann@gmx.de>

	* tests/testextendedlayout.c: Improve drawing of baseline guides.

svn path=/branches/extended-layout/; revision=18328
2007-07-01 21:12:10 +00:00
Mathias Hasselmann
0f8b3448b3 Properly report feature set and consider baseline_policy when evaluating
2007-07-01  Mathias Hasselmann  <mathias.hasselmann@gmx.de>

	* gtk/gtkhbox.c: Properly report feature set and consider
	baseline_policy when evaluating the baseline of the box.
	* gtk/gtklabel.c: Adjust the coding style of get_features
	to match the style of GtkHBox.

svn path=/branches/extended-layout/; revision=18327
2007-07-01 21:12:07 +00:00
Mathias Hasselmann
07410c89fa Make baseline alignment work, by ignoring the uniform height constraint a
2007-07-01  Mathias Hasselmann  <mathias.hasselmann@gmx.de>

	* gtk/gtkhbox.c: Make baseline alignment work, by ignoring the uniform
	height constraint a GtkHBox implies. TODO: Obey that constraint.

svn path=/branches/extended-layout/; revision=18321
2007-07-01 09:23:44 +00:00
Mathias Hasselmann
86c0d93981 Rudimentary implementation of GtkExtendLayout.
2007-07-01  Mathias Hasselmann  <mathias.hasselmann@gmx.de>

	* gtk/gtkhbox.c: Rudimentary implementation of GtkExtendLayout.

svn path=/branches/extended-layout/; revision=18320
2007-07-01 09:11:47 +00:00
Mathias Hasselmann
d50c7c68b4 Fix a typo: s/GtkWindow/GtkWidget/
svn path=/branches/extended-layout/; revision=18319
2007-07-01 09:11:42 +00:00
Mathias Hasselmann
a21a526141 Provide button variant of the GtkHBox baseline alignment test, as those
2007-06-30  Mathias Hasselmann  <mathias.hasselmann@gmx.de>

	* tests/testextendedlayout.c: Provide button variant of the
	GtkHBox baseline alignment test, as those buttons show some
	shortcomings of my current baseline concept.

svn path=/branches/extended-layout/; revision=18318
2007-07-01 09:11:39 +00:00
Mathias Hasselmann
ecab2fb505 Provide status text, when no widget is selected.
2007-06-30  Mathias Hasselmann  <mathias.hasselmann@gmx.de>

	* tests/testextendedlayout.c:
	Provide status text, when no widget is selected.

svn path=/branches/extended-layout/; revision=18317
2007-07-01 09:11:34 +00:00
Mathias Hasselmann
2b051221e1 Drop g_debug messages.
2007-06-29  Mathias Hasselmann  <mathias.hasselmann@gmx.de>

	* gtk/gtkframe.c: Drop g_debug messages.

svn path=/branches/extended-layout/; revision=18300
2007-06-29 20:31:11 +00:00
Mathias Hasselmann
9f981fcebb Move buttons to top and provide textual information about currently
2007-06-29  Mathias Hasselmann  <mathias.hasselmann@gmx.de>

	* tests/testextendedlayout.c: Move buttons to top and
	provide textual information about currently hovered widget.

svn path=/branches/extended-layout/; revision=18299
2007-06-29 20:31:09 +00:00
Mathias Hasselmann
32ec6ad779 Move code to setup UI from main to test_suite_new.
2007-06-29  Mathias Hasselmann  <mathias.hasselmann@gmx.de>

	* tests/testextendedlayout.c: Move code to setup UI
	from main to test_suite_new.

svn path=/branches/extended-layout/; revision=18298
2007-06-29 20:31:05 +00:00
Mathias Hasselmann
ce56b73010 Split Baseline Alignment tests into separate tests and move the notebook
2007-06-29  Mathias Hasselmann  <mathias.hasselmann@gmx.de>

	* tests/testextendedlayout.c: Split Baseline Alignment tests into
	separate tests and move the notebook tabs to the right.
	* gtk/gtkhbox.c: Properly decode "debug-wanted" object
	tag with GPOINTER_TO_INT.

svn path=/branches/extended-layout/; revision=18297
2007-06-29 20:31:02 +00:00
Mathias Hasselmann
079233aef1 Add gtk_extended_layout_get_padding. Implement
2007-06-29  Mathias Hasselmann  <mathias.hasselmann@gmx.de>

	* gtk/gtkextendedlayout.h, gtk/gtkextendedlayout.c,
	gtk/gtk.symbols: Add gtk_extended_layout_get_padding.
	* gtk/gtkalignment.c, gtk/gtkbin.c, gtk/gtkbutton.c,
	gtk/gtkframe.c: Implement gtk_extended_layout_get_padding.
	* tests/autotestextendedlayout.c: Verify padding information
	provided via gtk_extended_layout_get_padding.

svn path=/branches/extended-layout/; revision=18283
2007-06-28 22:21:28 +00:00
Mathias Hasselmann
f9b5d39a96 Merge separate, but nearly identical child allocation code for start and
2007-06-28  Mathias Hasselmann  <mathias.hasselmann@gmx.de>

	* gtk/gtkhbox.c: Merge separate, but nearly identical child allocation
	code for start and end packing into one single loop. This should avoid
	programming errors caused by extensive code duplication, as they happend
	to me with the previous commit. Maybe some advanced compiler is able
	to do the trivial loop unrolling.
	* tests/testextendedlayout.c: Use exteriour guides instead of
	separators to identify GtkHBox allocation and extend the baseline
	alignment tests for GtkHBox.

svn path=/branches/extended-layout/; revision=18278
2007-06-28 09:54:50 +00:00
Mathias Hasselmann
9a147e24dc Initial, buggish implementation of baseline alignment in GtkHBox.
2007-06-28  Mathias Hasselmann  <mathias.hasselmann@gmx.de>

	* gtk/gtkhbox.c, gtk/gtkhbox.h, gtk/gtk.symbols,
	tests/testextendedlayout.c: Initial, buggish implementation
	of baseline alignment in GtkHBox.

svn path=/branches/extended-layout/; revision=18268
2007-06-27 23:44:01 +00:00
Mathias Hasselmann
3acb459d2f Introduce GtkBaselinePolicy. Add missing symbols. Introduce
2007-06-28  Mathias Hasselmann  <mathias.hasselmann@gmx.de>

	* gtk/gtkenums.h: Introduce GtkBaselinePolicy.
	* gtk/gtk.symbols: Add missing symbols.
	* gtk/gtkextendedlayout.c, gtk/gtkextendedlayout.h:
	  Introduce gtk_extended_layout_get_single_baseline.

svn path=/branches/extended-layout/; revision=18267
2007-06-27 23:43:55 +00:00
Mathias Hasselmann
68bf11d56d Prevent undefined behaviour when gtk_widget_translate_coordinates fails.
2007-06-28  Mathias Hasselmann  <mathias.hasselmann@gmx.de>

	* gtk/gtkbin.c: Prevent undefined behaviour when
	gtk_widget_translate_coordinates fails.

svn path=/branches/extended-layout/; revision=18266
2007-06-27 23:43:47 +00:00
Mathias Hasselmann
63ada5c4a7 Provide checkboxes to choose guide types at runtime.
2007-06-20  Mathias Hasselmann  <mathias.hasselmann@gmx.de>

	* tests/testextendedlayout.c: Provide checkboxes
	to choose guide types at runtime.

svn path=/branches/extended-layout/; revision=18212
2007-06-20 18:58:10 +00:00
Mathias Hasselmann
7a23061818 Don't create the tile pixmap with every expose event.
2007-06-20  Mathias Hasselmann  <mathias.hasselmann@gmx.de>

	* tests/testextendedlayout.c: Don't create
	the tile pixmap with every expose event.

svn path=/branches/extended-layout/; revision=18211
2007-06-20 18:58:07 +00:00
Mathias Hasselmann
89c9ad7a60 Dynamically highlight the currently hovered widget and its guides.
2007-06-20  Mathias Hasselmann  <mathias.hasselmann@gmx.de>

	* gtk/gtkextendedlayout.h, tests/testextendedlayout.c:
	Dynamically highlight the currently hovered widget and its guides.

svn path=/branches/extended-layout/; revision=18210
2007-06-20 16:36:51 +00:00
Mathias Hasselmann
06be1bed39 Implement GtkExtendedLayout for GtkBin.
2007-06-20  Mathias Hasselmann  <mathias.hasselmann@gmx.de>

	* gtk/gtkbin.c, tests/autotestextendedlayout.c,
	tests/testextendedlayout.c: Implement GtkExtendedLayout for GtkBin.

svn path=/branches/extended-layout/; revision=18209
2007-06-20 11:07:12 +00:00
Mathias Hasselmann
2d4338c231 Implement get_natural_size for GtkLabel.
2007-06-20  Mathias Hasselmann  <mathias.hasselmann@gmx.de>

	* gtk/gtklabel.c, tests/autotestextendedlayout.c:
	Implement get_natural_size for GtkLabel.

svn path=/branches/extended-layout/; revision=18208
2007-06-20 11:07:10 +00:00
Mathias Hasselmann
8fc990dfd0 Implement height for width for GtkLabel.
2007-06-20  Mathias Hasselmann  <mathias.hasselmann@gmx.de>

	* gtk/gtklabel.c, tests/autotestextendedlayout.c:
	Implement height for width for GtkLabel.

svn path=/branches/extended-layout/; revision=18203
2007-06-20 08:31:46 +00:00
Mathias Hasselmann
31f1a16eaa Correct some assumptions, write baseline values to console.
2007-06-20  Mathias Hasselmann  <mathias.hasselmann@gmx.de>

	* tests/autotestextendedlayout.c: Correct some assumptions,
	write baseline values to console.

svn path=/branches/extended-layout/; revision=18202
2007-06-20 06:36:23 +00:00
Mathias Hasselmann
470b4b395d Remove some late hacking crack.
2007-06-20  Mathias Hasselmann  <mathias.hasselmann@gmx.de>

	* gtk/gtklabel.c: Remove some late hacking crack.

svn path=/branches/extended-layout/; revision=18201
2007-06-20 05:58:35 +00:00
Mathias Hasselmann
24ef79cead Implementing get_baselines for GtkLabel and testing it.
2007-06-20  Mathias Hasselmann  <mathias.hasselmann@gmx.de>

	* gtk/gtklabel.c, tests/autotestextendedlayout.c,
	tests/testextendedlayout.c, tests/Makefile.am:
	Implementing get_baselines for GtkLabel and testing it.

svn path=/branches/extended-layout/; revision=18200
2007-06-20 05:43:28 +00:00
Mathias Hasselmann
a5461cea77 Implementing get_baselines for GtkLabel and testing it.
2007-06-20  Mathias Hasselmann  <mathias.hasselmann@gmx.de>

	* gtk/gtklabel.c, tests/autotestextendedlayout.c,
	tests/testextendedlayout.c, tests/Makefile.am:
	Implementing get_baselines for GtkLabel and testing it.

svn path=/branches/extended-layout/; revision=18198
2007-06-19 22:25:40 +00:00
Mathias Hasselmann
bd36257eca Implement GtkExtendLayout interface. Implement GtkExtendLayout interface.
2007-06-19  Mathias Hasselmann  <mathias.hasselmann@gmx.de>

	* gtk/Makefile.am, gtk/gtk.h, gtk/gtkextendedlayout.c,
	gtk/gtkextendedlayout.h: Implement GtkExtendLayout interface.
	* docs/reference/gtk/tmpl/gtkextendedlayout.sgml,
	docs/reference/gtk/gtk-docs.sgml, docs/reference/gtk/gtk-sections.txt,
	docs/reference/gtk/gtk.types: Implement GtkExtendLayout interface.

svn path=/branches/extended-layout/; revision=18195
2007-06-19 18:26:07 +00:00
Mathias Hasselmann
44f8a2524f Resynching with trunk to avoid future merge conflicts with the giant
2007-06-18  Mathias Hasselmann  <mathias.hasselmann@gmx.de>

	* gdk/*, gtk/*: Resynching with trunk to avoid future
	merge conflicts with the giant GtkBuilder patch.


svn path=/branches/extended-layout/; revision=18182
2007-06-18 21:04:02 +00:00
Mathias Hasselmann
6ce7f10b54 Implement formal testing
svn path=/branches/extended-layout/; revision=17976
2007-05-29 11:58:41 +00:00
Mathias Hasselmann
3e6f8421f2 Create initial heigth-for-width test
svn path=/branches/extended-layout/; revision=17975
2007-05-29 09:12:46 +00:00
Mathias Hasselmann
5d8017aef9 Also retreive base line information for GtkTextView widgets
svn path=/branches/extended-layout/; revision=17974
2007-05-29 08:07:25 +00:00
Mathias Hasselmann
54c20694b9 Ported guides drawing to legacy GdkGC API, which looks worse but supports IncludeInferiors
svn path=/branches/extended-layout/; revision=17962
2007-05-28 09:41:15 +00:00
Mathias Hasselmann
6f7f4a5673 Provide some hint which label a guide belongs to
svn path=/branches/extended-layout/; revision=17961
2007-05-28 08:26:02 +00:00
Mathias Hasselmann
cf0ee4d7b0 Some refactoring to get rid of the global list of allocation guides
svn path=/branches/extended-layout/; revision=17960
2007-05-28 08:21:42 +00:00
Mathias Hasselmann
57c1dae7aa Build-fixes for testextendedlayout
svn path=/branches/extended-layout/; revision=17953
2007-05-27 18:12:25 +00:00
Mathias Hasselmann
ea900daa0d Initial implementation of base line test
svn path=/branches/extended-layout/; revision=17952
2007-05-27 17:56:06 +00:00
Mathias Hasselmann
5417534eda Creating testing framework, starting with natural size testing.
svn path=/branches/extended-layout/; revision=17951
2007-05-27 17:52:13 +00:00
451 changed files with 103247 additions and 82036 deletions

1222
ChangeLog

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,438 @@
2007-08-28 Mathias Hasselmann <mathias.hasselmann@gmx.de>
* gtk/gtktable.c: Make sure natural_delta is initialized.
2007-08-28 Mathias Hasselmann <mathias.hasselmann@gmx.de>
* tests/testextendedlayout.c: Test size-for-allocation for GtkTable.
* gtk/gtk.symbols, gtk/gtktable.c, gtk/gtktable.h: Add orientation
property needed for choosing a size-for-allocation strategy.
2007-08-28 Mathias Hasselmann <mathias.hasselmann@gmx.de>
* gtk/gtkhbox.c: Consider width-for-height information.
* gtk/gtkvbox.c, gtk/gtkprivate.h: Move GtkChildSizeRequest
to gtkprivate.h.
2007-08-20 Mathias Hasselmann <mathias.hasselmann@gmx.de>
* gtk/gtkvbox.c: Properly calculate minimum_height in size-allocate.
So I yell it into the night: Height-for-width is shiny and bright!
2007-08-20 Mathias Hasselmann <mathias.hasselmann@gmx.de>
* gtk/gtklabel.c: Announce size-for-allocation features only when
ellipsis or wrapping with full size allocation are active.
* tests/testextendedlayout.c: Display size-for-allocation information
in statusbar.
2007-08-20 Mathias Hasselmann <mathias.hasselmann@gmx.de>
* tests/testextendedlayout.c: Improve contrast for currently
selected widget, show pointer address of widget in status bar.
Provider names in size-for-allocation test.
2007-08-20 Mathias Hasselmann <mathias.hasselmann@gmx.de>
* tests/testextendedlayout.c: Start real testing of height-for-width
and width-for-height.
* gtk/gtklabel.c, gtk/gtklabel.h, gtk/gtk.symbols: Add "full-size"
property to be able to provide a meaningfull implementation of
height-for-width and width-for-height.
* gtk/gtkvbox.c: Consider height-for-width information.
2007-08-13 Mathias Hasselmann <mathias.hasselmann@gmx.de>
* tests/testextendedlayout.c: Provide context menu to directly select
testable widgets. Defer self invokation for socket testing until
sockets are realized: Plugs cannot receive the "embedded" signal
before their socket is realized.
2007-08-13 Mathias Hasselmann <mathias.hasselmann@gmx.de>
* tests/testellipsise.c: Pimped the test for better demonstration.
* gtk/gtklabel.c: Correctly calulate layout width for rotated
text when ellipses are used.
2007-08-12 Mathias Hasselmann <mathias.hasselmann@gmx.de>
* gtk/gtkbin.c: Filter feature set returned by the child to match
the subset supported by bins. Ensure natural size matches at least
the requested size.
* gtk/gtkextendedlayout.c: Ensure natural size matches at least
the requested size by considering explicit size requests.
* gtk/gtkhbox.c, gtk/gtkvbox.c, gtk/gtktable.c, gtk/gtktable.h:
Delegate natural size calculation to the (modified) size_request
method for more accurate resutls. This trick was developed already
for GtkLabel, but not recognized before working on GtkScrolledWindow.
* gtk/gtktreeview.c: Skip invisible columns for natural size.
* tests/autotestextendedlayout.c: Test natural size properties
for all classes implementing GtkExtendLayout.
2007-08-06 Mathias Hasselmann <mathias.hasselmann@gmx.de>
* gtk/gtklabel.c: Practice consistent pixel rounding to avoid GtkLabel
showing ellipses when PANGO_PIXELS and PANGO_PIXELS_FLOOR differ by
less then 0.5 pixels.
2007-08-06 Mathias Hasselmann <mathias.hasselmann@gmx.de>
* gtk/gtktreeviewcolumn.c:
Rename gtk_tree_view_column_cell_get_size_impl
to gtk_tree_view_column_cell_get_real_size to
fit naming conventions.
* gtk/gtkscrolledwindow.c:
Provide and consider natural size information.
* tests/testextendedlayout.c:
Show natural size of the hovered widget in statusbar.
2007-08-06 Mathias Hasselmann <mathias.hasselmann@gmx.de>
* gtk/gtktreeprivate.h, gtk/gtktreeviewcolumn.h:
Introduce GtkTreeViewColumnPrivate.
* gtk/gtktreeview.c, gtk/gtktreeviewcolumn.c:
Provide and consider natural size information.
2007-08-06 Mathias Hasselmann <mathias.hasselmann@gmx.de>
* tests/testextendedlayout.c: Use tree-view instead of notebook
tabs for test case navigation. Support running a sub-set of tests.
Display plug-id of sockets as tooltip.
2007-08-06 Mathias Hasselmann <mathias.hasselmann@gmx.de>
* tests/testextendedlayout.c: Improve layout of natural size for
various widgets test and add a test for GtkTreeViews within
GtkScrolledWindows to it.
2007-08-06 Mathias Hasselmann <mathias.hasselmann@gmx.de>
* gtk/gtksocket.c: Repair sizing algorithm - gtk_socket_size_request
and gtk_socket_extended_layout_get_natural_size were calling each
other's windowing backend function. Was I drunk when commiting the
previous revision?
2007-08-01 Mathias Hasselmann <mathias.hasselmann@gmx.de>
* gtk/gtkcellrenderertext.c: Provide natural size information.
* gtk/gtkcellview.c: Consider and provide natural size information.
* tests/testextendedlayout.c: Change background of testing cell view.
2007-08-01 Mathias Hasselmann <mathias.hasselmann@gmx.de>
* gtk/gtkcellview.c: Seems there is no point in distinguishing between
GTK_PACK_START and GTK_PACK_END during size allocation. The loops only
differ in the packing check.
2007-08-01 Mathias Hasselmann <mathias.hasselmann@gmx.de>
* gtk/gtkcellview.c: Fix up the mess I commited before.
Rule of the thumb: Never write code when tired or in hurry.
2007-07-29 Mathias Hasselmann <mathias.hasselmann@gmx.de>
* gtk/gtkcellview.c: Avoid rounding errors in size
allocation by adopting the algorithm used by GtkHBox.
2007-07-28 Mathias Hasselmann <mathias.hasselmann@gmx.de>
* tests/testextendedlayout.c: Preparing natural
size tests for GtkCellView and GtkTreeView.
2007-07-27 Mathias Hasselmann <mathias.hasselmann@gmx.de>
* tests/testextendedlayout.c: Add paned widgets to
the natural size test for GtkAlignment and GtkSocket.
* gtk/gtksocket-x11.c: Fix some cast.
2007-07-27 Mathias Hasselmann <mathias.hasselmann@gmx.de>
* gtk/gtkalignment.c, gtk/gtksocket.c, gtk/gtksocket-x11.c,
gtk/gtksocketprivate.h: Consider natural size of the child.
* gtk/gtkplug.c, gtk/gtkplug-x11.c, gtk/gtkplugprivate.h:
Expose natural size via _GTK_NATURAL_SIZE window property.
* tests/testextendedlayout.c: Test natural size handling
of GtkAlignment, GtkPlug and GtkSocket.
2007-07-26 Mathias Hasselmann <mathias.hasselmann@gmx.de>
* gtk/gtktable.c: Seems natural size for spanning cells worked already.
* tests/testextendedlayout.c: Test spanning cells. Do not expand
succeeded root nodes.
2007-07-24 Mathias Hasselmann <mathias.hasselmann@gmx.de>
* gtk/gtkhbox.c, gtk/gtktable.c, gtk/gtkvbox.c: Also apply natural
size, when there are no expandable children. Fix natural size
calculation for GtkVBox.
* tests/testextendedlayout.c: More extensive natural size testing.
Make sure that really all guide groups are tested. Add detail
to test case label in results page.
2007-07-24 Mathias Hasselmann <mathias.hasselmann@gmx.de>
* gtk/gtktable.c, gtk/gtktable.h: Consider natural size to allocate
widgets spanning a single, rename GtkTableRowCol::natural_size.
Remove some lost g_print statements.
* tests/testextendedlayout.c: Test natural size allocation in
GtkTable for simple cases.
2007-07-23 Mathias Hasselmann <mathias.hasselmann@gmx.de>
* gtk/gtktable.c, gtk/gtktable.h: Provide natural size information.
* tests/autotestextendedlayout.c: Implemented some initial natural
size tests for GtkTable.
2007-07-18 Mathias Hasselmann <mathias.hasselmann@gmx.de>
* gtk/gtkextendedlayout.h, gtk/gtkhbox.c, gtk/gtkvbox.c:
Make the type check part of the extended layout feature check macros.
2007-07-16 Mathias Hasselmann <mathias.hasselmann@gmx.de>
* tests/testellipsise.c: Extend the test to support rotations.
* gtk/gtklabel.c: Support ellipsizing and wrapping on labels
rotated by multiples of 90°.
2007-07-16 Mathias Hasselmann <mathias.hasselmann@gmx.de>
* gtk/gtkvbox.c, tests/testextendedlayout.c:
Implement and test natural size support for GtkVBox.
* gtk/gtkhbox.c: Cleanup issues found when implementing
natural size for GtkVBox.
2007-07-15 Mathias Hasselmann <mathias.hasselmann@gmx.de>
* tests/testextendedlayout.c: Improve test result grouping.
2007-07-04 Mathias Hasselmann <mathias.hasselmann@gmx.de>
* gtk/gtkbin.c: Propagate baseline offset to the child widget.
* gtk/gtkhbox.c: Properly apply baseline alignment by using the
baseline found during requisition calculation for size allocation.
* tests/testextendedlayout.c: Add yscale variantes of GtkAlignment
to the baseline tests. Improve widget names. Split status message
into two lines.
2007-07-03 Mathias Hasselmann <mathias.hasselmann@gmx.de>
* tests/testextendedlayout.c: Allow choosing initially active
notebook page from command line and create more sane widget names
for the sake of g_print-debugging.
2007-07-02 Mathias Hasselmann <mathias.hasselmann@gmx.de>
* gtk/gtkbin.c: Properly evaluate natural size.
* gtk/gtkhbox.c: Consider natural size for child placement.
* gtk/gtklabel.c: Drop any PangoLayout width assigned during the
size allocation process to get proper natural size readings.
* tests/testextendedlayout.c: Add some GtkHPaned to the natural
size test for dynamic evaluation of the algorithm. Create guides for
the button of the height-for-width test for debugging, as it is
affected by natural sizing of GtkHBox.
2007-07-01 Mathias Hasselmann <mathias.hasselmann@gmx.de>
* gtk/gtk.symbols, gtk/gtkextendedlayout.c, gtk/gtkextendedlayout.h:
Add gtk_extended_layout_set_baseline_offset to allow widget to adjust
their baselines to the findings of their parent container.
* gtk/gtkhbox.c: Use gtk_extended_layout_set_baseline_offset to obey
the uniform height constraint of the horizontal box. Do not cache
baselines found during requisition evaluation, as baselines can
change, when assigning a widget more space than requested.
* gtk/gtklabel.c: Implement gtk_extended_layout_set_baseline_offset.
2007-07-01 Mathias Hasselmann <mathias.hasselmann@gmx.de>
* tests/testextendedlayout.c: Invalidate previously selected
widget when choosing another one, to avoid drawing artifacts.
2007-07-01 Mathias Hasselmann <mathias.hasselmann@gmx.de>
* tests/testextendedlayout.c: Improve drawing of baseline guides.
2007-07-01 Mathias Hasselmann <mathias.hasselmann@gmx.de>
* gtk/gtkhbox.c: Properly report feature set and consider
baseline_policy when evaluating the baseline of the box.
* gtk/gtklabel.c: Adjust the coding style of get_features
to match the style of GtkHBox.
2007-07-01 Mathias Hasselmann <mathias.hasselmann@gmx.de>
* gtk/gtkhbox.c: Make baseline alignment work, by ignoring the uniform
height constraint a GtkHBox implies. TODO: Obey that constraint.
2007-07-01 Mathias Hasselmann <mathias.hasselmann@gmx.de>
* gtk/gtkhbox.c: Rudimentary implementation of GtkExtendLayout.
2007-06-30 Mathias Hasselmann <mathias.hasselmann@gmx.de>
* tests/testextendedlayout.c: Provide button variant of the
GtkHBox baseline alignment test, as those buttons show some
shortcomings of my current baseline concept.
2007-06-30 Mathias Hasselmann <mathias.hasselmann@gmx.de>
* tests/testextendedlayout.c:
Provide status text, when no widget is selected.
2007-06-29 Mathias Hasselmann <mathias.hasselmann@gmx.de>
* gtk/gtkframe.c: Drop g_debug messages.
2007-06-29 Mathias Hasselmann <mathias.hasselmann@gmx.de>
* tests/testextendedlayout.c: Move buttons to top and
provide textual information about currently hovered widget.
2007-06-29 Mathias Hasselmann <mathias.hasselmann@gmx.de>
* tests/testextendedlayout.c: Move code to setup UI
from main to test_suite_new.
2007-06-29 Mathias Hasselmann <mathias.hasselmann@gmx.de>
* tests/testextendedlayout.c: Split Baseline Alignment tests into
separate tests and move the notebook tabs to the right.
* gtk/gtkhbox.c: Properly decode "debug-wanted" object
tag with GPOINTER_TO_INT.
2007-06-29 Mathias Hasselmann <mathias.hasselmann@gmx.de>
* gtk/gtkextendedlayout.h, gtk/gtkextendedlayout.c,
gtk/gtk.symbols: Add gtk_extended_layout_get_padding.
* gtk/gtkalignment.c, gtk/gtkbin.c, gtk/gtkbutton.c,
gtk/gtkframe.c: Implement gtk_extended_layout_get_padding.
* tests/autotestextendedlayout.c: Verify padding information
provided via gtk_extended_layout_get_padding.
2007-06-28 Mathias Hasselmann <mathias.hasselmann@gmx.de>
* gtk/gtkhbox.c: Merge separate, but nearly identical child allocation
code for start and end packing into one single loop. This should avoid
programming errors caused by extensive code duplication, as they happend
to me with the previous commit. Maybe some advanced compiler is able
to do the trivial loop unrolling.
* tests/testextendedlayout.c: Use exteriour guides instead of
separators to identify GtkHBox allocation and extend the baseline
alignment tests for GtkHBox.
2007-06-28 Mathias Hasselmann <mathias.hasselmann@gmx.de>
* gtk/gtkhbox.c, gtk/gtkhbox.h, gtk/gtk.symbols:
Initial, buggish implementation of baseline alignment in GtkHBox.
* tests/testextendedlayout.c: Add baseline alignment tests.
2007-06-28 Mathias Hasselmann <mathias.hasselmann@gmx.de>
* gtk/gtkenums.h: Introduce GtkBaselinePolicy.
* gtk/gtk.symbols: Add missing symbols.
* gtk/gtkextendedlayout.c, gtk/gtkextendedlayout.h:
Introduce gtk_extended_layout_get_single_baseline.
2007-06-28 Mathias Hasselmann <mathias.hasselmann@gmx.de>
* gtk/gtkbin.c: Prevent undefined behaviour when
gtk_widget_translate_coordinates fails.
2007-06-20 Mathias Hasselmann <mathias.hasselmann@gmx.de>
* tests/testextendedlayout.c: Provide checkboxes
to choose guide types at runtime.
2007-06-20 Mathias Hasselmann <mathias.hasselmann@gmx.de>
* tests/testextendedlayout.c: Don't create
the tile pixmap with every expose event.
2007-06-20 Mathias Hasselmann <mathias.hasselmann@gmx.de>
* gtk/gtkextendedlayout.h, tests/testextendedlayout.c:
Dynamically highlight the currently hovered widget and its guides.
2007-06-20 Mathias Hasselmann <mathias.hasselmann@gmx.de>
* gtk/gtkbin.c, tests/autotestextendedlayout.c,
tests/testextendedlayout.c: Implement GtkExtendedLayout for GtkBin.
2007-06-20 Mathias Hasselmann <mathias.hasselmann@gmx.de>
* gtk/gtklabel.c, tests/autotestextendedlayout.c:
Implement get_natural_size for GtkLabel.
2007-06-20 Mathias Hasselmann <mathias.hasselmann@gmx.de>
* gtk/gtklabel.c, tests/autotestextendedlayout.c:
Implement get_height_for_width for GtkLabel.
2007-06-20 Mathias Hasselmann <mathias.hasselmann@gmx.de>
* tests/autotestextendedlayout.c: Correct some assumptions,
write baseline values to console.
2007-06-20 Mathias Hasselmann <mathias.hasselmann@gmx.de>
* gtk/gtklabel.c: Remove some late hacking crack.
2007-06-20 Mathias Hasselmann <mathias.hasselmann@gmx.de>
* gtk/gtklabel.c, tests/autotestextendedlayout.c,
tests/testextendedlayout.c, tests/Makefile.am:
Implementing get_baselines for GtkLabel and testing it.
2007-06-19 Mathias Hasselmann <mathias.hasselmann@gmx.de>
* gtk/Makefile.am, gtk/gtk.h, gtk/gtkextendedlayout.c,
gtk/gtkextendedlayout.h: Implement GtkExtendLayout interface.
2007-06-18 Mathias Hasselmann <mathias.hasselmann@gmx.de>
* gdk/*, gtk/*: Resynching with trunk to avoid future
merge conflicts with the giant GtkBuilder patch.
2007-05-29 Mathias Hasselmann <mathias.hasselmann@gmx.de>
* testextendedlayout.c: Implement formal testing.
2007-05-29 Mathias Hasselmann <mathias.hasselmann@gmx.de>
* testextendedlayout.c: Create initial height-for-width test.
2007-05-29 Mathias Hasselmann <mathias.hasselmann@gmx.de>
* testextendedlayout.c: Also retreive base line information
for GtkTextView widgets.
2007-05-28 Mathias Hasselmann <mathias.hasselmann@gmx.de>
* testextendedlayout.c: Ported guides drawing to legacy
GdkGC API, which looks worse but supports IncludeInferiors.
2007-05-28 Mathias Hasselmann <mathias.hasselmann@gmx.de>
* testextendedlayout.c: Provide some hint which label
a guide belongs to.
2007-05-28 Mathias Hasselmann <mathias.hasselmann@gmx.de>
* testextendedlayout.c: Some refactoring to get rid
of the global list of allocation guides.
2007-05-27 Mathias Hasselmann <mathias.hasselmann@gmx.de>
* tests/testextendedlayout.c, tests/Makefile.am:
Build-fixes for testextendedlayout.
2007-04-21 Mathias Hasselmann <mathias.hasselmann@gmx.de>
* tests/testextendedlayout.c: Initial implementation of
base line test.
2007-04-20 Mathias Hasselmann <mathias.hasselmann@gmx.de>
* tests/testextendedlayout.c, tests/Makefile.am,
ChangeLog.gtk-extended-layout: Creating testing framework,
starting with natural size testing.

View File

@@ -4,7 +4,7 @@ Prerequisites
GTK+ requires the following packages:
- The GLib, Pango, ATK and cairo libraries, available at the same
location as GTK+. GTK+ 2.11.0 requires at least GLib 2.12,
location as GTK+. GTK+ 2.11.3 requires at least GLib 2.12,
Pango 1.13, ATK 1.9 and cairo 1.2.
- The TIFF, PNG, and JPEG image loading libraries. You most
@@ -20,8 +20,8 @@ GTK+ requires the following packages:
Simple install procedure
========================
% gzip -cd gtk+-2.11.0.tar.gz | tar xvf - # unpack the sources
% cd gtk+-2.11.0 # change to the toplevel directory
% gzip -cd gtk+-2.11.3.tar.gz | tar xvf - # unpack the sources
% cd gtk+-2.11.3 # change to the toplevel directory
% ./configure # run the `configure' script
% make # build GTK+
[ Become root if necessary ]

138
NEWS
View File

@@ -1,3 +1,141 @@
Overview of Changes from GTK+ 2.11.2 to 2.11.3
==============================================
* GtkBuilder: GTK+ supports constructing user interfaces
from XML descriptions now, similar to libglade.
* The new tooltip code now has convenience api to set
text tooltips: gtk_widget_set_tooltip_text(),
gtk_widget_set_tooltip_markup()
* GtkTextView, GtkEntry:
- gtk_widget_modify_cursor() is a new function in the
gtk_widget_modify family to override the style-provided
cursor colors
- Use a block cursor in overwrite mode
* GtkFileChooser:
- Use xdg-user-dirs to find the Desktop directory
- gtk_file_system_create() is now public API
* GtkMenu:
- GtkMenuItem gained a submenu property
- GtkMenuShell obtained a move-selected signal
* OS X port:
- Many improvements
* Bugs fixed:
445691 Crash when spawning a new process
447163 Implicit pointer conversion gdk_font_ref()
420249 deadlock on print operation
440918 out-of-bound access on loading pnm
142494 treeview coordinate systems need documentation/auditing
343012 RC parser rejects lower-case identifiers.
350460 Popup windows (esp. menus) misbehave wrt focus
410815 Icon view gets confused when scaling down the pixbuf column
435471 small GtkComboBox cleanup
435840 GTK_WIDGET_SAVED_STATE inconsistency
442617 gdk_spawn overrides envp, breaking child setup funcs whic...
443913 When .recently-used.xbel is empty, recently-used uses %10...
444097 Cannot compile gtksearchenginesimple.c
444310 update_buttons_state on a bare assistant causes gtk+ to c...
444734 Compact file-chooser folder selection not working with gt...
444786 Error loading 'gtk-select-color' in Stock icons and Items
445054 GtkScrolledWindow::scrollbars-within-bevel is drawing wrong
445284 Custom (pixbuf etc.) cursor reverts to default cursor on ...
445539 Unititialized var in gtkrc.c trunk
445855 gtk_scale_button_new() uses private API.
446138 Tiny doc update for gdk_window_get_pointer()
446513 gtknotebook.h: create_window is wrong declaration
446616 glib requirement insufficient
447065 GtkMenuItem: add "submenu" property and some cleanup
426192 Symbolic colors are not working under "engine" sections o...
446107 tiff load dialogue has unreadable text
447396 Typo in documentation of gtk_widget_modify_cursor
79585 API to change cursor color
80378 Visible (Cursor-shape) indicator for Overtype mode
158008 Stock button for Dont Save, Discard Changes, Do Not Save
334576 GtkCellRendererProgress ignores xalign attribute
344836 Add orientation property to CellRendererProgress
172535 Add support for UI builders in gtk+
446833 gtk_menu_shell_move_selected should be a vcall
447586 gtknotebook.c: decreasing unknown size pointer
* Updated translations
Spanish (es)
Swedish (sv)
Overview of Changes from GTK+ 2.11.1 to 2.11.2
==============================================
* The GtkListStore and GtkTreeStore have new API
to set values using vectors of columns and values
* Bugs fixed:
389603 GtkFileChooserWidget crashes when the window is too narrow
444351 metacity cores on startup
379213 gtkaboutdialog.h causes warnings with GCC and -Wshadow
442888 problem with GTK+ medialib integration
444236 gtk-demo says invisible text doesn't work
444457 Segfault in gdk_window_set_opacity when opacity < 1.0
399071 add gtk_tree_store_set_with_valuesv
434021 crash on startup with jhbuild
* Updated translations:
Spanish (es)
Overview of Changes from GTK+ 2.11.0 to 2.11.1
==============================================
* GtkTextView:
- Marks can be created independent from buffers
- Cursor color follows text color
* OS X port:
- Many improvements
* GDK:
- Add support for composited child windows
* Bugs fixed:
347883 do-overwrite-confirmation does nothing in 2.10
440890 Crash in gtktooltip.c (GTK+ 2.11.0)
440982 crash in gtk due to missing stock icon gtk-clear
418047 GtkIconView sizing is very broken
438440 All tests for Gtk2 failing when installing from CPAN
314172 gtk_toolbar_set_icon_size() should be 'undeprecated'
348493 _gdk_quartz_copy_to_image needs implementing for pixmaps
398414 Printing to file with multiple pages per sheet
412882 gdkwindow should support the concept of "composited"
430218 Some file names are being cut unnecessarily with RTL Inte...
435405 text view recreates pangolayouts all the time
439565 Crash in GtkIconView a11y code
440040 Reference counting in GtkPrintOperation goes awry
440511 xcursors.h: illegal initializing
440780 GtkAction set_short_label might be broken
441443 jpeg loader does not set error upon abortion
442172 Small cleanup in gtk_notebook_set_current_page and fix ty...
442183 Updated gdk/gdkkeysyms-update.pl
443247 Two GtkNotebook cleanups
441767 Icon cache isn't validated properly
442326 Overview navigator traps mouse on wrong screen in dual mo...
79585 GtkTextView API to change cursor color
132818 Allow GtkTextMark subclasses to be used in GtkTextBuffer
348065 [PATCH] Remove automagic status of xinerama dependency
441443 jpeg loader does not set error upon abortion
386935 gtk_notebook_set_window_creation_hook only allows one...
414947 Move "move-focus" signal to GtkWidget
* Updated translations:
Thai (th)
Spanish (es)
Norwegian bokmål (nb)
Overview of Changes from GTK+ 2.10.x to 2.11
============================================

28
README
View File

@@ -1,7 +1,7 @@
General Information
===================
This is GTK+ version 2.11.0. GTK+ is a multi-platform toolkit for
This is GTK+ version 2.11.3. GTK+ is a multi-platform toolkit for
creating graphical user interfaces. Offering a complete set of widgets,
GTK+ is suitable for projects ranging from small one-off projects to
complete application suites.
@@ -48,6 +48,32 @@ Release notes for 2.12
GDK for drawing decorations. In particular, metacity <= 2.18.0 is affected
by this. The problem has been fixed in metacity 2.18.1.
* Semi-private GtkTextLayout api has changed: new GtkTextLayout method
invalidate_cursors(), and new functions gtk_text_layout_invalidate_cursors()
and gtk_text_layout_cursors_changed(), which should be used in place of
gtk_text_layout_invalidate() and gtk_text_layout_changed() if invalidation
is due to marks moved or changed selection; new GtkTextLineDisplay structure
member. Source compatibility is preserved; binary compatibility may break
only if GtkTextLineDisplay structure was created on stack or as a part
of another structure (in particular GnomeCanvas and its clones do not need
recompiling).
* Another new signal has been added to GtkNotebook. The new signal
is called create-window, so this name can no longer be used for signals
in objects derived from GtkNotebook.
* The move-focus signal has been moved to GtkWidget, to unify the
various implementations of this signal in specific widgets. Great care
has been taken to make sure that all code using this signal continues
to work.
* Removed an unused and hardly visible GtkFrame from the menu widget hierarchy
when GtkComboBox::appears-as-list style property is set. Any RC file
applying a different style to any widget below the widget path
"gtk-combobox-popup-window.GtkFrame" should take into account that the
frame no longer exists.
Release notes for 2.10
======================

View File

@@ -48,6 +48,45 @@ Release notes for 2.12
GDK for drawing decorations. In particular, metacity <= 2.18.0 is affected
by this. The problem has been fixed in metacity 2.18.1.
* Semi-private GtkTextLayout api has changed: new GtkTextLayout method
invalidate_cursors(), and new functions gtk_text_layout_invalidate_cursors()
and gtk_text_layout_cursors_changed(), which should be used in place of
gtk_text_layout_invalidate() and gtk_text_layout_changed() if invalidation
is due to marks moved or changed selection; new GtkTextLineDisplay structure
member. Source compatibility is preserved; binary compatibility may break
only if GtkTextLineDisplay structure was created on stack or as a part
of another structure (in particular GnomeCanvas and its clones do not need
recompiling).
* Another new signal has been added to GtkNotebook. The new signal
is called create-window, so this name can no longer be used for signals
in objects derived from GtkNotebook.
* The move-focus signal has been moved to GtkWidget, to unify the
various implementations of this signal in specific widgets. Great care
has been taken to make sure that all code using this signal continues
to work.
* Removed an unused and hardly visible GtkFrame from the menu widget hierarchy
when GtkComboBox::appears-as-list style property is set. Any RC file
applying a different style to any widget below the widget path
"gtk-combobox-popup-window.GtkFrame" should take into account that the
frame no longer exists.
* The external print preview application used by GtkPrintOperationPreview is
now passed the print settings on the command line with the --print-settings
parameter pointing to a temp file containing the settings. The preview
application assumes ownership of the file and should delete it once it does
not need it anymore. The --print-settings commandline option is understood
by Evince 0.9.0 and newer. To use a different print preview application,
change the gtk-print-preview-command setting in your gtkrc file, e.g.
gtk-print-preview-command = "ggv %f"
* GtkMenuShell is now defined as an abstract type. It was already
documented as an abstract class, and there is little reason to
instantiate it.
Release notes for 2.10
======================

View File

@@ -12,10 +12,10 @@ AC_PREREQ(2.54)
m4_define([gtk_major_version], [2])
m4_define([gtk_minor_version], [11])
m4_define([gtk_micro_version], [1])
m4_define([gtk_micro_version], [4])
m4_define([gtk_version],
[gtk_major_version.gtk_minor_version.gtk_micro_version])
m4_define([gtk_interface_age], [1])
m4_define([gtk_interface_age], [0])
m4_define([gtk_binary_age],
[m4_eval(100 * gtk_minor_version + gtk_micro_version)])
# This is the X.Y used in -lgtk-FOO-X.Y
@@ -31,7 +31,7 @@ m4_define([gtk_api_version], [2.0])
m4_define([gtk_binary_version], [2.10.0])
# required versions of other packages
m4_define([glib_required_version], [2.13.1])
m4_define([glib_required_version], [2.13.3])
m4_define([pango_required_version], [1.15.3])
m4_define([atk_required_version], [1.9.0])
m4_define([cairo_required_version], [1.2.0])
@@ -199,6 +199,10 @@ AC_ARG_ENABLE(xkb,
[AC_HELP_STRING([--enable-xkb],
[support XKB [default=maybe]])],,
[enable_xkb="maybe"])
AC_ARG_ENABLE(xinerama,
[AC_HELP_STRING([--enable-xinerama],
[support xinerama extension if available [default=yes]])],,
[enable_xinerama="yes"])
AC_ARG_ENABLE(rebuilds,
[AC_HELP_STRING([--disable-rebuilds],
[disable all source autogeneration rules])],,
@@ -217,13 +221,13 @@ else
gdktarget=x11
fi
AC_ARG_WITH(gdktarget, [ --with-gdktarget=[[x11/linux-fb/win32/quartz/directfb]] select non-default GDK target],
AC_ARG_WITH(gdktarget, [ --with-gdktarget=[[x11/win32/quartz/directfb]] select non-default GDK target],
gdktarget=$with_gdktarget)
AC_SUBST(gdktarget)
case $gdktarget in
x11|linux-fb|win32|quartz|directfb) ;;
*) AC_MSG_ERROR([Invalid target for GDK: use x11, linux-fb, quartz, directfb or win32.]);;
x11|win32|quartz|directfb) ;;
*) AC_MSG_ERROR([Invalid target for GDK: use x11, quartz, directfb or win32.]);;
esac
gdktargetlib=libgdk-$gdktarget-$GTK_API_VERSION.la
@@ -232,19 +236,9 @@ gtktargetlib=libgtk-$gdktarget-$GTK_API_VERSION.la
AC_SUBST(gdktargetlib)
AC_SUBST(gtktargetlib)
AC_ARG_ENABLE(shadowfb,
[AC_HELP_STRING([--disable-shadowfb],
[disable shadowfb support for linux-fb])],,
[enable_shadowfb=yes])
AC_ARG_ENABLE(fbmanager,
[AC_HELP_STRING([--enable-fbmanager],
[enable framebuffer manager support (GtkFB)])],,
enable_fbmanager=no)
if test "x$enable_debug" = "xyes"; then
test "$cflags_set" = set || CFLAGS="$CFLAGS -g"
GTK_DEBUG_FLAGS="-DG_ENABLE_DEBUG"
GTK_DEBUG_FLAGS="-DG_ENABLE_DEBUG -DG_ERRORCHECK_MUTEXES"
else
if test "x$enable_debug" = "xno"; then
GTK_DEBUG_FLAGS="-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -DG_DISABLE_CAST_CHECKS"
@@ -1230,12 +1224,12 @@ if test "x$gdktarget" = "xx11"; then
fi
fi
# Check for Xinerama extension (Solaris impl or Xfree impl)
gtk_save_cppflags="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $x_cflags"
if test "x$enable_xinerama" = "xyes"; then
# Check for Xinerama extension (Solaris impl or Xfree impl)
gtk_save_cppflags="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $x_cflags"
case "$host" in
case "$host" in
*-*-solaris*)
# Check for solaris
AC_MSG_CHECKING(for Xinerama support on Solaris)
@@ -1278,8 +1272,9 @@ if test "x$gdktarget" = "xx11"; then
AC_MSG_RESULT(no)
fi
;;
esac
esac
fi
# set up things for XInput
if test "x$with_xinput" = "xxfree" || test "x$with_xinput" = "xyes"; then
@@ -1368,7 +1363,7 @@ else
fi
if test "x$gdktarget" = "xwin32"; then
GDK_EXTRA_LIBS="$GDK_EXTRA_LIBS -lgdi32 -user32 -limm32 -lshell32 -lole32 -Wl,-luuid"
GDK_EXTRA_LIBS="$GDK_EXTRA_LIBS -lgdi32 -limm32 -lshell32 -lole32 -Wl,-luuid"
AM_CONDITIONAL(USE_WIN32, true)
else
AM_CONDITIONAL(USE_WIN32, false)
@@ -1390,24 +1385,6 @@ AC_SUBST(GDK_PIXBUF_XLIB_EXTRA_CFLAGS)
AC_SUBST(GDK_PIXBUF_XLIB_DEP_LIBS)
AC_SUBST(GDK_PIXBUF_XLIB_DEP_CFLAGS)
if test "x$gdktarget" = "xlinux-fb"; then
if test x$enable_shadowfb = xyes ; then
AC_DEFINE(ENABLE_SHADOW_FB)
fi
if test x$enable_fbmanager = xyes ; then
AC_DEFINE(ENABLE_FB_MANAGER)
AM_CONDITIONAL(ENABLE_FB_MANAGER, true)
else
AM_CONDITIONAL(ENABLE_FB_MANAGER, false)
fi
AM_CONDITIONAL(USE_LINUX_FB, true)
else
AM_CONDITIONAL(USE_LINUX_FB, false)
AM_CONDITIONAL(ENABLE_FB_MANAGER, false)
fi
if test "x$gdktarget" = "xdirectfb"; then
DIRECTFB_REQUIRED_VERSION=0.9.24
AC_MSG_CHECKING(for DirectFB)
@@ -1701,10 +1678,6 @@ if test "x$gdktarget" = "xx11" ; then
elif test "x$gdktarget" = "xwin32" ; then
gdk_windowing='
#define GDK_WINDOWING_WIN32'
elif test "x$gdktarget" = "xlinux-fb" ; then
gdk_windowing='
#define GDK_WINDOWING_FB
#define GDK_NATIVE_WINDOW_POINTER'
elif test "x$gdktarget" = "xquartz" ; then
gdk_windowing='
#define GDK_WINDOWING_QUARTZ'
@@ -1767,7 +1740,6 @@ gdk/x11/Makefile
gdk/win32/Makefile
gdk/win32/rc/Makefile
gdk/win32/rc/gdk.rc
gdk/linux-fb/Makefile
gdk/quartz/Makefile
gdk/directfb/Makefile
gtk/Makefile
@@ -1798,9 +1770,3 @@ AC_OUTPUT
echo "configuration:
target: $gdktarget"
if test "x$gdktarget" = "xlinux-fb"; then
echo "Warning: The linux-fb GDK target is unmaintained"
echo " and may not work or even compile"
fi

View File

@@ -1,3 +1,15 @@
2007-06-15 Matthias Clasen <mclasen@redhat.com>
* === Released 2.11.3 ===
2007-06-06 Matthias Clasen <mclasen@redhat.com>
* === Released 2.11.2 ===
2007-06-04 Matthias Clasen <mclasen@redhat.com>
* === Released 2.11.1 ===
2007-05-24 Matthias Clasen <mclasen@redhat.com>
* === Released 2.11.0 ===

View File

@@ -7,6 +7,7 @@ democodedir=$(datadir)/gtk-2.0/demo
demos = \
appwindow.c \
assistant.c \
builder.c \
button_box.c \
changedisplay.c \
clipboard.c \
@@ -60,7 +61,8 @@ bin_PROGRAMS = gtk-demo
BUILT_SOURCES = demos.h
EXTRA_DIST = \
$(IMAGEFILES)
$(IMAGEFILES) \
demo.ui
demos.h: @REBUILD@ $(demos) geninclude.pl
(here=`pwd` ; cd $(srcdir) && $(PERL) $$here/geninclude.pl $(demos)) > demos.h
@@ -73,6 +75,7 @@ gtk_demo_SOURCES = \
gtk_demo_DEPENDENCIES = $(DEPS)
gtk_demo_LDADD = $(LDADDS)
gtk_demo_LDFLAGS = -export-dynamic
IMAGEFILES= alphatest.png \
apple-red.png \
@@ -89,6 +92,6 @@ IMAGEFILES= alphatest.png \
gnu-keys.png \
gtk-logo-rgb.gif
democode_DATA = $(demos) $(IMAGEFILES)
democode_DATA = $(demos) $(IMAGEFILES) demo.ui
DISTCLEANFILES = demos.h

60
demos/gtk-demo/builder.c Normal file
View File

@@ -0,0 +1,60 @@
/* Builder
*
* Demonstrates an interface loaded from a XML description.
*/
#include <gtk/gtk.h>
#include "demo-common.h"
void
quit_activate (GtkAction *action)
{
}
void
about_activate (GtkAction *action)
{
GtkWidget *about_dlg;
about_dlg = gtk_about_dialog_new ();
gtk_about_dialog_set_name (GTK_ABOUT_DIALOG (about_dlg), "GtkBuilder demo");
gtk_dialog_run (GTK_DIALOG (about_dlg));
gtk_widget_destroy (about_dlg);
}
GtkWidget *
do_builder (GtkWidget *do_widget)
{
static GtkWidget *window = NULL;
GtkBuilder *builder;
GError *err = NULL;
gchar *filename;
if (!window)
{
builder = gtk_builder_new ();
filename = demo_find_file ("demo.ui", NULL);
gtk_builder_add_from_file (builder, filename, &err);
g_free (filename);
if (err)
{
g_error ("ERROR: %s\n", err->message);
return NULL;
}
gtk_builder_connect_signals (builder, NULL);
window = GTK_WIDGET (gtk_builder_get_object (builder, "window1"));
}
if (!GTK_WIDGET_VISIBLE (window))
{
gtk_widget_show_all (window);
}
else
{
gtk_widget_destroy (window);
window = NULL;
}
return window;
}

227
demos/gtk-demo/demo.ui Normal file
View File

@@ -0,0 +1,227 @@
<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
<interface>
<object class="GtkListStore" id="liststore1">
<columns>
<column type="gchararray"/>
<column type="gchararray"/>
<column type="gint"/>
</columns>
<data>
<row>
<col id="0">John</col>
<col id="1">Doe</col>
<col id="2">25</col>
</row>
<row>
<col id="0">Mary</col>
<col id="1">Dole</col>
<col id="2">50</col>
</row>
</data>
</object>
<object class="GtkUIManager" id="uimanager">
<child>
<object class="GtkActionGroup" id="DefaultActions">
<child>
<object class="GtkAction" id="Copy">
<property name="name">Copy</property>
<property name="tooltip" translatable="yes">Copy selected object into the clipboard</property>
<property name="stock_id">gtk-copy</property>
</object>
</child>
<child>
<object class="GtkAction" id="Cut">
<property name="name">Cut</property>
<property name="tooltip" translatable="yes">Cut selected object into the clipboard</property>
<property name="stock_id">gtk-cut</property>
</object>
</child>
<child>
<object class="GtkAction" id="EditMenu">
<property name="name">EditMenu</property>
<property name="label" translatable="yes">_Edit</property>
</object>
</child>
<child>
<object class="GtkAction" id="FileMenu">
<property name="name">FileMenu</property>
<property name="label" translatable="yes">_File</property>
</object>
</child>
<child>
<object class="GtkAction" id="New">
<property name="name">New</property>
<property name="tooltip" translatable="yes">Create a new file</property>
<property name="stock_id">gtk-new</property>
</object>
</child>
<child>
<object class="GtkAction" id="Open">
<property name="name">Open</property>
<property name="tooltip" translatable="yes">Open a file</property>
<property name="stock_id">gtk-open</property>
</object>
</child>
<child>
<object class="GtkAction" id="Paste">
<property name="name">Paste</property>
<property name="tooltip" translatable="yes">Paste object from the Clipboard</property>
<property name="stock_id">gtk-paste</property>
</object>
</child>
<child>
<object class="GtkAction" id="Quit">
<property name="name">Quit</property>
<property name="tooltip" translatable="yes">Quit the program</property>
<property name="stock_id">gtk-quit</property>
<signal handler="quit_activate" name="activate"/>
</object>
</child>
<child>
<object class="GtkAction" id="Save">
<property name="name">Save</property>
<property name="is_important">True</property>
<property name="tooltip" translatable="yes">Save a file</property>
<property name="stock_id">gtk-save</property>
</object>
</child>
<child>
<object class="GtkAction" id="SaveAs">
<property name="name">SaveAs</property>
<property name="tooltip" translatable="yes">Save with a different name</property>
<property name="stock_id">gtk-save-as</property>
</object>
</child>
<child>
<object class="GtkAction" id="HelpMenu">
<property name="name">Help</property>
<property name="label" translatable="yes">_Help</property>
</object>
</child>
<child>
<object class="GtkAction" id="About">
<property name="name">About</property>
<property name="stock_id">gtk-about</property>
<signal handler="about_activate" name="activate"/>
</object>
</child>
</object>
</child>
<ui>
<menubar name="menubar1">
<menu action="FileMenu" name="FileMenu">
<menuitem action="New" name="New"/>
<menuitem action="Open" name="Open"/>
<menuitem action="Save" name="Save"/>
<menuitem action="SaveAs" name="SaveAs"/>
<separator/>
<menuitem action="Quit" name="Quit"/>
</menu>
<menu action="EditMenu">
<menuitem action="Copy" name="Copy"/>
<menuitem action="Cut" name="Cut"/>
<menuitem action="Paste" name="Paste"/>
</menu>
<menu action="HelpMenu" name="HelpMenu">
<menuitem action="About" name="About"/>
</menu>
</menubar>
<toolbar name="toolbar1">
<toolitem action="New" name="New"/>
<toolitem action="Open" name="Open"/>
<toolitem action="Save" name="Save"/>
<separator/>
<toolitem action="Copy" name="Copy"/>
<toolitem action="Cut" name="Cut"/>
<toolitem action="Paste" name="Paste"/>
</toolbar>
</ui>
</object>
<object class="GtkWindow" id="window1">
<property name="default_height">250</property>
<property name="default_width">440</property>
<signal name="destroy" handler="gtk_widget_destroyed"/>
<child>
<object class="GtkVBox" id="vbox1">
<property name="visible">True</property>
<child>
<object constructor="uimanager" class="GtkMenuBar" id="menubar1">
<property name="visible">True</property>
</object>
<packing>
<property name="expand">False</property>
</packing>
</child>
<child>
<object constructor="uimanager" class="GtkToolbar" id="toolbar1">
<property name="visible">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkScrolledWindow" id="scrolledwindow1">
<property name="hscrollbar_policy">automatic</property>
<property name="shadow_type">in</property>
<property name="visible">True</property>
<property name="vscrollbar_policy">automatic</property>
<child>
<object class="GtkTreeView" id="treeview1">
<property name="visible">True</property>
<property name="model">liststore1</property>
<child>
<object class="GtkTreeViewColumn" id="column1">
<property name="title">Name</property>
<child>
<object class="GtkCellRendererText" id="renderer1"/>
<attributes>
<attribute name="text">0</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn" id="column2">
<property name="title">Surname</property>
<child>
<object class="GtkCellRendererText" id="renderer2"/>
<attributes>
<attribute name="text">1</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn" id="column3">
<property name="title">Age</property>
<child>
<object class="GtkCellRendererText" id="renderer3"/>
<attributes>
<attribute name="text">2</attribute>
</attributes>
</child>
</object>
</child>
</object>
</child>
</object>
<packing>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkStatusbar" id="statusbar1">
<property name="visible">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="position">3</property>
</packing>
</child>
</object>
</child>
</object>
</interface>

View File

@@ -350,7 +350,7 @@ insert_text (GtkTextBuffer *buffer)
anchor = gtk_text_buffer_create_child_anchor (buffer, &iter);
gtk_text_buffer_insert (buffer, &iter, ".\n", -1);
gtk_text_buffer_insert (buffer, &iter, "\n\nThis demo doesn't demonstrate all the GtkTextBuffer features; it leaves out, for example: invisible/hidden text (doesn't work in GTK 2, but planned), tab stops, application-drawn areas on the sides of the widget for displaying breakpoints and such...", -1);
gtk_text_buffer_insert (buffer, &iter, "\n\nThis demo doesn't demonstrate all the GtkTextBuffer features; it leaves out, for example: invisible/hidden text, tab stops, application-drawn areas on the sides of the widget for displaying breakpoints and such...", -1);
/* Apply word_wrap tag to whole buffer */
gtk_text_buffer_get_bounds (buffer, &start, &end);

View File

@@ -1,3 +1,103 @@
2007-06-17 Matthias Clasen <mclasen@redhat.com>
* gtk/gtk-docs.sgml: Move GtkMenuShell to the abstract widgets.
2007-06-17 Jan Arne Petersen <jpetersen@jpetersen.org>
* gtk/gtk-docs.sgml: Add GtkTooltip. (#448341)
2007-06-15 Matthias Clasen <mclasen@redhat.com>
* === Released 2.11.3 ===
2007-06-15 Matthias Clasen <mclasen@redhat.com>
* gtk/tmpl/gtktreeview.sgml: Fix up cross-references
* gtk/gtk-sections.txt:
* gtk/Makefile.am: Updates
2007-06-14 Johan Dahlin <jdahlin@async.com.br>
* gtk/tmpl/gtktreeview.sgml (linkend): inlinegraphic instead of
inlinegraphics.
2007-06-13 Michael Natterer <mitch@imendio.com>
* gtk/tmpl/gtkmenuitem.sgml: remove stuff that has been moved inline.
2007-06-12 Matthias Clasen <mclasen@redhat.com>
* gdk/gdk-sections.txt: Remove GDK_WINDOWING_FB
* gtk/Makefile.am:
* gtk/gtk-docs.sgml:
* gtk/compiling.sgml:
* gtk/building.sgml: Remove linux-fb references
2007-06-09 Matthias Clasen <mclasen@redhat.com>
* gtk/gtk-update-icon-cache.xml: Document --validate
2007-06-09 Matthias Clasen <mclasen@redhat.com>
* gtk/text_widget.sgml:
* gtk/tree_widget.sgml:
* gtk/tmpl/gtkscalebutton.sgml:
* gtk/tmpl/gtktextbuffer.sgml:
* gtk/tmpl/gtktexttag.sgml:
* gtk/tmpl/gtktextview.sgml:
* gtk/tmpl/gtktreemodel.sgml:
* gtk/tmpl/gtktreeselection.sgml:
* gtk/tmpl/gtktreeviewcolumn.sgml:
* gtk/tmpl/gtkcellrenderer.sgml:
* gtk/tmpl/gtkliststore.sgml:
* gtk/tmpl/gtktreestore.sgml:
* gtk/tmpl/gtkmenubar.sgml:
* gtk/tmpl/gtkbbox.sgml:
* gtk/tmpl/gtkseparator.sgml:
* gtk/tmpl/gtkgamma.sgml:
* gtk/tmpl/gtkhruler.sgml:
* gtk/tmpl/gtkvruler.sgml:
* gtk/tmpl/gtkrecentchooser.sgml:
* gtk/tmpl/gtkvolumebutton.sgml: Clean up short descriptions
2007-06-09 Matthias Clasen <mclasen@redhat.com>
* gtk/tmpl/gtkbindings.sgml:
* gtk/tmpl/gtkrc.sgml:
* gtk/tmpl/gtkwidget.sgml:
* gtk/tmpl/gtkrecentmanager.sgml:
* gtk/*.sgml:
* gtk/tmpl/gtkstock.sgml:
* gtk/gtk-sections.txt: Updates
* gtk/Makefile.am: Exclude another private header
* gtk/tmpl/gtkbox.sgml: Move docs inline
2007-06-08 Matthias Clasen <mclasen@redhat.com>
* gtk/gtk-sections.txt: Add gtk_rc_parse_color_full
2007-06-06 Matthias Clasen <mclasen@redhat.com>
* === Released 2.11.2 ===
2007-06-04 Matthias Clasen <mclasen@redhat.com>
* === Released 2.11.1 ===
2007-06-03 Matthias Clasen <mclasen@redhat.com>
* gtk/Makefile.am:
* gtk/visual_index.xml:
* gtk/images/volumebutton.png: Volume button image
2007-06-01 Matthias Clasen <mclasen@redhat.com>
* gdk/gdk-sections.txt: Add new composited window api
* gdk/tmpl/windows.sgml: Add composited window example
2007-05-26 Matthias Clasen <mclasen@redhat.com>
* gtk/migrating*.sgml: Some cleanups

View File

@@ -0,0 +1,6 @@
2007-06-19 Mathias Hasselmann <mathias.hasselmann@gmx.de>
* docs/reference/gtk/tmpl/gtkextendedlayout.sgml,
docs/reference/gtk/gtk-docs.sgml, docs/reference/gtk/gtk-sections.txt,
docs/reference/gtk/gtk.types: Implement GtkExtendLayout interface.

View File

@@ -55,7 +55,6 @@ gdk_error_trap_pop
<SUBSECTION>
GDK_WINDOWING_X11
GDK_WINDOWING_WIN32
GDK_WINDOWING_FB
<SUBSECTION Standard>
GDK_TYPE_GRAB_STATUS
@@ -155,6 +154,7 @@ gdk_display_supports_clipboard_persistence
gdk_display_store_clipboard
gdk_display_supports_shapes
gdk_display_supports_input_shapes
gdk_display_supports_composite
<SUBSECTION Standard>
GDK_DISPLAY_OBJECT
GDK_IS_DISPLAY
@@ -651,6 +651,7 @@ gdk_window_unfullscreen
gdk_window_set_keep_above
gdk_window_set_keep_below
gdk_window_set_opacity
gdk_window_set_composited
gdk_window_move
gdk_window_resize
gdk_window_move_resize

View File

@@ -268,6 +268,14 @@ is given in the <link linkend="glib-The-Main-Event-Loop">GLib Main Loop</link>.
@Returns:
<!-- ##### FUNCTION gdk_event_request_motions ##### -->
<para>
</para>
@event:
<!-- ##### FUNCTION gdk_event_handler_set ##### -->
<para>
</para>

View File

@@ -159,6 +159,12 @@ the device ID for the core pointer device.
@obj:
<!-- ##### MACRO GDK_WINDOWING_FB ##### -->
<para>
This macro is defined if GDK is configured to use the Linux framebuffer backend.
</para>
<!-- ##### MACRO GDK_WINDOWING_NANOX ##### -->
<para>

View File

@@ -396,3 +396,12 @@ Applications should never have any reason to use this facility
@Returns:
<!-- ##### FUNCTION gdk_display_supports_composite ##### -->
<para>
</para>
@display:
@Returns:

View File

@@ -399,10 +399,3 @@ This macro is defined if GDK is configured to use the Win32 backend.
<!-- ##### MACRO GDK_WINDOWING_FB ##### -->
<para>
This macro is defined if GDK is configured to use the Linux framebuffer backend.
</para>

View File

@@ -164,7 +164,7 @@ Deprecated equivalent of g_object_unref().
<!-- ##### STRUCT GdkBitmap ##### -->
<!-- ##### TYPEDEF GdkBitmap ##### -->
<para>
An opaque structure representing an offscreen drawable of depth
1. Pointers to structures of type #GdkPixmap, #GdkBitmap, and
@@ -172,7 +172,6 @@ An opaque structure representing an offscreen drawable of depth
refers generically to any of these types.
</para>
@user_data:
<!-- ##### MACRO gdk_bitmap_ref ##### -->
<para>

View File

@@ -328,7 +328,6 @@ colors. This is used only for gdk_draw_indexed_image().
@colors: The colors, represented as 0xRRGGBB integer values.
@n_colors: The number of colors in the cmap.
<!-- ##### FUNCTION gdk_rgb_gc_set_foreground ##### -->
<para>
Sets the foreground color in @gc to the specified color (or the

View File

@@ -12,6 +12,164 @@ GTK+ level. A #GtkWindow is a toplevel window, the thing a user might think of
as a "window" with a titlebar and so on; a #GtkWindow may contain many #GdkWindow.
For example, each #GtkButton has a #GdkWindow associated with it.
</para>
<example id="composited-window-example"><title>Composited windows</title>
<programlisting><![CDATA[
#include <gtk/gtk.h>
/* The expose event handler for the event box.
*
* This function simply draws a transparency onto a widget on the area
* for which it receives expose events. This is intended to give the
* event box a "transparent" background.
*
* In order for this to work properly, the widget must have an RGBA
* colourmap. The widget should also be set as app-paintable since it
* doesn't make sense for GTK+ to draw a background if we are drawing it
* (and because GTK+ might actually replace our transparency with its
* default background colour).
*/
static gboolean
transparent_expose (GtkWidget *widget,
GdkEventExpose *event)
{
cairo_t *cr;
cr = gdk_cairo_create (widget->window);
cairo_set_operator (cr, CAIRO_OPERATOR_CLEAR);
gdk_cairo_region (cr, event->region);
cairo_fill (cr);
cairo_destroy (cr);
return FALSE;
}
/* The expose event handler for the window.
*
* This function performs the actual compositing of the event box onto
* the already-existing background of the window at 50% normal opacity.
*
* In this case we do not want app-paintable to be set on the widget
* since we want it to draw its own (red) background. Because of this,
* however, we must ensure that we use g_signal_register_after so that
* this handler is called after the red has been drawn. If it was
* called before then GTK would just blindly paint over our work.
*
* Note: if the child window has children, then you need a cairo 1.16
* feature to make this work correctly.
*/
static gboolean
window_expose_event (GtkWidget *widget,
GdkEventExpose *event)
{
GdkRegion *region;
GtkWidget *child;
cairo_t *cr;
/* get our child (in this case, the event box) */
child = gtk_bin_get_child (GTK_BIN (widget));
/* create a cairo context to draw to the window */
cr = gdk_cairo_create (widget->window);
/* the source data is the (composited) event box */
gdk_cairo_set_source_pixmap (cr, child->window,
child->allocation.x,
child->allocation.y);
/* draw no more than our expose event intersects our child */
region = gdk_region_rectangle (&child->allocation);
gdk_region_intersect (region, event->region);
gdk_cairo_region (cr, region);
cairo_clip (cr);
/* composite, with a 50% opacity */
cairo_set_operator (cr, CAIRO_OPERATOR_OVER);
cairo_paint_with_alpha (cr, 0.5);
/* we're done */
cairo_destroy (cr);
return FALSE;
}
int
main (int argc, char **argv)
{
GtkWidget *window, *event, *button;
GdkScreen *screen;
GdkColormap *rgba;
GdkColor red;
gtk_init (&argc, &argv);
/* Make the widgets */
button = gtk_button_new_with_label ("A Button");
event = gtk_event_box_new ();
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
/* Put a red background on the window */
gdk_color_parse ("red", &red);
gtk_widget_modify_bg (window, GTK_STATE_NORMAL, &red);
/* Set the colourmap for the event box.
* Must be done before the event box is realised.
*/
screen = gtk_widget_get_screen (event);
rgba = gdk_screen_get_rgba_colormap (screen);
gtk_widget_set_colormap (event, rgba);
/* Set our event box to have a fully-transparent background
* drawn on it. Currently there is no way to simply tell GTK+
* that "transparency" is the background colour for a widget.
*/
gtk_widget_set_app_paintable (GTK_WIDGET (event), TRUE);
g_signal_connect (event, "expose-event",
G_CALLBACK (transparent_expose), NULL);
/* Put them inside one another */
gtk_container_set_border_width (GTK_CONTAINER (window), 10);
gtk_container_add (GTK_CONTAINER (window), event);
gtk_container_add (GTK_CONTAINER (event), button);
/* Realise and show everything */
gtk_widget_show_all (window);
/* Set the event box GdkWindow to be composited.
* Obviously must be performed after event box is realised.
*/
gdk_window_set_composited (event->window, TRUE);
/* Set up the compositing handler.
* Note that we do _after_ so that the normal (red) background is drawn
* by gtk before our compositing occurs.
*/
g_signal_connect_after (window, "expose-event",
G_CALLBACK (window_expose_event), NULL);
gtk_main (<!-- -->);
return 0;
}
]]>
</programlisting></example>
<para>
In the example <xref linkend="composited-window-example"/>, a button is
placed inside of an event box inside of a window. The event box is
set as composited and therefore is no longer automatically drawn to
the screen.
</para>
<para>
When the contents of the event box change, an expose event is
generated on its parent window (which, in this case, belongs to
the toplevel #GtkWindow). The expose handler for this widget is
responsible for merging the changes back on the screen in the way
that it wishes.
</para>
<para>
In our case, we merge the contents with a 50% transparency. We
also set the background colour of the window to red. The effect is
that the background shows through the button.
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
@@ -465,6 +623,15 @@ Deprecated equivalent of g_object_unref()
@opacity:
<!-- ##### FUNCTION gdk_window_set_composited ##### -->
<para>
</para>
@window:
@composited:
<!-- ##### FUNCTION gdk_window_move ##### -->
<para>

View File

@@ -27,6 +27,7 @@ IGNORE_HFILES= \
fnmatch.h \
gdk-pixbuf-loader.h \
gtkdebug.h \
gtkbuilderprivate.h \
gtkdndcursors.h \
gtkentryprivate.h \
gtkfilechooserdefault.h \
@@ -90,6 +91,7 @@ IGNORE_HFILES= \
gtkxembed.h \
gtkwin32embed.h \
gtkwin32embedwidget.h \
gtkwindow-decorate.h \
xdgmime \
xembed.h
@@ -121,7 +123,6 @@ content_files = \
changes-2.0.sgml \
compiling.sgml \
directfb.sgml \
framebuffer.sgml \
glossary.xml \
migrating-checklist.sgml \
migrating-GtkAction.sgml \
@@ -313,6 +314,8 @@ HTML_IMAGES = \
$(srcdir)/images/statusbar.png \
$(srcdir)/images/toggle-button.png \
$(srcdir)/images/toolbar.png \
$(srcdir)/images/tree-view-coordinates.png \
$(srcdir)/images/volumebutton.png \
$(srcdir)/images/window.png
# Extra options to supply to gtkdoc-fixref

View File

@@ -45,11 +45,12 @@ How to compile GTK+ itself
of the tools are already included in the source packages. But
it's useful to know a bit about how packages that use these
tools work. A source package is distributed as a
<literal>tar.gz</literal> file which you unpack into a
directory full of the source files as follows:
<literal>tar.gz</literal> or <literal>tar.bz2</literal> file
which you unpack into a directory full of the source files as follows:
</para>
<programlisting>
tar xvfz gtk+-2.0.0.tar.gz
tar xvfj gtk+-2.0.0.tar.bz2
</programlisting>
<para>
In the toplevel of the directory that is created, there will be
@@ -142,7 +143,7 @@ How to compile GTK+ itself
needed for that library along with version number information.)
The version of <command>pkg-config</command> needed to build
GTK+ is mirrored in the <filename>dependencies</filename> directory
on the <ulink url="ftp://ftp.gtk.org/pub/gtk/v2.6/">GTK+ FTP
on the <ulink url="ftp://ftp.gtk.org/pub/gtk/">GTK+ FTP
site.</ulink>
</para>
</listitem>
@@ -331,6 +332,10 @@ How to compile GTK+ itself
<arg>--disable-xkb</arg>
<arg>--enable-xkb</arg>
</group>
<group>
<arg>--disable-xinerama</arg>
<arg>--enable-xinerama</arg>
</group>
<group>
<arg>--disable-gtk-doc</arg>
<arg>--enable-gtk-doc</arg>
@@ -339,11 +344,7 @@ How to compile GTK+ itself
<arg>--with-xinput=[no|yes]</arg>
</group>
<group>
<arg>--with-gdktarget=[x11|linux-fb|win32]</arg>
</group>
<group>
<arg>--disable-shadowfb</arg>
<arg>--enable-shadowfb</arg>
<arg>--with-gdktarget=[x11|win32|quartz|directfb]</arg>
</group>
</cmdsynopsis>
</para>
@@ -480,6 +481,18 @@ How to compile GTK+ itself
</para>
</formalpara>
<formalpara>
<title><systemitem>--disable-xinerama</systemitem> and
<systemitem>--enable-xinerama</systemitem></title>
<para>
By default the <command>configure</command> script will try
to link against the Xinerama libraries if they are found.
These options can be used to explicitly control whether
Xinerama should be used.
</para>
</formalpara>
<formalpara>
<title><systemitem>--disable-gtk-doc</systemitem> and
<systemitem>--enable-gtk-doc</systemitem></title>
@@ -519,17 +532,9 @@ How to compile GTK+ itself
<para>
Toggles between the supported backends for GDK.
The default is x11, unless the platform is Windows, in which
case the default is win32.
</para>
</formalpara>
<formalpara>
<title><systemitem>--disable-shadowfb</systemitem> and
<systemitem>--enable-shadowfb</systemitem></title>
<para>
Toggles shadow framebuffer support for the linux-fb target,
if selected.
case the default is win32. Other supported backends are
the quartz backend for OS X, and the DirectFB backend
for the Linux framebuffer.
</para>
</formalpara>

View File

@@ -42,14 +42,6 @@ $ cc `pkg-config --cflags --libs gtk+-2.0` hello.c -o hello
</programlisting>
</para>
<para>
To compile a GTK+ program for the framebuffer, use the
"gtk+-linux-fb-2.0" package name instead of "gtk+-2.0":
<programlisting>
$ cc `pkg-config --cflags --libs gtk+-linux-fb-2.0` hello.c -o hello
</programlisting>
</para>
<para>
If you want to make sure that your program doesn't use any deprecated
functions, you can define the preprocessor symbol GTK_DISABLE_DEPRECATED

View File

@@ -31,75 +31,10 @@ system.
<refsect2><title>Build requirements</title>
<para>
Beyond the usual GTK+ build requirements, the DirectFB backend (obviously) needs
the DirectFB libraries (at least 0.9.21) and Cairo compiled with DirectFB support.
Beyond the usual GTK+ build requirements, the DirectFB backend (obviously)
needs the DirectFB libraries (at least 0.9.21) and cairo compiled with
DirectFB support.
</para>
</refsect2>
<!--
FIXME: it seems most of the options listed in _gdk_windowing_args
are ignored, and they need to be described by somebody who knows
what they are supposed to do...
<refsect2><title>DirectFB-specific commandline options</title>
<para>
The DirectFB GDB backend can be influenced with some additional
command line arguments.
</para>
<formalpara>
<title><systemitem>dfb-help</systemitem></title>
<para>
Display help for DirectFB-specific commandline options.
</para>
</formalpara>
<formalpara>
<title><systemitem>dfb=<replaceable>value</replaceable></systemitem></title>
<para>
Possible values: sdl, system.
</para>
</formalpara>
<formalpara>
<title><systemitem>disable-aa-fonts=<replaceable>number</replaceable></systemitem></title>
<para>
If <replaceable>number</replaceable> is 1, disable antialising for fonts.
</para>
</formalpara>
<formalpara>
<title><systemitem>argb-font=<replaceable>number</replaceable></systemitem></title>
<para>
If <replaceable>number</replaceable> is 1, enable ARGB fonts.
</para>
</formalpara>
<formalpara>
<title><systemitem>transparent-unfocused=<replaceable>number</replaceable></systemitem></title>
<para>
If <replaceable>number</replaceable> is 1, make unfocused windows transparent.
</para>
</formalpara>
<formalpara>
<title><systemitem>glyph-surface-cache=<replaceable>number</replaceable></systemitem></title>
<para>
Set the size of the glyph surface cache. The default value is 8.
</para>
</formalpara>
<formalpara>
<title><systemitem>enable-color-keyring=<replaceable>number</replaceable></systemitem></title>
<para>
If <replaceable>number</replaceable> is 1, turn on the color keyring.
</para>
</formalpara>
-->
</refsect1>
</refentry>

View File

@@ -14,6 +14,8 @@
<!ENTITY GtkBin SYSTEM "xml/gtkbin.xml">
<!ENTITY GtkBox SYSTEM "xml/gtkbox.xml">
<!ENTITY GtkButton SYSTEM "xml/gtkbutton.xml">
<!ENTITY GtkBuildable SYSTEM "xml/gtkbuildable.xml">
<!ENTITY GtkBuilder SYSTEM "xml/gtkbuilder.xml">
<!ENTITY GtkCalendar SYSTEM "xml/gtkcalendar.xml">
<!ENTITY GtkCheckButton SYSTEM "xml/gtkcheckbutton.xml">
<!ENTITY GtkCheckMenuItem SYSTEM "xml/gtkcheckmenuitem.xml">
@@ -35,6 +37,7 @@
<!ENTITY GtkEntryCompletion SYSTEM "xml/gtkentrycompletion.xml">
<!ENTITY GtkEventBox SYSTEM "xml/gtkeventbox.xml">
<!ENTITY GtkExpander SYSTEM "xml/gtkexpander.xml">
<!ENTITY GtkExtendedLayout SYSTEM "xml/gtkextendedlayout.xml">
<!ENTITY GtkFileChooser SYSTEM "xml/gtkfilechooser.xml">
<!ENTITY GtkFileChooserButton SYSTEM "xml/gtkfilechooserbutton.xml">
<!ENTITY GtkFileChooserDialog SYSTEM "xml/gtkfilechooserdialog.xml">
@@ -137,6 +140,7 @@
<!ENTITY GtkToolButton SYSTEM "xml/gtktoolbutton.xml">
<!ENTITY GtkToolItem SYSTEM "xml/gtktoolitem.xml">
<!ENTITY GtkTooltips SYSTEM "xml/gtktooltips.xml">
<!ENTITY GtkTooltip SYSTEM "xml/gtktooltip.xml">
<!ENTITY GtkTree SYSTEM "xml/gtktree.xml">
<!ENTITY GtkTreeItem SYSTEM "xml/gtktreeitem.xml">
<!ENTITY GtkTreeModel SYSTEM "xml/gtktreemodel.xml">
@@ -205,7 +209,6 @@
<!ENTITY gtk-Running SYSTEM "running.sgml">
<!ENTITY gtk-Resources SYSTEM "resources.sgml">
<!ENTITY gtk-Windows SYSTEM "windows.sgml">
<!ENTITY gtk-Framebuffer SYSTEM "framebuffer.sgml">
<!ENTITY gtk-X11 SYSTEM "x11.sgml">
<!ENTITY gtk-OSX SYSTEM "osx.sgml">
<!ENTITY gtk-DirectFB SYSTEM "directfb.sgml">
@@ -263,38 +266,31 @@ string utilities, file utilities, a main loop abstraction, and so on.
<varlistentry>
<term>Pango</term>
<listitem><para>
Pango is a library for internationalized text handling. It centers
around the <link linkend="PangoLayout">PangoLayout</link> object, representing
a paragraph of text.
Pango provides the engine for <link linkend="GtkTextView">GtkTextView</link>,
<link linkend="GtkLabel">GtkLabel</link>,
<link linkend="GtkEntry">GtkEntry</link>, and
around the #PangoLayout object, representing a paragraph of text.
Pango provides the engine for #GtkTextView, #GtkLabel, #GtkEntry, and
other widgets that display text.
</para></listitem>
</varlistentry>
<varlistentry>
<term>ATK</term>
<listitem><para>
ATK is the Accessibility Toolkit. It provides a set of generic
interfaces allowing accessibility technologies to interact with a
graphical user interface. For example, a screen reader uses ATK to
discover the text in an interface and read it to blind users. GTK+
widgets have built-in support for accessibility using the ATK
framework.
</para></listitem>
</varlistentry>
<varlistentry>
<term>GdkPixbuf</term>
<listitem><para>
This is a small library which allows you to create <link linkend="GdkPixbuf">GdkPixbuf</link>
This is a small library which allows you to create #GdkPixbuf
("pixel buffer") objects from image data or image files.
Use a <link linkend="GdkPixbuf">GdkPixbuf</link> in combination with <link linkend="GtkImage">GtkImage</link> to display images.
Use a #GdkPixbuf in combination with #GtkImage to display images.
</para></listitem>
</varlistentry>
@@ -310,11 +306,8 @@ on X11, Windows, and the Linux framebuffer device.
<varlistentry>
<term>GTK+</term>
<listitem><para>
The GTK+ library itself contains <firstterm>widgets</firstterm>,
that is, GUI components such as <link linkend="GtkButton">GtkButton</link> or
<link linkend="GtkTextView">GtkTextView</link>.
that is, GUI components such as #GtkButton or #GtkTextView.
</para></listitem>
</varlistentry>
</variablelist>
@@ -327,7 +320,6 @@ that is, GUI components such as <link linkend="GtkButton">GtkButton</link> or
&gtk-Windows;
&gtk-OSX;
&gtk-DirectFB;
&gtk-Framebuffer;
&gtk-Resources;
&gtk-Questions;
</part>
@@ -455,7 +447,6 @@ that is, GUI components such as <link linkend="GtkButton">GtkButton</link> or
&GtkMenu;
&GtkMenuBar;
&GtkMenuItem;
&GtkMenuShell;
&GtkImageMenuItem;
&GtkRadioMenuItem;
&GtkCheckMenuItem;
@@ -552,6 +543,7 @@ that is, GUI components such as <link linkend="GtkButton">GtkButton</link> or
&GtkIMContextSimple;
&GtkIMMulticontext;
&GtkSizeGroup;
&GtkTooltip;
&GtkTooltips;
&GtkViewport;
&GtkAccessible;
@@ -563,7 +555,9 @@ that is, GUI components such as <link linkend="GtkButton">GtkButton</link> or
&GtkBox;
&GtkButtonBox;
&GtkContainer;
&GtkExtendedLayout;
&GtkItem;
&GtkMenuShell;
&GtkMisc;
&GtkObject;
&GtkPaned;
@@ -600,6 +594,12 @@ that is, GUI components such as <link linkend="GtkButton">GtkButton</link> or
&GtkRecentFilter;
</chapter>
<chapter id="Builder">
<title>Interface builder</title>
&GtkBuildable;
&GtkBuilder;
</chapter>
<chapter id="DeprecatedObjects">
<title>Deprecated</title>
&GtkCList;

View File

@@ -431,6 +431,75 @@ GTK_BOX_GET_CLASS
gtk_box_get_type
</SECTION>
<SECTION>
<FILE>gtkvscrollbar</FILE>
<TITLE>GtkVScrollbar</TITLE>
GtkVScrollbar
gtk_vscrollbar_new
<SUBSECTION Standard>
GTK_VSCROLLBAR
GTK_IS_VSCROLLBAR
GTK_TYPE_VSCROLLBAR
gtk_vscrollbar_get_type
GTK_VSCROLLBAR_CLASS
GTK_IS_VSCROLLBAR_CLASS
GTK_VSCROLLBAR_GET_CLASS
</SECTION>
<SECTION>
<FILE>gtkbuildable</FILE>
GtkBuildable
GtkBuildableIface
gtk_buildable_set_name
gtk_buildable_get_name
gtk_buildable_add
gtk_buildable_set_property
gtk_buildable_construct_child
gtk_buildable_custom_tag_start
gtk_buildable_custom_tag_end
gtk_buildable_custom_finished
gtk_buildable_parser_finished
gtk_buildable_get_internal_child
<SUBSECTION Standard>
GTK_BUILDABLE
GTK_IS_BUILDABLE
GTK_TYPE_BUILDABLE
gtk_buildable_get_type
GTK_BUILDABLE_CLASS
GTK_BUILDABLE_GET_IFACE
</SECTION>
<SECTION>
<FILE>gtkbuilder</FILE>
<TITLE>GtkBuilder</TITLE>
GtkBuilder
GtkBuilderConnectFunc
gtk_builder_new
gtk_builder_add_from_file
gtk_builder_add_from_string
gtk_builder_get_object
gtk_builder_get_objects
gtk_builder_connect_signals
gtk_builder_connect_signals_full
gtk_builder_set_translation_domain
gtk_builder_get_translation_domain
gtk_builder_get_type_from_name
gtk_builder_value_from_string
gtk_builder_value_from_string_type
GTK_BUILDER_WARN_INVALID_CHILD_TYPE
GTK_BUILDER_ERROR
<SUBSECTION Standard>
GTK_BUILDER
GTK_IS_BUILDER
GTK_TYPE_BUILDER
GTK_BUILDER_CLASS
GTK_IS_BUILDER_CLASS
GTK_BUILDER_GET_CLASS
<SUBSECTION Private>
gtk_builder_get_type
gtk_builder_error_quark
</SECTION>
<SECTION>
<FILE>gtkbutton</FILE>
<TITLE>GtkButton</TITLE>
@@ -1246,6 +1315,26 @@ gtk_expander_get_type
GtkExpanderPrivate
</SECTION>
<SECTION>
<FILE>gtkextendedlayout</FILE>
<TITLE>GtkExtendedLayout</TITLE>
GtkExtendedLayout
GtkExtendedLayoutIface
gtk_extended_layout_get_baselines
gtk_extended_layout_get_features
gtk_extended_layout_get_height_for_width
gtk_extended_layout_get_natural_size
gtk_extended_layout_get_width_for_height
<SUBSECTION Standard>
GTK_EXTENDED_LAYOUT
GTK_EXTENDED_LAYOUT_CLASS
GTK_EXTENDED_LAYOUT_GET_IFACE
GTK_IS_EXTENDED_LAYOUT
GTK_TYPE_EXTENDED_LAYOUT
<SUBSECTION Private>
gtk_extended_layout_get_type
</SECTION>
<SECTION>
<FILE>gtkfilechooser</FILE>
<TITLE>GtkFileChooser</TITLE>
@@ -4095,7 +4184,9 @@ gtk_tooltips_get_type
<SECTION>
<FILE>gtktooltip</FILE>
<TITLE>GtkTooltip</TITLE>
GtkTooltip
gtk_tooltip_set_markup
gtk_tooltip_set_text
gtk_tooltip_set_icon
gtk_tooltip_set_icon_from_stock
gtk_tooltip_set_custom
@@ -4395,6 +4486,7 @@ gtk_tree_store_set_column_types
gtk_tree_store_set_value
gtk_tree_store_set
gtk_tree_store_set_valist
gtk_tree_store_set_valuesv
gtk_tree_store_remove
gtk_tree_store_insert
gtk_tree_store_insert_before
@@ -4478,6 +4570,7 @@ gtk_tree_view_column_cell_get_position
gtk_tree_view_column_cell_is_visible
gtk_tree_view_column_focus_cell
gtk_tree_view_column_queue_resize
gtk_tree_view_column_get_tree_view
<SUBSECTION Standard>
GTK_TREE_VIEW_COLUMN
GTK_IS_TREE_VIEW_COLUMN
@@ -4552,6 +4645,12 @@ gtk_tree_view_get_visible_range
gtk_tree_view_get_bin_window
gtk_tree_view_widget_to_tree_coords
gtk_tree_view_tree_to_widget_coords
gtk_tree_view_convert_bin_window_to_tree_coords
gtk_tree_view_convert_bin_window_to_widget_coords
gtk_tree_view_convert_tree_to_bin_window_coords
gtk_tree_view_convert_tree_to_widget_coords
gtk_tree_view_convert_widget_to_bin_window_coords
gtk_tree_view_convert_widget_to_tree_coords
gtk_tree_view_enable_model_drag_dest
gtk_tree_view_enable_model_drag_source
gtk_tree_view_unset_rows_drag_source
@@ -4828,6 +4927,7 @@ gtk_list_store_set_column_types
gtk_list_store_set
gtk_list_store_set_valist
gtk_list_store_set_value
gtk_list_store_set_valuesv
gtk_list_store_remove
gtk_list_store_insert
gtk_list_store_insert_before
@@ -5134,6 +5234,7 @@ gtk_widget_modify_bg
gtk_widget_modify_text
gtk_widget_modify_base
gtk_widget_modify_font
gtk_widget_modify_cursor
gtk_widget_create_pango_context
gtk_widget_get_pango_context
gtk_widget_create_pango_layout
@@ -5188,6 +5289,10 @@ gtk_widget_get_action
gtk_widget_is_composited
gtk_widget_error_bell
gtk_widget_keynav_failed
gtk_widget_get_tooltip_markup
gtk_widget_set_tooltip_markup
gtk_widget_get_tooltip_text
gtk_widget_set_tooltip_text
gtk_widget_get_tooltip_window
gtk_widget_set_tooltip_window
gtk_widget_trigger_tooltip_query
@@ -5563,6 +5668,7 @@ gtk_rc_add_default_file
gtk_rc_get_default_files
gtk_rc_set_default_files
gtk_rc_parse_color
gtk_rc_parse_color_full
gtk_rc_parse_state
gtk_rc_parse_priority
gtk_rc_find_module_in_path
@@ -5972,6 +6078,7 @@ GTK_STOCK_DIALOG_INFO
GTK_STOCK_DIALOG_QUESTION
GTK_STOCK_DIALOG_WARNING
GTK_STOCK_DIRECTORY
GTK_STOCK_DISCARD
GTK_STOCK_DISCONNECT
GTK_STOCK_DND
GTK_STOCK_DND_MULTIPLE

View File

@@ -18,6 +18,7 @@
<arg choice="opt">--index-only</arg>
<arg choice="opt">--source<arg>name</arg></arg>
<arg choice="opt">--quiet</arg>
<arg choice="opt">--validate</arg>
<arg choice="req">iconpath</arg>
</cmdsynopsis>
</refsynopsisdiv>
@@ -80,6 +81,13 @@ multiple applications, the overall memory consumption is reduced as well.
<listitem><para>Turn off verbose output.
</para></listitem>
</varlistentry>
<varlistentry>
<term>--validate</term>
<term>-v</term>
<listitem><para>Validate existing icon cache.
</para></listitem>
</varlistentry>
</variablelist>
</refsect1>

View File

@@ -18,6 +18,8 @@ gtk_aspect_frame_get_type
gtk_assistant_get_type
gtk_bin_get_type
gtk_box_get_type
gtk_builder_get_type
gtk_buildable_get_type
gtk_button_box_get_type
gtk_button_get_type
gtk_calendar_get_type
@@ -52,6 +54,7 @@ gtk_entry_completion_get_type
gtk_entry_get_type
gtk_event_box_get_type
gtk_expander_get_type
gtk_extended_layout_get_type
gtk_file_chooser_button_get_type
gtk_file_chooser_dialog_get_type
gtk_file_chooser_get_type

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@@ -56,8 +56,8 @@
g_object_unref (pixbuf);
</programlisting></informalexample>
If the g_object_new() construction scares you, you can also use
gtk_about_dialog_new() to construct the dialog and then use the setters for
the individual properties.
gtk_about_dialog_new() to construct the dialog and then use the
setters for the individual properties.
</para>
<para>

View File

@@ -58,8 +58,8 @@ gtk_combo_box_append_text (GTK_COMBO_BOX (combo_box), "First Item");
gtk_combo_box_append_text (GTK_COMBO_BOX (combo_box), "Second Item");
gtk_combo_box_append_text (GTK_COMBO_BOX (combo_box), "Third Item");
</programlisting></informalexample>
In order to react to the user's selection, connect to the "changed"
signal on the combo box and use gtk_combo_box_get_active()
In order to react to the user's selection, connect to the
#GtkComboBox::changed signal and use gtk_combo_box_get_active()
to retrieve the index of the selected item.
</para>

View File

@@ -11,15 +11,15 @@
<para>
Porting an application from <structname>GnomeHRef</structname> to
#GtkLinkButton is very simple. #GtkLinkButton does not have a
default action for "clicked" signal. So instead of simply creating
the widget
default action for #GtkButton::clicked signal. So instead of simply
creating the widget
<informalexample><programlisting>
GtkWidget *button;
button = gnome_href_new (url, "");
</programlisting></informalexample>
you will have to handle the activation of the #GtkLinkButton, using
the "clicked" signal for instance
the ::clicked signal for instance
<informalexample><programlisting>
static void
link_button_clicked_cb (GtkWidget *widget,

View File

@@ -22,7 +22,7 @@
</formalpara>
<para>
The #GtkWidget::popup_menu signal instructs the widget for which
The #GtkWidget::popup-menu signal instructs the widget for which
it is emitted to create a context-sensitive popup menu. By default,
the <link linkend="gtk-bindings">key binding mechanism</link> is set to
emit this signal when the
@@ -75,7 +75,7 @@ do_popup_menu (GtkWidget *my_widget, GdkEventButton *event)
<listitem>
<para>
In your ::button-press handler, call this function
In your #GtkWidget::button-press-event handler, call this function
when you need to pop up a menu:
</para>
@@ -97,7 +97,7 @@ my_widget_button_press_event_handler (GtkWidget *widget, GdkEventButton *event)
<listitem>
<para>
Implement a handler for the ::popup-menu signal:
Implement a handler for the #GtkWidget::popup-menu signal:
</para>
<programlisting>
@@ -124,10 +124,10 @@ my_widget_popup_menu_handler (GtkWidget *widget)
provide your own <link
linkend="GtkMenuPositionFunc">menu-positioning function</link>
in the case where the <parameter>event</parameter> is
<constant>NULL</constant>. This function should compute the
desired position for a menu when it is invoked through the
keyboard. For example, #GtkEntry aligns the
top edge of its popup menu with the bottom edge of the entry.
%NULL. This function should compute the desired position for
a menu when it is invoked through the keyboard. For example,
#GtkEntry aligns the top edge of its popup menu with the bottom
edge of the entry.
</para>
</note>
@@ -137,8 +137,7 @@ my_widget_popup_menu_handler (GtkWidget *widget)
able to take the keyboard focus. In general, widgets should
be fully usable through the keyboard and not just the mouse.
The very first step of this is to ensure that your widget
turns on the %GTK_CAN_FOCUS <link
linkend="gtkwidgetflags">flag</link>.
turns on the %GTK_CAN_FOCUS <link linkend="gtkwidgetflags">flag</link>.
</para>
</note>
</section>
@@ -180,7 +179,7 @@ my_widget_popup_menu_handler (GtkWidget *widget)
<para>
Regions have an internal representation that is accessible as a
list of rectangles. To turn the
list of rectangles. To turn the
<structfield>GdkEventExpose.region</structfield> field into such
a list, use gdk_region_get_rectangles():
</para>
@@ -215,12 +214,10 @@ my_widget_expose_event_handler (GtkWidget *widget, GdkEventExpose *event)
<formalpara>
<title>Why</title>
<para>
With
gtk_accelerator_get_default_mod_mask()
you can test for modifier keys reliably; this way your key
event handlers will work correctly even if
<keycap>NumLock</keycap> or <keycap>CapsLock</keycap> are
activated.
With gtk_accelerator_get_default_mod_mask() you can test for
modifier keys reliably; this way your key event handlers will
work correctly even if <keycap>NumLock</keycap> or
<keycap>CapsLock</keycap> are activated.
</para>
</formalpara>
@@ -230,7 +227,7 @@ my_widget_expose_event_handler (GtkWidget *widget, GdkEventExpose *event)
indicates the modifier state at the time the key was pressed.
Modifiers are keys like <keycap>Control</keycap> and
<keycap>NumLock</keycap>. When implementing a
#GtkWidget::key_press_event handler, you should use
#GtkWidget::key-press-event handler, you should use
gtk_accelerator_get_default_mod_mask() to
test against modifier keys. This function returns a bit mask
which encompasses all the modifiers which the user may be
@@ -298,7 +295,7 @@ my_widget_key_press_event_handler (GtkWidget *widget, GdkEventKey *event)
gtk_window_set_icon_name()) and images (see gtk_image_set_icon_name()).
In GTK+ 2.8, you can also use named icons for drag-and-drop (see
gtk_drag_source_set_icon_name()) and in treeview cells (see the
#GtkCellRendererPixbuf:icon_name property).
#GtkCellRendererPixbuf:icon-name property).
</para>
</section>
</chapter>

View File

@@ -59,7 +59,7 @@ See the <link linkend="gtk-resources">documentation on this topic</link>.
<qandaentry>
<question><para>How do I port from one GTK+
<question><para>How do I port from one GTK+
version to another?</para></question>
<answer>
@@ -96,17 +96,17 @@ from functions?
<answer>
<para>
See the documentation for #GObject and #GtkObject. For #GObject note specifically
g_object_ref() and g_object_unref(). #GtkObject is a subclass of #GObject so the
same points apply, except that it has a "floating" state (explained in its
documentation).
See the documentation for #GObject and #GtkObject. For #GObject note
specifically g_object_ref() and g_object_unref(). #GtkObject is a subclass
of #GObject so the same points apply, except that it has a "floating" state
(explained in its documentation).
</para>
<para>
For strings returned from functions, they will be declared "const" (using
#G_CONST_RETURN) if they should not be freed. Non-const strings should be freed
with g_free(). Arrays follow the same rule. (If you find an exception to the rules,
please report a bug to <ulink
#G_CONST_RETURN) if they should not be freed. Non-const strings should be
freed with g_free(). Arrays follow the same rule. (If you find an exception
to the rules, please report a bug to <ulink
url="http://bugzilla.gnome.org">http://bugzilla.gnome.org</ulink>.)
</para>
@@ -135,8 +135,9 @@ reference counting, not floating reference counting.
</para>
<para>
To to get this, you must acquire a reference to the widget and drop the floating
reference (<quote>ref and sink</quote> in GTK+ parlance) after creating it:
To to get this, you must acquire a reference to the widget and drop the
floating reference (<quote>ref and sink</quote> in GTK+ parlance) after
creating it:
<informalexample><programlisting>
foo = gtk_foo_new (<!-- -->);
g_object_ref (foo);
@@ -165,10 +166,9 @@ How do I use GTK+ with threads?
<answer>
<para>
This is covered in the
<link linkend="gdk-Threads">GDK threads documentation</link>.
See also the <link linkend="glib-Threads">GThread</link> documentation for portable
threading primitives.
This is covered in the <link linkend="gdk-Threads">GDK threads
documentation</link>. See also the <link linkend="glib-Threads">GThread</link>
documentation for portable threading primitives.
</para>
</answer>
@@ -184,8 +184,8 @@ How do I internationalize a GTK+ program?
<para>
Most people use <ulink url="http://www.gnu.org/software/gettext/">GNU
gettext</ulink>, already required in order to install GLib. On a UNIX
or Linux system with gettext installed, type <literal>info
gettext</literal> to read the documentation.
or Linux system with gettext installed, type <literal>info gettext</literal>
to read the documentation.
</para>
<para>
The short checklist on how to use gettext is: call bindtextdomain() so gettext
@@ -199,15 +199,17 @@ follows for convenience:
#define N_(x) x
</programlisting>
</informalexample>
You use N_() (N stands for no-op) to mark a string for translation in a context
where a function call to gettext() is not allowed, such as in an array initializer.
You use N_() (N stands for no-op) to mark a string for translation in a
context where a function call to gettext() is not allowed, such as in an
array initializer.
You eventually have to call gettext() on the string to actually fetch the
translation. _() both marks the string for translation and actually translates it.
translation. _() both marks the string for translation and actually
translates it.
</para>
<para>
Nowadays, GLib provides the common shorthand macros in the header file
<filename>gi18n.h</filename>, so you don't have to define them yourself, just
include that header.
<filename>gi18n.h</filename>, so you don't have to define them yourself,
just include that header.
</para>
<para>
Code using these macros ends up looking like this:
@@ -230,10 +232,11 @@ Code using these macros ends up looking like this:
</informalexample>
</para>
<para>
Libraries using gettext should use dgettext() instead of gettext(), which allows
them to specify the translation domain each time they ask for a translation. Libraries
should also avoid calling textdomain(), since they'll be specifying the domain instead
of using the default.For dgettext() the _() macro can be defined as:
Libraries using gettext should use dgettext() instead of gettext(), which
allows them to specify the translation domain each time they ask for a
translation. Libraries should also avoid calling textdomain(), since they
will be specifying the domain instead of using the default. For dgettext()
the _() macro can be defined as:
<informalexample>
<programlisting>
#define _(x) dgettext ("MyDomain", x)
@@ -241,9 +244,9 @@ of using the default.For dgettext() the _() macro can be defined as:
</informalexample>
</para>
<para>
Again, GLib comes with the <filename>gi18n-lib.h</filename>, saving you the trouble
of defining the macros by hand. The macros in that header expect the translation
domain to be specified by the %GETTEXT_PACKAGE macro.
Again, GLib comes with the <filename>gi18n-lib.h</filename>, saving you the
trouble of defining the macros by hand. The macros in that header expect the
translation domain to be specified by the %GETTEXT_PACKAGE macro.
</para>
</answer>
</qandaentry>
@@ -258,10 +261,9 @@ How do I use non-ASCII characters in GTK+ programs ?
<answer>
<para>
GTK+ uses <ulink url="http://www.unicode.org">Unicode</ulink> (more exactly
UTF-8) for all text. UTF-8 encodes each Unicode codepoint as a
sequence of one to six bytes and has a number of nice
properties which make it a good choice for working with Unicode
text in C programs:
UTF-8) for all text. UTF-8 encodes each Unicode codepoint as a sequence of
one to six bytes and has a number of nice properties which make it a good
choice for working with Unicode text in C programs:
<itemizedlist>
<listitem><para>
ASCII characters are encoded by their familiar ASCII codepoints.
@@ -270,21 +272,22 @@ ASCII characters are encoded by their familiar ASCII codepoints.
ASCII characters never appear as part of any other character.
</para></listitem>
<listitem><para>
The zero byte doesn't occur as part of a character, so that UTF-8 strings can
be manipulated with the usual C library functions for
handling zero-terminated strings.
The zero byte doesn't occur as part of a character, so that UTF-8 strings
can be manipulated with the usual C library functions for handling
zero-terminated strings.
</para></listitem>
</itemizedlist>
More information about Unicode and UTF-8 can be found in the
<ulink url="http://www.cl.cam.ac.uk/~mgk25/unicode.html">UTF-8 and Unicode FAQ for Unix/Linux</ulink>.
<ulink url="http://www.cl.cam.ac.uk/~mgk25/unicode.html">UTF-8 and Unicode i
FAQ for Unix/Linux</ulink>.
GLib provides functions for converting strings between UTF-8 and other
encodings, see g_locale_to_utf8() and g_convert().
encodings, see g_locale_to_utf8() and g_convert().
</para>
<para>
Text coming from external sources (e.g. files or user input), has to be
converted to UTF-8 before being handed over to GTK+. The
following example writes the content of a IS0-8859-1 encoded text
file to <literal>stdout</literal>:
converted to UTF-8 before being handed over to GTK+. The following example
writes the content of a IS0-8859-1 encoded text file to
<literal>stdout</literal>:
<informalexample><programlisting>
gchar *text, *utf8_text;
gsize length;
@@ -308,7 +311,7 @@ else
</para>
<para>
For string literals in the source code, there are several alternatives for
handling non-ASCII content:
handling non-ASCII content:
<variablelist>
<varlistentry><term>direct UTF-8</term>
<listitem><para>
@@ -334,8 +337,9 @@ very convenient. Be careful when mixing hexadecimal escapes with ordinary text;
<listitem><para>
If the string literals can be represented in an encoding which your toolchain
can handle (e.g. IS0-8859-1), you can write your source files in that encoding
and use g_convert() to convert the strings to UTF-8 at runtime. Note that this has
some runtime overhead, so you may want to move the conversion out of inner loops.
and use g_convert() to convert the strings to UTF-8 at runtime. Note that this
has some runtime overhead, so you may want to move the conversion out of inner
loops.
</para></listitem>
</varlistentry>
</variablelist>
@@ -364,7 +368,7 @@ There are two ways to approach this. The GTK+ header files use the subset
of C that's also valid C++, so you can simply use the normal GTK+ API
in a C++ program. Alternatively, you can use a "C++ binding"
such as <ulink url="http://gtkmm.sourceforge.net/">gtkmm</ulink>
which provides a C++-native API.
which provides a native C++ API.
</para>
<para>
When using GTK+ directly, keep in mind that only functions can be
@@ -404,7 +408,7 @@ How do I use GTK+ with other non-C languages?
<para>
See the <ulink url="http://www.gtk.org/bindings.html">list of language
bindings</ulink> on <ulink
url="http://www.gtk.org">http://www.gtk.org</ulink>.
url="http://www.gtk.org">http://www.gtk.org</ulink>.
</para>
</answer>
@@ -419,15 +423,16 @@ How do I load an image or animation from a file?
<answer>
<para>
To load an image file straight into a display widget, use gtk_image_new_from_file()
<footnote><para> If the file load fails, gtk_image_new_from_file() will display no
image graphic &mdash; to detect a failed load yourself, use gdk_pixbuf_new_from_file()
directly, then gtk_image_new_from_pixbuf().</para></footnote>.
To load an image for another purpose, use gdk_pixbuf_new_from_file(). To load an
animation, use gdk_pixbuf_animation_new_from_file().
gdk_pixbuf_animation_new_from_file() can also load non-animated images, so use it
in combination with gdk_pixbuf_animation_is_static_image() to load a file of unknown
type.
To load an image file straight into a display widget, use
gtk_image_new_from_file() <footnote><para> If the file load fails,
gtk_image_new_from_file() will display no image graphic &mdash; to detect
a failed load yourself, use gdk_pixbuf_new_from_file() directly, then
gtk_image_new_from_pixbuf().</para></footnote>.
To load an image for another purpose, use gdk_pixbuf_new_from_file(). To i
load an animation, use gdk_pixbuf_animation_new_from_file().
gdk_pixbuf_animation_new_from_file() can also load non-animated images, so
use it in combination with gdk_pixbuf_animation_is_static_image() to load a
file of unknown type.
</para>
<para>
To load an image or animation file asynchronously (without blocking), use
@@ -503,21 +508,22 @@ to the GNOME 2.0 platform</ulink>.
<qandaentry>
<question>
<para>
Why are types not registered if I use their <literal>GTK_TYPE_BLAH</literal> macro ?
Why are types not registered if I use their <literal>GTK_TYPE_BLAH</literal>
macro ?
</para>
</question>
<answer>
<para>
The <literal>GTK_TYPE_BLAH</literal> macros are defined as calls to
<literal>gtk_blah_get_type()</literal>, and the <literal>_get_type()</literal> functions
are declared as <literal>G_GNUC_CONST</literal> which allows the compiler to optimize
<literal>gtk_blah_get_type()</literal>, and the <literal>_get_type()</literal> i
functions are declared as %G_GNUC_CONST which allows the compiler to optimize
the call away if it appears that the value is not being used.
</para>
<para>
A common workaround for this problem is to store the result in a volatile variable,
which keeps the compiler from optimizing the call away.
A common workaround for this problem is to store the result in a volatile
variable, which keeps the compiler from optimizing the call away.
<informalexample><programlisting>
volatile GType dummy = GTK_TYPE_BLAH;
</programlisting></informalexample>
@@ -595,9 +601,9 @@ should use the #GtkTextView widget. Do not use the deprecated widget #GtkText
in newly-written code, it has a number of problems that are best avoided.
</para>
<para>
If you only have a small amount of text, #GtkLabel may also be appropriate of course.
It can be made selectable with gtk_label_set_selectable(). For a single-line text
entry, see #GtkEntry.
If you only have a small amount of text, #GtkLabel may also be appropriate
of course. It can be made selectable with gtk_label_set_selectable(). For a
single-line text entry, see #GtkEntry.
</para>
</answer>
</qandaentry>
@@ -610,9 +616,9 @@ entry, see #GtkEntry.
<answer>
<para>
#GtkImage can display images in just about any format GTK+ understands. You can also
use #GtkDrawingArea if you need to do something more complex, such as draw text or
graphics over the top of the image.
#GtkImage can display images in just about any format GTK+ understands.
You can also use #GtkDrawingArea if you need to do something more complex,
such as draw text or graphics over the top of the image.
</para>
</answer>
</qandaentry>
@@ -644,14 +650,15 @@ How do I change the color of a widget?
<answer><para>
See gtk_widget_modify_fg(), gtk_widget_modify_bg(), gtk_widget_modify_base(),
and gtk_widget_modify_text(). See <link linkend="gtk-Resource-Files">GTK+
resource files</link> for more discussion. You can also change widget color by
installing a resource file and parsing it with gtk_rc_add_default_file().
resource files</link> for more discussion. You can also change widget color
by installing a resource file and parsing it with gtk_rc_add_default_file().
The advantage of a resource file is that users can then override the
color you've chosen.
</para>
<para>To change the background color for widgets such as #GtkLabel that have no
background, place them in a #GtkEventBox and set the background of the event box.
<para>To change the background color for widgets such as #GtkLabel that have
no background, place them in a #GtkEventBox and set the background of the
event box.
</para></answer>
</qandaentry>
@@ -661,9 +668,9 @@ How do I change the font of a widget?
</para></question>
<answer><para>
This has several possible answers, depending on what exactly you want to achieve.
One option is gtk_widget_modify_font(). Note that this function can be used to
change only the font size, as in the following example:
This has several possible answers, depending on what exactly you want to
achieve. One option is gtk_widget_modify_font(). Note that this function
can be used to change only the font size, as in the following example:
<programlisting>
PangoFontDesc *font_desc = pango_font_description_new (<!-- -->);
pango_font_description_set_size (font_desc, 40);
@@ -672,23 +679,24 @@ change only the font size, as in the following example:
</programlisting>
</para>
<para>
If you want to make the text of a label larger, you can use gtk_label_set_markup():
If you want to make the text of a label larger, you can use
gtk_label_set_markup():
<programlisting>
gtk_label_set_markup (label, "&lt;big&gt;big text&lt;/big&gt;");
</programlisting>
This is preferred for many apps because it's a relative size to the
user's chosen font size. See g_markup_escape_text() if you are constructing such
strings on the fly.
user's chosen font size. See g_markup_escape_text() if you are
constructing such strings on the fly.
</para>
<para>
You can also change the font of a widget by putting
<programlisting>
gtk-font-name = "Sans 30"
</programlisting>
in a resource file and parsing it with gtk_rc_add_default_file(). The advantage of
a resource file is that users can then override the font you've chosen. See
<link linkend="gtk-Resource-Files">GTK+ resource files</link> for more
discussion.
in a resource file and parsing it with gtk_rc_add_default_file().
The advantage of a resource file is that users can then override the font you
have chosen. See <link linkend="gtk-Resource-Files">GTK+ resource files</link>
for more discussion.
</para>
</answer>
</qandaentry>
@@ -738,9 +746,10 @@ How do I make a text widget display its complete contents in a specific font?
</para></question>
<answer><para>
If you use gtk_text_buffer_insert_with_tags() with appropriate tags to select the
font, the inserted text will have the desired appearance, but text typed in by the
user before or after the tagged block will appear in the default style.
If you use gtk_text_buffer_insert_with_tags() with appropriate tags to select
the font, the inserted text will have the desired appearance, but text typed
in by the user before or after the tagged block will appear in the default
style.
</para>
<para>
To ensure that all text has the desired appearance, use gtk_widget_modify_font()
@@ -789,8 +798,8 @@ How do I associate some data with a row in the tree?
<answer>
<para>
Remember that the #GtkTreeModel columns don't necessarily have to be displayed.
So you can put non-user-visible data in your model just like any other data, and
retrieve it with gtk_tree_model_get(). See the
So you can put non-user-visible data in your model just like any other data,
and retrieve it with gtk_tree_model_get(). See the
<link linkend="TreeWidget">tree widget overview</link>.
</para>
</answer>
@@ -818,9 +827,10 @@ How do I put an image and some text in the same column?
<answer>
<para>
You can pack more than one #GtkCellRenderer into a single #GtkTreeViewColumn using
gtk_tree_view_column_pack_start() or gtk_tree_view_column_pack_end(). So pack both
a #GtkCellRendererPixbuf and a #GtkCellRendererText into the column.
You can pack more than one #GtkCellRenderer into a single #GtkTreeViewColumn
using gtk_tree_view_column_pack_start() or gtk_tree_view_column_pack_end().
So pack both a #GtkCellRendererPixbuf and a #GtkCellRendererText into the
column.
</para>
</answer>
</qandaentry>
@@ -834,8 +844,9 @@ gtk_list_store_set() and gtk_tree_store_set(), but can't read it back?
<answer>
<para>
Both the #GtkTreeStore and the #GtkListStore implement the #GtkTreeModel
interface. Consequentially, the can use any function this interface implements.
The easiest way to read a set of data back is to use gtk_tree_model_get().
interface. Consequentially, the can use any function this interface
implements. The easiest way to read a set of data back is to use
gtk_tree_model_get().
</para>
</answer>
</qandaentry>
@@ -846,8 +857,8 @@ How do I change the way that numbers are formatted by #GtkTreeView?
</para></question>
<answer><para>
Use gtk_tree_view_insert_column_with_data_func()
or gtk_tree_view_column_set_cell_data_func() and do the conversion from number to
string yourself (with, say, g_strdup_printf()).
or gtk_tree_view_column_set_cell_data_func() and do the conversion from i
number to string yourself (with, say, g_strdup_printf()).
</para>
<para>

View File

@@ -20,9 +20,9 @@ How to run and debug your GTK+ application
<para>
All GTK+ applications support a number of standard commandline
options. These are removed from <literal>argv</literal> by <link
linkend="gtk-init">gtk_init()</link>. Modules may parse and remove
further options. The <link linkend="x11-cmdline">X11</link> and
options. These are removed from <literal>argv</literal> by gtk_init().
Modules may parse and remove further options. The
<link linkend="x11-cmdline">X11</link> and
<link linkend="win32-cmdline">Windows</link> GDK backends parse
some additional commandline options.
</para>
@@ -80,7 +80,7 @@ list them here for completeness nevertheless.
<title><systemitem>--class <replaceable>class</replaceable></systemitem></title>
<para>
Sets the program class; see <link linkend="gdk-set-program-class"><function>gdk_set_program_class</function>()</link>.
Sets the program class; see gdk_set_program_class().
</para>
</formalpara>
@@ -97,10 +97,9 @@ Sets the program name.
<para>
A list of <link linkend="GDK-Debug-Options">debug options</link>
to turn on in addition to those
specified in the <envar>GDK_DEBUG</envar> environment variable.
This option is only available if GTK+ has been configured with
<option>--enable-debug=yes</option>.
to turn on in addition to those specified in the <envar>GDK_DEBUG</envar>
environment variable. This option is only available if GTK+ has been
configured with <option>--enable-debug=yes</option>.
</para>
</formalpara>
@@ -109,8 +108,7 @@ This option is only available if GTK+ has been configured with
<para>
A list of <link linkend="GDK-Debug-Options">debug options</link>
to turn off.
This option is only available if GTK+ has been configured with
to turn off. This option is only available if GTK+ has been configured with
<option>--enable-debug=yes</option>.
</para>
</formalpara>
@@ -184,7 +182,8 @@ additional environment variables.
</varlistentry>
</variablelist>
The special value <literal>all</literal> can be used to turn on all debug options.
The special value <literal>all</literal> can be used to turn on all
debug options.
</para>
</formalpara>
@@ -202,12 +201,13 @@ additional environment variables.
<para>
Specifies a list of directories to search when GTK+ is looking for
dynamically loaded objects such as the modules specified by
<envar>GTK_MODULES</envar>, theme engines, and input method
modules. If the path to the dynamically loaded object is given
as an absolute path name, then GTK+ loads it directly. Otherwise,
GTK+ goes in turn through the directories in GTK_PATH, followed
by the directory <filename>.gtk-2.0</filename> in the user's home
directory, followed by the system default directory,
<envar>GTK_MODULES</envar>, theme engines, input method
modules, file system backends and print backends. If the path to
the dynamically loaded object is given as an absolute path name,
then GTK+ loads it directly.
Otherwise, GTK+ goes in turn through the directories in GTK_PATH,
followed by the directory <filename>.gtk-2.0</filename> in the user's
home directory, followed by the system default directory,
which is <filename><replaceable>libdir</replaceable>/gtk-2.0/modules</filename>.
(If <envar>GTK_EXE_PREFIX</envar> is defined, <replaceable>libdir</replaceable> is
<filename>$GTK_EXE_PREFIX/lib</filename>. Otherwise it is the libdir
@@ -225,9 +225,10 @@ additional environment variables.
--variable=gtk_host gtk+-2.0</literal> to determine this from a
script), and <replaceable>type</replaceable> is a directory
specific to the type of modules; currently it can be
<literal>modules</literal>, <literal>engines</literal> or
<literal>immodules</literal> corresponding to the three types of
modules above. Either <replaceable>version</replaceable>,
<literal>modules</literal>, <literal>engines</literal>,
<literal>immodules</literal>, <literal>filesystems</literal> or
<literal>printbackends</literal>, corresponding to the types of
modules mentioned above. Either <replaceable>version</replaceable>,
<replaceable>host</replaceable>, or both may be omitted. GTK+ looks
first in the most specific directory, then in directories with
fewer components.
@@ -328,7 +329,8 @@ nevertheless.
<listitem><para>Information about XIM support</para></listitem>
</varlistentry>
</variablelist>
The special value <literal>all</literal> can be used to turn on all debug options.
The special value <literal>all</literal> can be used to turn on all
debug options.
</para>
</formalpara>

View File

@@ -7,7 +7,7 @@
<refnamediv>
<refname>Text Widget Overview</refname>
<refpurpose>Overview of #GtkTextBuffer, #GtkTextView, and friends</refpurpose>
<refpurpose>Overview of GtkTextBuffer, GtkTextView, and friends</refpurpose>
</refnamediv>
<refsect1>
@@ -37,8 +37,8 @@ be called "bold" and make the text inside the tag bold. However, the tag
concept is more general than that; tags don't have to affect appearance. They
can instead affect the behavior of mouse and key presses, "lock" a range of
text so the user can't edit it, or countless other things. A tag is
represented by a #GtkTextTag object. One #GtkTextTag can be applied to any number
of text ranges in any number of buffers.
represented by a #GtkTextTag object. One #GtkTextTag can be applied to any
number of text ranges in any number of buffers.
</para>
<para>
@@ -57,35 +57,36 @@ is convenient if you're creating tags on-the-fly).
<para>
Most text manipulation is accomplished with <firstterm>iterators</firstterm>,
represented by a #GtkTextIter. An iterator represents a position between two
characters in the text buffer. #GtkTextIter is a struct designed to be allocated
on the stack; it's guaranteed to be copiable by value and never contain any
heap-allocated data. Iterators are not valid indefinitely; whenever the buffer
is modified in a way that affects the number of characters in the buffer, all
outstanding iterators become invalid. (Note that deleting 5 characters and then
reinserting 5 still invalidates iterators, though you end up with the same
number of characters you pass through a state with a different number).
characters in the text buffer. #GtkTextIter is a struct designed to be
allocated on the stack; it's guaranteed to be copiable by value and never
contain any heap-allocated data. Iterators are not valid indefinitely;
whenever the buffer is modified in a way that affects the number of characters
in the buffer, all outstanding iterators become invalid. (Note that deleting
5 characters and then reinserting 5 still invalidates iterators, though you
end up with the same number of characters you pass through a state with a
different number).
</para>
<para>
Because of this, iterators can't be used to preserve positions across buffer
modifications. To preserve a position, the #GtkTextMark object is ideal. You can
think of a mark as an invisible cursor or insertion point; it floats in the buffer,
saving a position. If the text surrounding the mark is deleted, the mark remains
in the position the text once occupied; if text is inserted at the mark, the
mark ends up either to the left or to the right of the new text, depending on
its <firstterm>gravity</firstterm>. The standard text cursor in left-to-right
languages is a mark with right gravity, because it stays to the right of
inserted text.
modifications. To preserve a position, the #GtkTextMark object is ideal. You
can think of a mark as an invisible cursor or insertion point; it floats in
the buffer, saving a position. If the text surrounding the mark is deleted,
the mark remains in the position the text once occupied; if text is inserted
at the mark, the mark ends up either to the left or to the right of the new
text, depending on its <firstterm>gravity</firstterm>. The standard text
cursor in left-to-right languages is a mark with right gravity, because it
stays to the right of inserted text.
</para>
<para>
Like tags, marks can be either named or anonymous. There are two marks built-in
to #GtkTextBuffer; these are named <literal>"insert"</literal> and
<literal>"selection_bound"</literal> and refer to the insertion point and the
boundary of the selection which is not the insertion point, respectively. If no
text is selected, these two marks will be in the same position. You can manipulate
what is selected and where the cursor appears by moving these marks around.
boundary of the selection which is not the insertion point, respectively. If
no text is selected, these two marks will be in the same position. You can
manipulate what is selected and where the cursor appears by moving these
marks around.
<footnote>
<para>
If you want to place the cursor in response to a user action, be sure to use

View File

@@ -213,6 +213,30 @@ GtkPacker
Private Information
<!-- ##### SECTION ./tmpl/gtkthemes.sgml:Long_Description ##### -->
<para>
</para>
<!-- ##### SECTION ./tmpl/gtkthemes.sgml:See_Also ##### -->
<para>
</para>
<!-- ##### SECTION ./tmpl/gtkthemes.sgml:Short_Description ##### -->
<!-- ##### SECTION ./tmpl/gtkthemes.sgml:Stability_Level ##### -->
<!-- ##### SECTION ./tmpl/gtkthemes.sgml:Title ##### -->
Themes
<!-- ##### SECTION ./tmpl/gtktreemodelsimple.sgml:Long_Description ##### -->
<para>
@@ -1478,6 +1502,14 @@ produce superscript and subscript.
</para>
<!-- ##### SIGNAL GtkTextView::move-focus ##### -->
<para>
</para>
@textview: the object which received the signal.
@arg1:
<!-- ##### ARG GtkTextView:height-lines ##### -->
<para>
@@ -1502,6 +1534,15 @@ produce superscript and subscript.
</para>
<!-- ##### SIGNAL GtkToolbar::move-focus ##### -->
<para>
</para>
@toolbar: the object which received the signal.
@arg1:
@Returns:
<!-- ##### ARG GtkToolbar:pack-end ##### -->
<para>
@@ -1663,6 +1704,14 @@ the #GtkAdjustment which sets the range of the scale.
@window: the object which received the signal.
<!-- ##### SIGNAL GtkWindow::move-focus ##### -->
<para>
</para>
@window: the object which received the signal.
@arg1:
<!-- ##### ARG GtkWindow:auto-shrink ##### -->
<para>
If the window shrinks automatically when widgets within it shrink.
@@ -2323,6 +2372,39 @@ This function is not usually used by users.
@tree_column:
@titles:
<!-- ##### FUNCTION gtk_decorated_window_calculate_frame_size ##### -->
<para>
</para>
@window:
<!-- ##### FUNCTION gtk_decorated_window_init ##### -->
<para>
</para>
@window:
<!-- ##### FUNCTION gtk_decorated_window_move_resize_window ##### -->
<para>
</para>
@window:
@x:
@y:
@width:
@height:
<!-- ##### FUNCTION gtk_decorated_window_set_title ##### -->
<para>
</para>
@window:
@title:
<!-- ##### FUNCTION gtk_drag_dest_handle_event ##### -->
<para>
Internal function.

View File

@@ -413,10 +413,12 @@ link is activated.
</para>
@about: the #GtkAboutDialog in which the link was activated
@link: the URL or email address to whiche the activated link points
@link_:
@data: user data that was passed when the function was registered
with gtk_about_dialog_set_email_hook() or
gtk_about_dialog_set_url_hook()
<!-- # Unused Parameters # -->
@link: the URL or email address to whiche the activated link points
<!-- ##### FUNCTION gtk_about_dialog_set_email_hook ##### -->

View File

@@ -2,7 +2,7 @@
GtkButtonBox
<!-- ##### SECTION Short_Description ##### -->
Base class for #GtkHButtonBox and #GtkVButtonBox
Base class for GtkHButtonBox and GtkVButtonBox
<!-- ##### SECTION Long_Description ##### -->
<para>

View File

@@ -243,7 +243,7 @@ Deprecated.
<!-- ##### FUNCTION gtk_bindings_activate_event ##### -->
<para>
<!-- documented inline -->
</para>
@object:

View File

@@ -5,138 +5,116 @@ GtkBox
Base class for box containers
<!-- ##### SECTION Long_Description ##### -->
<para>
GtkBox is an abstract widget which encapsulates functionallity for a
particular kind of container, one that organizes a variable number of
widgets into a rectangular area. GtkBox currently has two derived
classes, #GtkHBox and #GtkVBox.
</para>
<para>
The rectangular area of a GtkBox is organized into either a single row
or a single column of child widgets depending upon whether the box is
of type #GtkHBox or #GtkVBox, respectively. Thus, all children of a
GtkBox are allocated one dimension in common, which is the height of a
row, or the width of a column.
</para>
<para>
GtkBox uses a notion of <emphasis>packing</emphasis>. Packing refers to
adding widgets with reference to a particular position in a
#GtkContainer. For a GtkBox, there are two reference positions: the
<emphasis>start</emphasis> and the <emphasis>end</emphasis> of the box. For a
#GtkVBox, the start is defined as the top of the box and the end is
defined as the bottom. For a #GtkHBox the start is defined as the
left side and the end is defined as the right side.
</para>
<para>
Use repeated calls to gtk_box_pack_start() to pack widgets into a
GtkBox from start to end. Use gtk_box_pack_end() to add widgets from
end to start. You may intersperse these calls and add widgets from
both ends of the same GtkBox.
</para>
<para>
Use gtk_box_pack_start_defaults() or gtk_box_pack_end_defaults()
to pack widgets into a GtkBox if you do not need to specify the
<structfield>expand</structfield>, <structfield>fill</structfield>, or
<structfield>padding</structfield> attributes of the child to be
added.
</para>
<para>
Because GtkBox is a #GtkContainer, you may also use
gtk_container_add() to insert widgets into the box, and they will be
packed as if with gtk_box_pack_start_defaults(). Use
gtk_container_remove() to remove widgets from the GtkBox.
</para>
<para>
Use gtk_box_set_homogeneous() to specify whether or not all children
of the GtkBox are forced to get the same amount of space.
</para>
<para>
Use gtk_box_set_spacing() to determine how much space will be
minimally placed between all children in the GtkBox.
</para>
<para>
Use gtk_box_reorder_child() to move a GtkBox child to a different
place in the box.
</para>
<para>
Use gtk_box_set_child_packing() to reset the
<structfield>expand</structfield>, <structfield>fill</structfield>,
and <structfield>padding</structfield> attributes of any GtkBox child.
Use gtk_box_query_child_packing() to query these fields.
<para>
GtkBox is an abstract widget which encapsulates functionality for a
particular kind of container, one that organizes a variable number of
widgets into a rectangular area. GtkBox currently has two derived
classes, #GtkHBox and #GtkVBox.
</para>
<para>
The rectangular area of a GtkBox is organized into either a single row
or a single column of child widgets depending upon whether the box is
of type #GtkHBox or #GtkVBox, respectively. Thus, all children of a
GtkBox are allocated one dimension in common, which is the height of a
row, or the width of a column.
</para>
<para>
GtkBox uses a notion of <emphasis>packing</emphasis>. Packing refers to
adding widgets with reference to a particular position in a
#GtkContainer. For a GtkBox, there are two reference positions: the
<emphasis>start</emphasis> and the <emphasis>end</emphasis> of the box.
For a #GtkVBox, the start is defined as the top of the box and the end is
defined as the bottom. For a #GtkHBox the start is defined as the
left side and the end is defined as the right side.
</para>
<para>
Use repeated calls to gtk_box_pack_start() to pack widgets into a
GtkBox from start to end. Use gtk_box_pack_end() to add widgets from
end to start. You may intersperse these calls and add widgets from
both ends of the same GtkBox.
</para>
<para>
Use gtk_box_pack_start_defaults() or gtk_box_pack_end_defaults()
to pack widgets into a GtkBox if you do not need to specify the
#GtkBox:expand, #GtkBox:fill, or #GtkBox:padding child properties
for the child to be added.
</para>
<para>
Because GtkBox is a #GtkContainer, you may also use
gtk_container_add() to insert widgets into the box, and they will be
packed as if with gtk_box_pack_start_defaults(). Use
gtk_container_remove() to remove widgets from the GtkBox.
</para>
<para>
Use gtk_box_set_homogeneous() to specify whether or not all children
of the GtkBox are forced to get the same amount of space.
</para>
<para>
Use gtk_box_set_spacing() to determine how much space will be
minimally placed between all children in the GtkBox.
</para>
<para>
Use gtk_box_reorder_child() to move a GtkBox child to a different
place in the box.
</para>
<para>
Use gtk_box_set_child_packing() to reset the #GtkBox:expand,
#GtkBox:fill and #GtkBox:padding child properties.
Use gtk_box_query_child_packing() to query these fields.
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
<variablelist>
<varlistentry>
<term>#GtkHBox</term>
<listitem><para>a derived class that organizes widgets into a row.</para></listitem>
</varlistentry>
<varlistentry>
<term>#GtkVBox</term>
<listitem><para>a derived class that organizes widgets into a column.</para></listitem>
</varlistentry>
<varlistentry>
<term>#GtkFrame</term>
<listitem><para>a #GtkWidget useful for drawing a border around a GtkBox.</para></listitem>
</varlistentry>
<varlistentry>
<term>#GtkTable</term>
<listitem><para>a #GtkContainer for organizing widgets into a grid,
rather than independent rows or columns.</para></listitem>
</varlistentry>
<varlistentry>
<term>#GtkLayout</term>
<listitem><para>a #GtkContainer for organizing widgets into arbitrary
layouts.</para></listitem>
</varlistentry>
</variablelist>
<para>
<variablelist>
<varlistentry>
<term>#GtkHBox</term>
<listitem><para>a derived class that organizes widgets into a row.</para></listitem>
</varlistentry>
<varlistentry>
<term>#GtkVBox</term>
<listitem><para>a derived class that organizes widgets into a column.</para></listitem>
</varlistentry>
<varlistentry>
<term>#GtkFrame</term>
<listitem><para>a #GtkWidget useful for drawing a border around a GtkBox.</para></listitem>
</varlistentry>
<varlistentry>
<term>#GtkTable</term>
<listitem><para>a #GtkContainer for organizing widgets into a grid,
rather than independent rows or columns.</para></listitem>
</varlistentry>
<varlistentry>
<term>#GtkLayout</term>
<listitem><para>a #GtkContainer for organizing widgets into arbitrary
layouts.</para></listitem>
</varlistentry>
</variablelist>
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### STRUCT GtkBox ##### -->
<para>
The #GtkBox-struct describes an instance of GtkBox and contains the following fields.
(These fields should be considered read-only. They should never be set by
an application.)
<informaltable pgwide="1" frame="none" role="struct">
<tgroup cols="2"><colspec colwidth="2*"/><colspec colwidth="8*"/>
<tbody>
<row>
<entry>#GList * <structfield>children</structfield>;</entry>
<entry>a list of children belonging the GtkBox. The data is a list of
structures of type #GtkBoxChild-struct.</entry>
</row>
<row>
<entry>#gint16 <structfield>spacing</structfield>;</entry>
<entry>the number of pixels to put between children of the GtkBox, zero
by default. Use gtk_box_set_spacing() to set this field.</entry>
</row>
<row>
<entry>#guint <structfield>homogeneous</structfield>;</entry>
<entry>a flag that if %TRUE forces all children to get equal space in
the GtkBox; %FALSE by default. Use gtk_box_set_homogeneous() to set this
field.</entry>
</row>
</tbody></tgroup></informaltable>
<para>
The #GtkBox-struct describes an instance of GtkBox and contains the
following fields. (These fields should be considered read-only.
They should never be set by an application.)
</para>
@children:
@spacing:
@homogeneous:
@children: a list of children belonging the GtkBox.
The data is a list of structures of type #GtkBoxChild-struct.
@spacing: the number of pixels to put between children of the GtkBox,
zero by default. Use gtk_box_set_spacing() to set this field.
@homogeneous: a flag that if %TRUE forces all children to get equal
space in the GtkBox; %FALSE by default. Use gtk_box_set_homogeneous()
to set this field.
<!-- ##### ARG GtkBox:homogeneous ##### -->
<para>
@@ -174,145 +152,76 @@ field.</entry>
</para>
<!-- ##### STRUCT GtkBoxChild ##### -->
<para>
The #GtkBoxChild-struct holds a child widget of GtkBox and describes
how the child is to be packed into the GtkBox. Use
gtk_box_query_child_packing() and gtk_box_set_child_packing() to query
and reset the <structfield>padding</structfield>,
<structfield>expand</structfield>, <structfield>fill</structfield>,
and <structfield>pack</structfield> fields.
</para>
<para>
#GtkBoxChild-struct contains the following fields. (These fields
should be considered read-only. They should never be directly set by an
application.)
<informaltable pgwide="1" frame="none" role="struct">
<tgroup cols="2"><colspec colwidth="2*"/><colspec colwidth="8*"/>
<tbody>
<row>
<entry>#GtkWidget * <structfield>widget</structfield>;</entry>
<entry>the child widget, packed into the GtkBox.</entry>
</row>
<row>
<entry>#guint16 <structfield>padding</structfield>;</entry>
<entry>the number of extra pixels to put between this child and its
neighbors, set when packed, zero by default.</entry>
</row>
<row>
<entry>#guint <structfield>expand</structfield>;</entry>
<entry>flag indicates whether extra space should be given to this
child. Any extra space given to the parent GtkBox is divided up among
all children with this attribute set to %TRUE; set when packed, %TRUE by
default.</entry>
</row>
<row>
<entry>#guint <structfield>fill</structfield>;</entry>
<entry>flag indicates whether any extra space given to this child due to its
<structfield>expand</structfield> attribute being set is actually
allocated to the child, rather than being used as padding
around the widget; set when packed, %TRUE by default.</entry>
</row>
<row>
<entry>#guint <structfield>pack</structfield>;</entry> <entry>one of
#GtkPackType indicating whether the child is packed with reference to
the start (top/left) or end (bottom/right) of the GtkBox.</entry>
</row>
</tbody></tgroup></informaltable>
<para>
The #GtkBoxChild-struct holds a child widget of GtkBox and describes
how the child is to be packed into the GtkBox. Use
gtk_box_query_child_packing() and gtk_box_set_child_packing() to query
and reset the <structfield>padding</structfield>,
<structfield>expand</structfield>, <structfield>fill</structfield>,
and <structfield>pack</structfield> fields.
</para>
<para>
#GtkBoxChild-struct contains the following fields. (These fields
should be considered read-only. They should never be directly set by an
application.)
</para>
@widget:
@padding:
@expand:
@fill:
@pack:
@widget: the child widget, packed into the GtkBox.
@padding: the number of extra pixels to put between this child and its
neighbors, set when packed, zero by default.
@expand: flag indicates whether extra space should be given to this
child. Any extra space given to the parent GtkBox is divided up
among all children with this attribute set to %TRUE; set when packed,
%TRUE by default.
@fill: flag indicates whether any extra space given to this child due
to its @expand attribute being set is actually allocated to the child,
rather than being used as padding around the widget; set when packed,
%TRUE by default.
@pack: one of #GtkPackType indicating whether the child is packed with
reference to the start (top/left) or end (bottom/right) of the GtkBox.
@is_secondary:
<!-- ##### FUNCTION gtk_box_pack_start ##### -->
<para>
Adds @child to @box, packed with reference to the start of @box. The
@child is packed after any other child packed with reference to the
start of @box.
<para>
</para>
@box: a #GtkBox.
@child: the #GtkWidget to be added to @box.
@expand: %TRUE if the new child is to be given extra space allocated to
@box. The extra space will be divided evenly between all children of
@box that use this option.
@fill: %TRUE if space given to @child by the @expand option is
actually allocated to @child, rather than just padding it. This
parameter has no effect if @expand is set to %FALSE. A child is
always allocated the full height of a #GtkHBox and the full width of a
#GtkVBox. This option affects the other dimension.
@padding: extra space in pixels to put between this child and its
neighbors, over and above the global amount specified by
<structfield>spacing</structfield> in #GtkBox-struct. If @child is a
widget at one of the reference ends of @box, then @padding pixels are also put
between @child and the reference edge of @box.
@box:
@child:
@expand:
@box
@fill:
@padding:
<!-- ##### FUNCTION gtk_box_pack_end ##### -->
<para>
Adds @child to @box, packed with reference to the end of @box. The
@child is packed after (away from end of) any other child packed with reference to the
end of @box.
<para>
</para>
@box: a #GtkBox.
@child: the #GtkWidget to be added to @box.
@expand: %TRUE if the new child is to be given extra space allocated to
@box. The extra space will be divided evenly between all children of
@box that use this option.
@fill: %TRUE if space given to @child by the @expand option is
actually allocated to @child, rather than just padding it. This
parameter has no effect if @expand is set to %FALSE. A child is
always allocated the full height of a #GtkHBox and the full width of a
#GtkVBox. This option affects the other dimension.
@padding: extra space in pixels to put between this child and its
neighbors, over and above the global amount specified by
<structfield>spacing</structfield> in #GtkBox-struct. If @child is a
widget at one of the reference ends of @box, then @padding pixels are also put
between @child and the reference edge of @box.
@box:
@child:
@expand:
@fill:
@padding:
<!-- ##### FUNCTION gtk_box_pack_start_defaults ##### -->
<para>
Adds @widget to @box, packed with reference to the start of @box. The
child is packed after any other child packed with reference to the
start of @box.
</para>
<para>
Parameters for how to pack the child @widget,
<structfield>expand</structfield>, <structfield>fill</structfield>,
and <structfield>padding</structfield> in #GtkBoxChild-struct, are given their default
values, %TRUE, %TRUE, and 0, respectively.
<para>
</para>
@box: a #GtkBox.
@widget: the #GtkWidget to be added to @box.
@box:
@widget:
<!-- ##### FUNCTION gtk_box_pack_end_defaults ##### -->
<para>
Adds @widget to @box, packed with reference to the end of @box. The
child is packed after (away from end of) any other child packed with
reference to the end of @box.
</para>
<para>
Parameters for how to pack the child @widget,
<structfield>expand</structfield>, <structfield>fill</structfield>,
and <structfield>padding</structfield> in #GtkBoxChild-struct, are given their default
values, %TRUE, %TRUE, and 0, respectively.
<para>
</para>
@box: a #GtkBox.
@widget: the #GtkWidget to be added to @box.
@box:
@widget:
<!-- ##### FUNCTION gtk_box_get_homogeneous ##### -->
@@ -325,15 +234,12 @@ values, %TRUE, %TRUE, and 0, respectively.
<!-- ##### FUNCTION gtk_box_set_homogeneous ##### -->
<para>
Sets the <structfield>homogeneous</structfield> field of
#GtkBox-struct, controlling whether or not all children of @box are
given equal space in the box.
<para>
</para>
@box: a #GtkBox.
@homogeneous: a boolean value, %TRUE to create equal allotments,
%FALSE for variable allotments.
@box:
@homogeneous:
<!-- ##### FUNCTION gtk_box_get_spacing ##### -->
@@ -346,68 +252,47 @@ given equal space in the box.
<!-- ##### FUNCTION gtk_box_set_spacing ##### -->
<para>
Sets the <structfield>spacing</structfield> field of #GtkBox-struct,
which is the number of pixels to place between children of @box.
<para>
</para>
@box: a #GtkBox.
@spacing: the number of pixels to put between children.
@box:
@spacing:
<!-- ##### FUNCTION gtk_box_reorder_child ##### -->
<para>
Moves @child to a new @position in the list of @box children. The
list is the <structfield>children</structfield> field of
#GtkBox-struct, and contains both widgets packed #GTK_PACK_START as
well as widgets packed #GTK_PACK_END, in the order that these widgets
were added to @box.
</para>
<para>
A widget's position in the @box children list determines where the
widget is packed into @box. A child widget at some position in the
list will be packed just after all other widgets of the same packing
type that appear earlier in the list.
<para>
</para>
@box: a #GtkBox.
@child: the #GtkWidget to move.
@position: the new position for @child in the
<structfield>children</structfield> list of #GtkBox-struct, starting
from 0. If negative, indicates the end of the list.
@box:
@child:
@position:
<!-- ##### FUNCTION gtk_box_query_child_packing ##### -->
<para>
Returns information about how @child is packed into @box.
<para>
</para>
@box: a #GtkBox.
@child: the #GtkWidget of the child to query.
@expand: the returned value of the <structfield>expand</structfield>
field in #GtkBoxChild-struct.
@fill: the returned value of the <structfield>fill</structfield> field
in #GtkBoxChild-struct.
@padding: the returned value of the <structfield>padding</structfield>
field in #GtkBoxChild-struct.
@pack_type: the returned value of the <structfield>pack</structfield>
field in #GtkBoxChild-struct.
@box:
@child:
@expand:
@fill:
@padding:
@pack_type:
<!-- ##### FUNCTION gtk_box_set_child_packing ##### -->
<para>
Sets the way @child is packed into @box.
<para>
</para>
@box: a #GtkBox.
@child: the #GtkWidget of the child to set.
@expand: the new value of the <structfield>expand</structfield> field
in #GtkBoxChild-struct.
@fill: the new value of the <structfield>fill</structfield> field in
#GtkBoxChild-struct.
@padding: the new value of the <structfield>padding</structfield>
field in #GtkBoxChild-struct.
@pack_type: the new value of the <structfield>pack</structfield> field
in #GtkBoxChild-struct.
@box:
@child:
@expand:
@fill:
@padding:
@pack_type:

View File

@@ -0,0 +1,151 @@
<!-- ##### SECTION Title ##### -->
GtkBuildable
<!-- ##### SECTION Short_Description ##### -->
SHORT
<!-- ##### SECTION Long_Description ##### -->
<para>
LONG
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
SEE ALSO
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### STRUCT GtkBuildable ##### -->
<para>
</para>
<!-- ##### STRUCT GtkBuildableIface ##### -->
<para>
</para>
@g_iface:
@set_name:
@get_name:
@add:
@set_property:
@construct_child:
@custom_tag_start:
@custom_tag_end:
@custom_finished:
@parser_finished:
@get_internal_child:
<!-- ##### FUNCTION gtk_buildable_set_name ##### -->
<para>
</para>
@buildable:
@name:
<!-- ##### FUNCTION gtk_buildable_get_name ##### -->
<para>
</para>
@buildable:
@Returns:
<!-- ##### FUNCTION gtk_buildable_add ##### -->
<para>
</para>
@buildable:
@builder:
@child:
@type:
<!-- ##### FUNCTION gtk_buildable_set_property ##### -->
<para>
</para>
@buildable:
@builder:
@name:
@value:
<!-- ##### FUNCTION gtk_buildable_construct_child ##### -->
<para>
</para>
@buildable:
@builder:
@name:
@Returns:
<!-- ##### FUNCTION gtk_buildable_custom_tag_start ##### -->
<para>
</para>
@buildable:
@builder:
@child:
@tagname:
@parser:
@data:
@Returns:
<!-- ##### FUNCTION gtk_buildable_custom_tag_end ##### -->
<para>
</para>
@buildable:
@builder:
@child:
@tagname:
@data:
<!-- ##### FUNCTION gtk_buildable_custom_finished ##### -->
<para>
</para>
@buildable:
@builder:
@child:
@tagname:
@data:
<!-- ##### FUNCTION gtk_buildable_parser_finished ##### -->
<para>
</para>
@buildable:
@builder:
<!-- ##### FUNCTION gtk_buildable_get_internal_child ##### -->
<para>
</para>
@buildable:
@builder:
@childname:
@Returns:

View File

@@ -0,0 +1,188 @@
<!-- ##### SECTION Title ##### -->
GtkBuilder
<!-- ##### SECTION Short_Description ##### -->
Build an interface from a UI definition description.
<!-- ##### SECTION Long_Description ##### -->
<para>
This object represents an `instantiation' of an UI definition description.
When one of these objects is created, the XML file is read, and the
interface is created. The GtkBuilder object then provides an interface
for accessing the widgets in the interface by the names assigned to
them inside the UI description.
The GtkBuilder object can also be used to connect handlers to the named
signals in the description. GtkBuilder also provides an interface by
which it can look up the signal handler names in the program's symbol
table and automatically connect as many handlers up as it can that way.
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
SEE ALSO
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### STRUCT GtkBuilder ##### -->
<para>
</para>
<!-- ##### ARG GtkBuilder:translation-domain ##### -->
<para>
</para>
<!-- ##### USER_FUNCTION GtkBuilderConnectFunc ##### -->
<para>
</para>
@builder:
@object:
@signal_name:
@handler_name:
@connect_object:
@flags:
@user_data:
<!-- ##### FUNCTION gtk_builder_new ##### -->
<para>
</para>
@Returns:
<!-- ##### FUNCTION gtk_builder_add_from_file ##### -->
<para>
</para>
@builder:
@filename:
@error:
@Returns:
<!-- ##### FUNCTION gtk_builder_add_from_string ##### -->
<para>
</para>
@builder:
@buffer:
@length:
@error:
@Returns:
<!-- ##### FUNCTION gtk_builder_get_object ##### -->
<para>
</para>
@builder:
@name:
@Returns:
<!-- ##### FUNCTION gtk_builder_get_objects ##### -->
<para>
</para>
@builder:
@Returns:
<!-- ##### FUNCTION gtk_builder_connect_signals ##### -->
<para>
</para>
@builder:
@user_data:
<!-- ##### FUNCTION gtk_builder_connect_signals_full ##### -->
<para>
</para>
@builder:
@func:
@user_data:
<!-- ##### FUNCTION gtk_builder_set_translation_domain ##### -->
<para>
</para>
@builder:
@domain:
<!-- ##### FUNCTION gtk_builder_get_translation_domain ##### -->
<para>
</para>
@builder:
@Returns:
<!-- ##### FUNCTION gtk_builder_get_type_from_name ##### -->
<para>
</para>
@builder:
@typename:
@Returns:
<!-- ##### FUNCTION gtk_builder_value_from_string ##### -->
<para>
</para>
@pspec:
@string:
@value:
@Returns:
<!-- ##### FUNCTION gtk_builder_value_from_string_type ##### -->
<para>
</para>
@type:
@string:
@value:
@Returns:
<!-- ##### MACRO GTK_BUILDER_WARN_INVALID_CHILD_TYPE ##### -->
<para>
</para>
@object:
@type:
<!-- ##### MACRO GTK_BUILDER_ERROR ##### -->
<para>
</para>

View File

@@ -2,7 +2,7 @@
GtkCellRenderer
<!-- ##### SECTION Short_Description ##### -->
An object for rendering a single cell on a #GdkDrawable
An object for rendering a single cell on a GdkDrawable
<!-- ##### SECTION Long_Description ##### -->
<para>
@@ -61,7 +61,7 @@ probably has a selection colored background to render to.
@GTK_CELL_RENDERER_PRELIT: The mouse is hovering over the cell.
@GTK_CELL_RENDERER_INSENSITIVE: The cell is drawn in an insensitive manner
@GTK_CELL_RENDERER_SORTED: The cell is in a sorted row
@GTK_CELL_RENDERER_FOCUSED: The cell is in the focus row.
@GTK_CELL_RENDERER_FOCUSED: The cell is in the focus row.
<!-- ##### ENUM GtkCellRendererMode ##### -->
<para>

View File

@@ -28,6 +28,11 @@ The #GtkCellRendererProgress cell renderer was added in GTK+ 2.6.
</para>
<!-- ##### ARG GtkCellRendererProgress:orientation ##### -->
<para>
</para>
<!-- ##### ARG GtkCellRendererProgress:pulse ##### -->
<para>
@@ -38,6 +43,16 @@ The #GtkCellRendererProgress cell renderer was added in GTK+ 2.6.
</para>
<!-- ##### ARG GtkCellRendererProgress:text-xalign ##### -->
<para>
</para>
<!-- ##### ARG GtkCellRendererProgress:text-yalign ##### -->
<para>
</para>
<!-- ##### ARG GtkCellRendererProgress:value ##### -->
<para>

View File

@@ -212,8 +212,8 @@ The #GtkEntry-struct struct contains only private data.
</para>
@entry:
@text:
@entry:
@text:
<!-- ##### FUNCTION gtk_entry_append_text ##### -->
@@ -230,8 +230,8 @@ The #GtkEntry-struct struct contains only private data.
</para>
@entry:
@text:
@entry:
@text:
<!-- ##### FUNCTION gtk_entry_set_position ##### -->
@@ -258,7 +258,7 @@ The #GtkEntry-struct struct contains only private data.
</para>
@entry:
@start:
@start:
@end:
@@ -268,7 +268,7 @@ The #GtkEntry-struct struct contains only private data.
</para>
@entry:
@visible:
@visible:
<!-- ##### FUNCTION gtk_entry_set_invisible_char ##### -->

View File

@@ -84,7 +84,7 @@ contains. (See also: #GtkVButtonBox and #GtkHButtonBox).
(on the left for a HBox, or the top for a VBox).
@GTK_BUTTONBOX_END: Buttons are grouped towards the end of the box,
(on the right for a HBox, or the bottom for a VBox).
@GTK_BUTTONBOX_CENTER: Buttons are centered in the box. Since 2.12
@GTK_BUTTONBOX_CENTER: Buttons are centered in the box. Since 2.12
<!-- ##### ENUM GtkCornerType ##### -->
<para>

View File

@@ -0,0 +1,85 @@
<!-- ##### SECTION Title ##### -->
GtkExtendedLayout
<!-- ##### SECTION Short_Description ##### -->
<!-- ##### SECTION Long_Description ##### -->
<para>
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### STRUCT GtkExtendedLayout ##### -->
<para>
</para>
<!-- ##### STRUCT GtkExtendedLayoutIface ##### -->
<para>
</para>
@g_iface:
@get_features:
@get_height_for_width:
@get_width_for_height:
@get_natural_size:
@get_baselines:
<!-- ##### FUNCTION gtk_extended_layout_get_baselines ##### -->
<para>
</para>
@layout:
@baselines:
@Returns:
<!-- ##### FUNCTION gtk_extended_layout_get_features ##### -->
<para>
</para>
@layout:
@Returns:
<!-- ##### FUNCTION gtk_extended_layout_get_height_for_width ##### -->
<para>
</para>
@layout:
@width:
@Returns:
<!-- ##### FUNCTION gtk_extended_layout_get_natural_size ##### -->
<para>
</para>
@layout:
@requisition:
<!-- ##### FUNCTION gtk_extended_layout_get_width_for_height ##### -->
<para>
</para>
@layout:
@height:
@Returns:

View File

@@ -672,61 +672,6 @@ gtk_widget_destroy (chooser);
@filechooser: the object which received the signal.
<!-- ##### ARG GtkFileChooser:action ##### -->
<para>
</para>
<!-- ##### ARG GtkFileChooser:do-overwrite-confirmation ##### -->
<para>
</para>
<!-- ##### ARG GtkFileChooser:extra-widget ##### -->
<para>
</para>
<!-- ##### ARG GtkFileChooser:file-system-backend ##### -->
<para>
</para>
<!-- ##### ARG GtkFileChooser:filter ##### -->
<para>
</para>
<!-- ##### ARG GtkFileChooser:local-only ##### -->
<para>
</para>
<!-- ##### ARG GtkFileChooser:preview-widget ##### -->
<para>
</para>
<!-- ##### ARG GtkFileChooser:preview-widget-active ##### -->
<para>
</para>
<!-- ##### ARG GtkFileChooser:select-multiple ##### -->
<para>
</para>
<!-- ##### ARG GtkFileChooser:show-hidden ##### -->
<para>
</para>
<!-- ##### ARG GtkFileChooser:use-preview-label ##### -->
<para>
</para>
<!-- ##### ENUM GtkFileChooserAction ##### -->
<para>
Describes whether a #GtkFileChooser is being used to open

View File

@@ -2,7 +2,7 @@
GtkGammaCurve
<!-- ##### SECTION Short_Description ##### -->
a subclass of #GtkCurve for editing gamma curves.
A subclass of GtkCurve for editing gamma curves
<!-- ##### SECTION Long_Description ##### -->
<note>

View File

@@ -2,7 +2,7 @@
GtkHRuler
<!-- ##### SECTION Short_Description ##### -->
A horizontal ruler.
A horizontal ruler
<!-- ##### SECTION Long_Description ##### -->
<note>

View File

@@ -95,9 +95,11 @@ clicked.
</para>
@button: the #GtkLinkButton which was clicked
@link: the URI to which the clicked #GtkLinkButton points
@link_:
@user_data: user data that was passed when the function was registered
with gtk_link_button_set_uri_hook()
<!-- # Unused Parameters # -->
@link: the URI to which the clicked #GtkLinkButton points
<!-- ##### FUNCTION gtk_link_button_set_uri_hook ##### -->

View File

@@ -2,7 +2,7 @@
GtkListStore
<!-- ##### SECTION Short_Description ##### -->
A list-like data structure that can be used with the #GtkTreeView
A list-like data structure that can be used with the GtkTreeView
<!-- ##### SECTION Long_Description ##### -->
<para>
@@ -181,6 +181,18 @@ will cause the #GtkTreeModelFilterVisibleFunc to be visited with an empty row fi
@value:
<!-- ##### FUNCTION gtk_list_store_set_valuesv ##### -->
<para>
</para>
@list_store:
@iter:
@columns:
@values:
@n_values:
<!-- ##### FUNCTION gtk_list_store_remove ##### -->
<para>

View File

@@ -2,7 +2,7 @@
GtkMenuBar
<!-- ##### SECTION Short_Description ##### -->
A subclass widget for #GtkMenuShell which holds #GtkMenuItem widgets
A subclass widget for GtkMenuShell which holds GtkMenuItem widgets
<!-- ##### SECTION Long_Description ##### -->
<para>

View File

@@ -73,6 +73,11 @@ submenu. For normal applications, the relevant signal is "activate".
@menuitem: the object which received the signal.
@arg1:
<!-- ##### ARG GtkMenuItem:submenu ##### -->
<para>
</para>
<!-- ##### ARG GtkMenuItem:arrow-spacing ##### -->
<para>
@@ -130,11 +135,11 @@ Creates a new #GtkMenuItem whose child is a #GtkLabel.
<!-- ##### FUNCTION gtk_menu_item_set_submenu ##### -->
<para>
Sets the widget submenu, or changes it.
</para>
@menu_item: the menu item widget
@submenu: the submenu
@menu_item:
@submenu:
<!-- ##### FUNCTION gtk_menu_item_set_accel_path ##### -->
@@ -148,10 +153,10 @@ Sets the widget submenu, or changes it.
<!-- ##### FUNCTION gtk_menu_item_remove_submenu ##### -->
<para>
Removes the widget's submenu.
</para>
@menu_item: the menu item widget
@menu_item:
<!-- ##### FUNCTION gtk_menu_item_select ##### -->

View File

@@ -85,6 +85,15 @@ specified by @direction.
@menushell: the object which received the signal.
@direction: the direction to move.
<!-- ##### SIGNAL GtkMenuShell::move-selected ##### -->
<para>
</para>
@menushell: the object which received the signal.
@arg1:
@Returns:
<!-- ##### SIGNAL GtkMenuShell::selection-done ##### -->
<para>
This signal is emitted when a selection has been completed within a menu

View File

@@ -48,6 +48,17 @@ will be a popup menu allowing the users to switch pages.
@arg1:
@Returns:
<!-- ##### SIGNAL GtkNotebook::create-window ##### -->
<para>
</para>
@notebook: the object which received the signal.
@widget:
@arg1:
@arg2:
@Returns:
<!-- ##### SIGNAL GtkNotebook::focus-tab ##### -->
<para>

View File

@@ -159,7 +159,7 @@ Printing support was added in GTK+ 2.10.
<!-- ##### ENUM GtkPrintCapabilities ##### -->
<para>
An enum for specifying which features the print dialog should offer.
I neither %GTK_PRINT_CAPABILITY_GENERATE_PDF nor %GTK_PRINT_CAPABILITY_GENERATE_PS is
If neither %GTK_PRINT_CAPABILITY_GENERATE_PDF nor %GTK_PRINT_CAPABILITY_GENERATE_PS is
specified, GTK+ assumes that all formats are supported.
</para>
@@ -171,6 +171,7 @@ specified, GTK+ assumes that all formats are supported.
@GTK_PRINT_CAPABILITY_GENERATE_PDF: The program will send the document to the printer in PDF format
@GTK_PRINT_CAPABILITY_GENERATE_PS: The program will send the document to the printer in Postscript format
@GTK_PRINT_CAPABILITY_PREVIEW:
@GTK_PRINT_CAPABILITY_NUMBER_UP: Print dialog will offer printing multiple pages per sheet. Since 2.12
<!-- ##### FUNCTION gtk_print_unix_dialog_set_manual_capabilities ##### -->
<para>

View File

@@ -952,13 +952,23 @@ Parses resource information directly from a string.
<!-- ##### FUNCTION gtk_rc_parse_color ##### -->
<para>
Parses a color in the <link linkend="color-format">format</link> expected in a RC file.
</para>
@scanner: a #GtkScanner
@color: a pointer to a #GtkColor structure in which to store the result
@Returns: %G_TOKEN_NONE if parsing succeeded, otherwise the token
that was expected but not found.
@scanner:
@color:
@Returns:
<!-- ##### FUNCTION gtk_rc_parse_color_full ##### -->
<para>
</para>
@scanner:
@style:
@color:
@Returns:
<!-- ##### FUNCTION gtk_rc_parse_state ##### -->

View File

@@ -2,7 +2,7 @@
GtkRecentChooser
<!-- ##### SECTION Short_Description ##### -->
Interface implemented by GtkRecentChooserWidget, GtkRecentChooserMenu and GtkRecentChooserDialog
Interface implemented by widgets displaying recently used files
<!-- ##### SECTION Long_Description ##### -->
<para>

View File

@@ -110,23 +110,16 @@ recently used files list.
<!-- ##### STRUCT GtkRecentData ##### -->
<para>
Meta-data passed to gtk_recent_manager_add_full(). You should
use #GtkRecentData if you want to control the meta-data associated
to an entry of the recently used files list when you are adding
a new file to it.
</para>
@display_name: the string to be used when displaying the file
inside a #GtkRecentChooser
@description: a user readable description of the file
@mime_type: the mime type of the file
@app_name: the name of the application that is registering
the file
@app_exec: the command line that should be used when launching
the file
@groups: the list of group names to which the file belongs to
@is_private: whether the file should be displayed only by
the applications that have registered it
@display_name:
@description:
@mime_type:
@app_name:
@app_exec:
@groups:
@is_private:
<!-- ##### MACRO GTK_RECENT_MANAGER_ERROR ##### -->
<para>

View File

@@ -2,20 +2,18 @@
GtkScaleButton
<!-- ##### SECTION Short_Description ##### -->
A button which pops up a scale
<!-- ##### SECTION Long_Description ##### -->
<para>
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### SECTION Stability_Level ##### -->
@@ -52,6 +50,11 @@ GtkScaleButton
</para>
<!-- ##### ARG GtkScaleButton:icons ##### -->
<para>
</para>
<!-- ##### ARG GtkScaleButton:size ##### -->
<para>

View File

@@ -2,7 +2,7 @@
GtkSeparator
<!-- ##### SECTION Short_Description ##### -->
Base class for #GtkHSeparator and #GtkVSeparator
Base class for GtkHSeparator and GtkVSeparator
<!-- ##### SECTION Long_Description ##### -->
<para>

View File

@@ -275,6 +275,14 @@ The "Directory" icon.
@Since: 2.6
<!-- ##### MACRO GTK_STOCK_DISCARD ##### -->
<para>
The "Discard" item.
</para>
@Since: 2.12
<!-- ##### MACRO GTK_STOCK_DISCONNECT ##### -->
<para>
The "Disconnect" icon.

View File

@@ -2,9 +2,7 @@
GtkTextBuffer
<!-- ##### SECTION Short_Description ##### -->
Stores attributed text for display in a <link
linkend="GtkTextView">GtkTextView</link>
Stores attributed text for display in a GtkTextView
<!-- ##### SECTION Long_Description ##### -->
@@ -426,6 +424,16 @@ types related to the text widget and how they work together.
@where:
<!-- ##### FUNCTION gtk_text_buffer_add_mark ##### -->
<para>
</para>
@buffer:
@mark:
@where:
<!-- ##### FUNCTION gtk_text_buffer_delete_mark ##### -->
<para>

View File

@@ -62,6 +62,26 @@ Marks are typically created using the gtk_text_buffer_create_mark() function.
</para>
<!-- ##### ARG GtkTextMark:left-gravity ##### -->
<para>
</para>
<!-- ##### ARG GtkTextMark:name ##### -->
<para>
</para>
<!-- ##### FUNCTION gtk_text_mark_new ##### -->
<para>
</para>
@name:
@left_gravity:
@Returns:
<!-- ##### FUNCTION gtk_text_mark_set_visible ##### -->
<para>

View File

@@ -2,8 +2,7 @@
GtkTextTag
<!-- ##### SECTION Short_Description ##### -->
A tag that can be applied to text in a <link linkend="GtkTextBuffer">GtkTextBuffer</link>
A tag that can be applied to text in a GtkTextBuffer
<!-- ##### SECTION Long_Description ##### -->
<para>

View File

@@ -2,7 +2,7 @@
GtkTextView
<!-- ##### SECTION Short_Description ##### -->
Widget that displays a <link linkend="GtkTextBuffer">GtkTextBuffer</link>
Widget that displays a GtkTextBuffer
<!-- ##### SECTION Long_Description ##### -->
<para>
@@ -77,14 +77,6 @@ types related to the text widget and how they work together.
@arg2:
@arg3:
<!-- ##### SIGNAL GtkTextView::move-focus ##### -->
<para>
</para>
@textview: the object which received the signal.
@arg1:
<!-- ##### SIGNAL GtkTextView::move-viewport ##### -->
<para>

View File

@@ -63,15 +63,6 @@ accessed through the function described below.
@arg1:
@Returns:
<!-- ##### SIGNAL GtkToolbar::move-focus ##### -->
<para>
</para>
@toolbar: the object which received the signal.
@arg1:
@Returns:
<!-- ##### SIGNAL GtkToolbar::orientation-changed ##### -->
<para>

View File

@@ -9,16 +9,20 @@ GtkTooltip
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### STRUCT GtkTooltip ##### -->
<para>
</para>
<!-- ##### FUNCTION gtk_tooltip_set_markup ##### -->
<para>
@@ -28,6 +32,15 @@ GtkTooltip
@markup:
<!-- ##### FUNCTION gtk_tooltip_set_text ##### -->
<para>
</para>
@tooltip:
@text:
<!-- ##### FUNCTION gtk_tooltip_set_icon ##### -->
<para>

View File

@@ -2,7 +2,7 @@
GtkTreeModel
<!-- ##### SECTION Short_Description ##### -->
The tree interface used by #GtkTreeView
The tree interface used by GtkTreeView
<!-- ##### SECTION Long_Description ##### -->
<para>

View File

@@ -2,7 +2,7 @@
GtkTreeSelection
<!-- ##### SECTION Short_Description ##### -->
The selection object for #GtkTreeView
The selection object for GtkTreeView
<!-- ##### SECTION Long_Description ##### -->
<para>

View File

@@ -2,7 +2,7 @@
GtkTreeStore
<!-- ##### SECTION Short_Description ##### -->
A tree-like data structure that can be used with the #GtkTreeView
A tree-like data structure that can be used with the GtkTreeView
<!-- ##### SECTION Long_Description ##### -->
<para>
@@ -90,6 +90,18 @@ drop</link> interfaces.
@var_args:
<!-- ##### FUNCTION gtk_tree_store_set_valuesv ##### -->
<para>
</para>
@tree_store:
@iter:
@columns:
@values:
@n_values:
<!-- ##### FUNCTION gtk_tree_store_remove ##### -->
<para>

View File

@@ -11,9 +11,35 @@ linkend="GtkTreeModel">GtkTreeModel</link> interface.
</para>
<para>
Please refer to the <link linkend="TreeWidget">tree widget conceptual overview</link>
for an overview of all the objects and data types related to the tree widget and how
they work together.
Please refer to the <link linkend="TreeWidget">tree widget conceptual
overview</link> for an overview of all the objects and data types related
to the tree widget and how they work together.
</para>
<para>
Several different coordinate systems are exposed in the GtkTreeView API.
These are:
<inlinegraphic fileref="tree-view-coordinates.png" format="PNG"></inlinegraphic>
<simplelist>
<member>Widget coordinates -- coordinates relative to the widget
(usually <literal>widget-&gt;window</literal>.</member>
<member>Bin window coordinates -- coordinates relative to the window
that GtkTreeView renders to.</member>
<member>Tree coordinates -- coordinates relative to the entire scrollable
area of GtkTreeView. These coordinates start at (0, 0) for row 0 of the
tree.</member>
</simplelist>
</para>
<para>
Several functions are available for converting between the different
coordinate systems. The most common translations are between widget and bin
window coordinates and between bin window and tree coordinates. For the
former you can use gtk_tree_view_convert_widget_to_bin_window_coords()
(and vice versa), for the latter gtk_tree_view_convert_bin_window_to_tree_coords()
(and vice versa).
</para>
<!-- ##### SECTION See_Also ##### -->
@@ -35,21 +61,21 @@ they work together.
</para>
@treeview: the object which received the signal.
@tree_view: the object which received the signal.
<!-- ##### SIGNAL GtkTreeView::cursor-changed ##### -->
<para>
</para>
@treeview: the object which received the signal.
@tree_view: the object which received the signal.
<!-- ##### SIGNAL GtkTreeView::expand-collapse-cursor-row ##### -->
<para>
</para>
@treeview: the object which received the signal.
@tree_view: the object which received the signal.
@arg1:
@arg2:
@arg3:
@@ -60,7 +86,7 @@ they work together.
</para>
@treeview: the object which received the signal.
@tree_view: the object which received the signal.
@arg1:
@arg2:
@Returns:
@@ -70,7 +96,7 @@ they work together.
</para>
@treeview: the object which received the signal.
@tree_view: the object which received the signal.
@arg1:
@arg2:
@@ -79,7 +105,7 @@ they work together.
</para>
@treeview: the object which received the signal.
@tree_view: the object which received the signal.
@arg1:
@arg2:
@@ -88,7 +114,7 @@ they work together.
</para>
@treeview: the object which received the signal.
@tree_view: the object which received the signal.
@arg1:
@arg2:
@@ -97,7 +123,7 @@ they work together.
</para>
@treeview: the object which received the signal.
@tree_view: the object which received the signal.
@Returns:
<!-- ##### SIGNAL GtkTreeView::select-cursor-parent ##### -->
@@ -105,7 +131,7 @@ they work together.
</para>
@treeview: the object which received the signal.
@tree_view: the object which received the signal.
@Returns:
<!-- ##### SIGNAL GtkTreeView::select-cursor-row ##### -->
@@ -113,7 +139,7 @@ they work together.
</para>
@treeview: the object which received the signal.
@tree_view: the object which received the signal.
@arg1:
@Returns:
@@ -122,7 +148,7 @@ they work together.
</para>
@treeview: the object which received the signal.
@tree_view: the object which received the signal.
@arg1:
@arg2:
@@ -131,7 +157,7 @@ they work together.
</para>
@treeview: the object which received the signal.
@tree_view: the object which received the signal.
@Returns:
<!-- ##### SIGNAL GtkTreeView::test-collapse-row ##### -->
@@ -139,7 +165,7 @@ they work together.
</para>
@treeview: the object which received the signal.
@tree_view: the object which received the signal.
@arg1:
@arg2:
@Returns:
@@ -149,7 +175,7 @@ they work together.
</para>
@treeview: the object which received the signal.
@tree_view: the object which received the signal.
@arg1:
@arg2:
@Returns:
@@ -159,7 +185,7 @@ they work together.
</para>
@treeview: the object which received the signal.
@tree_view: the object which received the signal.
@Returns:
<!-- ##### SIGNAL GtkTreeView::unselect-all ##### -->
@@ -167,7 +193,7 @@ they work together.
</para>
@treeview: the object which received the signal.
@tree_view: the object which received the signal.
@Returns:
<!-- ##### ARG GtkTreeView:enable-grid-lines ##### -->
@@ -919,6 +945,78 @@ has some similarity to strcmp() returning 0 for equal strings.
@wy:
<!-- ##### FUNCTION gtk_tree_view_convert_bin_window_to_tree_coords ##### -->
<para>
</para>
@tree_view:
@bx:
@by:
@tx:
@ty:
<!-- ##### FUNCTION gtk_tree_view_convert_bin_window_to_widget_coords ##### -->
<para>
</para>
@tree_view:
@bx:
@by:
@wx:
@wy:
<!-- ##### FUNCTION gtk_tree_view_convert_tree_to_bin_window_coords ##### -->
<para>
</para>
@tree_view:
@tx:
@ty:
@bx:
@by:
<!-- ##### FUNCTION gtk_tree_view_convert_tree_to_widget_coords ##### -->
<para>
</para>
@tree_view:
@tx:
@ty:
@wx:
@wy:
<!-- ##### FUNCTION gtk_tree_view_convert_widget_to_bin_window_coords ##### -->
<para>
</para>
@tree_view:
@wx:
@wy:
@bx:
@by:
<!-- ##### FUNCTION gtk_tree_view_convert_widget_to_tree_coords ##### -->
<para>
</para>
@tree_view:
@wx:
@wy:
@tx:
@ty:
<!-- ##### FUNCTION gtk_tree_view_enable_model_drag_dest ##### -->
<para>

View File

@@ -2,7 +2,7 @@
GtkTreeViewColumn
<!-- ##### SECTION Short_Description ##### -->
A visible column in a #GtkTreeView widget
A visible column in a GtkTreeView widget
<!-- ##### SECTION Long_Description ##### -->
<para>
@@ -613,3 +613,12 @@ calling gtk_tree_view_column_set_cell_data_func()
@tree_column:
<!-- ##### FUNCTION gtk_tree_view_column_get_tree_view ##### -->
<para>
</para>
@tree_column:
@Returns:

View File

@@ -2,20 +2,18 @@
GtkVolumeButton
<!-- ##### SECTION Short_Description ##### -->
A button which pops up a volume control
<!-- ##### SECTION Long_Description ##### -->
<para>
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### SECTION Stability_Level ##### -->

View File

@@ -2,7 +2,7 @@
GtkVRuler
<!-- ##### SECTION Short_Description ##### -->
A vertical ruler.
A vertical ruler
<!-- ##### SECTION Long_Description ##### -->
<note>

View File

@@ -2,37 +2,35 @@
GtkVScrollbar
<!-- ##### SECTION Short_Description ##### -->
A vertical scrollbar
<!-- ##### SECTION Long_Description ##### -->
<para>
The #GtkVScrollbar widget is a widget arranged vertically creating a scrollbar.
See #GtkScrollbar for details on scrollbars. #GtkAdjustment pointers may be
added to handle the adjustment of the scrollbar or it may be left %NULL in which
case one will be created for you. See #GtkAdjustment for details.
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
#GtkScrollbar, #GtkScrolledWindow
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### STRUCT GtkVScrollbar ##### -->
<para>
The #GtkVScrollbar struct contains private data and should be accessed
using the functions below.
</para>
<!-- ##### FUNCTION gtk_vscrollbar_new ##### -->
<para>
Creates a new vertical scrollbar.
</para>
@adjustment: the #GtkAdjustment to use, or %NULL to create a new adjustment.
@Returns: the new #GtkVScrollbar
@adjustment:
@Returns:

View File

@@ -323,15 +323,11 @@ gtk_widget_style_get_valist() to obtain the value of a style property.
<!-- ##### SIGNAL GtkWidget::hierarchy-changed ##### -->
<para>
Emitted when there is a change in the hierarchy to
which a widget belongs. More precisely, a widget is
<firstterm>anchored</firstterm> when its toplevel
ancestor is a #GtkWindow. This signal is emitted when
a widget changes from un-anchored to anchored or vice-versa.
</para>
@widget: the object which received the signal.
@widget2: the toplevel ancestor, or %NULL
@widget:
@widget2:
<!-- ##### SIGNAL GtkWidget::key-press-event ##### -->
<para>
@@ -403,6 +399,14 @@ a widget changes from un-anchored to anchored or vice-versa.
@event:
@Returns: %TRUE to stop other handlers from being invoked for the event. %FALSE to propagate the event further.
<!-- ##### SIGNAL GtkWidget::move-focus ##### -->
<para>
</para>
@widget: the object which received the signal.
@arg1:
<!-- ##### SIGNAL GtkWidget::no-expose-event ##### -->
<para>
@@ -716,6 +720,11 @@ a widget changes from un-anchored to anchored or vice-versa.
</para>
<!-- ##### ARG GtkWidget:tooltip-text ##### -->
<para>
</para>
<!-- ##### ARG GtkWidget:visible ##### -->
<para>
@@ -1971,6 +1980,16 @@ This function is not useful for applications.
@font_desc:
<!-- ##### FUNCTION gtk_widget_modify_cursor ##### -->
<para>
</para>
@widget:
@primary:
@secondary:
<!-- ##### FUNCTION gtk_widget_create_pango_context ##### -->
<para>
@@ -2470,6 +2489,68 @@ This function is deprecated; it does nothing.
@Returns:
<!-- ##### FUNCTION gtk_widget_get_tooltip_markup ##### -->
<para>
</para>
@widget:
@Returns:
<!-- ##### FUNCTION gtk_widget_set_tooltip_markup ##### -->
<para>
</para>
@widget:
@markup:
<!-- ##### FUNCTION gtk_widget_get_tooltip_text ##### -->
<para>
</para>
@widget:
@Returns:
<!-- ##### FUNCTION gtk_widget_set_tooltip_text ##### -->
<para>
</para>
@widget:
@text:
<!-- ##### FUNCTION gtk_widget_get_tooltip_window ##### -->
<para>
</para>
@widget:
@Returns:
<!-- ##### FUNCTION gtk_widget_set_tooltip_window ##### -->
<para>
</para>
@widget:
@custom_window:
<!-- ##### FUNCTION gtk_widget_trigger_tooltip_query ##### -->
<para>
</para>
@widget:
<!-- ##### FUNCTION gtk_requisition_copy ##### -->
<para>

View File

@@ -53,14 +53,6 @@ Toplevel which can contain other widgets
@window: the object which received the signal.
<!-- ##### SIGNAL GtkWindow::move-focus ##### -->
<para>
</para>
@window: the object which received the signal.
@arg1:
<!-- ##### SIGNAL GtkWindow::set-focus ##### -->
<para>
@@ -1167,40 +1159,21 @@ Deprecated alias for gtk_window_set_position().
@setting:
<!-- ##### FUNCTION gtk_decorated_window_init ##### -->
<!-- ##### FUNCTION gtk_window_get_opacity ##### -->
<para>
</para>
@window:
@Returns:
<!-- ##### FUNCTION gtk_decorated_window_calculate_frame_size ##### -->
<!-- ##### FUNCTION gtk_window_set_opacity ##### -->
<para>
</para>
@window:
<!-- ##### FUNCTION gtk_decorated_window_set_title ##### -->
<para>
</para>
@window:
@title:
<!-- ##### FUNCTION gtk_decorated_window_move_resize_window ##### -->
<para>
</para>
@window:
@x:
@y:
@width:
@height:
@opacity:

View File

@@ -7,8 +7,7 @@
<refnamediv>
<refname>Tree and List Widget Overview</refname>
<refpurpose>Overview of #GtkTreeModel, #GtkTreeView, and other
associated widgets</refpurpose>
<refpurpose>Overview of GtkTreeModel, GtkTreeView, and friends</refpurpose>
</refnamediv>
<refsect1>
@@ -195,7 +194,8 @@ gtk_tree_view_append_column (GTK_TREE_VIEW (tree), column);
<para>
Most applications will need to not only deal with displaying data, but
also receiving input events from users. To do this, simply get a
reference to a selection object and connect to the "changed" signal.
reference to a selection object and connect to the
#GtkTreeSelection::changed signal.
</para>
<informalexample><programlisting><![CDATA[
/* Prototype for selection handler callback */

View File

@@ -50,6 +50,9 @@
<link linkend="GtkPaned">
<inlinegraphic fileref="panes.png" format="PNG"></inlinegraphic>
</link>
<link linkend="GtkVolumeButton">
<inlinegraphic fileref="volumebutton.png" format="PNG"></inlinegraphic>
</link>
<link linkend="GtkPageSetupUnixDialog">
<inlinegraphic fileref="pagesetupdialog.png" format="PNG"></inlinegraphic>
</link>

View File

@@ -911,6 +911,19 @@ create_image (void)
return new_widget_info ("image", vbox, SMALL);
}
static WidgetInfo *
create_volume_button (void)
{
GtkWidget *button, *widget;
button = gtk_volume_button_new ();
gtk_scale_button_set_value (GTK_SCALE_BUTTON (button), 33);
/* Hack: get the private dock */
widget = GTK_SCALE_BUTTON (button)->plus_button->parent->parent->parent;
gtk_widget_show_all (widget);
return new_widget_info ("volumebutton", widget, ASIS);
}
static WidgetInfo *
create_assistant (void)
{
@@ -981,6 +994,7 @@ get_all_widgets (void)
retval = g_list_prepend (retval, create_recent_chooser_dialog ());
retval = g_list_prepend (retval, create_page_setup_dialog ());
retval = g_list_prepend (retval, create_print_dialog ());
retval = g_list_prepend (retval, create_volume_button ());
return retval;
}

View File

@@ -1,3 +1,30 @@
2007-06-15 Matthias Clasen <mclasen@redhat.com>
* === Released 2.11.3 ===
2007-06-15 Hans Breuer <hans@breuer.org>
* makefile.msc : updated
* io-jpeg.c : use g_snprintf
2007-06-12 Behdad Esfahbod <behdad@gnome.org>
* io-pnm.c (explode_bitmap_into_buf): Fix out-of-bound access.
(#440918, Matthias Kilian)
2007-06-06 Matthias Clasen <mclasen@redhat.com>
* === Released 2.11.2 ===
2007-06-04 Matthias Clasen <mclasen@redhat.com>
* === Released 2.11.1 ===
2007-05-30 Chris Wilson <chris@chris-wilson.co.uk>
* io-jpeg.c (gdk_pixbuf__jpeg_image_stop_load):
Supply the current GError for fatal_error_handler(). (#441443)
2007-05-24 Matthias Clasen <mclasen@redhat.com>
* === Released 2.11.0 ===

View File

@@ -514,7 +514,7 @@ gdk_pixbuf__jpeg_image_load (FILE *f, GError **error)
/* if orientation tag was found set an option to remember its value */
if (is_otag) {
snprintf (otag_str, sizeof (otag_str), "%d", is_otag);
g_snprintf (otag_str, sizeof (otag_str), "%d", is_otag);
gdk_pixbuf_set_option (pixbuf, "orientation", otag_str);
}
@@ -692,6 +692,7 @@ gdk_pixbuf__jpeg_image_stop_load (gpointer data, GError **error)
g_object_unref (context->pixbuf);
/* if we have an error? */
context->jerr.error = error;
if (sigsetjmp (context->jerr.setjmp_buffer, 1)) {
retval = FALSE;
} else {
@@ -922,7 +923,7 @@ gdk_pixbuf__jpeg_image_load_increment (gpointer data,
/* if orientation tag was found set an option to remember its value */
if (is_otag) {
snprintf (otag_str, sizeof (otag_str), "%d", is_otag);
g_snprintf (otag_str, sizeof (otag_str), "%d", is_otag);
gdk_pixbuf_set_option (context->pixbuf, "orientation", otag_str);
}

View File

@@ -133,7 +133,7 @@ explode_bitmap_into_buf (PnmLoaderContext *context)
to -= 3;
bit++;
if (bit > 7) {
if (bit > 7 && x > 0) {
from--;
data = from[0];
bit = 0;

View File

@@ -42,6 +42,7 @@ OBJECTS = \
gdk-pixbuf-io.obj \
gdk-pixbuf-loader.obj \
gdk-pixbuf-scale.obj \
gdk-pixbuf-scaled-anim.obj \
gdk-pixbuf-util.obj \
gdk-pixbuf.obj \
gdk-pixbuf-simple-anim.obj \
@@ -76,7 +77,7 @@ gdk-pixbuf-alias.h: gdk-pixbuf.symbols
gdk_pixbuf.def: gdk-pixbuf.symbols makefile.msc
echo EXPORTS > gdk_pixbuf.def
cl /EP -DINCLUDE_VARIABLES -DG_OS_WIN32 -DALL_FILES \
# -FI $(GLIB)\glib\gmacros.h \
-DG_GNUC_MALLOC= -DG_GNUC_CONST= -DG_GNUC_NULL_TERMINATED= -DG_GNUC_NORETURN= -DG_GNUC_PRINTF=;G_GNUC_PRINTF \
gdk-pixbuf.symbols >> gdk_pixbuf.def
gdk-pixbuf-aliasdef.c: gdk-pixbuf.symbols

View File

@@ -1,7 +1,7 @@
## Makefile.am for gtk+/gdk
SUBDIRS = $(gdktarget)
DIST_SUBDIRS = linux-fb win32 x11 quartz directfb
DIST_SUBDIRS = win32 x11 quartz directfb
EXTRA_DIST = \
keynames.txt \
@@ -11,6 +11,7 @@ EXTRA_DIST = \
gdkkeysyms-update.pl \
gdk.def \
gdkmarshalers.list \
gdkmedialib.h \
makeenums.pl \
makefile.msc \
gdk.symbols \
@@ -48,11 +49,8 @@ LDADD = \
if USE_MEDIALIB
medialib_sources = \
gdkmedialib.c
medialib_h_sources = \
gdkmedialib.h
else
medialib_sources =
medialib_h_sources =
endif
#
@@ -93,7 +91,6 @@ gdk_public_h_sources = \
gdk_headers = \
$(gdk_public_h_sources) \
$(medialib_h_sources) \
gdkenumtypes.h \
gdkprivate.h \
gdkalias.h
@@ -155,11 +152,6 @@ libgdk_x11_2_0_la_LIBADD = x11/libgdk-x11.la $(GDK_DEP_LIBS) \
$(top_builddir)/gdk-pixbuf/libgdk_pixbuf-$(GTK_API_VERSION).la
libgdk_x11_2_0_la_LDFLAGS = $(LDADD)
libgdk_linux_fb_2_0_la_SOURCES = $(common_sources) gdkkeynames.c
libgdk_linux_fb_2_0_la_LIBADD = linux-fb/libgdk-linux-fb.la $(GDK_DEP_LIBS) \
$(top_builddir)/gdk-pixbuf/libgdk_pixbuf-$(GTK_API_VERSION).la
libgdk_linux_fb_2_0_la_LDFLAGS = $(LDADD)
libgdk_quartz_2_0_la_SOURCES = $(common_sources) gdkkeynames.c
libgdk_quartz_2_0_la_LIBADD = quartz/libgdk-quartz.la $(GDK_DEP_LIBS) \
$(top_builddir)/gdk-pixbuf/libgdk_pixbuf-$(GTK_API_VERSION).la
@@ -213,7 +205,7 @@ endif
lib_LTLIBRARIES = $(gdktargetlib)
EXTRA_LTLIBRARIES = libgdk-x11-2.0.la libgdk-linux-fb-2.0.la libgdk-win32-2.0.la libgdk-quartz-2.0.la libgdk-directfb-2.0.la
EXTRA_LTLIBRARIES = libgdk-x11-2.0.la libgdk-win32-2.0.la libgdk-quartz-2.0.la libgdk-directfb-2.0.la
MAINTAINERCLEANFILES = gdkenumtypes.h stamp-gdkenumtypes.h gdkenumtypes.c \
gdkmarshalers.h gdkmarshalers.c

View File

@@ -511,6 +511,13 @@ gdk_notify_startup_complete_with_id (const gchar* startup_id)
{
}
gboolean
gdk_display_supports_composite (GdkDisplay *display)
{
return FALSE;
}
#define __GDK_DISPLAY_X11_C__
#include "gdkaliasdef.c"

View File

@@ -30,6 +30,8 @@
* Sven Neumann <sven@convergence.de>
*/
#undef GDK_DISABLE_DEPRECATED
#include <config.h>
#include "gdk.h"

View File

@@ -3038,6 +3038,14 @@ gdk_window_set_opacity (GdkWindow *window,
cardinal = opacity * 0xff;
gdk_directfb_window_set_opacity(window,cardinal);
}
void
_gdk_windowing_window_set_composited (GdkWindow *window,
gboolean composited)
{
}
#define __GDK_WINDOW_X11_C__
#include "gdkaliasdef.c"

View File

@@ -466,6 +466,7 @@ gdk_display_supports_clipboard_persistence
gdk_display_supports_selection_notification
gdk_display_supports_shapes
gdk_display_supports_input_shapes
gdk_display_supports_composite
#endif
#endif
@@ -673,6 +674,7 @@ gdk_window_remove_filter
gdk_window_set_debug_updates
gdk_window_set_user_data
gdk_window_thaw_updates
gdk_window_set_composited
#endif
#endif

View File

@@ -233,7 +233,7 @@ gdk_cairo_set_source_pixbuf (cairo_t *cr,
*
* Sets the given pixmap as the source pattern for the Cairo context.
* The pattern has an extend mode of %CAIRO_EXTEND_NONE and is aligned
* so that the origin of @pixbuf is @pixbuf_x, @pixbuf_y
* so that the origin of @pixmap is @pixmap_x, @pixmap_y
*
* Since: 2.10
**/

View File

@@ -181,6 +181,7 @@ void gdk_display_store_clipboard (GdkDisplay *display,
gboolean gdk_display_supports_shapes (GdkDisplay *display);
gboolean gdk_display_supports_input_shapes (GdkDisplay *display);
gboolean gdk_display_supports_composite (GdkDisplay *display);
G_END_DECLS

View File

@@ -836,7 +836,7 @@ gdk_event_get_axis (GdkEvent *event,
* gdk_event_request_motions:
* @event: a valid #GdkEvent
*
* Request more motion notifies if #event is a motion notify hint event.
* Request more motion notifies if @event is a motion notify hint event.
* This function should be used instead of gdk_window_get_pointer() to
* request further motion notifies, because it also works for extension
* events where motion notifies are provided for devices other than the

View File

@@ -337,6 +337,9 @@ void _gdk_windowing_window_destroy_foreign (GdkWindow *window);
void _gdk_windowing_display_set_sm_client_id (GdkDisplay *display,
const gchar *sm_client_id);
void _gdk_windowing_window_set_composited (GdkWindow *window,
gboolean composited);
#define GDK_TYPE_PAINTABLE (_gdk_paintable_get_type ())
#define GDK_PAINTABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GDK_TYPE_PAINTABLE, GdkPaintable))
#define GDK_IS_PAINTABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GDK_TYPE_PAINTABLE))

View File

@@ -1,17 +1,17 @@
#!/usr/bin/env perl
# Updates http://cvs.gnome.org/viewcvs/gtk%2B/gdk/gdkkeysyms.h from upstream (X.org 6.9/7.0),
# OLD OLD -----from http://cvs.freedesktop.org/xorg/xc/include/keysymdef.h------ OLD OLD
# from http://webcvs.freedesktop.org/*checkout*/xorg/proto/X11/keysymdef.h
# Updates http://svn.gnome.org/viewcvs/gtk%2B/trunk/gdk/gdkkeysyms.h?view=log from upstream (X.org 7.x),
# from http://gitweb.freedesktop.org/?p=xorg/proto/x11proto.git;a=blob_plain;f=keysymdef.h
#
# Author : Simos Xenitellis <simos at gnome dot org>.
# Version : 1.0
# Version : 1.2
#
# Input : http://webcvs.freedesktop.org/xorg/proto/X11/keysymdef.h
# Output : http://cvs.gnome.org/viewcvs/gtk%2B/gdk/gdkkeysyms.h
# Input : http://gitweb.freedesktop.org/?p=xorg/proto/x11proto.git;a=blob_plain;f=keysymdef.h
# Output : http://svn.gnome.org/svn/gtk+/trunk/gdk/gdkkeysyms.h
#
# Notes : It downloads keysymdef.h from the Internet if not found locally
# Notes : It downloads keysymdef.h from the Internet, if not found locally,
# Notes : and creates an updated gdkkeysyms.h
# Notes : This version updates the source of gdkkeysyms.h from CVS to the GIT server.
use strict;
@@ -21,23 +21,23 @@ my @keysymelements;
if ( ! -f "keysymdef.h" )
{
print "Trying to download keysymdef.h from\n";
print "http://webcvs.freedesktop.org/xorg/proto/X11/keysymdef.h: ";
die "Unable to download keysymdef.h from http://webcvs.freedesktop.org/xorg/proto/X11/keysymdef.h\n"
unless system("wget -q \"http://webcvs.freedesktop.org/*checkout*/xorg/proto/X11/keysymdef.h\"") == 0;
print "http://gitweb.freedesktop.org/?p=xorg/proto/x11proto.git;a=blob_plain;f=keysymdef.h\n";
die "Unable to download keysymdef.h from http://gitweb.freedesktop.org/?p=xorg/proto/x11proto.git;a=blob_plain;f=keysymdef.h\n"
unless system("wget -c -O keysymdef.h \"http://gitweb.freedesktop.org/?p=xorg/proto/x11proto.git;a=blob_plain;f=keysymdef.h\"") == 0;
print " done.\n\n";
}
else
{
print "We are using existing keysymdef.h found in this directory.\n";
print "It is assume that you took care and it is a recent version\n";
print "as found at http://webcvs.freedesktop.org/*checkout*/xorg/proto/X11/keysymdef.h\n\n";
print "It is assumed that you took care and it is a recent version\n";
print "as found at http://gitweb.freedesktop.org/?p=xorg/proto/x11proto.git;a=blob;f=keysymdef.h\n\n";
}
if ( -f "gdkkeysyms.h" )
{
print "There is already a gdkkeysyms.h file in this directory. We are not overwriting it.\n";
print "Please move it in order to run this script.\n";
print "Please move it somewhere else in order to run this script.\n";
die "Exiting...\n\n";
}
@@ -50,7 +50,7 @@ die "Could not open file gdkkeysyms.h: $!\n" unless open(OUT_GDKKEYSYMS, ">:utf8
print OUT_GDKKEYSYMS<<EOF;
/* GDK - The GIMP Drawing Kit
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
* Copyright (C) 2005 GNOME Foundation
* Copyright (C) 2005, 2006, 2007 GNOME Foundation
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -69,13 +69,13 @@ print OUT_GDKKEYSYMS<<EOF;
*/
/*
* File auto-generated from script gdkkeysyms-update.pl
* File auto-generated from script http://svn.gnome.org/viewcvs/gtk%2B/trunk/gdk/gdkkeysyms-update.pl
* using the input file
* http://cvs.freedesktop.org/xorg/xc/include/keysymdef.h
* http://gitweb.freedesktop.org/?p=xorg/proto/x11proto.git;a=blob_plain;f=keysymdef.h
*/
/*
* Modified by the GTK+ Team and others 1997-2001. See the AUTHORS
* Modified by the GTK+ Team and others 1997-2007. See the AUTHORS
* file for a list of people on the GTK+ Team. See the ChangeLog
* files for a list of changes. These files are distributed with
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
@@ -116,4 +116,4 @@ print OUT_GDKKEYSYMS<<EOF;
#endif /* __GDK_KEYSYMS_H__ */
EOF
printf "We just finished converting keysymdef.h to gdkkeysyms.h\n";
printf "We just finished converting keysymdef.h to gdkkeysyms.h\nThank you\n";

Some files were not shown because too many files have changed in this diff Show More