1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136
|
about libXaw3dxft-1.6.2
-----------------------
This is a newer version which should be entirely source compatible with the
current development versions of libXaw3d-1.6.2 and provides additionally
support for freetype and UTF8 encoding (as did earlier versions
of libxaw3dxft <= 1.3.3).
To get the best features, it is recommended to use
./configure --enable-internationalization --enable-arrow-scrollbars
[--prefix=/usr]
The main parameter to be set is xaw3dxft_data->encoding. By default
xaw3dxft_data->encoding = 0
and in this case libXaw3dxft-1.6.2 just behaves as plain libXaw3d. Freetype
support is enabled when xaw3dxft_data->encoding != 0, and UTF8 corresponds to
xaw3dxft_data->encoding = -1
Other specific parameters (and their default values) are defined by the
Xaw3dXftData structure.
typedef struct _Xaw3dXftData {
char encoding;
char string_hilight;
char text_bg_hilight;
char string_use_pixmap;
char menu_spacing;
char show_tips;
char tip_do_grab;
char border_hack;
char no_hilit_reverse;
char button_inverse;
char button_dashed;
char multi_column_menu;
unsigned short insensitive_twist[4];
Xaw3dXftProc * proc;
Pixel tip_background_color;
Pixel text_bg_hilight_color;
Pixel text_fg_alternate_color;
char * hilit_color;
char * default_fontname;
XftFont * default_font;
} Xaw3dXftData;
It can be used typically with the following header file
#include <X11/Xaw3dxft/Xaw3dXft.h>
and by introducing e.g.
Xaw3dXftData *xaw3dxft_data = NULL;
Xaw3dXftProc *xaw3dxft_proc = NULL;
These structures can be initialized with the macro
GET_XAW3DXFT_DATA(xaw3dxft_data);
They can be set by writing
if (xaw3dxft_data) {
xaw3dxft_data->encoding = -1; /* UTF8 encoding */
xaw3dxft_data->string_hilight = 0;
xaw3dxft_data->string_use_pixmap = 0;
xaw3dxft_data->no_hilit_reverse = 1;
xaw3dxft_data->button_inverse = 0;
xaw3dxft_data->button_dashed = 1;
xaw3dxft_data->show_tips = 1;
xaw3dxft_data->text_bg_hilight = 1;
xaw3dxft_data->text_bg_hilight_color = 0x333300;
...
}
Default values are :
xaw3dxft_data->encoding = 0;
xaw3dxft_data->string_hilight = 0;
xaw3dxft_data->text_bg_hilight = 0;
xaw3dxft_data->string_use_pixmap = 0;
xaw3dxft_data->menu_spacing = 1;
xaw3dxft_data->show_tips = 1;
xaw3dxft_data->tip_do_grab = 1;
xaw3dxft_data->border_hack = 1;
xaw3dxft_data->no_hilit_reverse = 0;
xaw3dxft_data->button_inverse = 1;
xaw3dxft_data->button_dashed = 0;
xaw3dxft_data->multi_column_menu = 0;
memset(xaw3dxft_data->insensitive_twist, 0, 4);
xaw3dxft_data->text_bg_hilight_color = -1;
xaw3dxft_data->tip_background_color = -1;
xaw3dxft_data->text_fg_alternate_color = -1;
xaw3dxft_data->hilit_color = NULL;
xaw3dxft_data->default_fontname = NULL;
xaw3dxft_data->default_font = NULL;
xaw3dxft_proc = xaw3dxft_data->proc;
xaw3dxft_proc->set_default_hilit_color = Xaw3dXftSetDefaultHilitColor;
xaw3dxft_proc->set_hilit_color = Xaw3dXftSetHilitColor;
xaw3dxft_proc->set_default_fontname = Xaw3dXftSetDefaultFontName;
xaw3dxft_proc->set_insensitive_twist = Xaw3dXftSetInsensitiveTwist;
xaw3dxft_proc->get_font = Xaw3dXftGetFont;
xaw3dxft_proc->text_width = Xaw3dXftTextWidth;
xaw3dxft_proc->draw_string = Xaw3dXftDrawString;
xaw3dxft_proc->get_scrollbar = Xaw3dXftGetScrollbar;
xaw3dxft_proc->handle_mousewheel = Xaw3dXftHandleMouseWheel;
xaw3dxft_proc->set_mousewheel_handler = Xaw3dXftSetMouseWheelHandler;
xaw3dxft_proc->set_mousewheel_steps = Xaw3dXftSetMouseWheelSteps;
============================================================================
about libxaw3dxft-1.3.3
-----------------------
This is an updated version of the libxaw3dxft library, compatible with
xpaint-2.9.9 (which no longer includes libxaw3dxft).
It includes autoconf scripts rather than the older Imakefile build script -
thanks to David Flater for providing these.
The latest version libxaw3dxft-1.3.3 corrects some minor issues with
font resources. The X core font mechanism should now be superseded in
all circumstances by the freetype library. When compiled with libxaw3dxft,
fonts can be set :
- via the char *Xaw3dXftDefaultFontName parameter (global setting)
- via the Xaw3dXftSetDefaultFontName(char *name) routine (global setting)
- via a -xrm "*<widget,class>*XftFont: fontname" command line specification
(any widget type or class type name can be specified)
- via a XtVaSetValues(widget, XtNxftFont, fontname, NULL) call in a program.
By default, libxaw3dxft uses UTF8 (Xaw3dXftEncoding = 0), other encodings
are available via Xaw3dXftEncoding = 8 or 16.
CAUTION: the libxaw3dxft-1.3.3.tar.bz2 package uploaded on January 31, 2012
had a slight issue (one letter misspelled in the definition
#define XtNxftFont "xftFont"
in SmeBSB.h). Please correct or re-download the new version uploaded on
February 1.
|