Compare commits

..

4 Commits

Author SHA1 Message Date
Tristan Van Berkom
7f691b2df2 Allow single line GtkSpreadTable
Added exception for single line spread table and
updated test case to allow configuration to a single line.
2010-10-11 21:45:42 +09:00
Tristan Van Berkom
7db09805f6 Added gtk_spread_table_get_child_line
Gets the line index in which a child would be positioned
if the table were to be allocated size in the opposing
orientation of the table.

For instance, if the table is oriented vertically,
this function will return the child's column if
the table were to be allocated size width.
2010-10-09 00:54:30 +09:00
Tristan Van Berkom
a5f74b6279 Changed GtkSpreadTable algorithm to be a binary search for the best height
This has some exceptions:
   - We still ignore the height of a widget that spans the entire column
     (i.e. large images dont force the whole table to try to be as tall
     as the image itself)
   - In this new algorithm we fill in to the best height from left to
     right which can leave trailing empty columns; in this case we place
     only a single widget in each trailing column.
2010-10-08 21:39:55 +09:00
Tristan Van Berkom
794c4c9ec7 Added GtkSpreadTable widget and test case.
GtkSpreadTable positions its children by distributing them as
evenly as possible across a fixed number of rows or columns.

When oriented vertically the GtkSpreadTable will list its
children in order from top to bottom in columns and request
the smallest height as possible regardless of differences in
child sizes.
2010-10-06 17:34:06 +09:00
670 changed files with 236232 additions and 61674 deletions

View File

@@ -1,7 +1,7 @@
## Makefile.am for GTK+
include $(top_srcdir)/Makefile.decl
SRC_SUBDIRS = gdk gtk modules demos tests perf examples
SRC_SUBDIRS = gdk gtk modules demos tests perf
SUBDIRS = po po-properties $(SRC_SUBDIRS) docs m4macros build
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
@@ -31,8 +31,80 @@ EXTRA_DIST += \
gtk-zip.sh.in \
sanitize-la.sh \
po/README.translators \
po/po2tbl.sed.in
po/po2tbl.sed.in \
examples/aspectframe/Makefile \
examples/aspectframe/aspectframe.c \
examples/Makefile \
examples/README.1ST \
examples/extract.awk \
examples/extract.sh \
examples/arrow/Makefile \
examples/arrow/arrow.c \
examples/base/Makefile \
examples/base/base.c \
examples/buttonbox/Makefile \
examples/buttonbox/buttonbox.c \
examples/buttons/Makefile \
examples/buttons/buttons.c \
examples/buttons/info.xpm \
examples/calendar/Makefile \
examples/calendar/calendar.c \
examples/entry/Makefile \
examples/entry/entry.c \
examples/eventbox/Makefile \
examples/eventbox/eventbox.c \
examples/gtkdial/Makefile \
examples/gtkdial/dial_test.c \
examples/gtkdial/gtkdial.c \
examples/gtkdial/gtkdial.h \
examples/helloworld/Makefile \
examples/helloworld/helloworld.c \
examples/helloworld2/Makefile \
examples/helloworld2/helloworld2.c \
examples/label/Makefile \
examples/label/label.c \
examples/menu/Makefile \
examples/menu/menu.c \
examples/notebook/Makefile \
examples/notebook/notebook.c \
examples/packbox/Makefile \
examples/packbox/packbox.c \
examples/paned/Makefile \
examples/paned/paned.c \
examples/progressbar/Makefile \
examples/progressbar/progressbar.c \
examples/radiobuttons/Makefile \
examples/radiobuttons/radiobuttons.c \
examples/rangewidgets/Makefile \
examples/rangewidgets/rangewidgets.c \
examples/rulers/Makefile \
examples/rulers/rulers.c \
examples/scribble-simple/Makefile \
examples/scribble-simple/scribble-simple.c \
examples/scribble-xinput/Makefile \
examples/scribble-xinput/scribble-xinput.c \
examples/scrolledwin/Makefile \
examples/scrolledwin/scrolledwin.c \
examples/selection/Makefile \
examples/selection/gettargets.c \
examples/selection/setselection.c \
examples/statusbar/Makefile \
examples/statusbar/statusbar.c \
examples/table/Makefile \
examples/table/table.c \
examples/tictactoe/Makefile \
examples/tictactoe/tictactoe.c \
examples/tictactoe/tictactoe.h \
examples/tictactoe/ttt_test.c \
examples/wheelbarrow/Makefile \
examples/wheelbarrow/wheelbarrow.c \
examples/fixed/fixed.c \
examples/fixed/Makefile \
examples/frame/frame.c \
examples/frame/Makefile \
examples/spinbutton/spinbutton.c \
examples/spinbutton/Makefile \
examples/find-examples.sh
MAINTAINERCLEANFILES = \
$(srcdir)/INSTALL \
$(srcdir)/README \

183
NEWS
View File

@@ -1,186 +1,3 @@
Overview of Changes from GTK+ 2.91.3 to 2.91.4
==============================================
* Bugs fixed:
609622 disappearing statusicon
631331 window icons don't work anymore
632894 Only show Desktop in file chooser button if there is one
633670 Child minimum/natural size is not respected by GtkScrolledWindow
633762 Correctly convert colors to CSS and deal with librsvg limitations
633915 gtk_button_box_child_requisition() mishandles size allocations
634060 Support for GIcon pixbufs
634338 Move GtkPaned documentation to inline comments
634339 Move GtkProgressBar documentation to inline comments
634340 Move GtkPageSetup documentation to inline comments
* Translation updates
Japanese
Estonian
Overview of Changes from GTK+ 2.91.2 to 2.91.3
==============================================
* The scrollable interface has gained some extra properties
to influence scrolling behaviour: [hv]scroll-policy
* The size_request vfunc and signal have been deprecated and
are no longer used inside GTK+ itself
* GtkAssistant has added a custom page type that gives full
control of button visibility
* The homogeneous parameter has been removed from gtk_box_new
* Bugs fixed:
61852 GtkTextBuffer needs a case insensitive search
576498 GtkAssistant seals members without adding accessors
612611 auto-mnemonics breaks menu scrolling
633050 need gtk_combo_box_new_with_model_and_entry
633216 Make gdk_rgba_to_string() take a const GdkRGBA
633274 Add error trap around call to XFixesChangeSaveSet()
633374 Port tests to GtkScrollable API...
633500 statusbar labels behind resize grip on startup
* Updated translations:
Catalan (Valencian)
Estonian
Galician
Hebrew
Overview of Changes from GTK+ 2.91.1 to 2.91.2
==============================================
* GtkApplication has been rewritten. It mostly relies on GApplication
API now. Remaining functions include gtk_application_new() and
gtk_window_set_application()
* A GtkScrollable interface has been added and implemented by all
scrollable widgets. GtkScrolledWindow has ::min-display-width/height
properties to control the minimal size of the content area.
* GtkComboBox changes:
- Popups can be wider than the combo box itself
- The deprecated GtkComboBoxEntry subclass has been removed
- The deprecated combo box text convenience API has been removed
* GtkRecentManager changes:
- Store xbel file in XDG_USER_DATA
- Add gtk_recent_info_create_app_info()
- Add gtk_recent_info_get_gicon()
- Coalesce multiple changes
* GtkIconView allows tree models (ignoring anything below the root level)
* GtkProgressBar, GtkSpinButton, GtkEntry and GtkCalendar no longer have
their own input-output window
* gtk_widget_hide_all() has been removed
* GtkGrid: A legacy-free, height-for-width grid container
* GDK gained a GdkRGBA color struct containing 4 doubles, and various
GdkColor APIs have GdkRGBA counterparts now.
* Bugs fixed:
324899 GtkComboBoxText needs API to remove all items
438318 Deprecate and remove hide_all()
524304 Use XDG_USER_DATA to store the recent files
617174 gtkrecentinfo & GIcon
632381 gtk_combo_box_text_new_with_entry() adds two text cell renderers
632538 Move setting property registration in gtksettings.c
632539 Do not install gtkprivate.h
632677 restore copyright header
632736 change the window class of entry from INPUT_OUTPUT to INPUT_ONLY
632936 gtkcellrenderer gdkrgba changes not correct
* Translation updates:
Arabic
Galician
Hebrew
Japanese
Norwegian bokmål
Spanish
Telugu
Overview of Changes from GTK+ 2.91.0 to 2.91.1
==============================================
* GTK+ can now add a resize grip to any window. The resize
grip functionality in GtkStatusbar has been removed.
* A very old bug in the handling of geometry widgets has
been fixed, and a way to set geometry in terms of the
geometry widget has been added: gtk_window_resize_to_geometry()
* The GtkFileChooser now uses GSettings to store its settings
instead of the keyfile ~/.config/gtk-2.0/gtkfilechooser.ini
* GtkWrapBox has been dropped from GTK+ again. The widget
will be available in libegg until clear use cases have
been established.
* GtkWidget now has horizontal and vertical expand flags, in
the form of ::hexpand and ::vexpand properties. These flags
are intended to obsolete most custom container-specific
expand child properties, over time.
Expandability is inherited up the widget hierarchy.
* GtkComboBoxEntry has been deprecated in favor of a
::has-entry property on GtkComboBox.
* The GtkComboBox text convenience API (gtk_combo_box_new_text(), etc)
has been deprecated in favor of a new GtkComboBoxText class.
* GtkLinkButton has gained a ::activate-link signal that
can be used to suppress the default behavior.
* The very outdated tutorial has been dropped from the GTK+ distribution,
and a new 'Getting started' section has been added to the API
documentation that will accumulate tutorial material over time.
* Bugs fixed:
68668 Fix handling of geometry widget
313350 Return type of gtk_accelerator_get_default_mod_mask...
351247 GtkScrolledWindow is mis documented
423201 gtk_combo_box_entry_active_changed does not transform...
563002 Doesn't call 'update-preview' on set_filename
612396 Implement GtkComboBoxText subclass to supersede "text"...
613728 Rationalize GtkTreeView focus
628902 use expand flags to determine window resizability
629722 save_entry_get_info_cb() doesn't behave correctly
629778 Scrolled window does not behave properly with height-for...
629955 Deprecate / remove gtk_main and gtk_init_add / remove* API
630850 Use GSettings for the filechooser settings
630900 GtkCellRendererClass: unify const of GdkRectangle args
631203 Scrolling in GtkTextView can use 100% cpu
631311 Obvious fix for nasty crash in menu code
631473 Fix GTK+3 documentation
631475 Two old GDK_foo key macros left in gdk/quartz/gdkkeys-quartz.c
631599 Allow to use arbitrary surfaces for offscreen windows
631719 Action-based menu accelerators don't synch with GtkMenuItem
631794 Warn when calling gtk_window_parse_geometry() on an empty...
631976 Remove GtkWidgetAuxInfo from GtkScrolledWindow
632059 Move the introduction of the tutorial in the reference
632095 GtkTargetEntry: Add boxed type and constructor
632140 optionally take hotspot coordinates from the pixbuf...
632218 BadMatch when starting gnome-shell
* New or updated translations:
Catalan
Estonian
Galician
Greek
Kazakh
Kikongo
Lithuanian
Punjabi
Slovenian
Spanish
Overview of Changes from GTK+ 2.90.7 to 2.91.0
==============================================

View File

