Add markup.

* gtk/changes-1.2.sgml, gtk/changes-2.0.sgml,
        gtk/framebuffer.sgml: Add markup.
This commit is contained in:
Matthias Clasen
2002-01-03 00:36:09 +00:00
parent a11baab148
commit 0ea3acb02e
4 changed files with 519 additions and 404 deletions

View File

@ -1,3 +1,8 @@
2002-01-03 Matthias Clasen <matthiasc@poet.de>
* gtk/changes-1.2.sgml, gtk/changes-2.0.sgml,
gtk/framebuffer.sgml: Add markup.
2002-01-01 Havoc Pennington <hp@pobox.com> 2002-01-01 Havoc Pennington <hp@pobox.com>
* gtk/framebuffer.sgml: move README.linux-fb in here * gtk/framebuffer.sgml: move README.linux-fb in here

View File

@ -20,21 +20,24 @@ Incompatible changes made between version 1.0 and version 1.2
<listitem> <listitem>
<para> <para>
GtkAcceleratorTable has been replaced with GtkAccelGroup. <structname>GtkAcceleratorTable</structname> has been replaced with
<structname>GtkAccelGroup</structname>.
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
GtkMenuFactory has been replaced with GtkItemFactory, although <structname>GtkMenuFactory</structname> has been replaced with
a version of GtkMenuFactory is currently still provided to ease <structname>GtkItemFactory</structname>, although
the migration phase. a version of <structname>GtkMenuFactory</structname> is currently still
provided to ease the migration phase.
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
The GtkTypeInfo structures used in the gtk_*_type_init() functions have The <stuctname>GtkTypeInfo</structname> structures used in the
<function>gtk_*_type_init()</function> functions have
changed a bit, the old format: changed a bit, the old format:
<programlisting> <programlisting>
GtkTypeInfo bin_info = GtkTypeInfo bin_info =
@ -65,19 +68,22 @@ changed a bit, the old format:
}; };
</programlisting> </programlisting>
the GtkArgSetFunc and GtkArgGetFunc functions are not supported from the the <function>GtkArgSetFunc</function> and <function>GtkArgGetFunc</function>
type system anymore, and you should make sure that your code only fills functions are not supported from the type system anymore, and you should make
in these fields with NULL and doesn't use the deprecated function typedefs sure that your code only fills in these fields with <literal>NULL</literal>
(GtkArgSetFunc) and (GtkArgGetFunc) anymore. and doesn't use the deprecated function typedefs
<literal>(GtkArgSetFunc)</literal> and <literal>(GtkArgGetFunc)</literal>
anymore.
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
A number of Gtk functions were renamed. For compatibility, gtkcompat.h A number of GTK+ functions were renamed. For compatibility,
#define's the old 1.0.x function names in terms of the new names. <filename>gtkcompat.h</filename> #define's the old 1.0.x function names in
To assure your Gtk program doesn't rely on outdated function terms of the new names. To assure your GTK+ program doesn't rely on outdated
variants, compile your program with -DGTK_DISABLE_COMPAT_H to disable function variants, compile your program with
<option>-DGTK_DISABLE_COMPAT_H</option> to disable
the compatibility aliases. the compatibility aliases.
Here is the list of the old names and replacements: Here is the list of the old names and replacements:
@ -99,16 +105,16 @@ A number of Gtk functions were renamed. For compatibility, gtkcompat.h
gtk_window_position gtk_window_set_position gtk_window_position gtk_window_set_position
(1) gtk_style_apply_default_background() has an additional (1) gtk_style_apply_default_background() has an additional
argument, gboolean set_bg. This parameter should be FALSE if argument, gboolean set_bg. This parameter should be
the background is being set for a NO_WINDOW widget, otherwise <literal>FALSE</literal> if the background is being set for a
true. NO_WINDOW widget, otherwise <literal>TRUE</literal>.
</programlisting> </programlisting>
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
During the development phase of the 1.1.x line of Gtk certain functions During the development phase of the 1.1.x line of GTK+ certain functions
were deprecated and later removed. Functions affected are: were deprecated and later removed. Functions affected are:
<programlisting> <programlisting>
@ -138,17 +144,18 @@ During the development phase of the 1.1.x line of Gtk certain functions
<listitem> <listitem>
<para> <para>
Additionally, all gtk_*_interp functions were removed. Additionally, all <function>gtk_*_interp()</function> functions were removed.
gtk_*_full versions were provided as of GTK+-1.0 and should <function>gtk_*_full()</function> versions were provided as of GTK+ 1.0 and
be used instead. should be used instead.
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
GtkButton has been changed to derive from GtkBin. <structname>GtkButton</structname> has been changed to derive from
To access a button's child, use GTK_BIN (button)-&gt;child, instead <structname>GtkBin</structname>.
of the old GTK_BUTTON (button)-&gt;child. To access a button's child, use <literal>GTK_BIN (button)-&gt;child</literal>,
instead of the old <literal>GTK_BUTTON (button)-&gt;child</literal>.
</para> </para>
</listitem> </listitem>
@ -156,8 +163,9 @@ GtkButton has been changed to derive from GtkBin.
<para> <para>
The selection API has been slightly modified: The selection API has been slightly modified:
gtk_selection_add_handler() and gtk_selection_add_handler_full() <function>gtk_selection_add_handler()</function> and
have been removed. To supply the selection, one now register <function>gtk_selection_add_handler_full()</function>
have been removed. To supply the selection, one now registers
the targets one is interested in with: the targets one is interested in with:
<programlisting> <programlisting>
@ -212,14 +220,15 @@ Support for Themes has been added. In general, this does
<programlisting> <programlisting>
- To set a shape for a window, you must use - To set a shape for a window, you must use
gtk_widget_shape_combine_mask() instead of <function>gtk_widget_shape_combine_mask()</function> instead of
gdk_window_shape_combine_mask(), or the shape will be <function>gdk_window_shape_combine_mask()</function>, or the shape will be
reset when switching themes. reset when switching themes.
- It is no longer permissable to draw directly on an arbitrary - It is no longer permissable to draw directly on an arbitrary
widget, or to set an arbitrary widget's background pixmap. widget, or to set an arbitrary widget's background pixmap.
If you need to do that, use a GtkDrawingArea or (for a If you need to do that, use a <structname>GtkDrawingArea</structname> or
toplevel) a GtkWindow where gtk_widget_set_app_paintable() (for a toplevel) a <structname>GtkWindow</structname> where
<function>gtk_widget_set_app_paintable()</function>
has been called. has been called.
</programlisting> </programlisting>
</para> </para>
@ -227,20 +236,24 @@ Support for Themes has been added. In general, this does
<listitem> <listitem>
<para> <para>
The ScrolledWindow widget no longer creates a Viewport The <structname>GtkScrolledWindow</structname> widget no longer creates a
automatically. Instead, it has been generalized to accept <structname>GtkViewport</structname> automatically. Instead, it has been
any "self-scrolling" widget. generalized to accept any "self-scrolling" widget.
</para> </para>
<para> <para>
The self-scrolling widgets in the Gtk+ core are GtkViewport, The self-scrolling widgets in the GTK+ core are
GtkCList, GtkCTree, GtkText, and GtkLayout. All of these widgets can <structname>GtkViewport</structname>,
be added to a scrolled window as normal children with <structname>GtkCList</structname>, <structname>GtkCTree</structname>,
gtk_container_add() and scrollbars will be set up automatically. <structname>GtkText</structname>, and <structname>GtkLayout</structname>.
All of these widgets can be added to a scrolled window as normal children with
<function>gtk_container_add()</function> and scrollbars will be set up
automatically.
</para> </para>
<para> <para>
To add scrollbars to a non self-scrolling widget, (such as a GtkList), To add scrollbars to a non self-scrolling widget, (such as a
<function>GtkList</function>),
first add it to a viewport, then add the viewport to a scrolled window. first add it to a viewport, then add the viewport to a scrolled window.
The scrolled window code provides a convenience function to do this: The scrolled window code provides a convenience function to do this:
@ -249,16 +262,17 @@ The ScrolledWindow widget no longer creates a Viewport
GtkWidget *child); GtkWidget *child);
</programlisting> </programlisting>
This does exactly what it says - it creates a Viewport, adds the child This does exactly what it says - it creates a viewport, adds the child
widget to it, then adds the Viewport to the scrolled window. widget to it, then adds the viewport to the scrolled window.
</para> </para>
<para> <para>
The scrollbars have been removed from the GtkCList and GtkCTree, The scrollbars have been removed from the <structname>GtkCList</structname>
because they are now scrolled by simply adding them to a Scrolled and <structname>GtkCTree</structname>, because they are now scrolled by simply
Window. The scrollbar policy is set on the scrolled window with adding them to a scrolled window. The scrollbar policy is set on the scrolled
gtk_scrolled_window_set_policy() and not on the child widgets window with <function>gtk_scrolled_window_set_policy()</function> and not on
(e.g. GtkCList's gtk_clist_set_policy() was removed). the child widgets (e.g. <structname>GtkCList</structname>'s
<function>gtk_clist_set_policy()</function> was removed).
</para> </para>
</listitem> </listitem>
@ -273,8 +287,9 @@ The "main loop" of GTK+ has been moved to GLib. This should not
<listitem> <listitem>
<para> <para>
the GTK_BASIC flag was removed, and with it the corresponding the <literal>GTK_BASIC</literal> flag was removed, and with it the corresponding
macro and function GTK_WIDGET_BASIC() and gtk_widget_basic(). macro and function <function>GTK_WIDGET_BASIC()</function> and
<function>gtk_widget_basic()</function>.
</para> </para>
</listitem> </listitem>
@ -292,9 +307,11 @@ All freeze/thaw methods are now recursive - that is, if you
[...] [...]
if (!frozen) if (!frozen)
gtk_clist_thaw (clist); gtk_clist_thaw (clist);
</programlisting>
it will not work anymore. It must be, simply: it will not work anymore. It must be, simply:
<programlisting>
gtk_clist_freeze (clist); gtk_clist_freeze (clist);
[...] [...]
gtk_clist_thaw (clist); gtk_clist_thaw (clist);
@ -314,81 +331,110 @@ The thread safety in GTK+ 1.2 is slightly different than
<para> <para>
This means: This means:
<programlisting> <itemizedlist>
- You must call g_thread_init() before executing any <listitem>
other GTK+ or GDK functions in a threaded GTK+ program. <para>You must call <function>g_thread_init()</function> before
executing any other GTK+ or GDK functions in a threaded GTK+ program.
</para>
</listitem>
- Idles, timeouts, and input functions are executed outside <listitem>
of the main GTK+ lock. So, if you need to call GTK+ <para>Idles, timeouts, and input functions are executed outside
inside of such a callback, you must surround the callback of the main GTK+ lock. So, if you need to call GTK+
with a gdk_threads_enter()/gdk_threads_leave() pair. inside of such a callback, you must surround the callback
with a <function>gdk_threads_enter()</function>/<function>gdk_threads_leave()</function>
pair.
</para>
[ However, signals are still executed within the main <para>However, signals are still executed within the main
GTK+ lock ] GTK+ lock.
</para>
In particular, this means, if you are writing widgets <para>In particular, this means, if you are writing widgets
that might be used in threaded programs, you _must_ that might be used in threaded programs, you _must_
surround timeouts and idle functions in this matter. surround timeouts and idle functions in this matter.
</para>
<para>As always, you must also surround any calls to GTK+
not made within a signal handler with a
<function>gdk_threads_enter()</function>/<function>gdk_threads_leave()</function>
pair.
</para>
</listitem>
As always, you must also surround any calls to GTK+ <listitem>
not made within a signal handler with a <para>There is no longer a special <option>--with-threads</option>
gdk_threads_enter()/gdk_threads_leave() pair. <command>configure</command> option for GTK+. To use threads in a GTK+
program, you must:
- There is no longer a special --with-threads configure
option for GTK+. To use threads in a GTK+ program, you
must:
a) If you want to use the native thread implementation, <orderedlist>
make sure GLib found this in configuration, otherwise, <listitem>
call you must provide a thread implementation to <para>If you want to use the native thread implementation,
g_thread_init(). make sure GLib found this in configuration, otherwise,
call you must provide a thread implementation to
b) Link with the libraries returned by: <function>g_thread_init()</function>.
</para>
</listitem>
<listitem>
<para>Link with the libraries returned by:
gtk-config --libs gthread <command>gtk-config --libs gthread</command>
and use the cflags from: and use the cflags from:
gtk-config --cflags gthread <command>gtk-config --cflags gthread</command>
You can get these CFLAGS and LIBS by passing gthread You can get these <envar>CFLAGS</envar> and <envar>LIBS</envar> by
as the fourth parameter to the AM_PATH_GTK automake passing <literal>gthread</literal> as the fourth parameter to the
macro. <literal>AM_PATH_GTK</literal> <application>automake</application>
</programlisting> macro.
</para>
</listitem>
</orderedlist>
</para>
</listitem>
</itemizedlist>
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
Prior to GTK+-1.2, there were two conflicting interpretations Prior to GTK+ 1.2, there were two conflicting interpretations
of widget->requistion. It was either taken to be of <literal>widget->requisition</literal>. It was either taken to be
the size that the widget requested, or that size the size that the widget requested, or that size modified by calls to
modified by calls to gtk_widget_set_usize(). In GTK+-1.2, <function>gtk_widget_set_usize()</function>. In GTK+ 1.2,
it is always interpreted the first way. it is always interpreted the first way.
</para> </para>
<para> <para>
Container widgets are affected in two ways by this: Container widgets are affected in two ways by this:
<programlisting> <orderedlist>
1) Container widgets should not pass widget->requisition <listitem>
as the second parameter to gtk_widget_size_request(). <para>Container widgets should not pass
Instead they should call it like: <literal>widget->requisition</literal> as the second parameter to
<function>gtk_widget_size_request()</function>.
GtkRequisition child_requisition; Instead they should call it like:
gtk_widget_size_request (widget, &amp;child_requisition); <programlisting>
GtkRequisition child_requisition;
2) Container widgets should not access child->requisition gtk_widget_size_request (widget, &amp;child_requisition);
directly. Either they should use the values returned </programlisting>
by gtk_widget_size_request(), or they should call </para>
the new function: </listitem>
<listitem>
<para>Container widgets should not access
<literal>child->requisition</literal> directly. Either they should use
the values returned by <function>gtk_widget_size_request()</function>,
or they should call the new function:
<programlisting>
void gtk_widget_get_child_requisition (GtkWidget *widget, void gtk_widget_get_child_requisition (GtkWidget *widget,
GtkRequisition *requisition); GtkRequisition *requisition);
</programlisting>
which returns the requisition of the given widget, modified which returns the requisition of the given widget, modified
by calls to gtk_widget_set_usize(). by calls to <function>gtk_widget_set_usize()</function>.
</programlisting> </para>
</listitem>
</orderedlist>
</para> </para>
</listitem> </listitem>

