diff --git a/docs/reference/ChangeLog b/docs/reference/ChangeLog index 49638dbbfc..b22a5e437f 100644 --- a/docs/reference/ChangeLog +++ b/docs/reference/ChangeLog @@ -1,3 +1,8 @@ +2002-01-03 Matthias Clasen + + * gtk/changes-1.2.sgml, gtk/changes-2.0.sgml, + gtk/framebuffer.sgml: Add markup. + 2002-01-01 Havoc Pennington * gtk/framebuffer.sgml: move README.linux-fb in here diff --git a/docs/reference/gtk/changes-1.2.sgml b/docs/reference/gtk/changes-1.2.sgml index 037648aa3a..d30e4b63ce 100644 --- a/docs/reference/gtk/changes-1.2.sgml +++ b/docs/reference/gtk/changes-1.2.sgml @@ -20,21 +20,24 @@ Incompatible changes made between version 1.0 and version 1.2 -GtkAcceleratorTable has been replaced with GtkAccelGroup. +GtkAcceleratorTable has been replaced with +GtkAccelGroup. -GtkMenuFactory has been replaced with GtkItemFactory, although -a version of GtkMenuFactory is currently still provided to ease -the migration phase. +GtkMenuFactory has been replaced with +GtkItemFactory, although +a version of GtkMenuFactory is currently still +provided to ease the migration phase. -The GtkTypeInfo structures used in the gtk_*_type_init() functions have +The GtkTypeInfo structures used in the +gtk_*_type_init() functions have changed a bit, the old format: GtkTypeInfo bin_info = @@ -65,19 +68,22 @@ changed a bit, the old format: }; - the GtkArgSetFunc and GtkArgGetFunc functions are not supported from the - type system anymore, and you should make sure that your code only fills - in these fields with NULL and doesn't use the deprecated function typedefs - (GtkArgSetFunc) and (GtkArgGetFunc) anymore. + the GtkArgSetFunc and GtkArgGetFunc + functions are not supported from the type system anymore, and you should make + sure that your code only fills in these fields with NULL + and doesn't use the deprecated function typedefs + (GtkArgSetFunc) and (GtkArgGetFunc) + anymore. -A number of Gtk functions were renamed. For compatibility, gtkcompat.h - #define's the old 1.0.x function names in terms of the new names. - To assure your Gtk program doesn't rely on outdated function - variants, compile your program with -DGTK_DISABLE_COMPAT_H to disable +A number of GTK+ functions were renamed. For compatibility, + gtkcompat.h #define's the old 1.0.x function names in + terms of the new names. To assure your GTK+ program doesn't rely on outdated + function variants, compile your program with + to disable the compatibility aliases. 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 (1) gtk_style_apply_default_background() has an additional - argument, gboolean set_bg. This parameter should be FALSE if - the background is being set for a NO_WINDOW widget, otherwise - true. + argument, gboolean set_bg. This parameter should be + FALSE if the background is being set for a + NO_WINDOW widget, otherwise TRUE. -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: @@ -138,17 +144,18 @@ During the development phase of the 1.1.x line of Gtk certain functions -Additionally, all gtk_*_interp functions were removed. - gtk_*_full versions were provided as of GTK+-1.0 and should - be used instead. +Additionally, all gtk_*_interp() functions were removed. + gtk_*_full() versions were provided as of GTK+ 1.0 and + should be used instead. -GtkButton has been changed to derive from GtkBin. - To access a button's child, use GTK_BIN (button)->child, instead - of the old GTK_BUTTON (button)->child. +GtkButton has been changed to derive from +GtkBin. + To access a button's child, use GTK_BIN (button)->child, + instead of the old GTK_BUTTON (button)->child. @@ -156,8 +163,9 @@ GtkButton has been changed to derive from GtkBin. The selection API has been slightly modified: - gtk_selection_add_handler() and gtk_selection_add_handler_full() - have been removed. To supply the selection, one now register + gtk_selection_add_handler() and + gtk_selection_add_handler_full() + have been removed. To supply the selection, one now registers the targets one is interested in with: @@ -212,14 +220,15 @@ Support for Themes has been added. In general, this does - To set a shape for a window, you must use - gtk_widget_shape_combine_mask() instead of - gdk_window_shape_combine_mask(), or the shape will be + gtk_widget_shape_combine_mask() instead of + gdk_window_shape_combine_mask(), or the shape will be reset when switching themes. - It is no longer permissable to draw directly on an arbitrary widget, or to set an arbitrary widget's background pixmap. - If you need to do that, use a GtkDrawingArea or (for a - toplevel) a GtkWindow where gtk_widget_set_app_paintable() + If you need to do that, use a GtkDrawingArea or + (for a toplevel) a GtkWindow where + gtk_widget_set_app_paintable() has been called. @@ -227,20 +236,24 @@ Support for Themes has been added. In general, this does -The ScrolledWindow widget no longer creates a Viewport - automatically. Instead, it has been generalized to accept - any "self-scrolling" widget. +The GtkScrolledWindow widget no longer creates a + GtkViewport automatically. Instead, it has been + generalized to accept any "self-scrolling" widget. - The self-scrolling widgets in the Gtk+ core are GtkViewport, - GtkCList, GtkCTree, GtkText, and GtkLayout. All of these widgets can - be added to a scrolled window as normal children with - gtk_container_add() and scrollbars will be set up automatically. + The self-scrolling widgets in the GTK+ core are + GtkViewport, + GtkCList, GtkCTree, + GtkText, and GtkLayout. + All of these widgets can be added to a scrolled window as normal children with + gtk_container_add() and scrollbars will be set up + automatically. - 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 + GtkList), 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: @@ -249,16 +262,17 @@ The ScrolledWindow widget no longer creates a Viewport GtkWidget *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. + This does exactly what it says - it creates a viewport, adds the child + widget to it, then adds the viewport to the scrolled window. - The scrollbars have been removed from the GtkCList and GtkCTree, - because they are now scrolled by simply adding them to a Scrolled - Window. The scrollbar policy is set on the scrolled window with - gtk_scrolled_window_set_policy() and not on the child widgets - (e.g. GtkCList's gtk_clist_set_policy() was removed). + The scrollbars have been removed from the GtkCList + and GtkCTree, because they are now scrolled by simply + adding them to a scrolled window. The scrollbar policy is set on the scrolled + window with gtk_scrolled_window_set_policy() and not on + the child widgets (e.g. GtkCList's + gtk_clist_set_policy() was removed). @@ -273,8 +287,9 @@ The "main loop" of GTK+ has been moved to GLib. This should not -the GTK_BASIC flag was removed, and with it the corresponding - macro and function GTK_WIDGET_BASIC() and gtk_widget_basic(). +the GTK_BASIC flag was removed, and with it the corresponding + macro and function GTK_WIDGET_BASIC() and + gtk_widget_basic(). @@ -292,9 +307,11 @@ All freeze/thaw methods are now recursive - that is, if you [...] if (!frozen) gtk_clist_thaw (clist); + it will not work anymore. It must be, simply: + gtk_clist_freeze (clist); [...] gtk_clist_thaw (clist); @@ -314,81 +331,110 @@ The thread safety in GTK+ 1.2 is slightly different than This means: - - - You must call g_thread_init() before executing any - other GTK+ or GDK functions in a threaded GTK+ program. + + + You must call g_thread_init() before + executing any other GTK+ or GDK functions in a threaded GTK+ program. + + - - Idles, timeouts, and input functions are executed outside - of the main GTK+ lock. So, if you need to call GTK+ - inside of such a callback, you must surround the callback - with a gdk_threads_enter()/gdk_threads_leave() pair. + + Idles, timeouts, and input functions are executed outside + of the main GTK+ lock. So, if you need to call GTK+ + inside of such a callback, you must surround the callback + with a gdk_threads_enter()/gdk_threads_leave() + pair. + - [ However, signals are still executed within the main - GTK+ lock ] + However, signals are still executed within the main + GTK+ lock. + - In particular, this means, if you are writing widgets - that might be used in threaded programs, you _must_ - surround timeouts and idle functions in this matter. + In particular, this means, if you are writing widgets + that might be used in threaded programs, you _must_ + surround timeouts and idle functions in this matter. + + + As always, you must also surround any calls to GTK+ + not made within a signal handler with a + gdk_threads_enter()/gdk_threads_leave() + pair. + + - As always, you must also surround any calls to GTK+ - not made within a signal handler with a - gdk_threads_enter()/gdk_threads_leave() pair. - - - There is no longer a special --with-threads configure - option for GTK+. To use threads in a GTK+ program, you - must: + + There is no longer a special + configure option for GTK+. To use threads in a GTK+ + program, you must: - a) If you want to use the native thread implementation, - make sure GLib found this in configuration, otherwise, - call you must provide a thread implementation to - g_thread_init(). - - b) Link with the libraries returned by: + + + If you want to use the native thread implementation, + make sure GLib found this in configuration, otherwise, + call you must provide a thread implementation to + g_thread_init(). + + + + Link with the libraries returned by: - gtk-config --libs gthread + gtk-config --libs gthread - and use the cflags from: + and use the cflags from: - gtk-config --cflags gthread + gtk-config --cflags gthread - You can get these CFLAGS and LIBS by passing gthread - as the fourth parameter to the AM_PATH_GTK automake - macro. - + You can get these CFLAGS and LIBS by + passing gthread as the fourth parameter to the + AM_PATH_GTK automake + macro. + + + + + + -Prior to GTK+-1.2, there were two conflicting interpretations - of widget->requistion. It was either taken to be - the size that the widget requested, or that size - modified by calls to gtk_widget_set_usize(). In GTK+-1.2, +Prior to GTK+ 1.2, there were two conflicting interpretations + of widget->requisition. It was either taken to be + the size that the widget requested, or that size modified by calls to + gtk_widget_set_usize(). In GTK+ 1.2, it is always interpreted the first way. Container widgets are affected in two ways by this: - - 1) Container widgets should not pass widget->requisition - as the second parameter to gtk_widget_size_request(). - Instead they should call it like: - - GtkRequisition child_requisition; - gtk_widget_size_request (widget, &child_requisition); - - 2) Container widgets should not access child->requisition - directly. Either they should use the values returned - by gtk_widget_size_request(), or they should call - the new function: - + + + Container widgets should not pass + widget->requisition as the second parameter to + gtk_widget_size_request(). + Instead they should call it like: + + GtkRequisition child_requisition; + gtk_widget_size_request (widget, &child_requisition); + + + + + Container widgets should not access + child->requisition directly. Either they should use + the values returned by gtk_widget_size_request(), + or they should call the new function: + void gtk_widget_get_child_requisition (GtkWidget *widget, GtkRequisition *requisition); - - which returns the requisition of the given widget, modified - by calls to gtk_widget_set_usize(). - + + which returns the requisition of the given widget, modified + by calls to gtk_widget_set_usize(). + + + diff --git a/docs/reference/gtk/changes-2.0.sgml b/docs/reference/gtk/changes-2.0.sgml index 66d5bb60de..fe7e30d604 100644 --- a/docs/reference/gtk/changes-2.0.sgml +++ b/docs/reference/gtk/changes-2.0.sgml @@ -38,48 +38,53 @@ exist whenever possible. -gtk_container_get_toplevels() was removed and replaced with - gtk_window_list_toplevels(), which has different memory management - on the return value (gtk_window_list_toplevels() copies the GList - and also references each widget in the list, so you have to - g_list_free() the list after first unref'ing each list member). +gtk_container_get_toplevels() was removed and replaced + with gtk_window_list_toplevels(), which has different + memory management on the return value + (gtk_window_list_toplevels() copies the + GList and also references each widget in the list, + so you have to g_list_free() the list after first + unref'ing each list member). -The gdk_time* functions have been removed. This functionality - has been unused since the main loop was moved into GLib +The gdk_time*() functions have been removed. This + functionality has been unused since the main loop was moved into GLib prior to 1.2. -The signature for GtkPrintFunc (used for gtk_item_factory_dump_items) - has been changed to take a 'const gchar *' instead of 'gchar *', to - match what we do for glib, and other similar cases. +The signature for GtkPrintFunc (used for + gtk_item_factory_dump_items()) + has been changed to take a const gchar * instead of + gchar *, to match what we do for GLib, and other similar cases. -The detail arguments in the GtkStyleClass structure are now 'const gchar *'. +The detail arguments in the GtkStyleClass structure +are now const gchar *. -gtk_paned_set_gutter_size() has been removed, since the small handle tab - has been changed to include the entire area previously occupied by - the gutter. +gtk_paned_set_gutter_size() has been removed, since the + small handle tab has been changed to include the entire area previously + occupied by the gutter. -gtk_paned_set_handle_size() has been removed, in favor of a style property, - since this is an option that only makes sense for themes to adjust. +gtk_paned_set_handle_size() has been removed, in favor of + a style property, since this is an option that only makes sense for themes + to adjust. @@ -87,31 +92,35 @@ gtk_paned_set_handle_size() has been removed, in favor of a style property, GDK no longer selects OwnerGrabButtonMask for button presses. This means that the automatic grab that occurs when the user presses a button - will have owner_events = FALSE, so all events are redirected to the - grab window, even events that would normally go to other windows of the - window's owner. + will have owner_events = FALSE, so all events are + redirected to the grab window, even events that would normally go to + other windows of the window's owner. -GtkColorSelectionDialog has now been moved into it's own set of files, - gtkcolorseldialog.c and gtkcolorseldialog.h. +GtkColorSelectionDialog has now been moved into it's + own set of files, gtkcolorseldialog.c and + gtkcolorseldialog.h. -gtk_widget_shape_combine_mask() now keeps a reference count on the - mask pixmap that is passed in. +gtk_widget_shape_combine_mask() now keeps a reference + count on the mask pixmap that is passed in. -The GtkPatternSpec has been moved to glib as GPatternSpec, the pattern - arguments to gtk_item_factory_dump_items() and gtk_item_factory_dump_rc() - have thusly been changed to take a GPatternSpec instead of GtkPatternSpec. +The GtkPatternSpec has been moved to GLib as + GPatternSpec, the pattern + arguments to gtk_item_factory_dump_items() and + gtk_item_factory_dump_rc() + have thusly been changed to take a GPatternSpec + instead of a GtkPatternSpec. @@ -121,32 +130,32 @@ Type system changes: - GTK_TYPE_OBJECT is not a fundamental type anymore. Type checks of the - style (GTK_FUNDAMENTAL_TYPE (some_type) == GTK_TYPE_OBJECT) - will not work anymore. As a replacement, (GTK_TYPE_IS_OBJECT (some_type)) + GTK_TYPE_OBJECT is not a fundamental type anymore. Type checks of the + style (GTK_FUNDAMENTAL_TYPE (some_type) == GTK_TYPE_OBJECT) + will not work anymore. As a replacement, (GTK_TYPE_IS_OBJECT (some_type)) can be used now. -The following types vanished: GTK_TYPE_ARGS, GTK_TYPE_CALLBACK, - GTK_TYPE_C_CALLBACK, GTK_TYPE_FOREIGN. The corresponding GtkArg +The following types vanished: GTK_TYPE_ARGS, GTK_TYPE_CALLBACK, + GTK_TYPE_C_CALLBACK, GTK_TYPE_FOREIGN. The corresponding GtkArg fields and field access macros are also gone. -The following type aliases vanished: GTK_TYPE_FLAT_FIRST, - GTK_TYPE_FLAT_LAST, GTK_TYPE_STRUCTURED_FIRST, - GTK_TYPE_STRUCTURED_LAST. +The following type aliases vanished: GTK_TYPE_FLAT_FIRST, + GTK_TYPE_FLAT_LAST, GTK_TYPE_STRUCTURED_FIRST, + GTK_TYPE_STRUCTURED_LAST. -The type macros GTK_TYPE_MAKE() and GTK_TYPE_SEQNO() vanished, use of - GTK_FUNDAMENTAL_TYPE() is discouraged. Instead, the corresponding GType - API should be used: G_TYPE_FUNDAMENTAL(), G_TYPE_DERIVE_ID(), - G_TYPE_BRANCH_SEQNO(). Note that the GLib type system doesn't build new +The type macros GTK_TYPE_MAKE() and GTK_TYPE_SEQNO() vanished, use of + GTK_FUNDAMENTAL_TYPE() is discouraged. Instead, the corresponding GType + API should be used: G_TYPE_FUNDAMENTAL(), G_TYPE_DERIVE_ID(), + G_TYPE_BRANCH_SEQNO(). Note that the GLib type system doesn't build new type ids based on a global incremental sequential number anymore, but numbers new type ids sequentially per fundamental type branch. @@ -184,28 +193,28 @@ The following type functions vanished/were replaced: Object system changes: - GtkObject derives from GObject, so is not the basic object type anymore. + GtkObject derives from GObject, so is not the basic object type anymore. This imposes the following source incompatible changes: -GtkObject has no klass field anymore, an object's class can be retrived - with the object's coresponding GTK_<OBJECT>_GET_CLASS (object) +GtkObject has no klass field anymore, an object's class can be retrieved + with the object's coresponding GTK_<OBJECT>_GET_CLASS (object) macro. -GtkObjectClass has no type field anymore, a class's type can be retrived - with the GTK_CLASS_TYPE (class) macro. +GtkObjectClass has no type field anymore, a class's type can be retrived + with the GTK_CLASS_TYPE (class) macro. -GtkObjectClass does not introduce the finalize() and shutdown() methods - anymore. While shutdown() is intended for GTK+ internal use only, finalize() - is required by a variety of object implementations. GObjectClass.finalize +GtkObjectClass does not introduce the finalize() and shutdown() methods + anymore. While shutdown() is intended for GTK+ internal use only, finalize() + is required by a variety of object implementations. GObjectClass.finalize should be overriden here, e.g.: static void gtk_label_finalize (GObject *gobject) @@ -257,36 +266,44 @@ The GtkObject::destroy signal can now be emitted multiple times on an object. Because the ::destroy signal can be emitted multiple times, it no longer makes sense to check if a widget has been destroyed using the - GTK_OBJECT_DESTROYED() macro, and this macro has been removed. If - catching destruction is still needed, it can be done with a signal - connection to ::destroy. + GTK_OBJECT_DESTROYED() macro, and this macro has been + removed. If catching destruction is still needed, it can be done with a + signal connection to ::destroy. Signal system changes: - The Gtk 2.0 signal merly proxies the GSignal system now. - For future usage, direct use of the GSignal API is recommended, - this avoids significant performance hits where GtkArg structures - have to be converted into GValues. For language bindings, - GSignal+GClosure provide a much more flexible and convenient - mechanism to hook into signal emissions or install class default - handlers, so the old GtkSignal API for language bindings is not + The GTK+ 2.0 signal system merely proxies the GSignalGSignal API is recommended, + this avoids significant performance hits where GtkArg + structures have to be converted into GValues. For + language bindings, GSignal+GClosure + provide a much more flexible and convenient mechanism to hook into signal + emissions or install class default handlers, so the old + GtkSignal API for language bindings is not supported anymore. - Functions that got removed in the Gtk signal API: - gtk_signal_n_emissions(), gtk_signal_n_emissions_by_name(), - gtk_signal_set_funcs(), gtk_signal_handler_pending_by_id(), - gtk_signal_add_emission_hook(), gtk_signal_add_emission_hook_full(), - gtk_signal_remove_emission_hook(), gtk_signal_query(). - Also, the GtkCallbackMarshal argument to gtk_signal_connect_full() is + Functions that got removed in the GTK+ signal API: + gtk_signal_n_emissions(), + gtk_signal_n_emissions_by_name(), + gtk_signal_set_funcs(), + gtk_signal_handler_pending_by_id(), + gtk_signal_add_emission_hook(), + gtk_signal_add_emission_hook_full(), + gtk_signal_remove_emission_hook(), + gtk_signal_query(). + Also, the GtkCallbackMarshal argument to + gtk_signal_connect_full() is not supported anymore. For many of the removed functions, similar variants are available - in the g_signal_* namespace. - The GSignal system perfomrs emissions in a slightly different manner than - the old GtkSignal code. Signal handlers that are connected to signal "foo" + in the g_signal_* namespace. + The GSignal system performs emissions in a + slightly different manner than the old GtkSignal + code. Signal handlers that are connected to signal "foo" on object "bar" while "foo" is being emitted, will not be called anymore during the emission they were connected within. @@ -294,53 +311,61 @@ Signal system changes: -Inserting and deleting text in GtkEntry though functions such - as gtk_entry_insert_text() now leave the cursor at its original - position in the text instead of moving it to the location of - the insertion/deletion. +Inserting and deleting text in GtkEntry though + functions such as gtk_entry_insert_text() now leave + the cursor at its original position in the text instead of moving it to + the location of the insertion/deletion. -The ->label field of GtkFrame widgets has been removed. (As part of - a change to allow the arbitrary widgets in the title position.) The - text can now be retrieved with the new function gtk_frame_get_text(). +The ->label field of GtkFrame + widgets has been removed. (As part of a change to allow arbitrary widgets + in the title position.) The text can now be retrieved with the new function + gtk_frame_get_text(). The 'font' and 'font_set' declarations in RC files are now ignored. There - is a new 'font_name' field that holds the string form of a Pango font + is a new 'font_name' field that holds the string form of a Pango font. -A number of types in GDK have become subclasses of GObject. For the - most part, this should not break anyone's code. However, it's now - possible/encouraged to use g_object_ref()/g_object_unref() and other - GObject features with these GDK types. The converted types are: - GdkWindow, GdkDrawable, GdkPixmap, GdkImage, GdkGC, GdkDragContext, - GdkColormap +A number of types in GDK have become subclasses of + GObject. For the most part, this should not break + anyone's code. However, it's now possible/encouraged to use + g_object_ref()/g_object_unref() and + other GObject features with these GDK types. The + converted types are: + GdkWindow, GdkDrawable, + GdkPixmap, GdkImage, + GdkGC, GdkDragContext, + GdkColormap. All drawables including pixmaps used to have a type tag, the - GdkWindowType enumeration, which included GDK_WINDOW_PIXMAP. - GdkWindowType is now a property of GdkWindow - only, and there is no GDK_WINDOW_PIXMAP. You - can use the GDK_IS_PIXMAP() macro to see if you have a pixmap, if + GdkWindowType enumeration, which included + GDK_WINDOW_PIXMAP. + GdkWindowType is now a property of + GdkWindow only, and there is + no GDK_WINDOW_PIXMAP. You can use the + GDK_IS_PIXMAP() macro to see if you have a pixmap, if you need to know that. -GtkStyle and GtkRcStyle are now subclasses of GObject as well. This +GtkStyle and GtkRcStyle are + now subclasses of GObject as well. This requires fairly extensive changes to theme engines, but shouldn't affect most other code. @@ -348,17 +373,19 @@ GtkStyle and GtkRcStyle are now subclasses of GObject as well. This -xthickness/ythickness have moved from GtkStyleClass to GtkStyle +xthickness/ythickness have moved from + GtkStyleClass to GtkStyle (from class to instance). This gives themes a bit more flexibility and is generally more of the Right Thing. You can trivially fix - your code with s/style->klass->xthickness/style->xthickness/g and - same for ythickness. + your code with s/style->klass->xthickness/style->xthickness/g and + same for ythickness. -Some GtkStyle draw_ methods have been removed (cross, oval, ramp) +Some GtkStyle draw_*() methods + have been removed (cross, oval, ramp) and others have been added (expander, layout). This will require changes to theme engines. @@ -375,8 +402,10 @@ If you were using private GDK types, they have been rearranged The visual for a widget, and also the default visual is now derived from the colormap for the widget and the default colormap. - gtk_widget_set_visual(), gtk_widget_set_default_visual(), - gtk_widget_push_visual() and gtk_widget_pop_visual() now do + gtk_widget_set_visual(), + gtk_widget_set_default_visual(), + gtk_widget_push_visual() and + gtk_widget_pop_visual() now do nothing. Since the visual always had to match that of the colormap, it is safe to simply delete all references to these functions. @@ -387,7 +416,7 @@ The visual for a widget, and also the default visual is now derived A number of functions in GDK have been renamed for consistency and clarity. #defines to provide backwards compatibility have been - included, but can be disabled by defining GDK_DISABLE_DEPRECATED. + included, but can be disabled by defining GDK_DISABLE_DEPRECATED. #define gdk_draw_pixmap gdk_draw_drawable @@ -419,32 +448,35 @@ A number of functions in GDK have been renamed for consistency and #define gdk_rgb_get_cmap gdk_rgb_get_colormap - gtk_widget_popup() was removed, it was only usable for GtkWindows, and - there the same effect can be achieved by gtk_window_move() and - gtk_widget_show(). + gtk_widget_popup() was removed, it was only usable + for GtkWindows, and there the same effect can be + achieved by gtk_window_move() and + gtk_widget_show(). -gdk_pixmap_foreign_new() no longer calls XFreePixmap() on the - pixmap when the GdkPixmap is finalized. This change corresponds - to the behavior of gdk_window_foreign_new(), and fixes a lot - of problems with code where the pixmap wasn't supposed to be - freed. If XFreePixmap() is needed, it can be done using the - destroy-notification facilities of g_object_set_data(). +gdk_pixmap_foreign_new() no longer calls + XFreePixmap() on the pixmap when the + GdkPixmap is finalized. This change corresponds + to the behavior of gdk_window_foreign_new(), and fixes + a lot of problems with code where the pixmap wasn't supposed to be freed. + If XFreePixmap() is needed, it can be done using the + destroy-notification facilities of g_object_set_data(). -GtkProgress/GtkProgressBar had serious problems in GTK 1.2. +GtkProgress/GtkProgressBar + had serious problems in GTK+ 1.2. Only 3 or 4 functions are really needed for 95% of progress - interfaces; GtkProgress[Bar] had about 25 functions, and - didn't even include these 3 or 4. + interfaces; GtkProgress[Bar] had about 25 + functions, and didn't even include these 3 or 4. @@ -453,7 +485,7 @@ Only 3 or 4 functions are really needed for 95% of progress In activity mode, the API involves setting the adjustment to any random value, just to have the side effect of calling the progress bar update function - the adjustment - is totally ignored in activity mode + is totally ignored in activity mode. @@ -461,27 +493,27 @@ In activity mode, the API involves setting the adjustment You set the activity step as a pixel value, which means to set the activity step you basically need to connect to - size_allocate + size_allocate. -There are ctree_set_expander_style()-functions, to randomly - change look-and-feel for no good reason +There are ctree_set_expander_style()-functions, to + randomly change look-and-feel for no good reason. -The split between GtkProgress and GtkProgressBar makes no sense - to me whatsoever. +The split between GtkProgress and +GtkProgressBar makes no sense to me whatsoever. - This was a big wart on GTK and made people waste lots of time, + This was a big wart on GTK+ and made people waste lots of time, both learning and using the interface. So, we have added what we feel is the correct API, and marked all the rest deprecated. However, the changes are 100% backward-compatible and @@ -505,22 +537,24 @@ The split between GtkProgress and GtkProgressBar makes no sense -The GtkNotebookPage structure has been removed from the public header files; +The GtkNotebookPage structure has been removed from + the public header files; this was never meant to be a public structure, and all functionality that could be done by accessing the struct fields of this structure should be - accesible otherwise. + accessible otherwise. -GtkMenuPositionFunc has a new parameter push_in which controls how - menus placed outside the screen is handled. If this is set to true and - part of the menu is outside the screen then Gtk+ pushes it into the visible +GtkMenuPositionFunc has a new parameter + push_in which controls how menus placed outside the + screen is handled. If this is set to TRUE and + part of the menu is outside the screen then GTK+ pushes it into the visible area. Otherwise the menu is cut of at the end of the visible screen area. - Regardles of what happens to the size of the menu, the result is always + Regardless of what happens to the size of the menu, the result is always that the items are placed in the same place as if the menu was placed outside the screen, using menu scrolling if necessary. @@ -528,12 +562,14 @@ GtkMenuPositionFunc has a new parameter push_in which controls how -The "draw" signal and virtual method on GtkWidget has been removed. +The "draw" signal and virtual method on GtkWidget + has been removed. All drawing should now occur by invalidating a region of the widget - (call gdk_window_invalidate_rect() or gtk_widget_queue_draw() for - example to invalidate a region). GTK+ merges all invalid regions, - and sends expose events to the widget in an idle handler for the - invalid regions. gtk_widget_draw() is deprecated but still works; it + (call gdk_window_invalidate_rect() or + gtk_widget_queue_draw() for example to invalidate + a region). GTK+ merges all invalid regions, and sends expose events to + the widget in an idle handler for the invalid regions. + gtk_widget_draw() is deprecated but still works; it adds the passed-in area to the invalid region and immediately sends expose events for the current invalid region. Most widgets will work fine if you just delete their "draw" @@ -545,114 +581,120 @@ The "draw" signal and virtual method on GtkWidget has been removed. -The GdkExposeEvent has a new region field. This can be used instead - of the area field if you want a more exact representation of the - area to update. +The GdkExposeEvent has a new region + field. This can be used instead of the area field if you + want a more exact representation of the area to update. -Sending synthetic exposes using gtk_widget_event is no longer allowed. - If you just need an expose call you should use gdk_window_invalidate_rect() - or gdk_window_invalidate_region() instead. For the case of container - widgets that need to propagate expose events to NO_WINDOW children - you can either use gtk_container_propagate_expose(), or chain to the +Sending synthetic exposes using gtk_widget_event() is no + longer allowed. If you just need an expose call you should use + gdk_window_invalidate_rect() or + gdk_window_invalidate_region() instead. For the case + of container widgets that need to propagate expose events to + NO_WINDOW children you can either use + gtk_container_propagate_expose(), or chain to the default container expose handler. -The draw_default and draw_focus methods/signals on GtkWidget are - gone; simply draw things in your expose handler. - gtk_widget_draw_focus() and gtk_widget_draw_default() wrapper +The draw_default and draw_focus methods/signals on + GtkWidget are gone; simply draw things in your + expose handler. gtk_widget_draw_focus() and + gtk_widget_draw_default() wrapper functions are also gone; just queue a draw on the widget, or the part affected by the focus/default anyway. - Also, GtkWidget now has default implementations for focus_in_event - and focus_out_event. These set/unset GTK_HAS_FOCUS, and queue a - draw. So if your focus in/out handler just does that, you can delete - it. + Also, GtkWidget now has default implementations for + focus_in_event and focus_out_event. These set/unset + GTK_HAS_FOCUS, and queue a draw. So if your focus in/out + handler just does that, you can delete it. -GtkText and GtkTree are buggy and broken. We don't recommend using - them, and changing old code to avoid them is a good idea. The - recommended alternatives are GtkTextView and GtkTreeView. The - broken widgets are not declared in the headers by default; to use - them, define the symbol GTK_ENABLE_BROKEN during compilation. In - some future release, these widgets will be removed from GTK+. +GtkText and GtkTree are + buggy and broken. We don't recommend using them, and changing old code to + avoid them is a good idea. The recommended alternatives are + GtkTextView and GtkTreeView. + The broken widgets are not declared in the headers by default; to use + them, define the symbol GTK_ENABLE_BROKEN during + compilation. In some future release, these widgets will be removed from GTK+. -GdkColorContext is gone; you probably weren't using it anyway. - Use GdkColormap and the gdk_rgb_* functions instead. +GdkColorContext is gone; you probably weren't using + it anyway. Use GdkColormap and the + gdk_rgb_* functions instead. -GtkMenuBar now draws the GtkContainer::border_width space outside - the frame, not inside the frame +GtkMenuBar now draws the GtkContainer::border_width + space outside the frame, not inside the frame. -In GTK 1.2, if an event handler returned TRUE it prevented +In GTK+ 1.2, if an event handler returned TRUE it prevented propagation of that event to parent widgets. That is, the event signal would not be emitted on parent widgets. In - GTK 2.0, if an event handler returns TRUE, the current signal - emission on the current widget is immediately stopped. That is, + GTK+ 2.0, if an event handler returns TRUE, the current + signal emission on the current widget is immediately stopped. That is, other callbacks connected to the signal will not be invoked. -gtk_toolbar_new() no longer has arguments. This function - was broken because the default GtkToolbarStyle (icons, text, both) - is now a user preference, which is overridden when you call - gtk_toolbar_set_style(). The constructor forced everyone to - override the preference, which was undesirable. So to port +gtk_toolbar_new() no longer has arguments. This function + was broken because the default GtkToolbarStyle (icons, + text, both) is now a user preference, which is overridden when you call + gtk_toolbar_set_style(). The constructor forced everyone + to override the preference, which was undesirable. So to port your app, decide if you want to force the toolbar style or conform to the user's global defaults; if you want to force - it, call gtk_toolbar_set_style(). + it, call gtk_toolbar_set_style(). - The orientation arg was removed from toolbar_new() as well, just - because it wasn't very useful and we were breaking the function + The orientation arg was removed from gtk_toolbar_new() + as well, just because it wasn't very useful and we were breaking the function anyway so had an opportunity to lose it. Call - gtk_toolbar_set_orientation() to set toolbar orientation. + gtk_toolbar_set_orientation() to set toolbar orientation. -GtkRange/GtkScrollbar/GtkScale were rewritten; this means that most +GtkRange/GtkScrollbar/GtkScale were rewritten; this means that most theme engines won't draw them properly, and any custom subclasses of these widgets will need a rewrite (though if you could figure out - how to subclass the old version of GtkRange, you have our - respect). Also, GtkTroughType is gone. + how to subclass the old version of GtkRange, you + have our respect). Also, GtkTroughType is gone. -The GtkContainer::focus signal/virtualfunction and - gtk_container_focus() call were replaced by - GtkWidget::focus and gtk_widget_child_focus(). +The GtkContainer::focus signal/virtual function and + gtk_container_focus() call were replaced by + GtkWidget::focus and gtk_widget_child_focus(). The semantics are the same, so you should be able to just - replace "container_class->focus = mywidget_focus" with - "widget_class->focus = mywidget_focus" and replace - gtk_container_focus() calls with gtk_widget_child_focus() calls. + replace container_class->focus = mywidget_focus with + widget_class->focus = mywidget_focus and replace + gtk_container_focus() calls with + gtk_widget_child_focus() calls. The purpose of this change was to allow non-containers to have @@ -662,32 +704,34 @@ The GtkContainer::focus signal/virtualfunction and -gtk_rc_set_image_loader() and gtk_rc_load_image() has been removed, now +gtk_rc_set_image_loader() and +gtk_rc_load_image() have been removed, now that GTK+ includes decent image loading capabilities itself. -An extra GtkSettings argument has been added to - gtk_rc_find_pixmap_in_path(). This function is only actually useful - from a theme engine during parsing, at which point the GtkSettings - is provided. +An extra GtkSettings argument has been added to + gtk_rc_find_pixmap_in_path(). This function is only + actually useful from a theme engine during parsing, at which point the + GtkSettings is provided. -The child argument facility in gtkcontainer.c has been converted - to a child property facility using GParamSpec and other facilities - for GObject. +The child argument facility in gtkcontainer.c has been + converted to a child property facility using + GParamSpec and other facilities + for GObject. -The set_child_arg and get_child_arg virtual methods have been - replaced with set_child_property / get_child_property, which +The set_child_arg() and get_child_arg() + virtual methods have been replaced with set_child_property()/get_child_property(), which work similar to GObject->set_property/get_property. @@ -695,7 +739,7 @@ The set_child_arg and get_child_arg virtual methods have been -Other removed GtkContainer unctions with the replacements: +Other removed GtkContainer functions with the replacements: gtk_container_add_child_arg_type => gtk_container_class_install_child_property @@ -711,41 +755,44 @@ Other removed GtkContainer unctions with the replacements: -gdk_image_get() (or rather its replacement, - gdk_drawable_get_image()) now handles errors properly by returning - NULL, previously it would crash. Also, a window being offscreen is - no longer considered an error; instead, the area being contains - undefined contents for the offscreen areas. In most cases, code - using gdk_image_get() should really be ported to - gdk_pixbuf_get_from_drawable(). +gdk_image_get() (or rather its replacement, + gdk_drawable_get_image()) now handles errors properly + by returning NULL, previously it would crash. Also, a + window being offscreen is no longer considered an error; instead, the area + contains undefined contents for the offscreen areas. In most cases, code + using gdk_image_get() should really be ported to + gdk_pixbuf_get_from_drawable(). -gtk_widget_set_usize() has been renamed to - gtk_widget_set_size_request(), however the old name still exists - unless you define GTK_DISABLE_DEPRECATED. +gtk_widget_set_usize() has been renamed to + gtk_widget_set_size_request(), however the old name + still exists unless you define GTK_DISABLE_DEPRECATED. -gtk_widget_set_uposition() is deprecated; use gtk_window_move(), - gtk_fixed_put(), or gtk_layout_put() instead. +gtk_widget_set_uposition() is deprecated; use + gtk_window_move(), + gtk_fixed_put(), or gtk_layout_put() + instead. -gtk_window_set_policy() is deprecated. To get the effect of - "allow_shrink", call gtk_widget_set_size_request(window, 0, 0). To - get the effect of "allow_grow", call - gtk_window_set_resizable(window, TRUE). You didn't want the effect - of auto_shrink, it made no sense. But maybe if you were using it you - want to use gtk_window_resize (window, 1, 1) to snap a window back - to its minimum size (the 1, 1 will be rounded up to the minimum - window size). +gtk_window_set_policy() is deprecated. To get the effect of + "allow_shrink", call + gtk_widget_set_size_request (window, 0, 0). To get the + effect of "allow_grow", call + gtk_window_set_resizable (window, TRUE). You didn't want + the effect of "auto_shrink", it made no sense. But maybe if you were using + it you want to use gtk_window_resize (window, 1, 1) to + snap a window back to its minimum size (the 1, 1 will be rounded up to the + minimum window size). @@ -753,51 +800,54 @@ gtk_window_set_policy() is deprecated. To get the effect of The core GTK+ now takes care of handling mapping, unmapping and realizing the child widgets of containers in - gtk_widget_set_parent(). In most cases, this allows container - implementations to be simplifid by removing the code in add() - methods to map and realize children. However, there are - a couple of things to watch out for here: + gtk_widget_set_parent(). In most cases, this allows + container implementations to be simplified by removing the code in + add() methods to map and realize children. However, + there are a couple of things to watch out for here: -If the parent is realized before the add() happens, - gtk_widget_set_parent_window() must be called before - gtk_widget_set_parent(), since gtk_widget_set_parent() - will realize the child. +If the parent is realized before the add() happens, + gtk_widget_set_parent_window() must be called before + gtk_widget_set_parent(), since + gtk_widget_set_parent() will realize the child. If a container depended on its children not being mapped - unless it did so itself (for example, GtkNotebook only - mapped the current page), then the new function - gtk_widget_set_child_visible() must be called to keep + unless it did so itself (for example, GtkNotebook + only mapped the current page), then the new function + gtk_widget_set_child_visible() must be called to keep widgets that should not be mapped not mapped. - As part of this change, most containers also will no longer need - custom implementations of the map() and unmap() virtual - functions. The only cases where this is necessary are: + As part of this change, most containers also will no longer need custom + implementations of the map() and + unmap() virtual functions. The only cases where this + is necessary are: -For !NO_WINDOW widgets, if you create children of widget->window - and don't map them in realize() then you must map them - in map(). [ In almost all cases, you can simply map the - windows in realize() ] +For !NO_WINDOW widgets, if you create children of + widget->window + and don't map them in realize() then you must map them + in map()realize(). ] -For NO_WINDOW widgets, if you create windows in your realize() - method, you must map then in map() and unmap them in unmap(). +For NO_WINDOW widgets, if you create windows in your + realize() method, you must map then in + map() and unmap them in unmap(). @@ -806,12 +856,13 @@ For NO_WINDOW widgets, if you create windows in your realize() -gtk_widget_set_default_style (), gtk_widget_push_style (), - and gtk_widget_pop_style () have been removed, since they +gtk_widget_set_default_style(), + gtk_widget_push_style(), + and gtk_widget_pop_style() have been removed, since they did not work properly with themes and there were better alternatives for modifying the appearance of widgets. - You should generally use gtk_widget_modify_fg/bg/base/text/font + You should generally use gtk_widget_modify_*() instead. @@ -819,18 +870,22 @@ gtk_widget_set_default_style (), gtk_widget_push_style (), -gtk_image_new() now takes no arguments and creates an empty GtkImage - widget. To create a GtkImage widget from a GdkImage (the least - common usage of GdkImage), use gtk_image_new_from_image. +gtk_image_new() now takes no arguments and creates an + empty GtkImage widget. To create a + GtkImage widget from a + GdkImage (the least + common usage of GdkImage), use + gtk_image_new_from_image(). -GTK_SELECTION_EXTENDED is now deprecated, and neither the - GtkList/GtkTree nor the GtkCList/GtkCTree support - GTK_SELECTION_EXTENDED anymore. However, the old extended behavior - replaces MULTIPLE behavior. +GTK_SELECTION_EXTENDED is now deprecated, and neither the + GtkList/GtkTree nor the + GtkCList/GtkCTree support + GTK_SELECTION_EXTENDED anymore. However, the old extended + behavior replaces MULTIPLE behavior. @@ -843,7 +898,7 @@ The following variables are no longer exported from GDK. (Other variables Variable Replacement ======== =========== - gdk_null_window_warnings None - did nothing in GTK+-1.2. + gdk_null_window_warnings None - did nothing in GTK+ 1.2. gdk_leader_window None - private variable gdk_screen gdk_x11_get_default_screen () gdk_root_window gdk_x11_get_default_root_xwindow () @@ -860,26 +915,26 @@ The following variables are no longer exported from GDK. (Other variables -The handling of Colormaps and widgets has been changed: +The handling of colormaps and widgets has been changed: -The default colormap for widgets is now the GdkRGB colormap, not - the system default colormap. If you try to use resources created for - a widget (e.g., widget->style) with a window using the system - colormap, errors will result on some machines. +The default colormap for widgets is now the GdkRGB + colormap, not the system default colormap. If you try to use resources + created for a widget (e.g., widget->style) with + a window using the system colormap, errors will result on some machines. -gtk_widget_push/pop_colormap() only cause the colormap to be - explicitely set on toplevel widgets not on all widgets. The - colormap for other widgets (when not set using - gtk_widget_set_colormap()), is determined by finding the nearest - ancestor with a colormap set on it explicitely, or if that +gtk_widget_push()/gtk_widget_pop_colormap() + only cause the colormap to be explicitly set on toplevel widgets, not on + all widgets. The colormap for other widgets (when not set using + gtk_widget_set_colormap()), is determined by finding + the nearest ancestor with a colormap set on it explicitly, or if that fails, the default colormap. @@ -892,9 +947,9 @@ gtk_widget_push/pop_colormap() only cause the colormap to be -The default selected day for GtkCalendar is now the current day in the - month, not the first day in the month. The current month and year - were already used. +The default selected day for GtkCalendar is now the + current day in the month, not the first day in the month. The current month + and year were already used. @@ -902,21 +957,24 @@ The default selected day for GtkCalendar is now the current day in the GDK is no longer put into threaded mode automatically when - g_thread_init() has been called. In order to use the - global GDK thread mutex with gdk_threads_enter() and - gdk_threads_leave(), you must call gdk_threads_init() explicitely. + g_thread_init() has been called. In order to use the + global GDK thread mutex with gdk_threads_enter() and + gdk_threads_leave(), you must call + gdk_threads_init() explicitly. If you aren't using GDK and GTK+ functions from multiple threads, - there is no reason to call gdk_threads_init(). + there is no reason to call gdk_threads_init(). -The GtkPreviewInfo struct has had its visual and colormap fields - removed. Also, gtk_preview_get_cmap() and gtk_preview_get_visual() - are deprecated, as GdkRgb works on any colormap and visual. You no - longer need to gtk_widget_push_cmap (gtk_preview_get_cmap ()) in +The GtkPreviewInfo struct has had its visual and + colormap fields removed. Also, gtk_preview_get_cmap() + and gtk_preview_get_visual() are deprecated, as + GdkRGB works on any colormap and visual. You no + longer need to + gtk_widget_push_cmap (gtk_preview_get_cmap ()) in your code. @@ -924,19 +982,21 @@ The GtkPreviewInfo struct has had its visual and colormap fields -The GtkBox, GtkTable, and GtkAlignment widgets now call - gtk_widget_set_redraw_on_allocate (widget, FALSE); on themselves. - If you want to actually draw contents in a widget derived from +The GtkBox, GtkTable, and + GtkAlignment widgets now call + gtk_widget_set_redraw_on_allocate (widget, FALSE); on + themselves. If you want to actually draw contents in a widget derived from one of these widgets, you'll probably want to change this - in your init() function. + in your init() function. -A number of widgets are now NO_WINDOW widgets (most importantly - GtkButton, but also GtkRange and GtkNotebook) +A number of widgets are now NO_WINDOW widgets (most + importantly GtkButton, but also + GtkRange and GtkNotebook) This has a couple of effects: @@ -945,7 +1005,7 @@ A number of widgets are now NO_WINDOW widgets (most importantly If you are deriving from one of these widgets, you need to adapt your code appropriately -- for instance, drawing coordinates - start from widget->allocation.x, widget->allocation.y. + start from widget->allocation.x, widget->allocation.y. @@ -953,16 +1013,16 @@ If you are deriving from one of these widgets, you need to If you are embedding one of these widgets in a custom widget, - you must make sure you call gtk_container_propagate_expose() - correctly, as you must for any NO_WINDOW widgets. + you must make sure you call gtk_container_propagate_expose() + correctly, as you must for any NO_WINDOW widgets. - GtkFixed is a little special; it is now created by default as - a NO_WINDOW widget, but if you do + GtkFixed is a little special; it is now created by + default as a NO_WINDOW widget, but if you do gtk_fixed_set_has_window (fixed, TRUE); @@ -975,38 +1035,39 @@ If you are embedding one of these widgets in a custom widget, -GtkLayout no longer has the xoffset, yoffset fields, which used - to store the difference between world and window coordinates for - layout->bin_window. These coordinate systems are now always - the same. +GtkLayout no longer has the xoffset, + yoffset fields, which used to store the difference between + world and window coordinates for layout->bin_window. + These coordinate systems are now always the same. -gtk_paint_focus(), gtk_draw_focus() and GtkStyle::draw_focus() +gtk_paint_focus(), gtk_draw_focus() + and GtkStyle::draw_focus() have been changed a bit: -A GtkStateType argument has been added to gtk_paint_focus() +A GtkStateType argument has been added to gtk_paint_focus(). -The default implementation of GtkStyle::draw_focus virtual - function now draws a focus rectangle whose width is - determinted by the GtkWidget::focus-width style property. +The default implementation of the GtkStyle::draw_focus() + virtual function now draws a focus rectangle whose width is + determined by the GtkWidget::focus-width style property. The rectangle passed in is the bounding box, instead of - the rectangle used in the gdk_draw_rectangle() call, so it is - no longer necessary to subtract 1 from the width and height. + the rectangle used in the gdk_draw_rectangle() call, + so it is no longer necessary to subtract 1 from the width and height. diff --git a/docs/reference/gtk/framebuffer.sgml b/docs/reference/gtk/framebuffer.sgml index 3f0c23b914..cba73c02a3 100644 --- a/docs/reference/gtk/framebuffer.sgml +++ b/docs/reference/gtk/framebuffer.sgml @@ -17,7 +17,7 @@ Using embedded GTK+ on the Linux framebuffer 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 without any changes to the source. @@ -25,17 +25,17 @@ without any changes to the source. Build requirements 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 -freetype-config in 2.0. Make sure that you install freetype before -Pango, since Pango also needs it. Freetype can be found at -ftp://ftp.freetype.org +freetype-config in 2.0. Make sure that you install +FreeType before Pango, since Pango also needs it. FreeType can be found at +ftp://ftp.freetype.org. Hardware requirements -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 a supported mouse. GTK+ currently supports the ps2 mouse, ms serial mouse and fidmour touchscreen. Additional hardware support should @@ -45,24 +45,25 @@ be simple to add. Building and installing -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 -CVS) with --with-gdktarget=linux-fb. +Then configure GTK+ by running configure (or +autogen.sh if running from +CVS) with . -Then compile as ususal: make; make install +Then compile as usual: make; make install Fonts -Since GtkFB uses freetype 2 to render fonts it can render truetype and -postscript type 1 antialiased fonts. +Since GtkFB uses FreeType 2 to render fonts it can render TrueType and +Postscript type 1 antialiased fonts. 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 -must add something like: +it looks in $prefix/lib/ft2fonts, and if you want to +change this you must add something like: [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 $prefix/etc/pango/pangoft2.aliases or ~/.pangoft2_aliases file. You can also set the name of this file using -the key AliasFiles in the PangoFT2 section in pangorc. +the key AliasFiles in the PangoFT2 section in pangorc. @@ -90,15 +91,16 @@ monospace normal normal normal normal "nimbus mono l" -And one using the Windows truetype fonts is: +And one using the Windows TrueType fonts is: sans normal normal normal normal "arial" serif normal normal normal normal "times new roman" monospace normal normal normal normal "courier new" -A more detailed example can be found in examples/pangoft2.aliases in the -pango distribution. +A more detailed example can be found in +examples/pangoft2.aliases in the +Pango distribution. @@ -106,16 +108,16 @@ pango distribution. 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 -by environment variables. Try testgtk distributed with GTK+ to test -if things work. +by environment variables. Try gtk-demo distributed +with GTK+ to test if things work. -If you use a ps2 mouse, make sure that /dev/psaux is readable and -writable. +If you use a ps2 mouse, make sure that /dev/psaux is +readable and writable. -Make sure gpm is not running. +Make sure gpm is not running. 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 @@ -124,28 +126,29 @@ changed by specifying environment variables: -GDK_VT: +GDK_VT: unset means open on the current VT. 0-9: open on the specified VT. Make sure you have read/write rights there. new: Allocate a new VT after the last currently used one. -GDK_DISPLAY_MODE: - Specifies the name of a mode in /etc/fb.modes that you want to use. +GDK_DISPLAY_MODE: + Specifies the name of a mode in /etc/fb.modes that you + want to use. -GDK_DISPLAY_DEPTH: +GDK_DISPLAY_DEPTH: Specify the desired bit depth of the framebuffer. -GDK_DISPLAY_WIDTH: +GDK_DISPLAY_WIDTH: Specify the desired width of the framebuffer. -GDK_DISPLAY_HEIGHT: +GDK_DISPLAY_HEIGHT: Specify the desired height of the framebuffer. -GDK_DISPLAY: - Specify the framebuffer device to use. Default is /dev/fb0 +GDK_DISPLAY: + Specify the framebuffer device to use. Default is /dev/fb0. -GDK_MOUSE_TYPE: +GDK_MOUSE_TYPE: Specify mouse type. Currently supported is: ps2 - PS/2 mouse imps2 - PS/2 intellimouse (wheelmouse) @@ -153,7 +156,7 @@ GDK_MOUSE_TYPE: fidmour - touch screen Default is ps2. -GDK_KEYBOARD_TYPE: +GDK_KEYBOARD_TYPE: Specify keyboard type. Currently supported is xlate - normal tty mode keyboard. Quite limited, cannot detect key up/key down events. Doesn't