@@ -19,7 +19,7 @@ if libtoolize --version < /dev/null > /dev/null 2>&1 ; then
sed -e 's/^\(.*\)([^)]*)\(.*\)$/\1\2/g' \
-e 's/^[^0-9]*\([0-9.][0-9.]*\).*/\1/'`
case $libtool_version in
2.*)
2.2*)
have_libtool=true
;;
esac

View File

@@ -72,7 +72,7 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="cairo.lib pango-1.0.lib pangocairo-1.0.lib imm32.lib"
AdditionalDependencies="cairo.lib"
OutputFile="$(OutDir)\$(GtkDllPrefix)$(ProjectName)-win32$(GtkDllSuffix).dll"
LinkIncremental="2"
ModuleDefinitionFile="$(IntDir)\gdk.def"
@@ -107,7 +107,7 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="cairo.lib pango-1.0.lib pangocairo-1.0.lib imm32.lib"
AdditionalDependencies="cairo.lib"
OutputFile="$(OutDir)\$(GtkDllPrefix)$(ProjectName)-win32$(GtkDllSuffix).dll"
LinkIncremental="2"
ModuleDefinitionFile="$(IntDir)\gdk.def"
@@ -137,7 +137,7 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="cairo.lib pango-1.0.lib pangocairo-1.0.lib imm32.lib"
AdditionalDependencies="cairo.lib"
OutputFile="$(OutDir)\$(GtkDllPrefix)$(ProjectName)-win32$(GtkDllSuffix).dll"
LinkIncremental="2"
ModuleDefinitionFile="$(IntDir)\gdk.def"
@@ -208,7 +208,6 @@
/>
</FileConfiguration>
</File>
<File RelativePath="..\..\..\gdk\win32\rc\gdk.rc" />
</Filter>
<Filter
Name="Source Files"

View File

@@ -8,13 +8,13 @@
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\..;$(GlibEtcInstallRoot)\lib\glib-2.0\include;$(GlibEtcInstallRoot)\include\glib-2.0;$(GlibEtcInstallRoot)\include;$(GlibEtcInstallRoot)\include\cairo;$(GlibEtcInstallRoot)\include\atk-1.0;$(GlibEtcInstallRoot)\include\pango-1.0;$(GlibEtcInstallRoot)\include\GdkPixbuf-2.0"
AdditionalIncludeDirectories="..\..\..;$(GlibEtcInstallRoot)\lib\glib-2.0\include;$(GlibEtcInstallRoot)\include\glib-2.0;$(GlibEtcInstallRoot)\include;$(GlibEtcInstallRoot)\include\cairo;$(GlibEtcInstallRoot)\include\atk-1.0;$(GlibEtcInstallRoot)\include\pango-1.0"
PreprocessorDefinitions="HAVE_CONFIG_H;G_DISABLE_DEPRECATED;G_DISABLE_SINGLE_INCLUDES;ATK_DISABLE_SINGLE_INCLUDES;GDK_PIXBUF_DISABLE_SINGLE_INCLUDES;GTK_DISABLE_SINGLE_INCLUDES"
ForcedIncludeFiles="msvc_recommended_pragmas.h"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="gdk_pixbuf-2.0.lib gio-2.0.lib gmodule-2.0.lib gobject-2.0.lib glib-2.0.lib intl.lib"
AdditionalDependencies="gio-2.0.lib gmodule-2.0.lib gobject-2.0.lib glib-2.0.lib intl.lib"
AdditionalLibraryDirectories="$(GlibEtcInstallRoot)\lib"
/>
<Tool
@@ -31,7 +31,7 @@ copy ..\..\..\gdk\gdkconfig.h.win32 ..\..\..\gdk\gdkconfig.h&#x0D;&#x0A;
/>
<UserMacro
Name="GtkApiVersion"
Value="2.0"
Value="3.0"
/>
<UserMacro
Name="GtkBinaryVersion"
@@ -45,6 +45,18 @@ copy ..\..\..\gdk\gdkconfig.h.win32 ..\..\..\gdk\gdkconfig.h&#x0D;&#x0A;
Name="GtkPrefixDefine"
Value="GTK_PREFIX=\&quot;$(GtkDummyPrefix)\&quot;"
/>
<UserMacro
Name="GdkPixbufIncludedLoaderDefines"
Value="INCLUDE_ani;INCLUDE_icns;INCLUDE_pcx;INCLUDE_ras;INCLUDE_tga;INCLUDE_png;INCLUDE_pnm;INCLUDE_wbmp;INCLUDE_xbm;INCLUDE_xpm;INCLUDE_gdiplus"
/>
<UserMacro
Name="GdkPixbufDefines"
Value="GDK_PIXBUF_COMPILATION;GDK_PIXBUF_ENABLE_BACKEND;$(GtkPrefixDefine);$(GdkPixbufIncludedLoaderDefines)"
/>
<UserMacro
Name="GdkPixbufLibdirDefine"
Value="PIXBUF_LIBDIR=\&quot;$(GtkDummyPrefix)/lib/gtk-$(GtkApiVersion)/$(GtkBinaryVersion)/loaders\&quot;"
/>
<UserMacro
Name="GdkDefines"
Value="GDK_COMPILATION;G_LOG_DOMAIN=\&quot;Gdk\&quot;"
@@ -63,20 +75,24 @@ copy ..\..\..\gdk\gdkconfig.h.win32 ..\..\..\gdk\gdkconfig.h&#x0D;&#x0A;
echo on&#x0D;&#x0A;
mkdir $(OutDir)\bin&#x0D;&#x0A;
copy $(ConfigurationName)\$(PlatformName)\bin\*.dll $(OutDir)\bin&#x0D;&#x0A;
copy $(ConfigurationName)\$(PlatformName)\bin\gtk-update-icon-cache.exe $(OutDir)\bin&#x0D;&#x0A;
mkdir $(OutDir)\bin\gtk-demo&#x0D;&#x0A;
copy $(ConfigurationName)\$(PlatformName)\bin\gtk-demo.exe $(OutDir)\bin\gtk-demo&#x0D;&#x0A;
copy ..\..\..\demos\gtk-demo\*.c $(OutDir)\bin\gtk-demo&#x0D;&#x0A;
copy ..\..\..\demos\gtk-demo\*.h $(OutDir)\bin\gtk-demo&#x0D;&#x0A;
copy ..\..\..\demos\gtk-demo\*.gif $(OutDir)\bin\gtk-demo&#x0D;&#x0A;
copy ..\..\..\demos\gtk-demo\*.jpg $(OutDir)\bin\gtk-demo&#x0D;&#x0A;
copy ..\..\..\demos\gtk-demo\*.png $(OutDir)\bin\gtk-demo&#x0D;&#x0A;
copy ..\..\..\demos\gtk-demo\*.ui $(OutDir)\bin\gtk-demo&#x0D;&#x0A;
copy $(ConfigurationName)\$(PlatformName)\bin\*.exe $(OutDir)\bin&#x0D;&#x0A;
mkdir $(OutDir)\lib&#x0D;&#x0A;
copy $(ConfigurationName)\$(PlatformName)\bin\*-$(GtkApiVersion).lib $(OutDir)\lib&#x0D;&#x0A;
mkdir $(OutDir)\include\gtk-$(GtkApiVersion)\gdk-pixbuf&#x0D;&#x0A;
copy ..\..\..\gdk-pixbuf\gdk-pixbuf-animation.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk-pixbuf&#x0D;&#x0A;
copy ..\..\..\gdk-pixbuf\gdk-pixbuf-core.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk-pixbuf&#x0D;&#x0A;
copy ..\..\..\gdk-pixbuf\gdk-pixbuf-enum-types.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk-pixbuf&#x0D;&#x0A;
copy ..\..\..\gdk-pixbuf\gdk-pixbuf-features.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk-pixbuf&#x0D;&#x0A;
copy ..\..\..\gdk-pixbuf\gdk-pixbuf-io.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk-pixbuf&#x0D;&#x0A;
copy ..\..\..\gdk-pixbuf\gdk-pixbuf-loader.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk-pixbuf&#x0D;&#x0A;
copy ..\..\..\gdk-pixbuf\gdk-pixbuf-marshal.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk-pixbuf&#x0D;&#x0A;
copy ..\..\..\gdk-pixbuf\gdk-pixbuf-simple-anim.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk-pixbuf&#x0D;&#x0A;
copy ..\..\..\gdk-pixbuf\gdk-pixbuf-transform.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk-pixbuf&#x0D;&#x0A;
copy ..\..\..\gdk-pixbuf\gdk-pixbuf.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk-pixbuf&#x0D;&#x0A;
copy ..\..\..\gdk-pixbuf\gdk-pixdata.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk-pixbuf&#x0D;&#x0A;
mkdir $(OutDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdk.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkapplaunchcontext.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
@@ -92,11 +108,9 @@ copy ..\..\..\gdk\gdkevents.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#
copy ..\..\..\gdk\gdkfont.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkgc.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdki18n.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkimage.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkinput.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkkeys.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkkeysyms.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkkeysyms-compat.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkpango.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkpixbuf.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkpixmap.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
@@ -144,7 +158,6 @@ copy ..\..\..\gtk\gtkcellrenderercombo.h $(OutDir)\include\gtk-$(GtkApiVersion)\
copy ..\..\..\gtk\gtkcellrendererpixbuf.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcellrendererprogress.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcellrendererspin.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcellrendererspinner.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcellrenderertext.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcellrenderertoggle.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcellview.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
@@ -226,7 +239,6 @@ copy ..\..\..\gtk\gtkmodules.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&
copy ..\..\..\gtk\gtkmountoperation.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtknotebook.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkobject.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkoffscreenwindow.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkoldeditable.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkoptionmenu.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkorientable.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
@@ -270,7 +282,6 @@ copy ..\..\..\gtk\gtkshow.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0
copy ..\..\..\gtk\gtksignal.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtksizegroup.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtksocket.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkspinner.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkspinbutton.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkstatusbar.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkstatusicon.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
@@ -297,8 +308,6 @@ copy ..\..\..\gtk\gtktoggletoolbutton.h $(OutDir)\include\gtk-$(GtkApiVersion)\g
copy ..\..\..\gtk\gtktoolbar.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktoolbutton.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktoolitem.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktoolitemgroup.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktoolpalette.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktoolshell.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktooltip.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktooltips.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
@@ -335,6 +344,10 @@ copy ..\..\..\gdk\gdkconfig.h $(OutDir)\lib\gtk-$(GtkApiVersion)\include&#x0D;&#
copy $(ConfigurationName)\$(PlatformName)\bin\*-$(GtkApiVersion).lib $(OutDir)\lib&#x0D;&#x0A;
"
/>
<UserMacro
Name="GtkGenerateGdkPixbufDef"
Value="echo EXPORTS &gt;&quot;$(IntDir)\gdk-pixbuf.def&quot; &amp;&amp; cl /EP -DG_OS_WIN32 -DINCLUDE_VARIABLES -DALL_FILES -DG_GNUC_CONST= -DG_GNUC_NULL_TERMINATED= ..\..\..\gdk-pixbuf\gdk-pixbuf.symbols &gt;&gt;&quot;$(IntDir)\gdk-pixbuf.def&quot;"
/>
<UserMacro
Name="GtkGenerateGdkDef"
Value="echo EXPORTS &gt;&quot;$(IntDir)\gdk.def&quot; &amp;&amp; cl /EP -DGDK_WINDOWING_WIN32 -DALL_FILES -DG_GNUC_CONST= ..\..\..\gdk\gdk.symbols &gt;&gt;&quot;$(IntDir)\gdk.def&quot;"

View File

@@ -76,10 +76,9 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="cairo.lib pango-1.0.lib pangocairo-1.0.lib"
LinkIncremental="2"
GenerateDebugInformation="true"
SubSystem="1"
SubSystem="2"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
TargetMachine="17"
@@ -107,10 +106,9 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="cairo.lib pango-1.0.lib pangocairo-1.0.lib"
LinkIncremental="1"
GenerateDebugInformation="true"
SubSystem="1"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
RandomizedBaseAddress="1"
@@ -140,10 +138,9 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="cairo.lib pango-1.0.lib pangocairo-1.0.lib"
LinkIncremental="1"
GenerateDebugInformation="true"
SubSystem="1"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
RandomizedBaseAddress="1"

View File

@@ -2,14 +2,6 @@
# require autoconf 2.54
AC_PREREQ([2.62])
AC_INIT([gtk+], [gtk_version],
[http://bugzilla.gnome.org/enter_bug.cgi?product=gtk%2B],
[gtk+])
AC_CONFIG_HEADER([config.h])
AC_CONFIG_SRCDIR([gdk/gdktypes.h])
AC_CONFIG_MACRO_DIR([m4])
# Making releases:
# GTK_MICRO_VERSION += 1;
# GTK_INTERFACE_AGE += 1;
@@ -20,7 +12,7 @@ AC_CONFIG_MACRO_DIR([m4])
m4_define([gtk_major_version], [2])
m4_define([gtk_minor_version], [91])
m4_define([gtk_micro_version], [4])
m4_define([gtk_micro_version], [1])
m4_define([gtk_interface_age], [0])
m4_define([gtk_binary_age],
[m4_eval(100 * gtk_minor_version + gtk_micro_version)])
@@ -39,7 +31,7 @@ m4_define([gtk_api_version], [3.0])
m4_define([gtk_binary_version], [3.0.0])
# required versions of other packages
m4_define([glib_required_version], [2.27.3])
m4_define([glib_required_version], [2.27.0])
m4_define([pango_required_version], [1.20])
m4_define([atk_required_version], [1.29.2])
m4_define([cairo_required_version], [1.10.0])
@@ -56,6 +48,14 @@ AC_SUBST(CAIRO_REQUIRED_VERSION)
AC_SUBST(GDK_PIXBUF_REQUIRED_VERSION)
AC_INIT([gtk+], [gtk_version],
[http://bugzilla.gnome.org/enter_bug.cgi?product=gtk%2B],
[gtk+])
AC_CONFIG_HEADER([config.h])
AC_CONFIG_SRCDIR([gdk/gdktypes.h])
AC_CONFIG_MACRO_DIR([m4])
# Save this value here, since automake will set cflags later
cflags_set=${CFLAGS+set}
@@ -65,7 +65,7 @@ AM_MAINTAINER_MODE([enable])
# Support silent build rules, requires at least automake-1.11. Enable
# by either passing --enable-silent-rules to configure or passing V=0
# to make
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([no])])
#
# For each of the libraries we build, we define the following
@@ -1225,9 +1225,9 @@ LDFLAGS="$saved_ldflags"
# Pull in gio-unix for GDesktopAppInfo usage, see at least gdkapplaunchcontext-x11.c
if test "x$gdktarget" = "xx11"; then
GDK_PACKAGES="$PANGO_PACKAGES gio-unix-2.0 $X_PACKAGES gdk-pixbuf-2.0 cairo-$cairo_backend cairo-gobject"
GDK_PACKAGES="$PANGO_PACKAGES gio-unix-2.0 $X_PACKAGES gdk-pixbuf-2.0 cairo-$cairo_backend"
else
GDK_PACKAGES="$PANGO_PACKAGES gio-2.0 gdk-pixbuf-2.0 cairo-$cairo_backend cairo-gobject"
GDK_PACKAGES="$PANGO_PACKAGES gio-2.0 gdk-pixbuf-2.0 cairo-$cairo_backend"
fi
GDK_DEP_LIBS="$GDK_EXTRA_LIBS `$PKG_CONFIG --libs $GDK_PACKAGES`"
@@ -1477,12 +1477,6 @@ if test -n "$export_dynamic"; then
GTK_DEP_LIBS=`echo $GTK_DEP_LIBS | sed -e "s/$export_dynamic//"`
fi
#############
# GSettings #
#############
GLIB_GSETTINGS
##################################################
# GObject introspection
##################################################
@@ -1640,7 +1634,6 @@ po-properties/Makefile.in
demos/Makefile
demos/gtk-demo/Makefile
demos/gtk-demo/geninclude.pl
examples/Makefile
tests/Makefile
docs/Makefile
docs/reference/Makefile
@@ -1649,7 +1642,9 @@ docs/reference/gdk/version.xml
docs/reference/gtk/Makefile
docs/reference/gtk/version.xml
docs/reference/libgail-util/Makefile
docs/faq/Makefile
docs/tools/Makefile
docs/tutorial/Makefile
build/Makefile
build/win32/Makefile
build/win32/vs9/Makefile

View File

@@ -384,6 +384,23 @@ mark_set_callback (GtkTextBuffer *buffer,
update_statusbar (buffer, GTK_STATUSBAR (data));
}
static void
update_resize_grip (GtkWidget *widget,
GdkEventWindowState *event,
GtkStatusbar *statusbar)
{
if (event->changed_mask & (GDK_WINDOW_STATE_MAXIMIZED |
GDK_WINDOW_STATE_FULLSCREEN))
{
gboolean maximized;
maximized = event->new_window_state & (GDK_WINDOW_STATE_MAXIMIZED |
GDK_WINDOW_STATE_FULLSCREEN);
gtk_statusbar_set_has_resize_grip (statusbar, !maximized);
}
}
GtkWidget *
do_appwindow (GtkWidget *do_widget)
{
@@ -552,6 +569,12 @@ do_appwindow (GtkWidget *do_widget)
statusbar,
0);
g_signal_connect_object (window,
"window_state_event",
G_CALLBACK (update_resize_grip),
statusbar,
0);
update_statusbar (buffer, GTK_STATUSBAR (statusbar));
}

View File

@@ -94,7 +94,7 @@ create_page1 (GtkWidget *assistant)
GtkWidget *box, *label, *entry;
GdkPixbuf *pixbuf;
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
box = gtk_hbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (box), 12);
label = gtk_label_new ("You must fill out this entry to continue:");
@@ -121,7 +121,7 @@ create_page2 (GtkWidget *assistant)
GtkWidget *box, *checkbutton;
GdkPixbuf *pixbuf;
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
box = gtk_vbox_new (12, FALSE);
gtk_container_set_border_width (GTK_CONTAINER (box), 12);
checkbutton = gtk_check_button_new_with_label ("This is optional data, you may continue "

View File

@@ -18,9 +18,9 @@ create_bbox (gint horizontal,
frame = gtk_frame_new (title);
if (horizontal)
bbox = gtk_button_box_new (GTK_ORIENTATION_HORIZONTAL);
bbox = gtk_hbutton_box_new ();
else
bbox = gtk_button_box_new (GTK_ORIENTATION_VERTICAL);
bbox = gtk_vbutton_box_new ();
gtk_container_set_border_width (GTK_CONTAINER (bbox), 5);
gtk_container_add (GTK_CONTAINER (frame), bbox);
@@ -63,13 +63,13 @@ do_button_box (GtkWidget *do_widget)
gtk_container_set_border_width (GTK_CONTAINER (window), 10);
main_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
main_vbox = gtk_vbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER (window), main_vbox);
frame_horz = gtk_frame_new ("Horizontal Button Boxes");
gtk_box_pack_start (GTK_BOX (main_vbox), frame_horz, TRUE, TRUE, 10);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
vbox = gtk_vbox_new (FALSE, 0);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 10);
gtk_container_add (GTK_CONTAINER (frame_horz), vbox);
@@ -92,7 +92,7 @@ do_button_box (GtkWidget *do_widget)
frame_vert = gtk_frame_new ("Vertical Button Boxes");
gtk_box_pack_start (GTK_BOX (main_vbox), frame_vert, TRUE, TRUE, 10);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
hbox = gtk_hbox_new (FALSE, 0);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 10);
gtk_container_add (GTK_CONTAINER (frame_vert), hbox);

View File

@@ -357,7 +357,7 @@ create_frame (ChangeDisplayInfo *info,
*frame = gtk_frame_new (title);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
hbox = gtk_hbox_new (FALSE, 8);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 8);
gtk_container_add (GTK_CONTAINER (*frame), hbox);
@@ -375,7 +375,7 @@ create_frame (ChangeDisplayInfo *info,
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (*tree_view));
gtk_tree_selection_set_mode (selection, GTK_SELECTION_BROWSE);
*button_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
*button_vbox = gtk_vbox_new (FALSE, 5);
gtk_box_pack_start (GTK_BOX (hbox), *button_vbox, FALSE, FALSE, 0);
if (!info->size_group)
@@ -624,7 +624,7 @@ do_changedisplay (GtkWidget *do_widget)
content_area = gtk_dialog_get_content_area (GTK_DIALOG (info->window));
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
vbox = gtk_vbox_new (FALSE, 5);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
gtk_box_pack_start (GTK_BOX (content_area), vbox, TRUE, TRUE, 0);

View File

@@ -210,7 +210,7 @@ do_clipboard (GtkWidget *do_widget)
g_signal_connect (window, "destroy",
G_CALLBACK (gtk_widget_destroyed), &window);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
vbox = gtk_vbox_new (FALSE, 0);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
gtk_container_add (GTK_CONTAINER (window), vbox);
@@ -219,7 +219,7 @@ do_clipboard (GtkWidget *do_widget)
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
hbox = gtk_hbox_new (FALSE, 4);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 8);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
@@ -236,7 +236,7 @@ do_clipboard (GtkWidget *do_widget)
label = gtk_label_new ("\"Paste\" will paste the text from the clipboard to the entry");
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
hbox = gtk_hbox_new (FALSE, 4);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 8);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
@@ -253,7 +253,7 @@ do_clipboard (GtkWidget *do_widget)
label = gtk_label_new ("Images can be transferred via the clipboard, too");
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
hbox = gtk_hbox_new (FALSE, 4);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 8);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);

View File

@@ -85,7 +85,7 @@ do_colorsel (GtkWidget *do_widget)
gtk_container_set_border_width (GTK_CONTAINER (window), 8);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
vbox = gtk_vbox_new (FALSE, 8);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
gtk_container_add (GTK_CONTAINER (window), vbox);

View File

@@ -238,12 +238,12 @@ is_capital_sensitive (GtkCellLayout *cell_layout,
}
static void
fill_combo_entry (GtkWidget *combo)
fill_combo_entry (GtkWidget *entry)
{
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), "One");
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), "Two");
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), "2\302\275");
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), "Three");
gtk_combo_box_append_text (GTK_COMBO_BOX (entry), "One");
gtk_combo_box_append_text (GTK_COMBO_BOX (entry), "Two");
gtk_combo_box_append_text (GTK_COMBO_BOX (entry), "2\302\275");
gtk_combo_box_append_text (GTK_COMBO_BOX (entry), "Three");
}
@@ -345,7 +345,7 @@ do_combobox (GtkWidget *do_widget)
gtk_container_set_border_width (GTK_CONTAINER (window), 10);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 2);
vbox = gtk_vbox_new (FALSE, 2);
gtk_container_add (GTK_CONTAINER (window), vbox);
/* A combobox demonstrating cell renderers, separators and
@@ -354,7 +354,7 @@ do_combobox (GtkWidget *do_widget)
frame = gtk_frame_new ("Some stock icons");
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
box = gtk_vbox_new (FALSE, 0);
gtk_container_set_border_width (GTK_CONTAINER (box), 5);
gtk_container_add (GTK_CONTAINER (frame), box);
@@ -395,7 +395,7 @@ do_combobox (GtkWidget *do_widget)
frame = gtk_frame_new ("Where are we ?");
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
box = gtk_vbox_new (FALSE, 0);
gtk_container_set_border_width (GTK_CONTAINER (box), 5);
gtk_container_add (GTK_CONTAINER (frame), box);
@@ -424,11 +424,11 @@ do_combobox (GtkWidget *do_widget)
frame = gtk_frame_new ("Editable");
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
box = gtk_vbox_new (FALSE, 0);
gtk_container_set_border_width (GTK_CONTAINER (box), 5);
gtk_container_add (GTK_CONTAINER (frame), box);
combo = gtk_combo_box_text_new_with_entry ();
combo = gtk_combo_box_entry_new_text ();
fill_combo_entry (combo);
gtk_container_add (GTK_CONTAINER (box), combo);

View File

@@ -54,7 +54,7 @@ interactive_dialog_clicked (GtkButton *button,
content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
hbox = gtk_hbox_new (FALSE, 8);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 8);
gtk_box_pack_start (GTK_BOX (content_area), hbox, FALSE, FALSE, 0);
@@ -120,25 +120,24 @@ do_dialog (GtkWidget *do_widget)
frame = gtk_frame_new ("Dialogs");
gtk_container_add (GTK_CONTAINER (window), frame);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
vbox = gtk_vbox_new (FALSE, 8);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
gtk_container_add (GTK_CONTAINER (frame), vbox);
/* Standard message dialog */
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
hbox = gtk_hbox_new (FALSE, 8);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
button = gtk_button_new_with_mnemonic ("_Message Dialog");
g_signal_connect (button, "clicked",
G_CALLBACK (message_dialog_clicked), NULL);
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (vbox), gtk_separator_new (GTK_ORIENTATION_HORIZONTAL),
FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (vbox), gtk_hseparator_new (), FALSE, FALSE, 0);
/* Interactive dialog*/
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
hbox = gtk_hbox_new (FALSE, 8);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
vbox2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
vbox2 = gtk_vbox_new (FALSE, 0);
button = gtk_button_new_with_mnemonic ("_Interactive Dialog");
g_signal_connect (button, "clicked",

View File

@@ -193,7 +193,7 @@ close_window (void)
window = NULL;
if (surface)
cairo_surface_destroy (surface);
g_object_unref (surface);
surface = NULL;
}
@@ -216,7 +216,7 @@ do_drawingarea (GtkWidget *do_widget)
gtk_container_set_border_width (GTK_CONTAINER (window), 8);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
vbox = gtk_vbox_new (FALSE, 8);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
gtk_container_add (GTK_CONTAINER (window), vbox);

View File

@@ -332,7 +332,7 @@ do_editable_cells (GtkWidget *do_widget)
g_signal_connect (window, "destroy",
G_CALLBACK (gtk_widget_destroyed), &window);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
vbox = gtk_vbox_new (FALSE, 5);
gtk_container_add (GTK_CONTAINER (window), vbox);
gtk_box_pack_start (GTK_BOX (vbox),
@@ -365,8 +365,7 @@ do_editable_cells (GtkWidget *do_widget)
gtk_container_add (GTK_CONTAINER (sw), treeview);
/* some buttons */
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
gtk_box_set_homogeneous (GTK_BOX (hbox), TRUE);
hbox = gtk_hbox_new (TRUE, 4);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
button = gtk_button_new_with_label ("Add item");

View File

@@ -34,7 +34,7 @@ do_entry_buffer (GtkWidget *do_widget)
content_area = gtk_dialog_get_content_area (GTK_DIALOG (window));
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
vbox = gtk_vbox_new (FALSE, 5);
gtk_box_pack_start (GTK_BOX (content_area), vbox, TRUE, TRUE, 0);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);

View File

@@ -61,7 +61,7 @@ do_entry_completion (GtkWidget *do_widget)
content_area = gtk_dialog_get_content_area (GTK_DIALOG (window));
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
vbox = gtk_vbox_new (FALSE, 5);
gtk_box_pack_start (GTK_BOX (content_area), vbox, TRUE, TRUE, 0);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);

View File

@@ -35,7 +35,7 @@ do_expander (GtkWidget *do_widget)
content_area = gtk_dialog_get_content_area (GTK_DIALOG (window));
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
vbox = gtk_vbox_new (FALSE, 5);
gtk_box_pack_start (GTK_BOX (content_area), vbox, TRUE, TRUE, 0);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);

View File

@@ -300,7 +300,7 @@ do_iconview (GtkWidget *do_widget)
GtkWidget *tool_bar;
GtkToolItem *home_button;
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
vbox = gtk_vbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER (window), vbox);
tool_bar = gtk_toolbar_new ();

View File

@@ -335,7 +335,7 @@ do_images (GtkWidget *do_widget)
gtk_container_set_border_width (GTK_CONTAINER (window), 8);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
vbox = gtk_vbox_new (FALSE, 8);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
gtk_container_add (GTK_CONTAINER (window), vbox);

View File

@@ -44,7 +44,7 @@ do_infobar (GtkWidget *do_widget)
g_signal_connect (window, "destroy", G_CALLBACK (gtk_widget_destroyed), &window);
gtk_container_set_border_width (GTK_CONTAINER (window), 8);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
vbox = gtk_vbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER (window), vbox);
bar = gtk_info_bar_new ();
@@ -81,7 +81,7 @@ do_infobar (GtkWidget *do_widget)
frame = gtk_frame_new ("Info bars");
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 8);
vbox2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
vbox2 = gtk_vbox_new (FALSE, 8);
gtk_container_set_border_width (GTK_CONTAINER (vbox2), 8);
gtk_container_add (GTK_CONTAINER (frame), vbox2);

View File

@@ -266,7 +266,7 @@ do_list_store (GtkWidget *do_widget)
G_CALLBACK (gtk_widget_destroyed), &window);
gtk_container_set_border_width (GTK_CONTAINER (window), 8);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
vbox = gtk_vbox_new (FALSE, 8);
gtk_container_add (GTK_CONTAINER (window), vbox);
label = gtk_label_new ("This is the bug list (note: not based on real data, it would be nice to have a nice ODBC interface to bugzilla or so, though).");

View File

@@ -954,7 +954,7 @@ main (int argc, char **argv)
g_signal_connect_after (window, "destroy",
G_CALLBACK (gtk_main_quit), NULL);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
hbox = gtk_hbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER (window), hbox);
tree = create_tree ();

View File

@@ -14,15 +14,15 @@ PERL = perl
################################################################
# Possibly override versions from build/win32/module.defs
GTK_VER = 2.0
GDK_PIXBUF_VER = 2.0
GTK_VER = @GTK_MAJOR_VERSION@.@GTK_MINOR_VERSION@
GDK_PIXBUF_VER = @GDK_PIXBUF_MAJOR@.@GDK_PIXBUF_MINOR@
GDK_LIBS = ../../gdk/gdk-win32-$(GTK_VER).lib
GTK_LIBS = ../../gtk/gtk-win32-$(GTK_VER).lib
GDK_PIXBUF_LIBS = ../../gdk-pixbuf/gdk_pixbuf-$(GDK_PIXBUF_VER).lib
INCLUDES = -FImsvc_recommended_pragmas.h -I . -I ../.. -I ../../gdk -I ../../gdk-pixbuf -I ../../gtk
DEPCFLAGS = $(PANGO_CFLAGS) $(GLIB_CFLAGS) $(LIBICONV_CFLAGS) $(INTL_CFLAGS) $(ATK_CFLAGS) $(CAIRO_CFLAGS)
DEPCFLAGS = $(PANGO_CFLAGS) $(GLIB_CFLAGS) $(LIBICONV_CFLAGS) $(INTL_CFLAGS) $(ATK_CFLAGS)
LDFLAGS = /link /machine:ix86 $(LINKDEBUG)
DEFINES = -DG_LOG_DOMAIN=\"GtkDemo\" -DGTK_VERSION=\"$(GTK_VER)\" \
-DDEMOCODEDIR=\".\"
@@ -90,6 +90,5 @@ OBJECTS = \
main.obj \
gtk-demo.exe : demos.h $(OBJECTS)
$(CC) $(CFLAGS) -Fegtk-demo.exe $(OBJECTS) $(GTK_LIBS) $(GDK_LIBS) $(GDK_PIXBUF_LIBS) \
$(CAIRO_LIBS) $(PANGOCAIRO_LIBS) $(PANGO_LIBS) $(GLIB_LIBS) $(LDFLAGS)
$(CC) $(CFLAGS) -Fegtk-demo.exe $(OBJECTS) $(GTK_LIBS) $(GDK_LIBS) $(GDK_PIXBUF_LIBS) $(PANGO_LIBS) $(GLIB_LIBS) $(LDFLAGS)

View File

@@ -146,11 +146,11 @@ do_menus (GtkWidget *do_widget)
gtk_container_set_border_width (GTK_CONTAINER (window), 0);
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
box = gtk_hbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER (window), box);
gtk_widget_show (box);
box1 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
box1 = gtk_vbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER (box), box1);
gtk_widget_show (box1);
@@ -176,7 +176,7 @@ do_menus (GtkWidget *do_widget)
gtk_menu_shell_append (GTK_MENU_SHELL (menubar), menuitem);
gtk_widget_show (menuitem);
box2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 10);
box2 = gtk_vbox_new (FALSE, 10);
gtk_container_set_border_width (GTK_CONTAINER (box2), 10);
gtk_box_pack_start (GTK_BOX (box1), box2, FALSE, TRUE, 0);
gtk_widget_show (box2);

View File

@@ -560,9 +560,8 @@ do_offscreen_window (GtkWidget *do_widget)
gtk_widget_modify_bg (window, GTK_STATE_NORMAL, &black);
gtk_container_set_border_width (GTK_CONTAINER (window), 10);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
scale = gtk_scale_new_with_range (GTK_ORIENTATION_HORIZONTAL,
0, G_PI/2, 0.01);
vbox = gtk_vbox_new (0, FALSE);
scale = gtk_hscale_new_with_range (0, G_PI/2, 0.01);
gtk_scale_set_draw_value (GTK_SCALE (scale), FALSE);
button = gtk_button_new_with_label ("A Button");

View File

@@ -461,13 +461,13 @@ do_offscreen_window2 (GtkWidget *do_widget)
gtk_container_set_border_width (GTK_CONTAINER (window), 10);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
vbox = gtk_vbox_new (0, FALSE);
bin = gtk_mirror_bin_new ();
group = gtk_size_group_new (GTK_SIZE_GROUP_VERTICAL);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
hbox = gtk_hbox_new (FALSE, 6);
backbutton = gtk_button_new ();
gtk_container_add (GTK_CONTAINER (backbutton),
gtk_image_new_from_stock (GTK_STOCK_GO_BACK, 4));

View File

@@ -153,14 +153,14 @@ do_panes (GtkWidget *do_widget)
gtk_window_set_title (GTK_WINDOW (window), "Panes");
gtk_container_set_border_width (GTK_CONTAINER (window), 0);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
vbox = gtk_vbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER (window), vbox);
vpaned = gtk_paned_new (GTK_ORIENTATION_VERTICAL);
vpaned = gtk_vpaned_new ();
gtk_box_pack_start (GTK_BOX (vbox), vpaned, TRUE, TRUE, 0);
gtk_container_set_border_width (GTK_CONTAINER(vpaned), 5);
hpaned = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL);
hpaned = gtk_hpaned_new ();
gtk_paned_add1 (GTK_PANED (vpaned), hpaned);
frame = gtk_frame_new (NULL);

View File

@@ -190,8 +190,7 @@ do_rotated_text (GtkWidget *do_widget)
gtk_window_set_default_size (GTK_WINDOW (window), 4 * RADIUS, 2 * RADIUS);
g_signal_connect (window, "destroy", G_CALLBACK (gtk_widget_destroyed), &window);
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
gtk_box_set_homogeneous (GTK_BOX (box), TRUE);
box = gtk_hbox_new (TRUE, 0);
gtk_container_add (GTK_CONTAINER (window), box);
/* Add a drawing area */

View File

@@ -266,7 +266,7 @@ do_search_entry (GtkWidget *do_widget)
content_area = gtk_dialog_get_content_area (GTK_DIALOG (window));
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
vbox = gtk_vbox_new (FALSE, 5);
gtk_box_pack_start (GTK_BOX (content_area), vbox, TRUE, TRUE, 0);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
@@ -274,7 +274,7 @@ do_search_entry (GtkWidget *do_widget)
gtk_label_set_markup (GTK_LABEL (label), "Search entry demo");
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
hbox = gtk_hbox_new (FALSE, 10);
gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, TRUE, 0);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 0);

View File

@@ -25,10 +25,10 @@ create_combo_box (const char **strings)
GtkWidget *combo_box;
const char **str;
combo_box = gtk_combo_box_text_new ();
combo_box = gtk_combo_box_new_text ();
for (str = strings; *str; str++)
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo_box), *str);
gtk_combo_box_append_text (GTK_COMBO_BOX (combo_box), *str);
gtk_combo_box_set_active (GTK_COMBO_BOX (combo_box), 0);
@@ -118,7 +118,7 @@ do_sizegroup (GtkWidget *do_widget)
content_area = gtk_dialog_get_content_area (GTK_DIALOG (window));
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
vbox = gtk_vbox_new (FALSE, 5);
gtk_box_pack_start (GTK_BOX (content_area), vbox, TRUE, TRUE, 0);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);

View File

@@ -50,12 +50,12 @@ do_spinner (GtkWidget *do_widget)
content_area = gtk_dialog_get_content_area (GTK_DIALOG (window));
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
vbox = gtk_vbox_new (FALSE, 5);
gtk_box_pack_start (GTK_BOX (content_area), vbox, TRUE, TRUE, 0);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
/* Sensitive */
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 5);
hbox = gtk_hbox_new (FALSE, 5);
spinner = gtk_spinner_new ();
gtk_container_add (GTK_CONTAINER (hbox), spinner);
gtk_container_add (GTK_CONTAINER (hbox), gtk_entry_new ());
@@ -63,7 +63,7 @@ do_spinner (GtkWidget *do_widget)
spinner_sensitive = spinner;
/* Disabled */
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 5);
hbox = gtk_hbox_new (FALSE, 5);
spinner = gtk_spinner_new ();
gtk_container_add (GTK_CONTAINER (hbox), spinner);
gtk_container_add (GTK_CONTAINER (hbox), gtk_entry_new ());

View File

@@ -417,7 +417,7 @@ do_stock_browser (GtkWidget *do_widget)
g_signal_connect (window, "destroy", G_CALLBACK (gtk_widget_destroyed), &window);
gtk_container_set_border_width (GTK_CONTAINER (window), 8);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
hbox = gtk_hbox_new (FALSE, 8);
gtk_container_add (GTK_CONTAINER (window), hbox);
sw = gtk_scrolled_window_new (NULL, NULL);
@@ -486,7 +486,7 @@ do_stock_browser (GtkWidget *do_widget)
frame = gtk_frame_new ("Selected Item");
gtk_container_add (GTK_CONTAINER (align), frame);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
vbox = gtk_vbox_new (FALSE, 8);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 4);
gtk_container_add (GTK_CONTAINER (frame), vbox);

View File

@@ -184,8 +184,7 @@ do_textscroll (GtkWidget *do_widget)
G_CALLBACK (gtk_widget_destroyed), &window);
gtk_window_set_default_size (GTK_WINDOW (window), 600, 400);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
gtk_box_set_homogeneous (GTK_BOX (hbox), TRUE);
hbox = gtk_hbox_new (TRUE, 6);
gtk_container_add (GTK_CONTAINER (window), hbox);
create_text_view (hbox, TRUE);

View File

@@ -371,15 +371,15 @@ attach_widgets (GtkTextView *text_view)
}
else if (i == 1)
{
widget = gtk_combo_box_text_new ();
widget = gtk_combo_box_new_text ();
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (widget), "Option 1");
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (widget), "Option 2");
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (widget), "Option 3");
gtk_combo_box_append_text (GTK_COMBO_BOX (widget), "Option 1");
gtk_combo_box_append_text (GTK_COMBO_BOX (widget), "Option 2");
gtk_combo_box_append_text (GTK_COMBO_BOX (widget), "Option 3");
}
else if (i == 2)
{
widget = gtk_scale_new (GTK_ORIENTATION_HORIZONTAL, NULL);
widget = gtk_hscale_new (NULL);
gtk_range_set_range (GTK_RANGE (widget), 0, 100);
gtk_widget_set_size_request (widget, 70, -1);
}
@@ -434,7 +434,7 @@ do_textview (GtkWidget *do_widget)
gtk_window_set_title (GTK_WINDOW (window), "TextView");
gtk_container_set_border_width (GTK_CONTAINER (window), 0);
vpaned = gtk_paned_new (GTK_ORIENTATION_VERTICAL);
vpaned = gtk_vpaned_new ();
gtk_container_set_border_width (GTK_CONTAINER(vpaned), 5);
gtk_container_add (GTK_CONTAINER (window), vpaned);

View File

@@ -438,7 +438,7 @@ do_toolpalette (GtkWidget *do_widget)
gtk_container_set_border_width (GTK_CONTAINER (window), 8);
/* Add widgets to control the ToolPalette appearance: */
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
box = gtk_vbox_new (FALSE, 6);
gtk_container_add (GTK_CONTAINER (window), box);
/* Orientation combo box: */
@@ -507,7 +507,7 @@ do_toolpalette (GtkWidget *do_widget)
gtk_box_pack_start (GTK_BOX (box), combo_style, FALSE, FALSE, 0);
/* Add hbox */
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 5);
hbox = gtk_hbox_new (FALSE, 5);
gtk_box_pack_start (GTK_BOX (box), hbox, TRUE, TRUE, 0);
/* Add and fill the ToolPalette: */

View File

@@ -402,7 +402,7 @@ do_tree_store (GtkWidget *do_widget)
g_signal_connect (window, "destroy",
G_CALLBACK (gtk_widget_destroyed), &window);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
vbox = gtk_vbox_new (FALSE, 8);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
gtk_container_add (GTK_CONTAINER (window), vbox);

View File

@@ -196,7 +196,7 @@ do_ui_manager (GtkWidget *do_widget)
g_error_free (error);
}
box1 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
box1 = gtk_vbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER (window), box1);
gtk_box_pack_start (GTK_BOX (box1),
@@ -209,11 +209,11 @@ do_ui_manager (GtkWidget *do_widget)
gtk_box_pack_start (GTK_BOX (box1), label, TRUE, TRUE, 0);
separator = gtk_separator_new (GTK_ORIENTATION_HORIZONTAL);
separator = gtk_hseparator_new ();
gtk_box_pack_start (GTK_BOX (box1), separator, FALSE, TRUE, 0);
box2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 10);
box2 = gtk_vbox_new (FALSE, 10);
gtk_container_set_border_width (GTK_CONTAINER (box2), 10);
gtk_box_pack_start (GTK_BOX (box1), box2, FALSE, TRUE, 0);

View File

@@ -323,7 +323,7 @@ do_image (const char *filename)
gtk_container_set_border_width (GTK_CONTAINER (window), 8);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
vbox = gtk_vbox_new (FALSE, 8);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
gtk_container_add (GTK_CONTAINER (window), vbox);
@@ -384,7 +384,7 @@ do_nonprogressive (const gchar *filename)
gtk_container_set_border_width (GTK_CONTAINER (window), 8);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
vbox = gtk_vbox_new (FALSE, 8);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
gtk_container_add (GTK_CONTAINER (window), vbox);

View File

@@ -350,7 +350,7 @@ main (int argc, char **argv)
g_signal_connect (window, "destroy",
G_CALLBACK (gtk_main_quit), NULL);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, FALSE, 0);
hbox = gtk_hbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER (window), hbox);
tree = create_tree ();

View File

@@ -365,7 +365,7 @@ main (int argc, char **argv)
g_signal_connect (window, "destroy",
G_CALLBACK (close_app), NULL);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
vbox = gtk_vbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER (window), vbox);
drawing_area = gtk_drawing_area_new ();

View File

@@ -98,15 +98,15 @@ main(int argc, char **argv)
g_signal_connect (window, "destroy",
G_CALLBACK (gtk_main_quit), NULL);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
vbox = gtk_vbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER (window), vbox);
combo_box = gtk_combo_box_text_new ();
combo_box = gtk_combo_box_new_text ();
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo_box), "NEAREST");
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo_box), "BILINEAR");
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo_box), "TILES");
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo_box), "HYPER");
gtk_combo_box_append_text (GTK_COMBO_BOX (combo_box), "NEAREST");
gtk_combo_box_append_text (GTK_COMBO_BOX (combo_box), "BILINEAR");
gtk_combo_box_append_text (GTK_COMBO_BOX (combo_box), "TILES");
gtk_combo_box_append_text (GTK_COMBO_BOX (combo_box), "HYPER");
gtk_combo_box_set_active (GTK_COMBO_BOX (combo_box), 1);
@@ -117,7 +117,7 @@ main(int argc, char **argv)
alignment = gtk_alignment_new (0.0, 0.0, 0.0, 0.5);
gtk_box_pack_start (GTK_BOX (vbox), alignment, FALSE, FALSE, 0);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
hbox = gtk_hbox_new (FALSE, 4);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
label = gtk_label_new ("Overall Alpha:");
@@ -127,7 +127,7 @@ main(int argc, char **argv)
g_signal_connect (adjustment, "value_changed",
G_CALLBACK (overall_changed_cb), NULL);
hscale = gtk_scale_new (GTK_ORIENTATION_HORIZONTAL, adjustment);
hscale = gtk_hscale_new (adjustment);
gtk_scale_set_digits (GTK_SCALE (hscale), 0);
gtk_box_pack_start (GTK_BOX (hbox), hscale, TRUE, TRUE, 0);

View File

@@ -1,7 +1,7 @@
## Process this file with automake to produce Makefile.in
include $(top_srcdir)/Makefile.decl
SUBDIRS = reference tools
SUBDIRS = tutorial faq reference tools
EXTRA_DIST += \
CODING-STYLE \

44
docs/faq/Makefile.am Normal file
View File

@@ -0,0 +1,44 @@
include $(top_srcdir)/Makefile.decl
EXTRA_DIST += \
gtk-faq.sgml
if HAVE_DOCBOOK
html:
if test -w $(srcdir); then \
(cd $(srcdir); \
db2html gtk-faq.sgml; \
test -d html && rm -r html; \
mv gtk-faq html); \
fi
pdf:
if test -w $(srcdir); then \
(cd $(srcdir); db2pdf gtk-faq.sgml); \
fi
all-local: html
dist-hook: html
cp -Rp $(srcdir)/html $(distdir)
else
html:
echo "***"
echo "*** Warning: FAQ not built"
echo "***"
pdf:
echo "***"
echo "*** Warning: FAQ not built"
echo "***"
dist-hook:
echo "***"
echo "*** Warning: FAQ not built"
echo "*** DISTRIBUTION IS INCOMPLETE"
echo "***"
endif
.PHONY: html
-include $(top_srcdir)/git.mk

3637
docs/faq/gtk-faq.sgml Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -17,29 +17,44 @@
<reference id="reference">
<title>API Reference</title>
<xi:include href="xml/general.xml" />
<xi:include href="multihead.sgml" />
<xi:include href="xml/gdkdisplay.xml" />
<xi:include href="xml/gdkdisplaymanager.xml" />
<xi:include href="xml/gdkscreen.xml" />
<xi:include href="xml/regions.xml" />
<xi:include href="xml/drawing.xml" />
<xi:include href="xml/colors.xml" />
<xi:include href="xml/rgba_colors.xml" />
<xi:include href="xml/visuals.xml" />
<xi:include href="xml/fonts.xml" />
<xi:include href="xml/cursors.xml" />
<xi:include href="xml/windows.xml" />
<xi:include href="xml/events.xml" />
<xi:include href="xml/event_structs.xml" />
<xi:include href="xml/keys.xml" />
<xi:include href="xml/selections.xml" />
<xi:include href="xml/dnd.xml" />
<xi:include href="xml/properties.xml" />
<xi:include href="xml/threads.xml" />
<xi:include href="xml/input.xml" />
<xi:include href="xml/gdkdevicemanager.xml" />
<xi:include href="xml/pango_interaction.xml" />
<xi:include href="xml/cairo_interaction.xml" />
<xi:include href="xml/x_interaction.xml" />
<xi:include href="xml/gdkapplaunchcontext.xml" />
<xi:include href="xml/gdktesting.xml" />
</reference>

View File

@@ -259,21 +259,6 @@ GDK_TYPE_COLOR
</SECTION>
<SECTION>
<TITLE>RGBA Colors</TITLE>
<FILE>rgba_colors</FILE>
GdkRGBA
gdk_rgba_copy
gdk_rgba_free
gdk_rgba_parse
gdk_rgba_equal
gdk_rgba_hash
gdk_rgba_to_string
<SUBSECTION Standard>
GDK_TYPE_RGBA
</SECTION>
<SECTION>
<TITLE>Drawing Primitives</TITLE>
<FILE>drawing</FILE>
@@ -436,7 +421,6 @@ gdk_window_merge_child_input_shapes
gdk_window_set_static_gravities
gdk_window_set_title
gdk_window_set_background
gdk_window_set_background_rgba
gdk_window_set_background_pattern
gdk_window_get_background_pattern
GDK_PARENT_RELATIVE
@@ -611,7 +595,6 @@ gdk_window_create_similar_surface
gdk_cairo_create
gdk_cairo_get_clip_rectangle
gdk_cairo_set_source_color
gdk_cairo_set_source_rgba
gdk_cairo_set_source_pixbuf
gdk_cairo_set_source_window
gdk_cairo_rectangle

View File

@@ -106,12 +106,12 @@ gtk_window_set_screen (window, second_screen);<!--
<para>
<variablelist>
<varlistentry>
<term><link linkend="GdkDisplay">GdkDisplay</link></term>
<term><link linkend="gdk-GdkDisplay">GdkDisplay</link></term>
<listitem><para>the GDK Object used to represent and manipulate display
related data</para></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="GdkScreen">GdkScreen</link></term>
<term><link linkend="gdk-GdkScreen">GdkScreen</link></term>
<listitem><para>the GDK Object used to represent and query screen related
data</para></listitem>
</varlistentry>

View File

@@ -8,10 +8,10 @@ Standard and pixmap cursors
<para>
These functions are used to create and destroy cursors.
There is a number of standard cursors, but it is also
possible to construct new cursors from pixbufs. There
may be limitations as to what kinds of cursors can be
constructed on a given display, see
gdk_display_supports_cursor_alpha(),
possible to construct new cursors from pixmaps and
pixbufs. There may be limitations as to what kinds of
cursors can be constructed on a given display, see
gdk_display_supports_cursor_alpha(),
gdk_display_supports_cursor_color(),
gdk_display_get_default_cursor_size() and
gdk_display_get_maximal_cursor_size().

View File

@@ -45,6 +45,52 @@ or a #GdkWindow.
</para>
<!-- ##### FUNCTION gdk_drawable_get_screen ##### -->
<para>
</para>
@drawable:
@Returns:
<!-- ##### FUNCTION gdk_drawable_get_visual ##### -->
<para>
</para>
@drawable:
@Returns:
<!-- ##### FUNCTION gdk_drawable_set_colormap ##### -->
<para>
</para>
@drawable:
@colormap:
<!-- ##### FUNCTION gdk_drawable_get_depth ##### -->
<para>
</para>
@drawable:
@Returns:
<!-- ##### FUNCTION gdk_drawable_get_size ##### -->
<para>
</para>
@drawable:
@width:
@height:
<!-- ##### FUNCTION gdk_drawable_get_clip_region ##### -->
<para>

View File

@@ -77,6 +77,33 @@ when GDK gets multihead support.
@Returns:
<!-- ##### FUNCTION gdk_screen_get_default_colormap ##### -->
<para>
</para>
@screen:
@Returns:
<!-- ##### FUNCTION gdk_screen_set_default_colormap ##### -->
<para>
</para>
@screen:
@colormap:
<!-- ##### FUNCTION gdk_screen_get_system_colormap ##### -->
<para>
</para>
@screen:
@Returns:
<!-- ##### FUNCTION gdk_screen_get_system_visual ##### -->
<para>
@@ -86,6 +113,15 @@ when GDK gets multihead support.
@Returns:
<!-- ##### FUNCTION gdk_screen_get_rgba_colormap ##### -->
<para>
</para>
@screen:
@Returns:
<!-- ##### FUNCTION gdk_screen_get_rgba_visual ##### -->
<para>

View File

@@ -326,30 +326,6 @@ available.
@void:
<!-- ##### FUNCTION gdk_error_trap_push ##### -->
<para>
</para>
@void:
<!-- ##### MACRO gdk_error_trap_pop ##### -->
<para>
</para>
<!-- ##### FUNCTION gdk_error_trap_pop_ignored ##### -->
<para>
</para>
@void:
<!-- ##### MACRO GDK_WINDOWING_X11 ##### -->
<para>
This macro is defined if GDK is configured to use the X11 backend.

View File

@@ -7,9 +7,9 @@ Using Pango in GDK
<!-- ##### SECTION Long_Description ##### -->
<para>
Pango is the text layout system used by GDK and GTK+. The functions
and types in this section are used to obtain clip regions for
#PangoLayouts, and to get #PangoContexts that can be used with
GDK.
and types in this section are used to render Pango objects to GDK.
drawables, and also extend the set of Pango attributes to include
stippling and embossing.
</para>
<para>
Creating a #PangoLayout object is the first step in rendering text,
@@ -24,38 +24,51 @@ between Pango units and pixels using <link
linkend="PANGO-SCALE-CAPS">PANGO_SCALE</link> or the PANGO_PIXELS() macro.)
</para>
<para>
Rendering a Pango layout is done most simply with pango_cairo_show_layout();
you can also draw pieces of the layout with pango_cairo_show_layout_line().
Rendering a Pango layout is done most simply with gdk_draw_layout();
you can also draw pieces of the layout with gdk_draw_layout().
#GdkPangoRenderer is a subclass of #PangoRenderer that is used internally
to implement these functions. Using it directly or subclassing it can be
useful in some cases. See the #GdkPangoRenderer documentation for details.
</para>
<example id="rotated-example">
<title>Draw transformed text with Pango and cairo</title>
<title>Using #GdkPangoRenderer to draw transformed text</title>
<!-- Note that this example is basically the same as
demos/gtk-demo/rotated_text.c -->
<programlisting>
#define RADIUS 100
#define N_WORDS 10
#define FONT "Sans Bold 18"
GdkScreen *screen = gdk_drawable_get_screen (drawable);
PangoRenderer *renderer;
GdkGC *gc;
PangoMatrix matrix = PANGO_MATRIX_INIT;
PangoContext *context;
PangoLayout *layout;
PangoFontDescription *desc;
double radius;
double device_radius;
int width, height;
int i;
/* Get the default renderer for the screen, and set it up for drawing */
renderer = gdk_pango_renderer_get_default (screen);
gdk_pango_renderer_set_drawable (GDK_PANGO_RENDERER (renderer), drawable);
gc = gdk_gc_new (drawable);
gdk_pango_renderer_set_gc (GDK_PANGO_RENDERER (renderer), gc);
/* Set up a transformation matrix so that the user space coordinates for
* where we are drawing are [-RADIUS, RADIUS], [-RADIUS, RADIUS]
* We first center, then change the scale */
gdk_drawable_get_size (drawable, &amp;width, &amp;height);
device_radius = MIN (width, height) / 2.;
width = gdk_window_get_width (window);
height = gdk_window_get_height (window);
radius = MIN (width, height) / 2.;
cairo_translate (cr,
radius + (width - 2 * radius) / 2,
radius + (height - 2 * radius) / 2);
cairo_scale (cr, radius / RADIUS, radius / RADIUS);
pango_matrix_translate (&amp;matrix,
device_radius + (width - 2 * device_radius) / 2,
device_radius + (height - 2 * device_radius) / 2);
pango_matrix_scale (&amp;matrix, device_radius / RADIUS, device_radius / RADIUS);
/* Create a PangoLayout, set the font and text */
context = gdk_pango_context_get_for_screen (screen);
@@ -68,32 +81,41 @@ pango_font_description_free (desc);
/* Draw the layout N_WORDS times in a circle */
for (i = 0; i &lt; N_WORDS; i++)
{
double red, green, blue;
double angle = 2 * G_PI * i / n_words;
cairo_save (cr);
GdkColor color;
PangoMatrix rotated_matrix = matrix;
int width, height;
double angle = (360. * i) / N_WORDS;
/* Gradient from red at angle == 60 to blue at angle == 300 */
red = (1 + cos (angle - 60)) / 2;
green = 0;
blue = 1 - red;
cairo_set_source_rgb (cr, red, green, blue);
cairo_rotate (cr, angle);
color.red = 65535 * (1 + cos ((angle - 60) * M_PI / 180.)) / 2;
color.green = 0;
color.blue = 65535 - color.red;
gdk_pango_renderer_set_override_color (GDK_PANGO_RENDERER (renderer),
PANGO_RENDER_PART_FOREGROUND, &amp;color);
pango_matrix_rotate (&amp;rotated_matrix, angle);
pango_context_set_matrix (context, &amp;rotated_matrix);
/* Inform Pango to re-layout the text with the new transformation matrix */
pango_cairo_update_layout (cr, layout);
pango_layout_context_changed (layout);
pango_layout_get_size (layout, &amp;width, &amp;height);
cairo_move_to (cr, - width / 2 / PANGO_SCALE, - DEFAULT_TEXT_RADIUS);
pango_cairo_show_layout (cr, layout);
cairo_restore (cr);
pango_renderer_draw_layout (renderer, layout,
- width / 2, - RADIUS * PANGO_SCALE);
}
/* Clean up default renderer, since it is shared */
gdk_pango_renderer_set_override_color (GDK_PANGO_RENDERER (renderer),
PANGO_RENDER_PART_FOREGROUND, NULL);
gdk_pango_renderer_set_drawable (GDK_PANGO_RENDERER (renderer), NULL);
gdk_pango_renderer_set_gc (GDK_PANGO_RENDERER (renderer), NULL);
/* free the objects we created */
g_object_unref (layout);
g_object_unref (context);
g_object_unref (gc);
</programlisting>
</example>
<figure>
@@ -138,21 +160,3 @@ g_object_unref (context);
@Returns:
<!-- ##### FUNCTION gdk_pango_context_get ##### -->
<para>
</para>
@void:
@Returns:
<!-- ##### FUNCTION gdk_pango_context_get_for_screen ##### -->
<para>
</para>
@screen:
@Returns:

View File

@@ -36,7 +36,7 @@ then %GDK_VISUAL_STATIC_GRAY.
<!-- ##### SECTION See_Also ##### -->
<para>
#GdkColormap
</para>
<!-- ##### SECTION Stability_Level ##### -->

View File

@@ -6,17 +6,7 @@ X backend-specific functions
<!-- ##### SECTION Long_Description ##### -->
<para>
The functions in this section are specific to the GDK X11 backend.
To use them, you need to include the <literal>&lt;gdk/gdkx.h&gt;</literal>
header and use the X11-specific pkg-config files to build your application
(either <literal>gdk-x11-3.0</literal> or <literal>gtk+-x11-3.0</literal>.
To make your code compile with other GDK backends, guard backend-specific
calls by an ifdef as follows:
<informalexample><programlisting>
#ifdef GDK_WINDOWING_X11
/* X11-specific calls here... */
#endif
</programlisting></informalexample>
</para>
<!-- ##### SECTION See_Also ##### -->
@@ -37,6 +27,14 @@ Obtains the Xlib window id of the root window of the current screen.
<!-- ##### MACRO GDK_DISPLAY ##### -->
<para>
The current display.
</para>
@Returns: an Xlib <type>Display*</type>.
<!-- ##### MACRO GDK_WINDOW_XDISPLAY ##### -->
<para>
Returns the display of a #GdkWindow.
@@ -55,6 +53,24 @@ Returns the X window belonging to a #GdkWindow.
@Returns: the Xlib <type>Window</type> of @win.
<!-- ##### MACRO GDK_PIXMAP_XDISPLAY ##### -->
<para>
Returns the display of a #GdkPixmap.
</para>
@pix: a #GdkPixmap.
@Returns: an Xlib <type>Display*</type>.
<!-- ##### MACRO GDK_PIXMAP_XID ##### -->
<para>
Returns the X pixmap belonging to a #GdkPixmap.
</para>
@pix: a #GdkPixmap.
@Returns: the Xlib <type>XPixmap</type> of @win.
<!-- ##### MACRO GDK_DISPLAY_XDISPLAY ##### -->
<para>
Returns the display of a #GdkDisplay.
@@ -81,6 +97,24 @@ Returns the X resource (window or pixmap) belonging to a #GdkDrawable.
@Returns: the ID of @win's X resource.
<!-- ##### MACRO GDK_COLORMAP_XDISPLAY ##### -->
<para>
Returns the display of a #GdkColormap.
</para>
@cmap: a #GdkColormap.
@Returns: an Xlib <type>Display*</type>.
<!-- ##### MACRO GDK_COLORMAP_XCOLORMAP ##### -->
<para>
Returns the X colormap belonging to a #GdkColormap.
</para>
@cmap: a #GdkColormap.
@Returns: an Xlib <type>Colormap</type>.
<!-- ##### MACRO GDK_SCREEN_XDISPLAY ##### -->
<para>
Returns the display of a #GdkScreen.
@@ -109,6 +143,15 @@ Returns the screen of a #GdkScreen.
@Returns: an Xlib <type>Screen*</type>.
<!-- ##### MACRO GDK_VISUAL_XVISUAL ##### -->
<para>
Returns the X visual belonging to a #GdkVisual.
</para>
@vis: a #GdkVisual.
@Returns: an Xlib <type>Visual*</type>.
<!-- ##### MACRO GDK_CURSOR_XCURSOR ##### -->
<para>
Returns the X cursor belonging to a #GdkCursor.
@@ -143,6 +186,38 @@ Another name for GDK_DRAWABLE_XID().
@Returns:
<!-- ##### FUNCTION gdk_pixmap_foreign_new ##### -->
<para>
</para>
@anid:
@Returns:
<!-- ##### FUNCTION gdk_pixmap_foreign_new_for_display ##### -->
<para>
</para>
@display:
@anid:
@Returns:
<!-- ##### FUNCTION gdk_pixmap_foreign_new_for_screen ##### -->
<para>
</para>
@screen:
@anid:
@width:
@height:
@depth:
@Returns:
<!-- ##### FUNCTION gdk_window_foreign_new ##### -->
<para>
@@ -199,6 +274,24 @@ Another name for GDK_DRAWABLE_XID().
@Returns:
<!-- ##### FUNCTION gdk_pixmap_lookup ##### -->
<para>
</para>
@anid:
@Returns:
<!-- ##### FUNCTION gdk_pixmap_lookup_for_display ##### -->
<para>
</para>
@display:
@anid:
@Returns:
<!-- ##### FUNCTION gdk_x11_lookup_xdisplay ##### -->
<para>
@@ -291,6 +384,34 @@ Another name for GDK_DRAWABLE_XID().
@Returns:
<!-- ##### FUNCTION gdk_x11_colormap_foreign_new ##### -->
<para>
</para>
@visual:
@xcolormap:
@Returns:
<!-- ##### FUNCTION gdk_x11_colormap_get_xcolormap ##### -->
<para>
</para>
@colormap:
@Returns:
<!-- ##### FUNCTION gdk_x11_colormap_get_xdisplay ##### -->
<para>
</para>
@colormap:
@Returns:
<!-- ##### FUNCTION gdk_x11_cursor_get_xcursor ##### -->
<para>
@@ -353,22 +474,6 @@ Another name for GDK_DRAWABLE_XID().
@display:
<!-- ##### FUNCTION gdk_x11_display_error_trap_push ##### -->
<para>
</para>
@display:
<!-- ##### FUNCTION gdk_x11_display_error_trap_pop_ignored ##### -->
<para>
</para>
@display:
<!-- ##### FUNCTION gdk_x11_display_set_cursor_theme ##### -->
<para>

View File

@@ -121,7 +121,6 @@ content_files = \
glossary.xml \
migrating-2to3.xml \
migrating-checklist.sgml \
migrating-GtkApplication.xml \
objects_grouped.sgml \
osx.sgml \
question_index.sgml \
@@ -133,20 +132,16 @@ content_files = \
gtk-query-immodules-3.0.xml \
gtk-update-icon-cache-3.0.xml \
gtk-builder-convert-3.0.xml \
visual_index.xml \
getting_started.xml \
overview.xml
visual_index.xml
expand_content_files = \
drawing-model.xml \
getting_started.xml \
glossary.xml \
migrating-2to3.xml \
migrating-checklist.sgml \
migrating-GtkApplication.xml \
question_index.sgml \
tree_widget.sgml \
text_widget.sgml \
tree_widget.sgml
question_index.sgml
# Images to copy into HTML directory
HTML_IMAGES = \
@@ -320,9 +315,7 @@ HTML_IMAGES = \
$(srcdir)/images/layout-rlbt.png \
$(srcdir)/images/layout-rltb.png \
$(srcdir)/images/layout-tblr.png \
$(srcdir)/images/layout-tbrl.png \
$(srcdir)/images/window-default.png \
$(srcdir)/images/hello-world.png
$(srcdir)/images/layout-tbrl.png
# Extra options to supply to gtkdoc-fixref
FIXXREF_OPTIONS=--extra-dir=../gdk/html \

View File

@@ -333,6 +333,10 @@ How to compile GTK+ itself
<arg>--disable-Bsymbolic</arg>
<arg>--enable-Bsymbolic</arg>
</group>
<group>
<arg>--disable-shm</arg>
<arg>--enable-shm</arg>
</group>
<group>
<arg>--disable-xkb</arg>
<arg>--enable-xkb</arg>
@@ -444,6 +448,17 @@ How to compile GTK+ itself
</para>
</formalpara>
<formalpara>
<title><systemitem>--disable-shm</systemitem> and
<systemitem>--enable-shm</systemitem></title>
<para>
These options can be used to control whether GTK+ will use shared
memory to communicate with the X server when possible.
The default is 'yes'.
</para>
</formalpara>
<formalpara>
<title><systemitem>--disable-xkb</systemitem> and
<systemitem>--enable-xkb</systemitem></title>

View File

@@ -1,108 +0,0 @@
<?xml version="1.0"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
]>
<chapter id="gtk-getting-started" xmlns:xi="http://www.w3.org/2003/XInclude">
<title>Getting Started with GTK+</title>
<para>This chapter is contains some tutorial information to get you
started with GTK+ programming. It assumes that you have GTK+, its
dependencies and a C compiler installed and ready to use. If you
need to build GTK+ itself first, refer to the
<link linkend="gtk-compiling">Compiling the GTK+ libraries</link>
section in this reference.</para>
<para>To begin our introduction to GTK, we'll start with the simplest
program possible. This program will create an empty 200x200 pixel
window:</para>
<para>
<inlinegraphic fileref="window-default.png" format="PNG"></inlinegraphic>
</para>
<informalexample><programlisting>
<xi:include href="../../../../examples/window-default.c" parse="text">
<xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback>
</xi:include>
</programlisting></informalexample>
<para>You can compile the program above with GCC using:</para>
<para><literallayout>
<literal>gcc `pkg-config --cflags gtk+-3.0` -o window-default window-default.c `pkg-config --libs gtk+-3.0`</literal>
</literallayout></para>
<note><para>For more information on how to compile a GTK+ application, please
refer to the <link linkend="gtk-compiling">Compiling GTK+ Applications</link>
section in this reference.</para></note>
<para>All GTK+ applications will, of course, include
<filename>gtk/gtk.h</filename>, which declares functions, types and
macros required by GTK+ applications.</para>
<warning><para>Even if GTK+ installs multiple header files, only the
top-level <filename>gtk/gtk.h</filename> header can be directly included
by third party code. The compiler will abort with an error if any other
header will be included.</para></warning>
<para>We then proceed into the <function>main</function>() function of the
application, and we declare a <varname>window</varname> variable as a pointer
of type #GtkWidget.</para>
<para>The following line will call gtk_init(), which
is the initialization function for GTK+; this function will set up GTK+,
the type system, the connection to the windowing environment, etc. The
gtk_init() takes as arguments the pointers to the command line arguments
counter and string array; this allows GTK+ to parse specific command line
arguments that control the behavior of GTK+ itself. The parsed arguments
will be removed from the array, leaving the unrecognized ones for your
application to parse.</para>
<note><para>For more information on which command line arguments GTK+
recognizes, please refer to the <link linkend="gtk-running">Running GTK+
Applications</link> section in this reference.</para></note>
<para>The call to gtk_window_new() will create a new #GtkWindow and store
it inside the <varname>window</varname> variable. The type of the window
is %GTK_WINDOW_TOPLEVEL, which means that the #GtkWindow will be managed
by the windowing system: it will have a frame, a title bar and window
controls, depending on the platform.</para>
<para>In order to terminate the application when the #GtkWindow is
destroyed, we connect the #GtkWidget::destroy signal to the gtk_main_quit()
function. This function will terminate the GTK+ main loop started by calling
gtk_main() later. The #GtkWidget::destroy signal is emitted when a widget is
destroyed, either by explicitly calling gtk_widget_destroy() or when the
widget is unparented. Top-level #GtkWindow<!-- -->s are also destroyed when
the Close window control button is clicked.</para>
<para>#GtkWidget<!-- -->s are hidden by default. By calling gtk_widget_show()
on a #GtkWidget we are asking GTK+ to set the visibility attribute so that it
can be displayed. All this work is done after the main loop has been
started.</para>
<para>The last line of interest is the call to gtk_main(). This function will
start the GTK+ main loop and will block the control flow of the
<function>main</function>() until the gtk_main_quit() function is
called.</para>
<para>The following example is slightly more complex, and tries to
showcase some of the capabilities of GTK+.</para>
<para>In the long tradition of programming languages and libraries,
it is called <emphasis>Hello, World</emphasis>.</para>
<para>
<inlinegraphic fileref="hello-world.png" format="PNG"></inlinegraphic>
</para>
<example id="gtk-getting-started-hello-world">
<title>Hello World in GTK+</title>
<programlisting>
<xi:include href="../../../../examples/hello-world.c" parse="text">
<xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback>
</xi:include>
</programlisting>
</example>
</chapter>

View File

@@ -16,8 +16,102 @@
<part id="gtk">
<title>GTK+ Overview</title>
<xi:include href="overview.xml"/>
<xi:include href="xml/getting_started.xml"/>
<partintro>
<para>
GTK+ is a library for creating graphical user interfaces. It
works on many UNIX-like platforms, Windows, and on framebuffer
devices. GTK+ is released under the GNU Library General Public License
(GNU LGPL), which allows for flexible licensing of client
applications. GTK+ has a C-based object-oriented architecture that
allows for maximum flexibility. Bindings for other languages have
been written, including C++, Objective-C, Guile/Scheme, Perl, Python,
TOM, Ada95, Free Pascal, and Eiffel.
</para>
<para>
GTK+ depends on the following libraries:
<variablelist>
<varlistentry>
<term>GLib</term>
<listitem><para>
A general-purpose utility library, not specific to graphical user interfaces.
GLib provides many useful data types, macros, type conversions,
string utilities, file utilities, a main loop abstraction, and so on.
</para></listitem>
</varlistentry>
<varlistentry>
<term>GObject</term>
<listitem><para>A library that provides a type system, a collection of
fundamental types including an object type, a signal system.
</para></listitem>
</varlistentry>
<varlistentry>
<term>GIO</term>
<listitem><para>A modern, easy-to-use VFS API including abstractions for
files, drives, volumes, stream IO, as well as network programming and
DBus communication.
</para></listitem>
</varlistentry>
<varlistentry>
<term>cairo</term>
<listitem><para>Cairo is a 2D graphics library with support for multiple
output devices.
</para></listitem>
</varlistentry>
<varlistentry>
<term>Pango</term>
<listitem><para>
Pango is a library for internationalized text handling. It centers
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 #GdkPixbuf
("pixel buffer") objects from image data or image files.
Use a #GdkPixbuf in combination with #GtkImage to display images.
</para></listitem>
</varlistentry>
<varlistentry>
<term>GDK</term>
<listitem><para>
GDK is the abstraction layer that allows GTK+ to support multiple
windowing systems. GDK provides drawing and window system facilities
on X11, Windows, and the Linux framebuffer device.
</para></listitem>
</varlistentry>
<varlistentry>
<term>GTK+</term>
<listitem><para>
The GTK+ library itself contains <firstterm>widgets</firstterm>,
that is, GUI components such as #GtkButton or #GtkTextView.
</para></listitem>
</varlistentry>
</variablelist>
</para>
</partintro>
<xi:include href="building.sgml" />
<xi:include href="compiling.sgml" />
<xi:include href="running.sgml" />
@@ -33,7 +127,6 @@
<part id="gtkbase">
<title>GTK+ Core Reference</title>
<xi:include href="xml/gtkmain.xml" />
<xi:include href="xml/gtkfeatures.xml" />
<xi:include href="xml/gtkaccelgroup.xml" />
<xi:include href="xml/gtkaccelmap.xml" />
<xi:include href="xml/gtkclipboard.xml" />
@@ -47,6 +140,7 @@
<xi:include href="xml/gtkenums.xml" />
<xi:include href="xml/gtkstyle.xml" />
<xi:include href="xml/gtkselection.xml" />
<xi:include href="xml/gtkfeatures.xml" />
<xi:include href="xml/gtktesting.xml" />
<xi:include href="xml/filesystem.xml" />
</part>
@@ -153,7 +247,7 @@
<chapter id="MenusAndCombos">
<title>Menus, Combo Box, Toolbar</title>
<xi:include href="xml/gtkcombobox.xml" />
<xi:include href="xml/gtkcomboboxtext.xml" />
<xi:include href="xml/gtkcomboboxentry.xml" />
<xi:include href="xml/gtkmenu.xml" />
<xi:include href="xml/gtkmenubar.xml" />
<xi:include href="xml/gtkmenuitem.xml" />
@@ -203,7 +297,6 @@
<chapter id="LayoutContainers">
<title>Layout Containers</title>
<xi:include href="xml/gtkgrid.xml" />
<xi:include href="xml/gtkalignment.xml" />
<xi:include href="xml/gtkaspectframe.xml" />
<xi:include href="xml/gtkbox.xml" />
@@ -212,6 +305,7 @@
<xi:include href="xml/gtkbbox.xml" />
<xi:include href="xml/gtkhbbox.xml" />
<xi:include href="xml/gtkvbbox.xml" />
<xi:include href="xml/gtkwrapbox.xml" />
<xi:include href="xml/gtkfixed.xml" />
<xi:include href="xml/gtkpaned.xml" />
<xi:include href="xml/gtkhpaned.xml" />
@@ -221,6 +315,7 @@
<xi:include href="xml/gtktable.xml" />
<xi:include href="xml/gtkexpander.xml" />
<xi:include href="xml/gtkorientable.xml" />
<xi:include href="xml/gtksizerequest.xml" />
</chapter>
<chapter id="Ornaments">
@@ -237,7 +332,6 @@
<xi:include href="xml/gtkhscrollbar.xml" />
<xi:include href="xml/gtkvscrollbar.xml" />
<xi:include href="xml/gtkscrolledwindow.xml" />
<xi:include href="xml/gtkscrollable.xml" />
</chapter>
<chapter id="Printing">
@@ -271,12 +365,12 @@
<chapter id="AbstractObjects">
<title>Abstract Base Classes</title>
<xi:include href="xml/gtkwidget.xml" />
<xi:include href="xml/gtkcontainer.xml" />
<xi:include href="xml/gtkbin.xml" />
<xi:include href="xml/gtkcontainer.xml" />
<xi:include href="xml/gtkmenushell.xml" />
<xi:include href="xml/gtkmisc.xml" />
<xi:include href="xml/gtkrange.xml" />
<xi:include href="xml/gtkwidget.xml" />
<xi:include href="xml/gtkimcontext.xml" />
</chapter>
@@ -330,7 +424,6 @@
<xi:include href="xml/migrating-checklist.sgml" />
<xi:include href="xml/migrating-2to3.xml" />
<xi:include href="xml/migrating-GtkApplication.xml" />
</part>
<part>

View File

@@ -89,7 +89,6 @@ GTK_IS_ACCEL_GROUP_CLASS
GTK_ACCEL_GROUP_GET_CLASS
<SUBSECTION Private>
GTK_ACCEL_GROUP_GET_PRIVATE
GtkAccelGroupPrivate
GtkAccelGroupEntry
gtk_accel_group_get_type
@@ -164,7 +163,6 @@ GTK_ACCESSIBLE_GET_CLASS
GTK_IS_ACCESSIBLE
GTK_IS_ACCESSIBLE_CLASS
<SUBSECTION Private>
GtkAccessiblePrivate
gtk_accessible_get_type
</SECTION>
@@ -399,7 +397,6 @@ GTK_ARROW_CLASS
GTK_IS_ARROW_CLASS
GTK_ARROW_GET_CLASS
<SUBSECTION Private>
GtkArrowPrivate
gtk_arrow_get_type
</SECTION>
@@ -671,13 +668,10 @@ gtk_check_menu_item_get_type
GtkColorButton
gtk_color_button_new
gtk_color_button_new_with_color
gtk_color_button_new_with_rgba
gtk_color_button_set_color
gtk_color_button_get_color
gtk_color_button_set_alpha
gtk_color_button_get_alpha
gtk_color_button_set_rgba
gtk_color_button_get_rgba
gtk_color_button_set_use_alpha
gtk_color_button_get_use_alpha
gtk_color_button_set_title
@@ -734,10 +728,6 @@ gtk_color_selection_get_previous_alpha
gtk_color_selection_set_previous_alpha
gtk_color_selection_get_previous_color
gtk_color_selection_set_previous_color
gtk_color_selection_get_current_rgba
gtk_color_selection_set_current_rgba
gtk_color_selection_get_previous_rgba
gtk_color_selection_set_previous_rgba
gtk_color_selection_is_adjusting
gtk_color_selection_palette_from_string
gtk_color_selection_palette_to_string
@@ -777,9 +767,7 @@ gtk_color_selection_dialog_get_type
<TITLE>GtkComboBox</TITLE>
GtkComboBox
gtk_combo_box_new
gtk_combo_box_new_with_entry
gtk_combo_box_new_with_model
gtk_combo_box_new_with_model_and_entry
gtk_combo_box_get_wrap_width
gtk_combo_box_set_wrap_width
gtk_combo_box_get_row_span_column
@@ -792,6 +780,12 @@ gtk_combo_box_get_active_iter
gtk_combo_box_set_active_iter
gtk_combo_box_get_model
gtk_combo_box_set_model
gtk_combo_box_new_text
gtk_combo_box_append_text
gtk_combo_box_insert_text
gtk_combo_box_prepend_text
gtk_combo_box_remove_text
gtk_combo_box_get_active_text
gtk_combo_box_popup_for_device
gtk_combo_box_popup
gtk_combo_box_popdown
@@ -806,11 +800,6 @@ gtk_combo_box_set_focus_on_click
gtk_combo_box_get_focus_on_click
gtk_combo_box_set_button_sensitivity
gtk_combo_box_get_button_sensitivity
gtk_combo_box_get_has_entry
gtk_combo_box_set_entry_text_column
gtk_combo_box_get_entry_text_column
gtk_combo_box_set_popup_fixed_width
gtk_combo_box_get_popup_fixed_width
<SUBSECTION Standard>
GTK_TYPE_COMBO_BOX
GTK_COMBO_BOX
@@ -824,29 +813,24 @@ gtk_combo_box_get_type
</SECTION>
<SECTION>
<FILE>gtkcomboboxtext</FILE>
<TITLE>GtkComboBoxText</TITLE>
GtkComboBoxText
gtk_combo_box_text_new
gtk_combo_box_text_new_with_entry
gtk_combo_box_text_append_text
gtk_combo_box_text_insert_text
gtk_combo_box_text_prepend_text
gtk_combo_box_text_remove
gtk_combo_box_text_remove_all
gtk_combo_box_text_get_active_text
<FILE>gtkcomboboxentry</FILE>
<TITLE>GtkComboBoxEntry</TITLE>
GtkComboBoxEntry
gtk_combo_box_entry_new
gtk_combo_box_entry_new_with_model
gtk_combo_box_entry_new_text
gtk_combo_box_entry_set_text_column
gtk_combo_box_entry_get_text_column
<SUBSECTION Standard>
GTK_TYPE_COMBO_BOX_TEXT
GTK_COMBO_BOX_TEXT
GTK_IS_COMBO_BOX_TEXT
GTK_COMBO_BOX_TEXT_CLASS
GTK_IS_COMBO_BOX_TEXT_CLASS
GTK_COMBO_BOX_TEXT_GET_CLASS
GTK_TYPE_COMBO_BOX_ENTRY
GTK_COMBO_BOX_ENTRY
GTK_COMBO_BOX_ENTRY_CLASS
GTK_IS_COMBO_BOX_ENTRY
GTK_IS_COMBO_BOX_ENTRY_CLASS
GTK_COMBO_BOX_ENTRY_GET_CLASS
<SUBSECTION Private>
GtkComboBoxTextPrivate
gtk_combo_box_text_get_type
GtkComboBoxEntryPrivate
gtk_combo_box_entry_get_type
</SECTION>
<SECTION>
@@ -976,7 +960,6 @@ GTK_TYPE_EDITABLE
GTK_EDITABLE_CLASS
GTK_IS_EDITABLE_CLASS
GTK_EDITABLE_GET_CLASS
GTK_EDITABLE_GET_IFACE
<SUBSECTION Private>
gtk_editable_get_type
</SECTION>
@@ -992,7 +975,6 @@ gtk_entry_set_buffer
gtk_entry_set_text
gtk_entry_get_text
gtk_entry_get_text_length
gtk_entry_get_text_area
gtk_entry_set_visibility
gtk_entry_set_invisible_char
gtk_entry_unset_invisible_char
@@ -1048,7 +1030,8 @@ gtk_entry_set_icon_tooltip_markup
gtk_entry_get_icon_tooltip_markup
gtk_entry_set_icon_drag_source
gtk_entry_get_current_icon_drag_source
gtk_entry_get_icon_area
gtk_entry_get_icon_window
gtk_entry_get_text_window
<SUBSECTION Standard>
GTK_ENTRY
@@ -2637,12 +2620,10 @@ gtk_recent_info_get_private_hint
gtk_recent_info_get_application_info
gtk_recent_info_get_applications
gtk_recent_info_last_application
gtk_recent_info_has_application
gtk_recent_info_create_app_info
gtk_recent_info_get_groups
gtk_recent_info_has_group
gtk_recent_info_has_application
gtk_recent_info_get_icon
gtk_recent_info_get_gicon
gtk_recent_info_get_short_name
gtk_recent_info_get_uri_display
gtk_recent_info_get_age
@@ -2760,28 +2741,6 @@ GtkScaleButtonPrivate
gtk_scale_button_get_type
</SECTION>
<SECTION>
<FILE>gtkscrollable</FILE>
<TITLE>GtkScrollable</TITLE>
GtkScrollable
gtk_scrollable_get_hadjustment
gtk_scrollable_set_hadjustment
gtk_scrollable_get_vadjustment
gtk_scrollable_set_vadjustment
<SUBSECTION Standard>
GtkScrollableIface
GTK_IS_SCROLLABLE
GTK_IS_SCROLLABLE_CLASS
GTK_SCROLLABLE
GTK_SCROLLABLE_CLASS
GTK_SCROLLABLE_GET_IFACE
GTK_TYPE_SCROLLABLE
<SUBSECTION Private>
gtk_scrollable_get_type
</SECTION>
<SECTION>
<FILE>gtkscrollbar</FILE>
<TITLE>GtkScrollbar</TITLE>
@@ -2817,11 +2776,6 @@ gtk_scrolled_window_set_vadjustment
gtk_scrolled_window_get_placement
gtk_scrolled_window_get_policy
gtk_scrolled_window_get_shadow_type
gtk_scrolled_window_get_min_content_width
gtk_scrolled_window_set_min_content_width
gtk_scrolled_window_get_min_content_height
gtk_scrolled_window_set_min_content_height
<SUBSECTION Standard>
GTK_SCROLLED_WINDOW
GTK_IS_SCROLLED_WINDOW
@@ -3016,6 +2970,8 @@ gtk_statusbar_push
gtk_statusbar_pop
gtk_statusbar_remove
gtk_statusbar_remove_all
gtk_statusbar_set_has_resize_grip
gtk_statusbar_get_has_resize_grip
gtk_statusbar_get_message_area
<SUBSECTION Standard>
GTK_STATUSBAR
@@ -3839,7 +3795,6 @@ GtkToolPaletteDragTargets
gtk_tool_palette_set_drag_source
gtk_tool_palette_get_hadjustment
gtk_tool_palette_get_vadjustment
<SUBSECTION Standard>
GtkToolPaletteClass
GTK_TOOL_PALETTE
@@ -4337,7 +4292,6 @@ gtk_cell_view_set_displayed_row
gtk_cell_view_get_displayed_row
gtk_cell_view_get_size_of_row
gtk_cell_view_set_background_color
gtk_cell_view_set_background_rgba
<SUBSECTION Standard>
GtkCellViewClass
GTK_TYPE_CELL_VIEW
@@ -4790,6 +4744,7 @@ gtk_widget_show
gtk_widget_show_now
gtk_widget_hide
gtk_widget_show_all
gtk_widget_hide_all
gtk_widget_map
gtk_widget_unmap
gtk_widget_realize
@@ -4867,12 +4822,12 @@ gtk_widget_render_icon
gtk_widget_pop_composite_child
gtk_widget_push_composite_child
gtk_widget_queue_draw_area
gtk_widget_queue_draw_region
gtk_widget_reset_shapes
gtk_widget_set_app_paintable
gtk_widget_set_double_buffered
gtk_widget_set_redraw_on_allocate
gtk_widget_set_composite_name
gtk_widget_set_scroll_adjustments
gtk_widget_mnemonic_activate
gtk_widget_class_install_style_property
gtk_widget_class_install_style_property_parser
@@ -4961,18 +4916,7 @@ gtk_requisition_new
gtk_requisition_copy
gtk_requisition_free
<SUBSECTION Width-for-Height>
GtkSizeRequestMode
GtkRequestedSize
gtk_widget_get_preferred_height
gtk_widget_get_preferred_width
gtk_widget_get_preferred_height_for_width
gtk_widget_get_preferred_width_for_height
gtk_widget_get_request_mode
gtk_widget_get_preferred_size
gtk_distribute_natural_allocation
<SUBSECTION Alignment and Margins>
<SUBSECTION>
GtkAlign
gtk_widget_get_halign
gtk_widget_set_halign
@@ -4987,18 +4931,6 @@ gtk_widget_set_margin_top
gtk_widget_get_margin_bottom
gtk_widget_set_margin_bottom
<SUBSECTION Expand>
gtk_widget_get_hexpand
gtk_widget_set_hexpand
gtk_widget_get_hexpand_set
gtk_widget_set_hexpand_set
gtk_widget_get_vexpand
gtk_widget_set_vexpand
gtk_widget_get_vexpand_set
gtk_widget_set_vexpand_set
gtk_widget_queue_compute_expand
gtk_widget_compute_expand
<SUBSECTION Standard>
GTK_WIDGET
GTK_IS_WIDGET
@@ -5028,7 +4960,6 @@ gtk_window_activate_focus
gtk_window_activate_default
gtk_window_set_modal
gtk_window_set_default_size
gtk_window_set_default_geometry
gtk_window_set_geometry_hints
gtk_window_set_gravity
gtk_window_get_gravity
@@ -5107,7 +5038,6 @@ gtk_window_move
gtk_window_parse_geometry
gtk_window_reshow_with_initial_size
gtk_window_resize
gtk_window_resize_to_geometry
gtk_window_set_default_icon_list
gtk_window_set_default_icon
gtk_window_set_default_icon_from_file
@@ -5121,13 +5051,6 @@ gtk_window_get_opacity
gtk_window_set_opacity
gtk_window_get_mnemonics_visible
gtk_window_set_mnemonics_visible
gtk_window_set_has_resize_grip
gtk_window_get_has_resize_grip
gtk_window_resize_grip_is_visible
gtk_window_get_resize_grip_area
gtk_window_get_application
gtk_window_set_application
<SUBSECTION Standard>
GTK_WINDOW
GTK_IS_WINDOW
@@ -5366,9 +5289,6 @@ GtkRcContext
GtkTargetEntry
GtkTargetList
GtkTargetPair
gtk_target_entry_new
gtk_target_entry_copy
gtk_target_entry_free
gtk_target_list_new
gtk_target_list_ref
gtk_target_list_unref
@@ -5420,7 +5340,6 @@ GTK_TYPE_TARGET_LIST
<SUBSECTION Private>
gtk_selection_data_get_type
gtk_target_list_get_type
gtk_target_entry_get_type
</SECTION>
<SECTION>
@@ -5564,6 +5483,8 @@ GtkScrollType
GtkSelectionMode
GtkShadowType
GtkStateType
GtkSubmenuDirection
GtkSubmenuPlacement
GtkToolbarStyle
GtkUpdateType
GtkWindowPosition
@@ -6344,15 +6265,43 @@ GTK_TYPE_ORIENTABLE
gtk_orientable_get_type
</SECTION>
<SECTION>
<FILE>gtksizerequest</FILE>
<TITLE>GtkSizeRequest</TITLE>
GtkSizeRequestMode
GtkRequestedSize
gtk_widget_get_preferred_height
gtk_widget_get_preferred_width
gtk_widget_get_preferred_height_for_width
gtk_widget_get_preferred_width_for_height
gtk_widget_get_request_mode
gtk_widget_get_preferred_size
gtk_distribute_natural_allocation
<SUBSECTION Standard>
GTK_SIZE_REQUEST
GTK_SIZE_REQUEST_CLASS
GTK_SIZE_REQUEST_GET_IFACE
GTK_IS_SIZE_REQUEST
GTK_TYPE_SIZE_REQUEST
<SUBSECTION Private>
gtk_widget_get_type
</SECTION>
<SECTION>
<FILE>gtkapplication</FILE>
<TITLE>GtkApplication</TITLE>
GtkApplication
gtk_application_new
gtk_application_run
gtk_application_quit
gtk_application_set_action_group
gtk_application_get_window
gtk_application_add_window
gtk_application_remove_window
gtk_application_get_windows
gtk_application_create_window
<SUBSECTION Standard>
GtkApplicationClass
@@ -6368,31 +6317,40 @@ GtkApplicationPrivate
</SECTION>
<SECTION>
<FILE>gtkgrid</FILE>
<TITLE>GtkGrid</TITLE>
GtkGrid
gtk_grid_new
gtk_grid_attach
gtk_grid_attach_next_to
gtk_grid_set_row_homogeneous
gtk_grid_get_row_homogeneous
gtk_grid_set_row_spacing
gtk_grid_get_row_spacing
gtk_grid_set_column_homogeneous
gtk_grid_get_column_homogeneous
gtk_grid_set_column_spacing
gtk_grid_get_column_spacing
<FILE>gtkwrapbox</FILE>
<TITLE>GtkWrapBox</TITLE>
GtkWrapBox
gtk_wrap_box_new
GtkWrapBoxPacking
gtk_wrap_box_insert_child
gtk_wrap_box_reorder_child
GtkWrapAllocationMode
gtk_wrap_box_set_allocation_mode
gtk_wrap_box_get_allocation_mode
GtkWrapBoxSpreading
gtk_wrap_box_set_vertical_spreading
gtk_wrap_box_get_vertical_spreading
gtk_wrap_box_set_horizontal_spreading
gtk_wrap_box_get_horizontal_spreading
gtk_wrap_box_set_vertical_spacing
gtk_wrap_box_get_vertical_spacing
gtk_wrap_box_set_horizontal_spacing
gtk_wrap_box_get_horizontal_spacing
gtk_wrap_box_set_minimum_line_children
gtk_wrap_box_get_minimum_line_children
gtk_wrap_box_set_natural_line_children
gtk_wrap_box_get_natural_line_children
<SUBSECTION Standard>
GtkGridClass
GTK_TYPE_GRID
GTK_GRID
GTK_GRID_CLASS
GTK_IS_GRID
GTK_IS_GRID_CLASS
GTK_GRID_GET_CLASS
GtkWrapBoxClass
GTK_TYPE_WRAP_BOX
GTK_WRAP_BOX
GTK_WRAP_BOX_CLASS
GTK_IS_WRAP_BOX
GTK_IS_WRAP_BOX_CLASS
GTK_WRAP_BOX_GET_CLASS
<SUBSECTION Private>
GtkGridPrivate
gtk_grid_get_type
gtk_wrap_box_get_type
GtkWrapBoxPrivate
</SECTION>

View File

@@ -40,8 +40,8 @@ gtk_clipboard_get_type
gtk_color_button_get_type
gtk_color_selection_dialog_get_type
gtk_color_selection_get_type
gtk_combo_box_entry_get_type
gtk_combo_box_get_type
gtk_combo_box_text_get_type
gtk_container_get_type
gtk_dialog_get_type
gtk_drawing_area_get_type
@@ -61,7 +61,6 @@ gtk_font_button_get_type
gtk_font_selection_dialog_get_type
gtk_font_selection_get_type
gtk_frame_get_type
gtk_grid_get_type
gtk_handle_box_get_type
gtk_hbox_get_type
gtk_hbutton_box_get_type
@@ -124,7 +123,6 @@ gtk_recent_manager_get_type
gtk_ruler_get_type
gtk_scale_button_get_type
gtk_scale_get_type
gtk_scrollable_get_type
gtk_scrollbar_get_type
gtk_scrolled_window_get_type
gtk_separator_get_type
@@ -178,3 +176,4 @@ gtk_vseparator_get_type
gtk_widget_get_type
gtk_window_get_type
gtk_window_group_get_type
gtk_wrap_box_get_type

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

View File

@@ -343,189 +343,6 @@ cairo_destroy (cr);
have been either impossible or impractical.
</para>
<section>
<title>Replace size_request by get_preferred_width/height</title>
<para>
The request-phase of the traditional GTK+ geometry management
has been replaced by a more flexible height-for-width system,
which is described in detail in the API documentation
(see <xref linkend="geometry-management"/>). As a consequence,
the ::size-request signal and vfunc has been removed from
#GtkWidgetClass. The replacement for size_request() can
take several levels of sophistication:
<itemizedlist>
<listitem>As a minimal replacement to keep current functionality,
you can simply implement the get_preferred_width() and
get_preferred_height() vfuncs by calling your existing
size_request() function. So you go from
<informalexample><programlisting>
static void
my_widget_class_init (MyWidgetClass *class)
{
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (class);
/* ... */
widget_class->size_request = my_widget_size_request;
/* ... */
}
</programlisting></informalexample>
to something that looks more like this:
<informalexample><programlisting>
static void
my_widget_get_preferred_width (GtkWidget *widget,
gint *minimal_width,
gint *natural_width)
{
GtkRequisition requisition;
my_widget_size_request (widget, &amp;requisition);
*minimal_width = *natural_width = requisition.width;
}
static void
my_widget_get_preferred_height (GtkWidget *widget,
gint *minimal_height,
gint *natural_height)
{
GtkRequisition requisition;
my_widget_size_request (widget, &amp;requisition);
*minimal_height = *natural_height = requisition.height;
}
/* ... */
static void
my_widget_class_init (MyWidgetClass *class)
{
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (class);
/* ... */
widget_class->get_preferred_width = my_widget_get_preferred_width;
widget_class->get_preferred_height = my_widget_get_preferred_height;
/* ... */
}
</programlisting></informalexample>
Sometimes you can make things a little more streamlined
by replacing your existing size_request() implementation by
one that takes an orientation parameter:
<informalexample><programlisting>
static void
my_widget_get_preferred_size (GtkWidget *widget,
GtkOrientation orientation,
gint *minimal_size,
gint *natural_size)
{
/* do things that are common for both orientations ... */
if (orientation == GTK_ORIENTATION_HORIZONTAL)
{
/* do stuff that only applies to width... */
*minimal_size = *natural_size = ...
}
else
{
/* do stuff that only applies to height... */
*minimal_size = *natural_size = ...
}
}
static void
my_widget_get_preferred_width (GtkWidget *widget,
gint *minimal_width,
gint *natural_width)
{
my_widget_get_preferred_size (widget,
GTK_ORIENTATION_HORIZONTAL,
minimal_width,
natural_width);
}
static void
my_widget_get_preferred_height (GtkWidget *widget,
gint *minimal_height,
gint *natural_height)
{
my_widget_get_preferred_size (widget,
GTK_ORIENTATION_VERTICAL,
minimal_height,
natural_height);
}
/* ... */
</programlisting></informalexample>
</listitem>
<listitem>If your widget can cope with a small size,
but would appreciate getting some more space (a common
example would be that it contains ellipsizable labels),
you can do that by making your get_preferred_width()/height()
functions return a smaller value for @minimal than for @natural.
For @minimal, you probably want to return the same value
that your size_request() function returned before (since
size_request() was defined as returning the minimal size
a widget can work with). A simple way to obtain good
values for @natural, in the case of containers, is to use
gtk_widget_get_preferred_width() and
gtk_widget_get_preferred_height() on the children of the
container, as in the following example:
<informalexample><programlisting>
static void
gtk_fixed_get_preferred_height (GtkWidget *widget,
gint *minimum,
gint *natural)
{
GtkFixed *fixed = GTK_FIXED (widget);
GtkFixedPrivate *priv = fixed->priv;
GtkFixedChild *child;
GList *children;
gint child_min, child_nat;
*minimum = 0;
*natural = 0;
for (children = priv->children; children; children = children->next)
{
child = children->data;
if (!gtk_widget_get_visible (child->widget))
continue;
gtk_widget_get_preferred_height (child->widget, &amp;child_min, &amp;child_nat);
*minimum = MAX (*minimum, child->y + child_min);
*natural = MAX (*natural, child->y + child_nat);
}
}
</programlisting></informalexample>
</listitem>
<listitem>Note that the get_preferred_width()/height() functions
only allow you to deal with one dimension at a time. If your
size_request() handler is doing things that involve both
width and height at the same time (e.g. limiting the aspect
ratio), you will have to implement get_preferred_height_for_width()
and get_preferred_width_for_height().
</listitem>
<listitem>To make full use of the new capabilities of the
height-for-width geometry management, you need to additionally
implement the get_preferred_height_for_width() and
get_preferred_width_for_height(). For details on these functions,
see <xref linkend="geometry-management"/>.
</listitem>
</itemizedlist>
</para>
</section>
<section>
<title>Replace GdkRegion by cairo_region_t</title>
@@ -807,21 +624,7 @@ gtk_arrow_draw (GtkWidget *widget,
</section>
<section>
<title>Check your expand flags</title>
<para>
The behaviour of expanding widgets has changed slightly in GTK+ 3,
compared to GTK+ 2.x. It is now 'inherited', i.e. a container that
has an expanding child is considered expanding itself. This is often
the desired behaviour. In places where you don't want this to happen,
setting the container explicity as not expanding will stop the
expand flag of the child from being inherited. See
gtk_widget_set_hexpand() and gtk_widget_set_vexpand().
</para>
</section>
<section>
<title>Scrolling changes</title>
<title>GtkScrolledWindow policy</title>
<para>
The default values for the #GtkScrolledWindow:hscrollbar-policy and
@@ -829,14 +632,6 @@ gtk_arrow_draw (GtkWidget *widget,
'never' to 'automatic'. If your application was relying on the default
value, you will have explicitly set it explicitly.
</para>
<para>
The ::set-scroll-adjustments signal on GtkWidget has been replaced
by the #GtkScrollable interface which must be implemented by a widget
that wants to be placed in a #GtkScrolledWindow. Instead of emitting
::set-scroll-adjustments, the scrolled window simply sets the
#GtkScrollable::hadjustment and #GtkScrollable::vadjustment properties.
</para>
</section>
<section>
@@ -867,19 +662,6 @@ gtk_arrow_draw (GtkWidget *widget,
</para>
</section>
<section>
<title>Resize grips</title>
<para>
The resize grip functionality has been moved from #GtkStatusbar
to #GtkWindow. Any window can now have resize grips, regardless whether
it has a statusbar or not. The functions
gtk_statusbar_set_has_resize_grip() and gtk_statusbar_get_has_resize_grip()
have disappeared, and instead there are now
gtk_window_set_has_resize_grip() and gtk_window_get_has_resize_grip().
</para>
</section>
<section>
<title>Prevent mixed linkage</title>
<para>

View File

@@ -1,133 +0,0 @@
<?xml version="1.0"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
]>
<chapter id="gtk-migrating-GtkApplication">
<title>Migrating from libunique to GApplication or GtkApplication</title>
<para>
libunique offers 'unique application' support as well as ways to
communicate with a running application instance. This is implemented
in various ways, either using D-Bus, or socket-based communication.
</para>
<para>
Starting with GLib 2.26, D-Bus support has been integrated into GIO
in the form of GDBus, and #GApplication has been added to provide
the same level of application support as libunique.
</para>
<example><title>A unique application</title>
<para>Here is a simple application using libunique:
<programlisting>
int
main (int argc, char *argv[])
{
UniqueApp *app;
GtkWidget *window;
gtk_init (&amp;argc, &amp;argv);
app = unique_app_new ("org.gtk.TestApplication", NULL);
if (unique_app_is_running (app))
{
UniqueResponse response;
response = unique_app_send_message (app, UNIQUE_ACTIVATE, NULL);
g_object_unref (app);
return response == UNIQUE_RESPONSE_OK ? 0 : 1;
}
window = create_my_window ();
unique_app_watch_window (app, GTK_WINDOW (window));
gtk_widget_show (window);
gtk_main ();
g_object_unref (app);
return 0;
}
</programlisting>
The same application using GtkApplication:
<programlisting>
static void
activate (GtkApplication *app)
{
GtkWidget *window;
window = create_my_window ();
gtk_window_set_application (GTK_WINDOW (window), app);
gtk_widget_show (window);
}
int
main (int argc, char *argv[])
{
GtkApplication *app;
gint status;
app = gtk_application_new ("org.gtk.TestApplication", 0);
g_signal_connect (app, "activate", G_CALLBACK (activate), NULL);
status = g_application_run (app);
g_object_unref (app);
return status;
}
</programlisting>
</para>
</example>
<section><title>Uniqueness</title>
<para>
Instead of creating a #UniqueApp with unique_app_new(), create
a #GApplication with g_application_new() or a #GtkApplication
with gtk_application_new(). The @name that was used with
unique_app_new() is very likely usable as the @application_id for
g_application_new() without any changes, and GtkApplication passes
the <envar>DESKTOP_STARTUP_ID</envar> environment variable
automatically.
</para>
<para>
While libunique expects you to check for an already running instance
yourself and activate it manually, GApplication handles all this on
its own in g_application_run(). If you still need to find out if there
is a running instance of your application, use
g_application_get_is_remote() instead of unique_app_is_running().
</para>
</section>
<section><title>Commands and Messages</title>
<para>
libunique lets you send messages with commands to a running
instance using unique_app_send_message(). The commands can be either
predefined or custom. Some of the predefined libunique commands have
equivalents in GApplication. Instead of sending the %UNIQUE_ACTIVATE
command, call g_application_activate(), instead of sending the
%UNIQUE_OPEN command, call g_application_open(). The
%UNIQUE_NEW and %UNIQUE_CLOSE and user-defined commands don't
have direct replacement at this time.
</para>
<para>
As a replacement for custom commands, GApplication implements the
#GActionGroup interface and lets you add a group of actions with
g_application_set_action_group(). The actions can then be invoked,
either by using the D-Bus interface for #GAction directly, or by
calling g_action_group_activate_action() from another instance of
the GApplication. The #GApplication documentation contains an
example for using GApplication with actions.
</para>
<para>
For more complex needs, GApplication supports passing entire
commandlines to the running instance.
</para>
</section>
</chapter>

View File

@@ -265,7 +265,7 @@ my_widget_expose_event_handler (GtkWidget *widget, GdkEventExpose *event)
static gboolean
my_widget_key_press_event_handler (GtkWidget *widget, GdkEventKey *event)
{
GdkModifierType modifiers;
guint modifiers;
modifiers = gtk_accelerator_get_default_mod_mask (<!-- -->);

View File

@@ -31,7 +31,7 @@ or environment variables.
<para>
For up-to-date information about the current status of this port, see the
<ulink url="http://live.gnome.org/GTK+/OSX">project page</ulink>.
<ulink url="http://developer.imendio.com/wiki/Gtk_Mac_OS_X">project page</ulink>.
</para>
</refsect1>

View File

@@ -1,100 +0,0 @@
<?xml version="1.0"?>
<!DOCTYPE partintro PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
]>
<partintro>
<para>
GTK+ is a library for creating graphical user interfaces. It
works on many UNIX-like platforms, Windows, and OS X.
GTK+ is released under the GNU Library General Public License
(GNU LGPL), which allows for flexible licensing of client
applications. GTK+ has a C-based object-oriented architecture that
allows for maximum flexibility. Bindings for many other languages have
been written, including C++, Objective-C, Guile/Scheme, Perl, Python,
TOM, Ada95, Free Pascal, and Eiffel.
</para>
<para>
GTK+ depends on the following libraries:
<variablelist>
<varlistentry>
<term>GLib</term>
<listitem><para>
A general-purpose utility library, not specific to graphical user interfaces.
GLib provides many useful data types, macros, type conversions,
string utilities, file utilities, a main loop abstraction, and so on.
</para></listitem>
</varlistentry>
<varlistentry>
<term>GObject</term>
<listitem><para>A library that provides a type system, a collection of
fundamental types including an object type, a signal system.
</para></listitem>
</varlistentry>
<varlistentry>
<term>GIO</term>
<listitem><para>A modern, easy-to-use VFS API including abstractions for
files, drives, volumes, stream IO, as well as network programming and
DBus communication.
</para></listitem>
</varlistentry>
<varlistentry>
<term>cairo</term>
<listitem><para>Cairo is a 2D graphics library with support for multiple
output devices.
</para></listitem>
</varlistentry>
<varlistentry>
<term>Pango</term>
<listitem><para>
Pango is a library for internationalized text handling. It centers
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 GdkPixbuf
("pixel buffer") objects from image data or image files.
Use a GdkPixbuf in combination with GtkImage to display images.
</para></listitem>
</varlistentry>
<varlistentry>
<term>GDK</term>
<listitem><para>
GDK is the abstraction layer that allows GTK+ to support multiple
windowing systems. GDK provides window system facilities on X11, Windows,
and OS X.
</para></listitem>
</varlistentry>
<varlistentry>
<term>GTK+</term>
<listitem><para>
The GTK+ library itself contains <firstterm>widgets</firstterm>,
that is, GUI components such as GtkButton or GtkTextView.
</para></listitem>
</varlistentry>
</variablelist>
</para>
</partintro>

View File

@@ -1,41 +1,28 @@
gtkaccelmap.sgml
gtkactiongroup.sgml
gtkaboutdialog.sgml
gtkadjustment.sgml
gtkbbox.sgml
gtkbox.sgml
gtkbuilder.sgml
gtkbutton.sgml
gtkcalendar.sgml
gtkcelleditable.sgml
gtkcellrenderer.sgml
gtkcellrenderertext.sgml
gtkcellview.sgml
gtkcolorbutton.sgml
gtkcolorsel.sgml
gtkcombobox.sgml
gtkcomboboxentry.sgml
gtkcontainer.sgml
gtkeditable.sgml
gtkentry.sgml
gtkentrybuffer.sgml
gtkhbox.sgml
gtkiconview.sgml
gtkimcontextsimple.sgml
gtkimmulticontext.sgml
gtkitemfactory.sgml
gtklayout.sgml
gtklinkbutton.sgml
gtkmessagedialog.sgml
gtknotebook.sgml
gtkobject.sgml
gtkorientable.sgml
gtkpagesetup.sgml
gtkpagesetupunixdialog.sgml
gtkpaned.sgml
gtkpapersize.sgml
gtkprinter.sgml
gtkprogressbar.sgml
gtkradioaction.sgml
gtkradiobutton.sgml
gtkrange.sgml
@@ -47,28 +34,18 @@ gtkrecentchooserwidget.sgml
gtkrecentmanager.sgml
gtkscale.sgml
gtkscalebutton.sgml
gtkscrollbar.sgml
gtkscrolledwindow.sgml
gtkseparator.sgml
gtkseparatormenuitem.sgml
gtkseparatortoolitem.sgml
gtksettings.sgml
gtkstatusbar.sgml
gtkstyle.sgml
gtktesting.sgml
gtktextiter.sgml
gtktexttagtable.sgml
gtktextview.sgml
gtktoggleaction.sgml
gtktoolbar.sgml
gtktoolitem.sgml
gtktooltip.sgml
gtktreednd.sgml
gtktreemodelfilter.sgml
gtktreeselection.sgml
gtktreesortable.sgml
gtktreestore.sgml
gtktreeview.sgml
gtktreeviewcolumn.sgml
gtktypeutils.sgml
gtkwindow.sgml

View File

@@ -0,0 +1,310 @@
<!-- ##### SECTION Title ##### -->
GtkAdjustment
<!-- ##### SECTION Short_Description ##### -->
A representation of an adjustable bounded value
<!-- ##### SECTION Long_Description ##### -->
<para>
The #GtkAdjustment object represents a value which has an associated lower
and upper bound, together with step and page increments, and a page size.
It is used within several GTK+ widgets, including
#GtkSpinButton, #GtkViewport, and #GtkRange (which is a base class for
#GtkHScrollbar, #GtkVScrollbar, #GtkHScale, and #GtkVScale).
</para>
<para>
The #GtkAdjustment object does not update the value itself. Instead
it is left up to the owner of the #GtkAdjustment to control the value.
</para>
<para>
The owner of the #GtkAdjustment typically calls the
gtk_adjustment_value_changed() and gtk_adjustment_changed() functions
after changing the value and its bounds. This results in the emission of the
&quot;value_changed&quot; or &quot;changed&quot; signal respectively.
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### SECTION Image ##### -->
<!-- ##### STRUCT GtkAdjustment ##### -->
<para>
The #GtkAdjustment-struct struct contains the following fields.
<informaltable pgwide="1" frame="none" role="struct">
<tgroup cols="2"><colspec colwidth="2*"/><colspec colwidth="8*"/>
<tbody>
<row>
<entry>#gdouble lower;</entry>
<entry>the minimum value.</entry>
</row>
<row>
<entry>#gdouble upper;</entry>
<entry>the maximum value.</entry>
</row>
<row>
<entry>#gdouble value;</entry>
<entry>the current value.</entry>
</row>
<row>
<entry>#gdouble step_increment;</entry>
<entry>the increment to use to make minor changes to the value.
In a #GtkScrollbar this increment is used when the mouse is clicked on the
arrows at the top and bottom of the scrollbar, to scroll by a small amount.
</entry>
</row>
<row>
<entry>#gdouble page_increment;</entry>
<entry>the increment to use to make major changes to the value.
In a #GtkScrollbar this increment is used when the mouse is clicked in the
trough, to scroll by a large amount.
</entry>
</row>
<row>
<entry>#gdouble page_size;</entry>
<entry>the page size.
In a #GtkScrollbar this is the size of the area which is currently visible.
</entry>
</row>
</tbody></tgroup></informaltable>
</para>
<!-- ##### SIGNAL GtkAdjustment::changed ##### -->
<para>
Emitted when one or more of the #GtkAdjustment fields have been changed,
other than the value field.
</para>
@adjustment: the object which received the signal.
<!-- ##### SIGNAL GtkAdjustment::value-changed ##### -->
<para>
Emitted when the #GtkAdjustment value field has been changed.
</para>
@adjustment: the object which received the signal.
<!-- ##### ARG GtkAdjustment:lower ##### -->
<para>
</para>
<!-- ##### ARG GtkAdjustment:page-increment ##### -->
<para>
</para>
<!-- ##### ARG GtkAdjustment:page-size ##### -->
<para>
</para>
<!-- ##### ARG GtkAdjustment:step-increment ##### -->
<para>
</para>
<!-- ##### ARG GtkAdjustment:upper ##### -->
<para>
</para>
<!-- ##### ARG GtkAdjustment:value ##### -->
<para>
</para>
<!-- ##### FUNCTION gtk_adjustment_new ##### -->
<para>
Creates a new #GtkAdjustment.
</para>
@value: the initial value.
@lower: the minimum value.
@upper: the maximum value.
@step_increment: the step increment.
@page_increment: the page increment.
@page_size: the page size.
@Returns: a new #GtkAdjustment.
<!-- ##### FUNCTION gtk_adjustment_get_value ##### -->
<para>
</para>
@adjustment:
@Returns:
<!-- ##### FUNCTION gtk_adjustment_set_value ##### -->
<para>
Sets the #GtkAdjustment value. The value is clamped to lie between
<literal>adjustment-&gt;lower</literal> and
<literal>adjustment-&gt;upper</literal>.
</para>
<para>
Note that for adjustments which are used in a #GtkScrollbar, the effective
range of allowed values goes from <literal>adjustment-&gt;lower</literal> to
<literal>adjustment-&gt;upper - adjustment-&gt;page_size</literal>.
</para>
@adjustment: a #GtkAdjustment.
@value: the new value.
<!-- ##### FUNCTION gtk_adjustment_clamp_page ##### -->
<para>
Updates the #GtkAdjustment @value to ensure that the range between @lower
and @upper is in the current page (i.e. between @value and @value +
@page_size).
If the range is larger than the page size, then only the start of it will
be in the current page.
A &quot;changed&quot; signal will be emitted if the value is changed.
</para>
@adjustment: a #GtkAdjustment.
@lower: the lower value.
@upper: the upper value.
<!-- ##### FUNCTION gtk_adjustment_changed ##### -->
<para>
Emits a &quot;changed&quot; signal from the #GtkAdjustment.
This is typically called by the owner of the #GtkAdjustment after it has
changed any of the #GtkAdjustment fields other than the value.
</para>
@adjustment: a #GtkAdjustment
<!-- ##### FUNCTION gtk_adjustment_value_changed ##### -->
<para>
Emits a &quot;value_changed&quot; signal from the #GtkAdjustment.
This is typically called by the owner of the #GtkAdjustment after it has
changed the #GtkAdjustment value field.
</para>
@adjustment: a #GtkAdjustment
<!-- ##### FUNCTION gtk_adjustment_configure ##### -->
<para>
</para>
@adjustment:
@value:
@lower:
@upper:
@step_increment:
@page_increment:
@page_size:
<!-- ##### FUNCTION gtk_adjustment_get_lower ##### -->
<para>
</para>
@adjustment:
@Returns:
<!-- ##### FUNCTION gtk_adjustment_get_page_increment ##### -->
<para>
</para>
@adjustment:
@Returns:
<!-- ##### FUNCTION gtk_adjustment_get_page_size ##### -->
<para>
</para>
@adjustment:
@Returns:
<!-- ##### FUNCTION gtk_adjustment_get_step_increment ##### -->
<para>
</para>
@adjustment:
@Returns:
<!-- ##### FUNCTION gtk_adjustment_get_upper ##### -->
<para>
</para>
@adjustment:
@Returns:
<!-- ##### FUNCTION gtk_adjustment_set_lower ##### -->
<para>
</para>
@adjustment:
@lower:
<!-- ##### FUNCTION gtk_adjustment_set_page_increment ##### -->
<para>
</para>
@adjustment:
@page_increment:
<!-- ##### FUNCTION gtk_adjustment_set_page_size ##### -->
<para>
</para>
@adjustment:
@page_size:
<!-- ##### FUNCTION gtk_adjustment_set_step_increment ##### -->
<para>
</para>
@adjustment:
@step_increment:
<!-- ##### FUNCTION gtk_adjustment_set_upper ##### -->
<para>
</para>
@adjustment:
@upper:

View File

@@ -0,0 +1,355 @@
<!-- ##### SECTION Title ##### -->
GtkCellRenderer
<!-- ##### SECTION Short_Description ##### -->
An object for rendering a single cell on a GdkDrawable
<!-- ##### SECTION Long_Description ##### -->
<para>
The #GtkCellRenderer is a base class of a set of objects used for
rendering a cell to a #GdkDrawable. These objects are used primarily by
the #GtkTreeView widget, though they aren't tied to them in any
specific way. It is worth noting that #GtkCellRenderer is not a
#GtkWidget and cannot be treated as such.
</para>
<para>
The primary use of a #GtkCellRenderer is for drawing a certain graphical
elements on a #GdkDrawable. Typically, one cell renderer is used to
draw many cells on the screen. To this extent, it isn't expected that a
CellRenderer keep any permanent state around. Instead, any state is set
just prior to use using #GObject<!-- -->s property system. Then, the
cell is measured using gtk_cell_renderer_get_size(). Finally, the cell
is rendered in the correct location using gtk_cell_renderer_render().
</para>
<para>
There are a number of rules that must be followed when writing a new
#GtkCellRenderer. First and formost, it's important that a certain set
of properties will always yield a cell renderer of the same size,
barring a #GtkStyle change. The #GtkCellRenderer also has a number of
generic properties that are expected to be honored by all children.
</para>
<para>
Beyond merely rendering a cell, cell renderers can optionally
provide active user interface elements. A cell renderer can be
<firstterm>activatable</firstterm> like #GtkCellRendererToggle,
which toggles when it gets activated by a mouse click, or it can be
<firstterm>editable</firstterm> like #GtkCellRendererText, which
allows the user to edit the text using a #GtkEntry.
To make a cell renderer activatable or editable, you have to
implement the @activate or @start_editing virtual functions,
respectively.
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
#GtkCellRendererText,#GtkCellRendererPixbuf,#GtkCellRendererToggle
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### SECTION Image ##### -->
<!-- ##### ENUM GtkCellRendererState ##### -->
<para>
Tells how a cell is to be rendererd.
</para>
@GTK_CELL_RENDERER_SELECTED: The cell is currently selected, and
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.
<!-- ##### ENUM GtkCellRendererMode ##### -->
<para>
Identifies how the user can interact with a particular cell.
</para>
@GTK_CELL_RENDERER_MODE_INERT: The cell is just for display
and cannot be interacted with. Note that this doesn't mean that eg. the
row being drawn can't be selected -- just that a particular element of
it cannot be individually modified.
@GTK_CELL_RENDERER_MODE_ACTIVATABLE: The cell can be clicked.
@GTK_CELL_RENDERER_MODE_EDITABLE: The cell can be edited or otherwise modified.
<!-- ##### STRUCT GtkCellRenderer ##### -->
<para>
</para>
<!-- ##### SIGNAL GtkCellRenderer::editing-canceled ##### -->
<para>
</para>
@cellrenderer: the object which received the signal.
<!-- ##### SIGNAL GtkCellRenderer::editing-started ##### -->
<para>
</para>
@cellrenderer: the object which received the signal.
@arg1:
@arg2:
<!-- ##### ARG GtkCellRenderer:cell-background ##### -->
<para>
</para>
<!-- ##### ARG GtkCellRenderer:cell-background-gdk ##### -->
<para>
</para>
<!-- ##### ARG GtkCellRenderer:cell-background-set ##### -->
<para>
</para>
<!-- ##### ARG GtkCellRenderer:editing ##### -->
<para>
</para>
<!-- ##### ARG GtkCellRenderer:height ##### -->
<para>
</para>
<!-- ##### ARG GtkCellRenderer:is-expanded ##### -->
<para>
</para>
<!-- ##### ARG GtkCellRenderer:is-expander ##### -->
<para>
</para>
<!-- ##### ARG GtkCellRenderer:mode ##### -->
<para>
</para>
<!-- ##### ARG GtkCellRenderer:sensitive ##### -->
<para>
</para>
<!-- ##### ARG GtkCellRenderer:visible ##### -->
<para>
</para>
<!-- ##### ARG GtkCellRenderer:width ##### -->
<para>
</para>
<!-- ##### ARG GtkCellRenderer:xalign ##### -->
<para>
</para>
<!-- ##### ARG GtkCellRenderer:xpad ##### -->
<para>
</para>
<!-- ##### ARG GtkCellRenderer:yalign ##### -->
<para>
</para>
<!-- ##### ARG GtkCellRenderer:ypad ##### -->
<para>
</para>
<!-- ##### STRUCT GtkCellRendererClass ##### -->
<para>
</para>
@parent_class:
@get_size:
@render:
@activate:
@start_editing:
@editing_canceled:
@editing_started:
@_gtk_reserved1:
@_gtk_reserved2:
<!-- ##### FUNCTION gtk_cell_renderer_get_size ##### -->
<para>
</para>
@cell:
@widget:
@cell_area:
@x_offset:
@y_offset:
@width:
@height:
<!-- ##### FUNCTION gtk_cell_renderer_render ##### -->
<para>
</para>
@cell:
@window:
@widget:
@background_area:
@cell_area:
@expose_area:
@flags:
<!-- ##### FUNCTION gtk_cell_renderer_activate ##### -->
<para>
</para>
@cell:
@event:
@widget:
@path:
@background_area:
@cell_area:
@flags:
@Returns:
<!-- ##### FUNCTION gtk_cell_renderer_start_editing ##### -->
<para>
</para>
@cell:
@event:
@widget:
@path:
@background_area:
@cell_area:
@flags:
@Returns:
<!-- ##### FUNCTION gtk_cell_renderer_stop_editing ##### -->
<para>
</para>
@cell:
@canceled:
<!-- ##### FUNCTION gtk_cell_renderer_get_fixed_size ##### -->
<para>
</para>
@cell:
@width:
@height:
<!-- ##### FUNCTION gtk_cell_renderer_set_fixed_size ##### -->
<para>
</para>
@cell:
@width:
@height:
<!-- ##### FUNCTION gtk_cell_renderer_get_visible ##### -->
<para>
</para>
@cell:
@Returns:
<!-- ##### FUNCTION gtk_cell_renderer_set_visible ##### -->
<para>
</para>
@cell:
@visible:
<!-- ##### FUNCTION gtk_cell_renderer_get_sensitive ##### -->
<para>
</para>
@cell:
@Returns:
<!-- ##### FUNCTION gtk_cell_renderer_set_sensitive ##### -->
<para>
</para>
@cell:
@sensitive:
<!-- ##### FUNCTION gtk_cell_renderer_get_alignment ##### -->
<para>
</para>
@cell:
@xalign:
@yalign:
<!-- ##### FUNCTION gtk_cell_renderer_set_alignment ##### -->
<para>
</para>
@cell:
@xalign:
@yalign:
<!-- ##### FUNCTION gtk_cell_renderer_get_padding ##### -->
<para>
</para>
@cell:
@xpad:
@ypad:
<!-- ##### FUNCTION gtk_cell_renderer_set_padding ##### -->
<para>
</para>
@cell:
@xpad:
@ypad:

View File

@@ -31,7 +31,7 @@ The #GtkCellRendererProgress cell renderer was added in GTK+ 2.6.
</para>
<!-- ##### ARG GtkCellRendererProgress:inverted ##### -->
<!-- ##### ARG GtkCellRendererProgress:orientation ##### -->
<para>
</para>

View File

@@ -0,0 +1,283 @@
<!-- ##### SECTION Title ##### -->
GtkCellRendererText
<!-- ##### SECTION Short_Description ##### -->
Renders text in a cell
<!-- ##### SECTION Long_Description ##### -->
<para>
A #GtkCellRendererText renders a given text in its cell, using the font, color and
style information provided by its properties. The text will be ellipsized if it is
too long and the <link linkend="GtkCellRendererText--ellipsize">ellipsize</link>
property allows it.
</para>
<para>
If the <link linkend="GtkCellRenderer--mode">mode</link> is %GTK_CELL_RENDERER_MODE_EDITABLE,
the #GtkCellRendererText allows to edit its text using an entry.
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### SECTION Image ##### -->
<!-- ##### STRUCT GtkCellRendererText ##### -->
<para>
</para>
<!-- ##### SIGNAL GtkCellRendererText::edited ##### -->
<para>
</para>
@cellrenderertext: the object which received the signal.
@arg1:
@arg2:
<!-- ##### ARG GtkCellRendererText:align-set ##### -->
<para>
</para>
<!-- ##### ARG GtkCellRendererText:alignment ##### -->
<para>
</para>
<!-- ##### ARG GtkCellRendererText:attributes ##### -->
<para>
</para>
<!-- ##### ARG GtkCellRendererText:background ##### -->
<para>
</para>
<!-- ##### ARG GtkCellRendererText:background-gdk ##### -->
<para>
</para>
<!-- ##### ARG GtkCellRendererText:background-set ##### -->
<para>
</para>
<!-- ##### ARG GtkCellRendererText:editable ##### -->
<para>
</para>
<!-- ##### ARG GtkCellRendererText:editable-set ##### -->
<para>
</para>
<!-- ##### ARG GtkCellRendererText:ellipsize ##### -->
<para>
</para>
<!-- ##### ARG GtkCellRendererText:ellipsize-set ##### -->
<para>
</para>
<!-- ##### ARG GtkCellRendererText:family ##### -->
<para>
</para>
<!-- ##### ARG GtkCellRendererText:family-set ##### -->
<para>
</para>
<!-- ##### ARG GtkCellRendererText:font ##### -->
<para>
</para>
<!-- ##### ARG GtkCellRendererText:font-desc ##### -->
<para>
</para>
<!-- ##### ARG GtkCellRendererText:foreground ##### -->
<para>
</para>
<!-- ##### ARG GtkCellRendererText:foreground-gdk ##### -->
<para>
</para>
<!-- ##### ARG GtkCellRendererText:foreground-set ##### -->
<para>
</para>
<!-- ##### ARG GtkCellRendererText:language ##### -->
<para>
</para>
<!-- ##### ARG GtkCellRendererText:language-set ##### -->
<para>
</para>
<!-- ##### ARG GtkCellRendererText:markup ##### -->
<para>
</para>
<!-- ##### ARG GtkCellRendererText:rise ##### -->
<para>
</para>
<!-- ##### ARG GtkCellRendererText:rise-set ##### -->
<para>
</para>
<!-- ##### ARG GtkCellRendererText:scale ##### -->
<para>
</para>
<!-- ##### ARG GtkCellRendererText:scale-set ##### -->
<para>
</para>
<!-- ##### ARG GtkCellRendererText:single-paragraph-mode ##### -->
<para>
</para>
<!-- ##### ARG GtkCellRendererText:size ##### -->
<para>
</para>
<!-- ##### ARG GtkCellRendererText:size-points ##### -->
<para>
</para>
<!-- ##### ARG GtkCellRendererText:size-set ##### -->
<para>
</para>
<!-- ##### ARG GtkCellRendererText:stretch ##### -->
<para>
</para>
<!-- ##### ARG GtkCellRendererText:stretch-set ##### -->
<para>
</para>
<!-- ##### ARG GtkCellRendererText:strikethrough ##### -->
<para>
</para>
<!-- ##### ARG GtkCellRendererText:strikethrough-set ##### -->
<para>
</para>
<!-- ##### ARG GtkCellRendererText:style ##### -->
<para>
</para>
<!-- ##### ARG GtkCellRendererText:style-set ##### -->
<para>
</para>
<!-- ##### ARG GtkCellRendererText:text ##### -->
<para>
</para>
<!-- ##### ARG GtkCellRendererText:underline ##### -->
<para>
</para>
<!-- ##### ARG GtkCellRendererText:underline-set ##### -->
<para>
</para>
<!-- ##### ARG GtkCellRendererText:variant ##### -->
<para>
</para>
<!-- ##### ARG GtkCellRendererText:variant-set ##### -->
<para>
</para>
<!-- ##### ARG GtkCellRendererText:weight ##### -->
<para>
</para>
<!-- ##### ARG GtkCellRendererText:weight-set ##### -->
<para>
</para>
<!-- ##### ARG GtkCellRendererText:width-chars ##### -->
<para>
</para>
<!-- ##### ARG GtkCellRendererText:wrap-mode ##### -->
<para>
</para>
<!-- ##### ARG GtkCellRendererText:wrap-width ##### -->
<para>
</para>
<!-- ##### FUNCTION gtk_cell_renderer_text_new ##### -->
<para>
</para>
@void:
@Returns:
<!-- ##### FUNCTION gtk_cell_renderer_text_set_fixed_height_from_font ##### -->
<para>
</para>
@renderer:
@number_of_rows:

View File

@@ -0,0 +1,143 @@
<!-- ##### SECTION Title ##### -->
GtkCellView
<!-- ##### SECTION Short_Description ##### -->
A widget displaying a single row of a GtkTreeModel
<!-- ##### SECTION Long_Description ##### -->
<para>
A #GtkCellView displays a single row of a #GtkTreeModel, using
cell renderers just like #GtkTreeView. #GtkCellView doesn't support
some of the more complex features of #GtkTreeView, like cell editing
and drag and drop.
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### SECTION Image ##### -->
<!-- ##### STRUCT GtkCellView ##### -->
<para>
</para>
<!-- ##### ARG GtkCellView:background ##### -->
<para>
</para>
<!-- ##### ARG GtkCellView:background-gdk ##### -->
<para>
</para>
<!-- ##### ARG GtkCellView:background-set ##### -->
<para>
</para>
<!-- ##### ARG GtkCellView:model ##### -->
<para>
</para>
<!-- ##### FUNCTION gtk_cell_view_new ##### -->
<para>
</para>
@void:
@Returns:
<!-- ##### FUNCTION gtk_cell_view_new_with_text ##### -->
<para>
</para>
@text:
@Returns:
<!-- ##### FUNCTION gtk_cell_view_new_with_markup ##### -->
<para>
</para>
@markup:
@Returns:
<!-- ##### FUNCTION gtk_cell_view_new_with_pixbuf ##### -->
<para>
</para>
@pixbuf:
@Returns:
<!-- ##### FUNCTION gtk_cell_view_set_model ##### -->
<para>
</para>
@cell_view:
@model:
<!-- ##### FUNCTION gtk_cell_view_get_model ##### -->
<para>
</para>
@cell_view:
@Returns:
<!-- ##### FUNCTION gtk_cell_view_set_displayed_row ##### -->
<para>
</para>
@cell_view:
@path:
<!-- ##### FUNCTION gtk_cell_view_get_displayed_row ##### -->
<para>
</para>
@cell_view:
@Returns:
<!-- ##### FUNCTION gtk_cell_view_get_size_of_row ##### -->
<para>
</para>
@cell_view:
@path:
@requisition:
@Returns:
<!-- ##### FUNCTION gtk_cell_view_set_background_color ##### -->
<para>
</para>
@cell_view:
@color:

View File

@@ -0,0 +1,148 @@
<!-- ##### SECTION Title ##### -->
GtkColorButton
<!-- ##### SECTION Short_Description ##### -->
A button to launch a color selection dialog
<!-- ##### SECTION Long_Description ##### -->
<para>
The #GtkColorButton is a button which displays the currently selected color
an allows to open a color selection dialog to change the color. It is suitable
widget for selecting a color in a preference dialog.
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
#GtkColorSelectionDialog, #GtkFontButton
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### SECTION Image ##### -->
<!-- ##### STRUCT GtkColorButton ##### -->
<para>
The GtkColorButton struct has only private fields and
should not be used directly.
</para>
<!-- ##### SIGNAL GtkColorButton::color-set ##### -->
<para>
</para>
@colorbutton: the object which received the signal.
<!-- ##### ARG GtkColorButton:alpha ##### -->
<para>
</para>
<!-- ##### ARG GtkColorButton:color ##### -->
<para>
</para>
<!-- ##### ARG GtkColorButton:title ##### -->
<para>
</para>
<!-- ##### ARG GtkColorButton:use-alpha ##### -->
<para>
</para>
<!-- ##### FUNCTION gtk_color_button_new ##### -->
<para>
</para>
@void:
@Returns:
<!-- ##### FUNCTION gtk_color_button_new_with_color ##### -->
<para>
</para>
@color:
@Returns:
<!-- ##### FUNCTION gtk_color_button_set_color ##### -->
<para>
</para>
@color_button:
@color:
<!-- ##### FUNCTION gtk_color_button_get_color ##### -->
<para>
</para>
@color_button:
@color:
<!-- ##### FUNCTION gtk_color_button_set_alpha ##### -->
<para>
</para>
@color_button:
@alpha:
<!-- ##### FUNCTION gtk_color_button_get_alpha ##### -->
<para>
</para>
@color_button:
@Returns:
<!-- ##### FUNCTION gtk_color_button_set_use_alpha ##### -->
<para>
</para>
@color_button:
@use_alpha:
<!-- ##### FUNCTION gtk_color_button_get_use_alpha ##### -->
<para>
</para>
@color_button:
@Returns:
<!-- ##### FUNCTION gtk_color_button_set_title ##### -->
<para>
</para>
@color_button:
@title:
<!-- ##### FUNCTION gtk_color_button_get_title ##### -->
<para>
</para>
@color_button:
@Returns:

View File

@@ -0,0 +1,237 @@
<!-- ##### SECTION Title ##### -->
GtkColorSelection
<!-- ##### SECTION Short_Description ##### -->
A widget used to select a color
<!-- ##### SECTION Long_Description ##### -->
<para>
The #GtkColorSelection is a widget that is used to select
a color. It consists of a color wheel and number of sliders
and entry boxes for color parameters such as hue, saturation,
value, red, green, blue, and opacity. It is found on the standard
color selection dialog box #GtkColorSelectionDialog.
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### SECTION Image ##### -->
<!-- ##### STRUCT GtkColorSelection ##### -->
<para>
The #GtkColorSelection-struct struct contains private data only,
and should be accessed using the functions below.
</para>
<!-- ##### SIGNAL GtkColorSelection::color-changed ##### -->
<para>
This signal is emitted when the color changes in the #GtkColorSelection
according to its update policy.
</para>
@colorselection: the object which received the signal.
<!-- ##### ARG GtkColorSelection:current-alpha ##### -->
<para>
</para>
<!-- ##### ARG GtkColorSelection:current-color ##### -->
<para>
</para>
<!-- ##### ARG GtkColorSelection:has-opacity-control ##### -->
<para>
</para>
<!-- ##### ARG GtkColorSelection:has-palette ##### -->
<para>
</para>
<!-- ##### FUNCTION gtk_color_selection_new ##### -->
<para>
</para>
@void:
@Returns:
<!-- ##### FUNCTION gtk_color_selection_set_has_opacity_control ##### -->
<para>
</para>
@colorsel:
@has_opacity:
<!-- ##### FUNCTION gtk_color_selection_get_has_opacity_control ##### -->
<para>
</para>
@colorsel:
@Returns:
<!-- ##### FUNCTION gtk_color_selection_set_has_palette ##### -->
<para>
</para>
@colorsel:
@has_palette:
<!-- ##### FUNCTION gtk_color_selection_get_has_palette ##### -->
<para>
</para>
@colorsel:
@Returns:
<!-- ##### FUNCTION gtk_color_selection_get_current_alpha ##### -->
<para>
</para>
@colorsel:
@Returns:
<!-- ##### FUNCTION gtk_color_selection_set_current_alpha ##### -->
<para>
</para>
@colorsel:
@alpha:
<!-- ##### FUNCTION gtk_color_selection_get_current_color ##### -->
<para>
</para>
@colorsel:
@color:
<!-- ##### FUNCTION gtk_color_selection_set_current_color ##### -->
<para>
</para>
@colorsel:
@color:
<!-- ##### FUNCTION gtk_color_selection_get_previous_alpha ##### -->
<para>
</para>
@colorsel:
@Returns:
<!-- ##### FUNCTION gtk_color_selection_set_previous_alpha ##### -->
<para>
</para>
@colorsel:
@alpha:
<!-- ##### FUNCTION gtk_color_selection_get_previous_color ##### -->
<para>
</para>
@colorsel:
@color:
<!-- ##### FUNCTION gtk_color_selection_set_previous_color ##### -->
<para>
</para>
@colorsel:
@color:
<!-- ##### FUNCTION gtk_color_selection_is_adjusting ##### -->
<para>
</para>
@colorsel:
@Returns:
<!-- ##### FUNCTION gtk_color_selection_palette_from_string ##### -->
<para>
</para>
@str:
@colors:
@n_colors:
@Returns:
<!-- ##### FUNCTION gtk_color_selection_palette_to_string ##### -->
<para>
</para>
@colors:
@n_colors:
@Returns:
<!-- ##### USER_FUNCTION GtkColorSelectionChangePaletteFunc ##### -->
<para>
</para>
@colors:
@n_colors:
<!-- ##### FUNCTION gtk_color_selection_set_change_palette_with_screen_hook ##### -->
<para>
</para>
@func:
@Returns:
<!-- ##### USER_FUNCTION GtkColorSelectionChangePaletteWithScreenFunc ##### -->
<para>
</para>
@screen:
@colors:
@n_colors:
@Since: 2.2

View File

@@ -0,0 +1,222 @@
<!-- ##### SECTION Title ##### -->
GtkCombo
<!-- ##### SECTION Short_Description ##### -->
A text entry field with a dropdown list
<!-- ##### SECTION Long_Description ##### -->
<para>
The #GtkCombo widget consists of a single-line text entry field and a drop-down
list. The drop-down list is displayed when the user clicks on a small arrow
button to the right of the entry field.
</para>
<para>
The drop-down list is a #GtkList widget and can be accessed using the
<structfield>list</structfield> member of the #GtkCombo-struct.
List elements can contain arbitrary widgets, but if an element is not a
plain label, then you must use the gtk_list_set_item_string() function.
This sets the string which will be placed in the text entry field when the
item is selected.
</para>
<para>
By default, the user can step through the items in the list using the
arrow (cursor) keys, though this behaviour can be turned off with
gtk_combo_set_use_arrows().
</para>
<para>
As of GTK+ 2.4, #GtkCombo has been deprecated in favor of #GtkComboBoxEntry.
</para>
<example id="gtkcombo-simple-example">
<title>Creating a <structname>GtkCombo</structname> widget with simple text
items.</title>
<programlisting>
GtkWidget *combo;
GList *items = NULL;
items = g_list_append (items, "First Item");
items = g_list_append (items, "Second Item");
items = g_list_append (items, "Third Item");
items = g_list_append (items, "Fourth Item");
items = g_list_append (items, "Fifth Item");
combo = gtk_combo_new (<!-- -->);
gtk_combo_set_popdown_strings (GTK_COMBO (combo), items);
</programlisting>
</example>
<example>
<title>Creating a <structname>GtkCombo</structname> widget with a complex item.</title>
<programlisting>
GtkWidget *combo, *item, *hbox, *arrow, *label;
combo = gtk_combo_new (<!-- -->);
item = gtk_list_item_new (<!-- -->);
gtk_widget_show (item);
/* You can put almost anything into the GtkListItem widget. Here we will use
a horizontal box with an arrow and a label in it. */
hbox = gtk_hbox_new (FALSE, 3);
gtk_container_add (GTK_CONTAINER (item), hbox);
gtk_widget_show (hbox);
arrow = gtk_arrow_new (GTK_ARROW_RIGHT, GTK_SHADOW_OUT);
gtk_widget_show (arrow);
gtk_box_pack_start (GTK_BOX (hbox), arrow, FALSE, FALSE, 0);
label = gtk_label_new ("First Item");
gtk_widget_show (label);
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
/* You must set the string to display in the entry field when the item is
selected. */
gtk_combo_set_item_string (GTK_COMBO (combo), GTK_ITEM (item), "1st Item");
/* Now we simply add the item to the combo's list. */
gtk_container_add (GTK_CONTAINER (GTK_COMBO (combo)->list), item);
</programlisting>
</example>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### STRUCT GtkCombo ##### -->
<para>
The #GtkCombo-struct struct contains the following fields.
(These fields should be considered read-only. They should never be set by
an application.)
</para>
@entry: the text entry field.
@list: the list shown in the drop-down window.
@Deprecated: 2.4: Use #GtkComboBox instead.
<!-- ##### ARG GtkCombo:allow-empty ##### -->
<para>
</para>
<!-- ##### ARG GtkCombo:case-sensitive ##### -->
<para>
</para>
<!-- ##### ARG GtkCombo:enable-arrow-keys ##### -->
<para>
</para>
<!-- ##### ARG GtkCombo:enable-arrows-always ##### -->
<para>
</para>
<!-- ##### ARG GtkCombo:value-in-list ##### -->
<para>
</para>
<!-- ##### FUNCTION gtk_combo_new ##### -->
<para>
Creates a new #GtkCombo.
</para>
@Returns: a new #GtkCombo.
@Deprecated: 2.4: Use #GtkComboBox instead.
<!-- ##### FUNCTION gtk_combo_set_popdown_strings ##### -->
<para>
Convenience function to set all of the items in the popup list.
(See the <link linkend="gtkcombo-simple-example">example</link> above.)
</para>
@combo: a #GtkCombo.
@strings: a list of strings, or %NULL to clear the popup list
@Deprecated: 2.4: Use #GtkComboBox instead.
<!-- ##### FUNCTION gtk_combo_set_value_in_list ##### -->
<para>
Specifies whether the value entered in the text entry field must match one of
the values in the list. If this is set then the user will not be able to
perform any other action until a valid value has been entered.
</para>
<para>
If an empty field is acceptable, the @ok_if_empty parameter should be %TRUE.
</para>
@combo: a #GtkCombo.
@val: %TRUE if the value entered must match one of the values in the list.
@ok_if_empty: %TRUE if an empty value is considered valid.
@Deprecated: 2.4: Use #GtkComboBox instead.
<!-- ##### FUNCTION gtk_combo_set_use_arrows ##### -->
<para>
Specifies if the arrow (cursor) keys can be used to step through the items in
the list. This is on by default.
</para>
@combo: a #GtkCombo.
@val: %TRUE if the arrow keys can be used to step through the items in
the list.
@Deprecated: 2.4: Use #GtkComboBox instead.
<!-- ##### FUNCTION gtk_combo_set_use_arrows_always ##### -->
<para>
Obsolete function, does nothing.
</para>
@combo: a #GtkCombo.
@val: unused
@Deprecated: 2.4: Use #GtkComboBox instead.
<!-- ##### FUNCTION gtk_combo_set_case_sensitive ##### -->
<para>
Specifies whether the text entered into the #GtkEntry field and the text in
the list items is case sensitive.
</para>
<para>
This may be useful, for example, when you have called
gtk_combo_set_value_in_list() to limit the values entered, but you are not
worried about differences in case.
</para>
@combo: a #GtkCombo.
@val: %TRUE if the text in the list items is case sensitive.
@Deprecated: 2.4: Use #GtkComboBox instead.
<!-- ##### FUNCTION gtk_combo_set_item_string ##### -->
<para>
Sets the string to place in the #GtkEntry field when a particular list item is
selected. This is needed if the list item is not a simple label.
</para>
@combo: a #GtkCombo.
@item: a #GtkItem.
@item_value: the string to place in the #GtkEntry when @item is selected.
@Deprecated: 2.4: Use #GtkComboBox instead.
<!-- ##### FUNCTION gtk_combo_disable_activate ##### -->
<para>
Stops the #GtkCombo widget from showing the popup list when the #GtkEntry
emits the "activate" signal, i.e. when the Return key is pressed.
This may be useful if, for example, you want the Return key to close a dialog
instead.
</para>
@combo: a #GtkCombo.
@Deprecated: 2.4: Use #GtkComboBox instead.

View File

@@ -0,0 +1,539 @@
<!-- ##### SECTION Title ##### -->
GtkContainer
<!-- ##### SECTION Short_Description ##### -->
Base class for widgets which contain other widgets
<!-- ##### SECTION Long_Description ##### -->
<para>
A GTK+ user interface is constructed by nesting widgets inside widgets.
Container widgets are the inner nodes in the resulting tree of widgets:
they contain other widgets. So, for example, you might have a #GtkWindow
containing a #GtkFrame containing a GtkLabel. If you wanted an image instead
of a textual label inside the frame, you might replace the #GtkLabel widget
with a #GtkImage widget.
</para>
<para>
There are two major kinds of container widgets in GTK+. Both are subclasses
of the abstract #GtkContainer base class.
</para>
<para>
The first type of container widget has a single child widget and derives
from #GtkBin. These containers are <firstterm>decorators</firstterm>, which
add some kind of functionality to the child. For example, a #GtkButton makes
its child into a clickable button; a #GtkFrame draws a frame around its child
and a #GtkWindow places its child widget inside a top-level window.
</para>
<para>
The second type of container can have more than one child; its purpose is to
manage <firstterm>layout</firstterm>. This means that these containers assign
sizes and positions to their children. For example, a #GtkHBox arranges its
children in a horizontal row, and a #GtkTable arranges the widgets it contains
in a two-dimensional grid.
</para>
<para>
To fulfill its task, a layout container must negotiate the size requirements
with its parent and its children. The basic form of this negotiation is
carried out in two phases, <firstterm>size requisition</firstterm> and
<firstterm>size allocation</firstterm>, which are implemented by the
size_request() and size_allocate() virtual functions in #GtkWidget.
</para>
<para>
GTK+ also supports a more complicated form of size negotiation called
<firstterm>width-for-height</firstterm> (and its dual
<firstterm>height-for-width</firstterm>). See #GtkExtendedLayout
to learn more about width-for-height geometry management.
</para>
<refsect2 id="size-requisition"><title>Size Requisition</title>
<para>
The size requisition of a widget is it's desired width and height.
This is represented by a #GtkRequisition.
</para>
<para>
How a widget determines its desired size depends on the widget.
A #GtkLabel, for example, requests enough space to display all its text.
Container widgets generally base their size request on the requisitions
of their children.
</para>
<para>
The size requisition phase of the widget layout process operates top-down.
It starts at a top-level widget, typically a #GtkWindow. The top-level widget
asks its child for its size requisition by calling gtk_widget_get_preferred_size().
To determine its requisition, the child asks its own children for their
requisitions and so on. Finally, the top-level widget will get a requisition
back from its child.
</para>
</refsect2>
<refsect2 id="size-allocation"><title>Size Allocation</title>
<para>
When the top-level widget has determined how much space its child would like
to have, the second phase of the size negotiation, size allocation, begins.
Depending on its configuration (see gtk_window_set_resizable()), the top-level
widget may be able to expand in order to satisfy the size request or it may
have to ignore the size request and keep its fixed size. It then tells its
child widget how much space it gets by calling gtk_widget_size_allocate().
The child widget divides the space among its children and tells each child
how much space it got, and so on. Under normal circumstances, a #GtkWindow
will always give its child the amount of space the child requested.
</para>
<para>
A child's size allocation is represented by a #GtkAllocation. This struct
contains not only a width and height, but also a position (i.e. X and Y
coordinates), so that containers can tell their children not only how much
space they have gotten, but also where they are positioned inside the space
available to the container.
</para>
<para>
Widgets are required to honor the size allocation they receive; a size
request is only a request, and widgets must be able to cope with any size.
</para>
</refsect2>
<refsect2 id="child-properties"><title>Child properties</title>
<para>
<structname>GtkContainer</structname> introduces <firstterm>child
properties</firstterm> - these are object properties that are not specific
to either the container or the contained widget, but rather to their relation.
Typical examples of child properties are the position or pack-type of a widget
which is contained in a #GtkBox.</para>
<para>
Use gtk_container_class_install_child_property() to install child properties
for a container class and gtk_container_class_find_child_property() or
gtk_container_class_list_child_properties() to get information about existing
child properties.
</para>
<para>
To set the value of a child property, use gtk_container_child_set_property(),
gtk_container_child_set() or gtk_container_child_set_valist().
To obtain the value of a child property, use
gtk_container_child_get_property(), gtk_container_child_get() or
gtk_container_child_get_valist(). To emit notification about child property
changes, use gtk_widget_child_notify().
</para>
</refsect2>
<refsect2 id="GtkContainer-BUILDER-UI">
<title>GtkContainer as GtkBuildable</title>
<para>
The GtkContainer implementation of the GtkBuildable interface
supports a &lt;packing&gt; element for children, which can
contain multiple &lt;property&gt; elements that specify
child properties for the child.
</para>
<example>
<title>Child properties in UI definitions</title>
<programlisting><![CDATA[
<object class="GtkVBox">
<child>
<object class="GtkLabel"/>
<packing>
<property name="pack-type">start</property>
</packing>
</child>
</object>
]]></programlisting>
</example>
<para>
Since 2.16, child properties can also be marked as translatable using
the same "translatable", "comments" and "context" attributes that are used
for regular properties.
</para>
</refsect2>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### SECTION Image ##### -->
<!-- ##### STRUCT GtkContainer ##### -->
<para>
</para>
<!-- ##### SIGNAL GtkContainer::add ##### -->
<para>
</para>
@container: the object which received the signal.
@widget:
<!-- ##### SIGNAL GtkContainer::check-resize ##### -->
<para>
</para>
@container: the object which received the signal.
<!-- ##### SIGNAL GtkContainer::remove ##### -->
<para>
</para>
@container: the object which received the signal.
@widget:
<!-- ##### SIGNAL GtkContainer::set-focus-child ##### -->
<para>
</para>
@container: the object which received the signal.
@widget:
<!-- ##### ARG GtkContainer:border-width ##### -->
<para>
</para>
<!-- ##### ARG GtkContainer:child ##### -->
<para>
</para>
<!-- ##### ARG GtkContainer:resize-mode ##### -->
<para>
</para>
<!-- ##### MACRO GTK_IS_RESIZE_CONTAINER ##### -->
<para>
</para>
@widget:
<!-- ##### MACRO GTK_CONTAINER_WARN_INVALID_CHILD_PROPERTY_ID ##### -->
<para>
This macro should be used to emit a standard warning about unexpected
properties in set_child_property() and get_child_property() implementations.
</para>
@object: the #GObject on which set_child_property() or get_child_property()
was called
@property_id: the numeric id of the property
@pspec: the #GParamSpec of the property
<!-- ##### FUNCTION gtk_container_add ##### -->
<para>
</para>
@container:
@widget:
<!-- ##### FUNCTION gtk_container_remove ##### -->
<para>
</para>
@container:
@widget:
<!-- ##### FUNCTION gtk_container_add_with_properties ##### -->
<para>
</para>
@container:
@widget:
@first_prop_name:
@Varargs:
<!-- ##### FUNCTION gtk_container_get_resize_mode ##### -->
<para>
</para>
@container:
@Returns:
<!-- ##### FUNCTION gtk_container_set_resize_mode ##### -->
<para>
</para>
@container:
@resize_mode:
<!-- ##### FUNCTION gtk_container_check_resize ##### -->
<para>
</para>
@container:
<!-- ##### FUNCTION gtk_container_foreach ##### -->
<para>
</para>
@container:
@callback:
@callback_data:
<!-- ##### FUNCTION gtk_container_get_children ##### -->
<para>
</para>
@container:
@Returns:
<!-- ##### FUNCTION gtk_container_set_reallocate_redraws ##### -->
<para>
</para>
@container:
@needs_redraws:
<!-- ##### FUNCTION gtk_container_get_focus_child ##### -->
<para>
</para>
@container:
@Returns:
<!-- ##### FUNCTION gtk_container_set_focus_child ##### -->
<para>
</para>
@container:
@child:
<!-- ##### FUNCTION gtk_container_get_focus_vadjustment ##### -->
<para>
</para>
@container:
@Returns:
<!-- ##### FUNCTION gtk_container_set_focus_vadjustment ##### -->
<para>
</para>
@container:
@adjustment:
<!-- ##### FUNCTION gtk_container_get_focus_hadjustment ##### -->
<para>
</para>
@container:
@Returns:
<!-- ##### FUNCTION gtk_container_set_focus_hadjustment ##### -->
<para>
</para>
@container:
@adjustment:
<!-- ##### FUNCTION gtk_container_resize_children ##### -->
<para>
</para>
@container:
<!-- ##### FUNCTION gtk_container_child_type ##### -->
<para>
</para>
@container:
@Returns:
<!-- ##### FUNCTION gtk_container_child_get ##### -->
<para>
</para>
@container:
@child:
@first_prop_name:
@Varargs:
<!-- ##### FUNCTION gtk_container_child_set ##### -->
<para>
</para>
@container:
@child:
@first_prop_name:
@Varargs:
<!-- ##### FUNCTION gtk_container_child_get_property ##### -->
<para>
</para>
@container:
@child:
@property_name:
@value:
<!-- ##### FUNCTION gtk_container_child_set_property ##### -->
<para>
</para>
@container:
@child:
@property_name:
@value:
<!-- ##### FUNCTION gtk_container_child_get_valist ##### -->
<para>
</para>
@container:
@child:
@first_property_name:
@var_args:
<!-- ##### FUNCTION gtk_container_child_set_valist ##### -->
<para>
</para>
@container:
@child:
@first_property_name:
@var_args:
<!-- ##### FUNCTION gtk_container_forall ##### -->
<para>
</para>
@container:
@callback:
@callback_data:
<!-- ##### FUNCTION gtk_container_get_border_width ##### -->
<para>
</para>
@container:
@Returns:
<!-- ##### FUNCTION gtk_container_set_border_width ##### -->
<para>
</para>
@container:
@border_width:
<!-- ##### FUNCTION gtk_container_propagate_expose ##### -->
<para>
</para>
@container:
@child:
@event:
<!-- ##### FUNCTION gtk_container_get_focus_chain ##### -->
<para>
</para>
@container:
@focusable_widgets:
@Returns:
<!-- ##### FUNCTION gtk_container_set_focus_chain ##### -->
<para>
</para>
@container:
@focusable_widgets:
<!-- ##### FUNCTION gtk_container_unset_focus_chain ##### -->
<para>
</para>
@container:
<!-- ##### FUNCTION gtk_container_class_find_child_property ##### -->
<para>
</para>
@cclass:
@property_name:
@Returns:
<!-- ##### FUNCTION gtk_container_class_install_child_property ##### -->
<para>
</para>
@cclass:
@property_id:
@pspec:
<!-- ##### FUNCTION gtk_container_class_list_child_properties ##### -->
<para>
</para>
@cclass:
@n_properties:
@Returns:

View File

@@ -14,22 +14,22 @@ not require extensive effort on the user's part.
<para>
GTK+ treats a dialog as a window split vertically. The top section is a
#GtkVBox known as the <structfield>content_area</structfield>, and is
where widgets such as a #GtkLabel or a #GtkEntry should be packed.
The bottom area is known as the <structfield>action_area</structfield>.
This is generally used for packing buttons into the dialog which may
perform functions such as cancel, ok, or apply.
#GtkVBox, and is where widgets such as a #GtkLabel or a #GtkEntry should
be packed. The bottom area is known as the
<structfield>action_area</structfield>. This is generally used for
packing buttons into the dialog which may perform functions such as
cancel, ok, or apply. The two areas are separated by a #GtkHSeparator.
</para>
<para>
GtkDialog boxes are created with a call to gtk_dialog_new() or
gtk_dialog_new_with_buttons(). gtk_dialog_new_with_buttons() is recommended;
it allows you to set the dialog title, some convenient flags, and add simple
#GtkDialog boxes are created with a call to gtk_dialog_new() or
gtk_dialog_new_with_buttons(). gtk_dialog_new_with_buttons() is recommended; it
allows you to set the dialog title, some convenient flags, and add simple
buttons.
</para>
<para>
If 'dialog' is a newly created dialog, the two primary areas of the window
If 'dialog' is a newly created dialog, the two primary areas of the window
can be accessed through gtk_dialog_get_content_area() and
gtk_dialog_get_action_area(), as can be seen from the example, below.
</para>
@@ -196,6 +196,11 @@ as any other #GtkHButtonBox.
@dialog:
@arg1:
<!-- ##### ARG GtkDialog:has-separator ##### -->
<para>
</para>
<!-- ##### ARG GtkDialog:action-area-border ##### -->
<para>
@@ -225,6 +230,8 @@ Flags used to influence dialog construction.
see gtk_window_set_modal().
@GTK_DIALOG_DESTROY_WITH_PARENT: Destroy the dialog when its
parent is destroyed, see gtk_window_set_destroy_with_parent().
@GTK_DIALOG_NO_SEPARATOR: Don't put a separator between the
action area and the dialog content.
<!-- ##### ENUM GtkResponseType ##### -->
<para>
@@ -318,6 +325,15 @@ directly, but into the @vbox and @action_area, as described above.
@response_id:
<!-- ##### FUNCTION gtk_dialog_get_has_separator ##### -->
<para>
</para>
@dialog:
@Returns:
<!-- ##### FUNCTION gtk_dialog_set_default_response ##### -->
<para>
@@ -327,6 +343,15 @@ directly, but into the @vbox and @action_area, as described above.
@response_id:
<!-- ##### FUNCTION gtk_dialog_set_has_separator ##### -->
<para>
</para>
@dialog:
@setting:
<!-- ##### FUNCTION gtk_dialog_set_response_sensitive ##### -->
<para>

View File

@@ -224,8 +224,8 @@ drops.
</para>
@context:
@Returns:
@context:
@Returns:
<!-- ##### FUNCTION gtk_drag_highlight ##### -->
@@ -271,6 +271,18 @@ a widget.
@hot_y:
<!-- ##### FUNCTION gtk_drag_set_icon_pixmap ##### -->
<para>
</para>
@context:
@colormap:
@pixmap:
@mask:
@hot_x:
@hot_y:
<!-- ##### FUNCTION gtk_drag_set_icon_pixbuf ##### -->
<para>
@@ -293,15 +305,6 @@ a widget.
@hot_y:
<!-- ##### FUNCTION gtk_drag_set_icon_surface ##### -->
<para>
</para>
@context:
@surface:
<!-- ##### FUNCTION gtk_drag_set_icon_name ##### -->
<para>
@@ -345,6 +348,16 @@ a widget.
@actions:
<!-- ##### FUNCTION gtk_drag_source_set_icon ##### -->
<para>
</para>
@widget:
@colormap:
@pixmap:
@mask:
<!-- ##### FUNCTION gtk_drag_source_set_icon_pixbuf ##### -->
<para>

File diff suppressed because it is too large Load Diff

View File

@@ -29,6 +29,29 @@ Public enumerated types used throughout GTK+
@GTK_ACCEL_LOCKED:
@GTK_ACCEL_MASK:
<!-- ##### ENUM GtkAnchorType ##### -->
<para>
</para>
@GTK_ANCHOR_CENTER:
@GTK_ANCHOR_NORTH:
@GTK_ANCHOR_NORTH_WEST:
@GTK_ANCHOR_NORTH_EAST:
@GTK_ANCHOR_SOUTH:
@GTK_ANCHOR_SOUTH_WEST:
@GTK_ANCHOR_SOUTH_EAST:
@GTK_ANCHOR_WEST:
@GTK_ANCHOR_EAST:
@GTK_ANCHOR_N:
@GTK_ANCHOR_NW:
@GTK_ANCHOR_NE:
@GTK_ANCHOR_S:
@GTK_ANCHOR_SW:
@GTK_ANCHOR_SE:
@GTK_ANCHOR_W:
@GTK_ANCHOR_E:
<!-- ##### ENUM GtkArrowPlacement ##### -->
<para>
Used to specify the placement of scroll arrows in scrolling menus.
@@ -66,6 +89,7 @@ Used to dictate the style that a #GtkButtonBox uses to layout the buttons it
contains. (See also: #GtkVButtonBox and #GtkHButtonBox).
</para>
@GTK_BUTTONBOX_DEFAULT_STYLE: Default packing.
@GTK_BUTTONBOX_SPREAD: Buttons are evenly spread across the box.
@GTK_BUTTONBOX_EDGE: Buttons are placed at the edges of the box.
@GTK_BUTTONBOX_START: Buttons are grouped towards the start of the box,
@@ -310,6 +334,7 @@ Used to control what selections users are allowed to make.
The Ctrl key may be used to enlarge the selection, and Shift key to select
between the focus and the child pointed to. Some widgets may also allow
Click-drag to select a range of elements.
@GTK_SELECTION_EXTENDED: Deprecated, behaves identical to %GTK_SELECTION_MULTIPLE.
<!-- ##### ENUM GtkShadowType ##### -->
<para>
@@ -338,6 +363,22 @@ the widget and the widget will respond to mouse clicks.
@GTK_STATE_INSENSITIVE: State indicating that the widget is
unresponsive to user actions.
<!-- ##### ENUM GtkSubmenuDirection ##### -->
<para>
Indicates the direction a sub-menu will appear.
</para>
@GTK_DIRECTION_LEFT: A sub-menu will appear to the left of the current menu.
@GTK_DIRECTION_RIGHT: A sub-menu will appear to the right of the current menu.
<!-- ##### ENUM GtkSubmenuPlacement ##### -->
<para>
</para>
@GTK_TOP_BOTTOM:
@GTK_LEFT_RIGHT:
<!-- ##### ENUM GtkToolbarStyle ##### -->
<para>
Used to customize the appearance of a #GtkToolbar. Note that
@@ -362,6 +403,15 @@ Used by #GtkRange to control the policy for notifying value changes.
@GTK_UPDATE_DISCONTINUOUS: Notify updates when the mouse button has been released
@GTK_UPDATE_DELAYED: Space out updates with a small timeout
<!-- ##### ENUM GtkVisibility ##### -->
<para>
Used by #GtkCList and #GtkCTree to indicate whether a row is visible.
</para>
@GTK_VISIBILITY_NONE: The row is not visible.
@GTK_VISIBILITY_PARTIAL: The row is partially visible.
@GTK_VISIBILITY_FULL: The row is fully visible.
<!-- ##### ENUM GtkWindowPosition ##### -->
<para>
Window placement can be influenced using this enumeration. Note that

View File

@@ -22,51 +22,6 @@ typically use the features described here.
<!-- ##### SECTION Image ##### -->
<!-- ##### FUNCTION gtk_get_major_version ##### -->
<para>
</para>
@void:
@Returns:
<!-- ##### FUNCTION gtk_get_minor_version ##### -->
<para>
</para>
@void:
@Returns:
<!-- ##### FUNCTION gtk_get_micro_version ##### -->
<para>
</para>
@void:
@Returns:
<!-- ##### FUNCTION gtk_get_binary_age ##### -->
<para>
</para>
@void:
@Returns:
<!-- ##### FUNCTION gtk_get_interface_age ##### -->
<para>
</para>
@void:
@Returns:
<!-- ##### FUNCTION gtk_check_version ##### -->
<para>
</para>

View File

@@ -74,6 +74,11 @@ a &lt;child&gt; type attribute.
</para>
<!-- ##### ARG GtkFrame:shadow ##### -->
<para>
</para>
<!-- ##### ARG GtkFrame:shadow-type ##### -->
<para>

View File

@@ -115,6 +115,11 @@ handlebox are detached from the main window.
</para>
<!-- ##### ARG GtkHandleBox:shadow ##### -->
<para>
</para>
<!-- ##### ARG GtkHandleBox:shadow-type ##### -->
<para>

View File

@@ -0,0 +1,330 @@
<!-- ##### SECTION Title ##### -->
GtkItemFactory
<!-- ##### SECTION Short_Description ##### -->
A factory for menus
<!-- ##### SECTION Long_Description ##### -->
<para>
As of GTK+ 2.4, #GtkItemFactory has been deprecated in favour of #GtkUIManager.
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### STRUCT GtkItemFactory ##### -->
<para>
</para>
<!-- ##### USER_FUNCTION GtkPrintFunc ##### -->
<para>
</para>
@func_data:
@str:
<!-- ##### USER_FUNCTION GtkTranslateFunc ##### -->
<para>
The function used to translate messages in e.g. #GtkIconFactory
and #GtkActionGroup.
</para>
@path: The id of the message. In #GtkItemFactory this will be a path
from a #GtkItemFactoryEntry, in #GtkActionGroup, it will be a label
or tooltip from a #GtkActionEntry.
@func_data: user data passed in when registering the function
@Returns: the translated message
<!-- ##### USER_FUNCTION GtkItemFactoryCallback ##### -->
<para>
</para>
<!-- ##### USER_FUNCTION GtkItemFactoryCallback1 ##### -->
<para>
</para>
@callback_data:
@callback_action:
@widget:
<!-- ##### USER_FUNCTION GtkItemFactoryCallback2 ##### -->
<para>
</para>
@widget:
@callback_data:
@callback_action:
<!-- ##### STRUCT GtkItemFactoryEntry ##### -->
<para>
</para>
@path:
@accelerator:
@callback:
@callback_action:
@item_type:
@extra_data:
<!-- ##### STRUCT GtkItemFactoryItem ##### -->
<para>
</para>
@path:
@widgets:
<!-- ##### FUNCTION gtk_item_factory_new ##### -->
<para>
</para>
@container_type:
@path:
@accel_group:
@Returns:
<!-- ##### FUNCTION gtk_item_factory_construct ##### -->
<para>
</para>
@ifactory:
@container_type:
@path:
@accel_group:
<!-- ##### FUNCTION gtk_item_factory_add_foreign ##### -->
<para>
</para>
@accel_widget:
@full_path:
@accel_group:
@keyval:
@modifiers:
<!-- ##### FUNCTION gtk_item_factory_from_widget ##### -->
<para>
</para>
@widget:
@Returns:
<!-- ##### FUNCTION gtk_item_factory_path_from_widget ##### -->
<para>
</para>
@widget:
@Returns:
<!-- ##### FUNCTION gtk_item_factory_get_item ##### -->
<para>
</para>
@ifactory:
@path:
@Returns:
<!-- ##### FUNCTION gtk_item_factory_get_widget ##### -->
<para>
</para>
@ifactory:
@path:
@Returns:
<!-- ##### FUNCTION gtk_item_factory_get_widget_by_action ##### -->
<para>
</para>
@ifactory:
@action:
@Returns:
<!-- ##### FUNCTION gtk_item_factory_get_item_by_action ##### -->
<para>
</para>
@ifactory:
@action:
@Returns:
<!-- ##### FUNCTION gtk_item_factory_create_item ##### -->
<para>
</para>
@ifactory:
@entry:
@callback_data:
@callback_type:
<!-- ##### FUNCTION gtk_item_factory_create_items ##### -->
<para>
</para>
@ifactory:
@n_entries:
@entries:
@callback_data:
<!-- ##### FUNCTION gtk_item_factory_create_items_ac ##### -->
<para>
</para>
@ifactory:
@n_entries:
@entries:
@callback_data:
@callback_type:
<!-- ##### FUNCTION gtk_item_factory_delete_item ##### -->
<para>
</para>
@ifactory:
@path:
<!-- ##### FUNCTION gtk_item_factory_delete_entry ##### -->
<para>
</para>
@ifactory:
@entry:
<!-- ##### FUNCTION gtk_item_factory_delete_entries ##### -->
<para>
</para>
@ifactory:
@n_entries:
@entries:
<!-- ##### FUNCTION gtk_item_factory_popup ##### -->
<para>
</para>
@ifactory:
@x:
@y:
@mouse_button:
@time_:
<!-- ##### FUNCTION gtk_item_factory_popup_with_data ##### -->
<para>
</para>
@ifactory:
@popup_data:
@destroy:
@x:
@y:
@mouse_button:
@time_:
<!-- ##### FUNCTION gtk_item_factory_popup_data ##### -->
<para>
</para>
@ifactory:
@Returns:
<!-- ##### FUNCTION gtk_item_factory_popup_data_from_widget ##### -->
<para>
</para>
@widget:
@Returns:
<!-- ##### FUNCTION gtk_item_factory_from_path ##### -->
<para>
</para>
@path:
@Returns:
<!-- ##### FUNCTION gtk_item_factory_create_menu_entries ##### -->
<para>
</para>
@n_entries:
@entries:
<!-- ##### FUNCTION gtk_item_factories_path_delete ##### -->
<para>
</para>
@ifactory_path:
@path:
<!-- ##### FUNCTION gtk_item_factory_set_translate_func ##### -->
<para>
</para>
@ifactory:
@func:
@data:
@notify:

View File

@@ -0,0 +1,177 @@
<!-- ##### SECTION Title ##### -->
GtkLayout
<!-- ##### SECTION Short_Description ##### -->
Infinite scrollable area containing child widgets and/or custom drawing
<!-- ##### SECTION Long_Description ##### -->
<para>
#GtkLayout is similar to #GtkDrawingArea in that it's a "blank slate"
and doesn't do anything but paint a blank background by default. It's
different in that it supports scrolling natively (you can add it to a
#GtkScrolledWindow), and it can contain child widgets, since it's a
#GtkContainer. However if you're just going to draw, a #GtkDrawingArea
is a better choice since it has lower overhead.
</para>
<para>
When handling expose events on a #GtkLayout, you must draw to
GTK_LAYOUT (layout)-&gt;bin_window, rather than to
GTK_WIDGET (layout)-&gt;window, as you would for a drawing
area.
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
#GtkDrawingArea, #GtkScrolledWindow
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### SECTION Image ##### -->
<!-- ##### STRUCT GtkLayout ##### -->
<para>
</para>
<!-- ##### SIGNAL GtkLayout::set-scroll-adjustments ##### -->
<para>
</para>
@layout: the object which received the signal.
@arg1:
@arg2:
<!-- ##### ARG GtkLayout:hadjustment ##### -->
<para>
</para>
<!-- ##### ARG GtkLayout:height ##### -->
<para>
</para>
<!-- ##### ARG GtkLayout:vadjustment ##### -->
<para>
</para>
<!-- ##### ARG GtkLayout:width ##### -->
<para>
</para>
<!-- ##### ARG GtkLayout:x ##### -->
<para>
</para>
<!-- ##### ARG GtkLayout:y ##### -->
<para>
</para>
<!-- ##### FUNCTION gtk_layout_new ##### -->
<para>
</para>
@hadjustment:
@vadjustment:
@Returns:
<!-- ##### FUNCTION gtk_layout_put ##### -->
<para>
</para>
@layout:
@child_widget:
@x:
@y:
<!-- ##### FUNCTION gtk_layout_move ##### -->
<para>
</para>
@layout:
@child_widget:
@x:
@y:
<!-- ##### FUNCTION gtk_layout_set_size ##### -->
<para>
</para>
@layout:
@width:
@height:
<!-- ##### FUNCTION gtk_layout_get_size ##### -->
<para>
</para>
@layout:
@width:
@height:
<!-- ##### FUNCTION gtk_layout_get_hadjustment ##### -->
<para>
</para>
@layout:
@Returns:
<!-- ##### FUNCTION gtk_layout_get_vadjustment ##### -->
<para>
</para>
@layout:
@Returns:
<!-- ##### FUNCTION gtk_layout_set_hadjustment ##### -->
<para>
</para>
@layout:
@adjustment:
<!-- ##### FUNCTION gtk_layout_set_vadjustment ##### -->
<para>
</para>
@layout:
@adjustment:
<!-- ##### FUNCTION gtk_layout_get_bin_window ##### -->
<para>
</para>
@layout:
@Returns:

View File

@@ -395,8 +395,8 @@ widget and this function does nothing.
</para>
@void:
@Returns:
@void:
@Returns:
<!-- ##### FUNCTION gtk_grab_remove ##### -->
@@ -430,15 +430,6 @@ If @widget does not have the grab, this function does nothing.
@device:
<!-- ##### USER_FUNCTION GtkFunction ##### -->
<para>
</para>
@data:
@Returns:
<!-- ##### FUNCTION gtk_init_add ##### -->
<para>
Registers a function to be called when the mainloop is started.
@@ -446,7 +437,6 @@ Registers a function to be called when the mainloop is started.
@function: Function to invoke when gtk_main() is called next.
@data: Data to pass to that function.
@Deprecated: This function is going to be removed in GTK+ 3.0
<!-- ##### FUNCTION gtk_quit_add_destroy ##### -->
@@ -457,7 +447,6 @@ is quit.
@main_level: Level of the mainloop which shall trigger the destruction.
@object: Object to be destroyed.
@Deprecated: This function is going to be removed in GTK+ 3.0
<!-- ##### FUNCTION gtk_quit_add ##### -->
@@ -473,28 +462,8 @@ Registers a function to be called when an instance of the mainloop is left.
@data: Pointer to pass when calling @function.
@Returns: A handle for this quit handler (you need this for gtk_quit_remove())
or 0 if you passed a %NULL pointer in @function.
@Deprecated: This function is going to be removed in GTK+ 3.0
<!-- ##### USER_FUNCTION GtkCallbackMarshal ##### -->
<para>
</para>
@object:
@data:
@n_args:
@args:
<!-- ##### STRUCT GtkArg ##### -->
<para>
</para>
@type:
@name:
<!-- ##### FUNCTION gtk_quit_add_full ##### -->
<para>
Registers a function to be called when an instance of the mainloop is left.
@@ -519,7 +488,6 @@ used by GTK+ wrappers for languages other than C.
@destroy: Function to call to destruct @data. Gets @data as argument.
@Returns: A handle for this quit handler (you need this for gtk_quit_remove())
or 0 if you passed a %NULL pointer in @function.
@Deprecated: This function is going to be removed in GTK+ 3.0
<!-- ##### FUNCTION gtk_quit_remove ##### -->
@@ -528,7 +496,6 @@ Removes a quit handler by its identifier.
</para>
@quit_handler_id: Identifier for the handler returned when installing it.
@Deprecated: This function is going to be removed in GTK+ 3.0
<!-- ##### FUNCTION gtk_quit_remove_by_data ##### -->
@@ -537,7 +504,6 @@ Removes a quit handler identified by its @data field.
</para>
@data: The pointer passed as @data to gtk_quit_add() or gtk_quit_add_full().
@Deprecated: This function is going to be removed in GTK+ 3.0
<!-- ##### MACRO GTK_PRIORITY_RESIZE ##### -->

View File

@@ -245,7 +245,6 @@ Moves a #GtkMenuItem to a new position within the #GtkMenu.
@parent_menu_item:
@func:
@data:
@destroy:
@button:
@activate_time:

View File

@@ -78,20 +78,6 @@ submenu. For normal applications, the relevant signal is "activate".
@menuitem: the object which received the signal.
<!-- ##### SIGNAL GtkMenuItem::deselect ##### -->
<para>
</para>
@menuitem: the object which received the signal.
<!-- ##### SIGNAL GtkMenuItem::select ##### -->
<para>
</para>
@menuitem: the object which received the signal.
<!-- ##### SIGNAL GtkMenuItem::toggle-size-allocate ##### -->
<para>

View File

@@ -19,13 +19,11 @@ positioned within its allocated area. Note that if the widget is added to
a container in such a way that it expands automatically to fill its
allocated area, the alignment settings will not alter the widgets position.
</para>
<note>
<para>
Note that the desired effect can in most cases be achieved by using the
#GtkWidget:halign, #GtkWidget:valign and #GtkWidget:margin properties
on the child widget, so GtkMisc should not be used in new code.
on the child widget.
</para>
</note>
<!-- ##### SECTION See_Also ##### -->
<para>

View File

@@ -0,0 +1,320 @@
<!-- ##### SECTION Title ##### -->
GtkPageSetup
<!-- ##### SECTION Short_Description ##### -->
Stores page setup information
<!-- ##### SECTION Long_Description ##### -->
<para>
A GtkPageSetup object stores the page size, orientation and margins.
The idea is that you can get one of these from the page setup dialog
and then pass it to the #GtkPrintOperation when printing.
The benefit of splitting this out of the #GtkPrintSettings is that
these affect the actual layout of the page, and thus need to be set
long before user prints.
</para>
<para id="print-margins">
The margins specified in this object are the "print margins", i.e. the
parts of the page that the printer cannot print on. These are different
from the layout margins that a word processor uses; they are typically
used to determine the <emphasis>minimal</emphasis> size for the layout
margins.
</para>
<para>
To obtain a #GtkPageSetup use gtk_page_setup_new()
to get the defaults, or use gtk_print_run_page_setup_dialog() to show
the page setup dialog and receive the resulting page setup.
</para>
<example>
<title>A page setup dialog</title>
<programlisting>
static GtkPrintSettings *settings = NULL;
static GtkPageSetup *page_setup = NULL;
static void
do_page_setup (void)
{
GtkPageSetup *new_page_setup;
if (settings == NULL)
settings = gtk_print_settings_new (<!-- -->);
new_page_setup = gtk_print_run_page_setup_dialog (GTK_WINDOW (main_window),
page_setup, settings);
if (page_setup)
g_object_unref (page_setup);
page_setup = new_page_setup;
}
</programlisting>
</example>
<para>
Printing support was added in GTK+ 2.10.
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### SECTION Image ##### -->
<!-- ##### STRUCT GtkPageSetup ##### -->
<para>
</para>
<!-- ##### FUNCTION gtk_page_setup_new ##### -->
<para>
</para>
@void:
@Returns:
<!-- ##### FUNCTION gtk_page_setup_copy ##### -->
<para>
</para>
@other:
@Returns:
<!-- ##### FUNCTION gtk_page_setup_get_orientation ##### -->
<para>
</para>
@setup:
@Returns:
<!-- ##### FUNCTION gtk_page_setup_set_orientation ##### -->
<para>
</para>
@setup:
@orientation:
<!-- ##### FUNCTION gtk_page_setup_get_paper_size ##### -->
<para>
</para>
@setup:
@Returns:
<!-- ##### FUNCTION gtk_page_setup_set_paper_size ##### -->
<para>
</para>
@setup:
@size:
<!-- ##### FUNCTION gtk_page_setup_get_top_margin ##### -->
<para>
</para>
@setup:
@unit:
@Returns:
<!-- ##### FUNCTION gtk_page_setup_set_top_margin ##### -->
<para>
</para>
@setup:
@margin:
@unit:
<!-- ##### FUNCTION gtk_page_setup_get_bottom_margin ##### -->
<para>
</para>
@setup:
@unit:
@Returns:
<!-- ##### FUNCTION gtk_page_setup_set_bottom_margin ##### -->
<para>
</para>
@setup:
@margin:
@unit:
<!-- ##### FUNCTION gtk_page_setup_get_left_margin ##### -->
<para>
</para>
@setup:
@unit:
@Returns:
<!-- ##### FUNCTION gtk_page_setup_set_left_margin ##### -->
<para>
</para>
@setup:
@margin:
@unit:
<!-- ##### FUNCTION gtk_page_setup_get_right_margin ##### -->
<para>
</para>
@setup:
@unit:
@Returns:
<!-- ##### FUNCTION gtk_page_setup_set_right_margin ##### -->
<para>
</para>
@setup:
@margin:
@unit:
<!-- ##### FUNCTION gtk_page_setup_set_paper_size_and_default_margins ##### -->
<para>
</para>
@setup:
@size:
<!-- ##### FUNCTION gtk_page_setup_get_paper_width ##### -->
<para>
</para>
@setup:
@unit:
@Returns:
<!-- ##### FUNCTION gtk_page_setup_get_paper_height ##### -->
<para>
</para>
@setup:
@unit:
@Returns:
<!-- ##### FUNCTION gtk_page_setup_get_page_width ##### -->
<para>
</para>
@setup:
@unit:
@Returns:
<!-- ##### FUNCTION gtk_page_setup_get_page_height ##### -->
<para>
</para>
@setup:
@unit:
@Returns:
<!-- ##### FUNCTION gtk_page_setup_new_from_file ##### -->
<para>
</para>
@file_name:
@error:
@Returns:
<!-- ##### FUNCTION gtk_page_setup_new_from_key_file ##### -->
<para>
</para>
@key_file:
@group_name:
@error:
@Returns:
<!-- ##### FUNCTION gtk_page_setup_load_file ##### -->
<para>
</para>
@setup:
@file_name:
@error:
@Returns:
<!-- ##### FUNCTION gtk_page_setup_load_key_file ##### -->
<para>
</para>
@setup:
@key_file:
@group_name:
@error:
@Returns:
<!-- ##### FUNCTION gtk_page_setup_to_file ##### -->
<para>
</para>
@setup:
@file_name:
@error:
@Returns:
<!-- ##### FUNCTION gtk_page_setup_to_key_file ##### -->
<para>
</para>
@setup:
@key_file:
@group_name:

View File

@@ -0,0 +1,272 @@
<!-- ##### SECTION Title ##### -->
GtkPaned
<!-- ##### SECTION Short_Description ##### -->
Base class for widgets with two adjustable panes
<!-- ##### SECTION Long_Description ##### -->
<para>
#GtkPaned is the base class for widgets with two panes,
arranged either horizontally (#GtkHPaned) or
vertically (#GtkVPaned). Child widgets are
added to the panes of the widget with
gtk_paned_pack1() and gtk_paned_pack2(). The division
beween the two children is set by default from the
size requests of the children, but it can be adjusted
by the user.
</para>
<para>
A paned widget draws a separator between the two
child widgets and a small handle that the user
can drag to adjust the division. It does not
draw any relief around the children or around
the separator. (The space in which the separator
is called the gutter.) Often, it is useful
to put each child inside a #GtkFrame with the
shadow type set to %GTK_SHADOW_IN so that the
gutter appears as a ridge. No separator is drawn
if one of the children is missing.
</para>
<para>
Each child has two options that can be set,
@resize and @shrink. If @resize is true, then when the
#GtkPaned is resized, that child will expand
or shrink along with the paned widget. If @shrink
is true, then when that child can be made smaller
than its requisition by the user. Setting @shrink
to %FALSE allows the application to set a minimum
size. If @resize is false for both children, then
this is treated as if @resize is true for both
children.
</para>
<para>
The application can set the position of the slider
as if it were set by the user, by calling
gtk_paned_set_position().
</para>
<example>
<title>Creating a paned widget with minimum sizes.</title>
<programlisting>
GtkWidget *hpaned = gtk_hpaned_new (<!-- -->);
GtkWidget *frame1 = gtk_frame_new (NULL);
GtkWidget *frame2 = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (frame1), GTK_SHADOW_IN);
gtk_frame_set_shadow_type (GTK_FRAME (frame2), GTK_SHADOW_IN);
gtk_widget_set_size_request (hpaned, 200, -1);
gtk_paned_pack1 (GTK_PANED (hpaned), frame1, TRUE, FALSE);
gtk_widget_set_size_request (frame1, 50, -1);
gtk_paned_pack2 (GTK_PANED (hpaned), frame2, FALSE, FALSE);
gtk_widget_set_size_request (frame2, 50, -1);
</programlisting>
</example>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### SECTION Image ##### -->
<!-- ##### STRUCT GtkPaned ##### -->
<para>
</para>
<!-- ##### SIGNAL GtkPaned::accept-position ##### -->
<para>
</para>
@paned: the object which received the signal.
@Returns:
<!-- ##### SIGNAL GtkPaned::cancel-position ##### -->
<para>
</para>
@paned: the object which received the signal.
@Returns:
<!-- ##### SIGNAL GtkPaned::cycle-child-focus ##### -->
<para>
</para>
@Returns:
@Param4:
@Returns:
<!-- # Unused Parameters # -->
@paned: the object which received the signal.
<!-- ##### SIGNAL GtkPaned::cycle-handle-focus ##### -->
<para>
</para>
@Returns:
@Param4:
@Returns:
<!-- # Unused Parameters # -->
@paned: the object which received the signal.
<!-- ##### SIGNAL GtkPaned::move-handle ##### -->
<para>
</para>
@Returns:
@Param4:
@Returns:
<!-- # Unused Parameters # -->
@paned: the object which received the signal.
<!-- ##### SIGNAL GtkPaned::toggle-handle-focus ##### -->
<para>
</para>
@paned: the object which received the signal.
@Returns:
<!-- ##### ARG GtkPaned:max-position ##### -->
<para>
</para>
<!-- ##### ARG GtkPaned:min-position ##### -->
<para>
</para>
<!-- ##### ARG GtkPaned:position ##### -->
<para>
</para>
<!-- ##### ARG GtkPaned:position-set ##### -->
<para>
</para>
<!-- ##### ARG GtkPaned:resize ##### -->
<para>
</para>
<!-- ##### ARG GtkPaned:shrink ##### -->
<para>
</para>
<!-- ##### ARG GtkPaned:handle-size ##### -->
<para>
</para>
<!-- ##### FUNCTION gtk_paned_new ##### -->
<para>
</para>
@orientation:
@Returns:
<!-- ##### FUNCTION gtk_paned_add1 ##### -->
<para>
Adds a child to the top or left pane with
default parameters. This is equivalent
to <literal>gtk_paned_pack1 (paned, child, FALSE, TRUE)</literal>.
</para>
@paned: a paned widget
@child: the child to add
<!-- ##### FUNCTION gtk_paned_add2 ##### -->
<para>
Adds a child to the bottom or right pane with default
parameters. This is equivalent to
<literal>gtk_paned_pack2 (paned, child, TRUE, TRUE)</literal>.
</para>
@paned: a paned widget
@child: the child to add
<!-- ##### FUNCTION gtk_paned_pack1 ##### -->
<para>
Adds a child to the top or left pane.
</para>
@paned: a paned widget
@child: the child to add
@resize: should this child expand when the paned widget is resized.
@shrink: can this child be made smaller than its requisition.
<!-- ##### FUNCTION gtk_paned_pack2 ##### -->
<para>
Adds a child to the bottom or right pane.
</para>
@paned: a paned widget
@child: the child to add
@resize: should this child expand when the paned widget is resized.
@shrink: can this child be made smaller than its requisition.
<!-- ##### FUNCTION gtk_paned_get_child1 ##### -->
<para>
</para>
@paned:
@Returns:
<!-- ##### FUNCTION gtk_paned_get_child2 ##### -->
<para>
</para>
@paned:
@Returns:
<!-- ##### FUNCTION gtk_paned_set_position ##### -->
<para>
</para>
@paned:
@position:
<!-- ##### FUNCTION gtk_paned_get_position ##### -->
<para>
</para>
@paned:
@Returns:
<!-- ##### FUNCTION gtk_paned_get_handle_window ##### -->
<para>
</para>
@paned:
@Returns:

View File

@@ -0,0 +1,267 @@
<!-- ##### SECTION Title ##### -->
GtkProgressBar
<!-- ##### SECTION Short_Description ##### -->
A widget which indicates progress visually
<!-- ##### SECTION Long_Description ##### -->
<para>
The #GtkProgressBar is typically used to display the progress of a long
running operation. It provides a visual clue that processing
is underway. The #GtkProgressBar can be used in two different
modes: percentage mode and activity mode.
</para>
<para>
When an application can determine how much work needs to take place
(e.g. read a fixed number of bytes from a file) and can monitor its
progress, it can use the #GtkProgressBar in percentage mode and the user
sees a growing bar indicating the percentage of the work that has
been completed. In this mode, the application is required to call
gtk_progress_bar_set_fraction() periodically to update the progress bar.
</para>
<para>
When an application has no accurate way of knowing the amount of work
to do, it can use the #GtkProgressBar in activity mode, which shows activity
by a block moving back and forth within the progress area. In this mode,
the application is required to call gtk_progress_bar_pulse() perodically
to update the progress bar.
</para>
<para>
There is quite a bit of flexibility provided to control the appearance
of the #GtkProgressBar. Functions are provided to control the
orientation of the bar, optional text can be displayed along with
the bar, and the step size used in activity mode can be set.
</para>
<note>
<para>
The #GtkProgressBar/#GtkProgress API in GTK 1.2 was bloated, needlessly complex
and hard to use properly. Therefore #GtkProgress has been deprecated
completely and the #GtkProgressBar API has been reduced to the following 10
functions: gtk_progress_bar_new(), gtk_progress_bar_pulse(),
gtk_progress_bar_set_text(), gtk_progress_bar_set_fraction(),
gtk_progress_bar_set_pulse_step(), gtk_progress_bar_set_orientation(),
gtk_progress_bar_get_text(), gtk_progress_bar_get_fraction(),
gtk_progress_bar_get_pulse_step(), gtk_progress_bar_get_orientation().
These have been grouped at the beginning of this section, followed by
a large chunk of deprecated 1.2 compatibility functions.
</para>
</note>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### SECTION Image ##### -->
<!-- ##### STRUCT GtkProgressBar ##### -->
<para>
The #GtkProgressBar-struct struct contains private data only,
and should be accessed using the functions below.
</para>
<!-- ##### ARG GtkProgressBar:ellipsize ##### -->
<para>
</para>
<!-- ##### ARG GtkProgressBar:fraction ##### -->
<para>
</para>
<!-- ##### ARG GtkProgressBar:orientation ##### -->
<para>
</para>
<!-- ##### ARG GtkProgressBar:pulse-step ##### -->
<para>
</para>
<!-- ##### ARG GtkProgressBar:show-text ##### -->
<para>
</para>
<!-- ##### ARG GtkProgressBar:text ##### -->
<para>
</para>
<!-- ##### ARG GtkProgressBar:min-horizontal-bar-height ##### -->
<para>
</para>
<!-- ##### ARG GtkProgressBar:min-horizontal-bar-width ##### -->
<para>
</para>
<!-- ##### ARG GtkProgressBar:min-vertical-bar-height ##### -->
<para>
</para>
<!-- ##### ARG GtkProgressBar:min-vertical-bar-width ##### -->
<para>
</para>
<!-- ##### ARG GtkProgressBar:xspacing ##### -->
<para>
</para>
<!-- ##### ARG GtkProgressBar:yspacing ##### -->
<para>
</para>
<!-- ##### FUNCTION gtk_progress_bar_new ##### -->
<para>
Creates a new #GtkProgressBar.
</para>
@void:
@Returns: a #GtkProgressBar.
<!-- ##### FUNCTION gtk_progress_bar_pulse ##### -->
<para>
</para>
@pbar:
<!-- ##### FUNCTION gtk_progress_bar_set_fraction ##### -->
<para>
</para>
@pbar:
@fraction:
<!-- ##### FUNCTION gtk_progress_bar_get_fraction ##### -->
<para>
</para>
@pbar:
@Returns:
<!-- ##### ENUM GtkProgressBarOrientation ##### -->
<para>
An enumeration representing possible orientations and growth
directions for the visible progress bar.
</para>
@GTK_PROGRESS_LEFT_TO_RIGHT: A horizontal progress bar growing from left to right.
@GTK_PROGRESS_RIGHT_TO_LEFT: A horizontal progress bar growing from right to left.
@GTK_PROGRESS_BOTTOM_TO_TOP: A vertical progress bar growing from bottom to top.
@GTK_PROGRESS_TOP_TO_BOTTOM: A vertical progress bar growing from top to bottom.
<!-- ##### FUNCTION gtk_progress_bar_set_orientation ##### -->
<para>
</para>
@pbar:
@orientation:
<!-- ##### FUNCTION gtk_progress_bar_get_orientation ##### -->
<para>
</para>
@pbar:
@Returns:
<!-- ##### FUNCTION gtk_progress_bar_set_show_text ##### -->
<para>
</para>
@pbar:
@show_text:
<!-- ##### FUNCTION gtk_progress_bar_get_show_text ##### -->
<para>
</para>
@pbar:
@Returns:
<!-- ##### FUNCTION gtk_progress_bar_set_text ##### -->
<para>
</para>
@pbar:
@text:
<!-- ##### FUNCTION gtk_progress_bar_get_text ##### -->
<para>
</para>
@pbar:
@Returns:
<!-- ##### FUNCTION gtk_progress_bar_set_ellipsize ##### -->
<para>
</para>
@pbar:
@mode:
<!-- ##### FUNCTION gtk_progress_bar_get_ellipsize ##### -->
<para>
</para>
@pbar:
@Returns:
<!-- ##### FUNCTION gtk_progress_bar_set_pulse_step ##### -->
<para>
</para>
@pbar:
@fraction:
<!-- ##### FUNCTION gtk_progress_bar_get_pulse_step ##### -->
<para>
</para>
@pbar:
@Returns:

View File

@@ -143,7 +143,7 @@ Sets the group of a radio menu item, or changes it.
</para>
@radio_menu_item:
@Returns:
@radio_menu_item:
@Returns:

View File

@@ -0,0 +1,103 @@
<!-- ##### SECTION Title ##### -->
GtkScrollbar
<!-- ##### SECTION Short_Description ##### -->
Base class for GtkHScrollbar and GtkVScrollbar
<!-- ##### SECTION Long_Description ##### -->
<para>
The #GtkScrollbar widget is the base class for #GtkHScrollbar and
#GtkVScrollbar. It can be used in the same way as these, by setting
the "orientation" property appropriately.
</para>
<para>
The position of the thumb in a scrollbar is controlled by the scroll
adjustments. See #GtkAdjustment for the fields in an adjustment - for
#GtkScrollbar, the "value" field represents the position of the
scrollbar, which must be between the "lower" field and "upper -
page_size." The "page_size" field represents the size of the visible
scrollable area. The "step_increment" and "page_increment" fields are
used when the user asks to step down (using the small stepper arrows)
or page down (using for example the PageDown key).
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
<variablelist>
<varlistentry>
<term>#GtkHScrollbar</term>
<listitem><para>a horizontal scrollbar.</para></listitem>
</varlistentry>
<varlistentry>
<term>#GtkVScrollbar</term>
<listitem><para>a vertical scrollbar.</para></listitem>
</varlistentry>
<varlistentry>
<term>#GtkAdjustment</term>
<listitem><para>connects scrollbars to the widget being scrolled.</para></listitem>
</varlistentry>
<varlistentry>
<term>#GtkScrolledWindow</term>
<listitem><para>convenient widget for setting up scrolling.</para></listitem>
</varlistentry>
</variablelist>
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### SECTION Image ##### -->
<!-- ##### STRUCT GtkScrollbar ##### -->
<para>
The #GtkScrollbar struct does not contain any public data.
</para>
<!-- ##### ARG GtkScrollbar:fixed-slider-length ##### -->
<para>
</para>
<!-- ##### ARG GtkScrollbar:has-backward-stepper ##### -->
<para>
</para>
<!-- ##### ARG GtkScrollbar:has-forward-stepper ##### -->
<para>
</para>
<!-- ##### ARG GtkScrollbar:has-secondary-backward-stepper ##### -->
<para>
</para>
<!-- ##### ARG GtkScrollbar:has-secondary-forward-stepper ##### -->
<para>
</para>
<!-- ##### ARG GtkScrollbar:min-slider-length ##### -->
<para>
</para>
<!-- ##### FUNCTION gtk_scrollbar_new ##### -->
<para>
</para>
@orientation:
@adjustment:
@Returns:

View File

@@ -0,0 +1,282 @@
<!-- ##### SECTION Title ##### -->
GtkScrolledWindow
<!-- ##### SECTION Short_Description ##### -->
Adds scrollbars to its child widget
<!-- ##### SECTION Long_Description ##### -->
<para>
#GtkScrolledWindow is a #GtkBin subclass: it's a container
the accepts a single child widget. #GtkScrolledWindow adds scrollbars
to the child widget and optionally draws a beveled frame around the
child widget.
</para>
<para>
The scrolled window can work in two ways. Some widgets have native
scrolling support; these widgets have "slots" for #GtkAdjustment
objects.
<footnote><para>The scrolled window installs #GtkAdjustment objects in
the child window's slots using the set_scroll_adjustments_signal,
found in #GtkWidgetClass. (Conceptually, these widgets implement a
"Scrollable" interface; because GTK+ 1.2 lacked interface support in
the object system, this interface is hackily implemented as a signal
in #GtkWidgetClass. The GTK+ 2.0 object system would allow a clean
implementation, but it wasn't worth breaking the
API.)</para></footnote>
Widgets with native scroll support include #GtkTreeView, #GtkTextView,
and #GtkLayout.
</para>
<para>
For widgets that lack native scrolling support, the #GtkViewport
widget acts as an adaptor class, implementing scrollability for child
widgets that lack their own scrolling capabilities. Use #GtkViewport
to scroll child widgets such as #GtkTable, #GtkBox, and so on.
</para>
<para>
If a widget has native scrolling abilities, it can be added to the
#GtkScrolledWindow with gtk_container_add(). If a widget does not, you
must first add the widget to a #GtkViewport, then add the #GtkViewport
to the scrolled window. The convenience function
gtk_scrolled_window_add_with_viewport() does exactly this, so you can
ignore the presence of the viewport.
</para>
<para>
The position of the scrollbars is controlled by the scroll
adjustments. See #GtkAdjustment for the fields in an adjustment - for
#GtkScrollbar, used by #GtkScrolledWindow, the "value" field
represents the position of the scrollbar, which must be between the
"lower" field and "upper - page_size." The "page_size" field
represents the size of the visible scrollable area. The
"step_increment" and "page_increment" fields are used when the user
asks to step down (using the small stepper arrows) or page down (using
for example the PageDown key).
</para>
<para>
If a #GtkScrolledWindow doesn't behave quite as you would like, or
doesn't have exactly the right layout, it's very possible to set up
your own scrolling with #GtkScrollbar and for example a #GtkTable.
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
#GtkViewport, #GtkAdjustment, #GtkWidgetClass
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### SECTION Image ##### -->
<!-- ##### STRUCT GtkScrolledWindow ##### -->
<para>
There are no public fields in the #GtkScrolledWindow struct; it should
only be accessed using the functions below.
</para>
<!-- ##### SIGNAL GtkScrolledWindow::move-focus-out ##### -->
<para>
</para>
@scrolledwindow:
@arg1:
<!-- ##### SIGNAL GtkScrolledWindow::scroll-child ##### -->
<para>
</para>
@scrolledwindow:
@arg1:
@arg2:
@Returns:
<!-- ##### ARG GtkScrolledWindow:hadjustment ##### -->
<para>
</para>
<!-- ##### ARG GtkScrolledWindow:hscrollbar-policy ##### -->
<para>
</para>
<!-- ##### ARG GtkScrolledWindow:shadow-type ##### -->
<para>
</para>
<!-- ##### ARG GtkScrolledWindow:vadjustment ##### -->
<para>
</para>
<!-- ##### ARG GtkScrolledWindow:vscrollbar-policy ##### -->
<para>
</para>
<!-- ##### ARG GtkScrolledWindow:window-placement ##### -->
<para>
</para>
<!-- ##### ARG GtkScrolledWindow:window-placement-set ##### -->
<para>
</para>
<!-- ##### ARG GtkScrolledWindow:scrollbar-spacing ##### -->
<para>
</para>
<!-- ##### ARG GtkScrolledWindow:scrollbars-within-bevel ##### -->
<para>
</para>
<!-- ##### FUNCTION gtk_scrolled_window_new ##### -->
<para>
</para>
@hadjustment:
@vadjustment:
@Returns:
<!-- ##### FUNCTION gtk_scrolled_window_get_hadjustment ##### -->
<para>
</para>
@scrolled_window:
@Returns:
<!-- ##### FUNCTION gtk_scrolled_window_get_vadjustment ##### -->
<para>
</para>
@scrolled_window:
@Returns:
<!-- ##### FUNCTION gtk_scrolled_window_get_hscrollbar ##### -->
<para>
</para>
@scrolled_window:
@Returns:
<!-- ##### FUNCTION gtk_scrolled_window_get_vscrollbar ##### -->
<para>
</para>
@scrolled_window:
@Returns:
<!-- ##### FUNCTION gtk_scrolled_window_set_policy ##### -->
<para>
</para>
@scrolled_window:
@hscrollbar_policy:
@vscrollbar_policy:
<!-- ##### FUNCTION gtk_scrolled_window_add_with_viewport ##### -->
<para>
</para>
@scrolled_window:
@child:
<!-- ##### FUNCTION gtk_scrolled_window_set_placement ##### -->
<para>
</para>
@scrolled_window:
@window_placement:
<!-- ##### FUNCTION gtk_scrolled_window_unset_placement ##### -->
<para>
</para>
@scrolled_window:
<!-- ##### FUNCTION gtk_scrolled_window_set_shadow_type ##### -->
<para>
</para>
@scrolled_window:
@type:
<!-- ##### FUNCTION gtk_scrolled_window_set_hadjustment ##### -->
<para>
</para>
@scrolled_window:
@hadjustment:
<!-- ##### FUNCTION gtk_scrolled_window_set_vadjustment ##### -->
<para>
</para>
@scrolled_window:
@vadjustment:
<!-- ##### FUNCTION gtk_scrolled_window_get_placement ##### -->
<para>
</para>
@scrolled_window:
@Returns:
<!-- ##### FUNCTION gtk_scrolled_window_get_policy ##### -->
<para>
</para>
@scrolled_window:
@hscrollbar_policy:
@vscrollbar_policy:
<!-- ##### FUNCTION gtk_scrolled_window_get_shadow_type ##### -->
<para>
</para>
@scrolled_window:
@Returns:

View File

@@ -86,34 +86,6 @@ selection handling code.
@flags:
@info:
<!-- ##### FUNCTION gtk_target_entry_new ##### -->
<para>
</para>
@target:
@flags:
@info:
@Returns:
<!-- ##### FUNCTION gtk_target_entry_copy ##### -->
<para>
</para>
@data:
@Returns:
<!-- ##### FUNCTION gtk_target_entry_free ##### -->
<para>
</para>
@data:
<!-- ##### FUNCTION gtk_target_list_new ##### -->
<para>
</para>

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