File diff suppressed because it is too large Load Diff

View File

@ -17,7 +17,7 @@ Using embedded GTK+ on the Linux framebuffer
<para> <para>
The linux-fb port of GTK+, also known as GtkFB is an implementation of The linux-fb port of GTK+, also known as GtkFB is an implementation of
GDK (and therefore GTK+) that runs on the linux framebuffer. It runs in GDK (and therefore GTK+) that runs on the Linux framebuffer. It runs in
a single process that doesn't need X. It should run most GTK+ programs a single process that doesn't need X. It should run most GTK+ programs
without any changes to the source. without any changes to the source.
</para> </para>
@ -25,17 +25,17 @@ without any changes to the source.
<refsect2><title>Build requirements</title> <refsect2><title>Build requirements</title>
<para> <para>
You need GTK+ 2.0; the 1.2.x series does not have framebuffer support. You need GTK+ 2.0; the 1.2.x series does not have framebuffer support.
To compile GTK+ with framebuffer support you will need freetype 2, we To compile GTK+ with framebuffer support you will need FreeType 2, we
recommend FreeType 2.0.1 or later, as there was some problems with recommend FreeType 2.0.1 or later, as there was some problems with
freetype-config in 2.0. Make sure that you install freetype before <command>freetype-config</command> in 2.0. Make sure that you install
Pango, since Pango also needs it. Freetype can be found at FreeType before Pango, since Pango also needs it. FreeType can be found at
ftp://ftp.freetype.org <ulink url="ftp://ftp.freetype.org">ftp://ftp.freetype.org</ulink>.
</para> </para>
</refsect2> </refsect2>
<refsect2><title>Hardware requirements</title> <refsect2><title>Hardware requirements</title>
<para> <para>
You need a graphics card with an availible framebuffer driver that can You need a graphics card with an available framebuffer driver that can
run in 8, 16, 24 or 32 bpp, such as matroxfb or vesafb. You also need run in 8, 16, 24 or 32 bpp, such as matroxfb or vesafb. You also need
a supported mouse. GTK+ currently supports the ps2 mouse, ms serial a supported mouse. GTK+ currently supports the ps2 mouse, ms serial
mouse and fidmour touchscreen. Additional hardware support should mouse and fidmour touchscreen. Additional hardware support should
@ -45,24 +45,25 @@ be simple to add.
<refsect2><title>Building and installing</title> <refsect2><title>Building and installing</title>
<para> <para>
First build and install glib and pango as usual, in that order. First build and install GLib and Pango as usual, in that order.
Then configure Gtk by running configure (or autogen.sh if running from Then configure GTK+ by running <command>configure</command> (or
CVS) with <literal>--with-gdktarget=linux-fb</literal>. <command>autogen.sh</command> if running from
CVS) with <option>--with-gdktarget=linux-fb</option>.
</para> </para>
<para>Then compile as ususal: make; make install</para> <para>Then compile as usual: <command>make; make install</command></para>
</refsect2> </refsect2>
<refsect2><title>Fonts</title> <refsect2><title>Fonts</title>
<para> <para>
Since GtkFB uses freetype 2 to render fonts it can render truetype and Since GtkFB uses FreeType 2 to render fonts it can render TrueType and
postscript type 1 antialiased fonts. Postscript type 1 antialiased fonts.
</para> </para>
<para>At startup it scans some directories looking for fonts. By default <para>At startup it scans some directories looking for fonts. By default
it looks in $prefix/lib/ft2fonts, and if you want to change this you it looks in <filename>$prefix/lib/ft2fonts</filename>, and if you want to
must add something like: change this you must add something like:
<programlisting> <programlisting>
[PangoFT2] [PangoFT2]
@ -77,7 +78,7 @@ You must also set up font aliases for the fonts Sans, Serif and
Monotype. This is done by creating a Monotype. This is done by creating a
<filename>$prefix/etc/pango/pangoft2.aliases</filename> or <filename>$prefix/etc/pango/pangoft2.aliases</filename> or
<filename>~/.pangoft2_aliases</filename> file. You can also set the name of this file using <filename>~/.pangoft2_aliases</filename> file. You can also set the name of this file using
the key AliasFiles in the PangoFT2 section in pangorc. the key <literal>AliasFiles</literal> in the <literal>PangoFT2</literal> section in <filename>pangorc</filename>.
</para> </para>
<para> <para>
@ -90,15 +91,16 @@ monospace normal normal normal normal "nimbus mono l"
</para> </para>
<para> <para>
And one using the Windows truetype fonts is: And one using the Windows TrueType fonts is:
<programlisting> <programlisting>
sans normal normal normal normal "arial" sans normal normal normal normal "arial"
serif normal normal normal normal "times new roman" serif normal normal normal normal "times new roman"
monospace normal normal normal normal "courier new" monospace normal normal normal normal "courier new"
</programlisting> </programlisting>
A more detailed example can be found in examples/pangoft2.aliases in the A more detailed example can be found in
pango distribution. <filename>examples/pangoft2.aliases</filename> in the
Pango distribution.
</para> </para>
</refsect2> </refsect2>
@ -106,16 +108,16 @@ pango distribution.
<para> <para>
To run a program you should only need to start it, but there are some To run a program you should only need to start it, but there are some
things that can cause problems, and some things that can be controlled things that can cause problems, and some things that can be controlled
by environment variables. Try testgtk distributed with GTK+ to test by environment variables. Try <application>gtk-demo</application> distributed
if things work. with GTK+ to test if things work.
</para> </para>
<para> <para>
If you use a ps2 mouse, make sure that /dev/psaux is readable and If you use a ps2 mouse, make sure that <filename>/dev/psaux</filename> is
writable. readable and writable.
</para> </para>
<para>Make sure gpm is not running.</para> <para>Make sure <command>gpm</command> is not running.</para>
<para>If you don't specify anything GtkFB will start up in the current <para>If you don't specify anything GtkFB will start up in the current
virtual console in the current resolution and bit-depth. This can be virtual console in the current resolution and bit-depth. This can be
@ -124,28 +126,29 @@ changed by specifying environment variables:
<para> <para>
<programlisting> <programlisting>
GDK_VT: <envar>GDK_VT</envar>:
unset means open on the current VT. unset means open on the current VT.
0-9: open on the specified VT. Make sure you have read/write rights 0-9: open on the specified VT. Make sure you have read/write rights
there. there.
new: Allocate a new VT after the last currently used one. new: Allocate a new VT after the last currently used one.
GDK_DISPLAY_MODE: <envar>GDK_DISPLAY_MODE</envar>:
Specifies the name of a mode in /etc/fb.modes that you want to use. Specifies the name of a mode in <filename>/etc/fb.modes</filename> that you
want to use.
GDK_DISPLAY_DEPTH: <envar>GDK_DISPLAY_DEPTH</envar>:
Specify the desired bit depth of the framebuffer. Specify the desired bit depth of the framebuffer.
GDK_DISPLAY_WIDTH: <envar>GDK_DISPLAY_WIDTH</envar>:
Specify the desired width of the framebuffer. Specify the desired width of the framebuffer.
GDK_DISPLAY_HEIGHT: <envar>GDK_DISPLAY_HEIGHT</envar>:
Specify the desired height of the framebuffer. Specify the desired height of the framebuffer.
GDK_DISPLAY: <envar>GDK_DISPLAY</envar>:
Specify the framebuffer device to use. Default is /dev/fb0 Specify the framebuffer device to use. Default is <filename>/dev/fb0</filename>.
GDK_MOUSE_TYPE: <envar>GDK_MOUSE_TYPE</envar>:
Specify mouse type. Currently supported is: Specify mouse type. Currently supported is:
ps2 - PS/2 mouse ps2 - PS/2 mouse
imps2 - PS/2 intellimouse (wheelmouse) imps2 - PS/2 intellimouse (wheelmouse)
@ -153,7 +156,7 @@ GDK_MOUSE_TYPE:
fidmour - touch screen fidmour - touch screen
Default is ps2. Default is ps2.
GDK_KEYBOARD_TYPE: <envar>GDK_KEYBOARD_TYPE</envar>:
Specify keyboard type. Currently supported is Specify keyboard type. Currently supported is
xlate - normal tty mode keyboard. xlate - normal tty mode keyboard.
Quite limited, cannot detect key up/key down events. Doesn't Quite limited, cannot detect key up/key down events. Doesn't