/usr/include/XmHTML/toolkit.h is in xmhtml1-dev 1.1.7-19.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 | /*****
* toolkit.h : XmHTML Motif function & data type wrappers
*
* This file Version $Revision: 1.2 $
*
* Creation date: Thu Jan 8 04:32:19 GMT+0100 1998
* Last modification: $Date: 1998/04/27 07:03:52 $
* By: $Author: newt $
* Current State: $State: Exp $
*
* Author: newt
*
* Copyright (C) 1994-1997 by Ripley Software Development
* All Rights Reserved
*
* This file is part of the XmHTML Widget Library
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* About this file:
*
* XmHTML is originally an Xt/Motif based Widget. To make porting to
* other toolkits a bit easier, XmHTML uses a toolkit abstraction and a
* set of defines that allow you to replace all X/Xt/Xm functions used by
* XmHTML.
*
* All Xt/Xm functions are wrapped together in what I call a
* ToolkitAbstraction (see XmHTMLP.h for the definition and motif.c for
* the Motif ToolkitAbstraction).
*
* There is one assumption though: that you never include a header containing
* Xt or Xm specifics. If you do this however, you will need to override
* a whole bunch of routines, typedefs and constants (don't worry, they
* are all listed).
*
*****/
/*****
* $Source: /usr/local/rcs/Newt/XmHTML/RCS/toolkit.h,v $
*****/
/*****
* ChangeLog
* $Log: toolkit.h,v $
* Revision 1.2 1998/04/27 07:03:52 newt
* more tka stuff
*
* Revision 1.1 1998/04/04 06:27:29 newt
* Initial Revision
*
*****/
#ifndef _toolkit_h_
#define _toolkit_h_
#define XmHTMLPrivateHeader "XmHTML/XmHTMLP.h"
#define HAVE_XCCP_H
/* Every XmHTML source file requires these two X11 includes */
#include <X11/Xlib.h>
#include <X11/Intrinsic.h>
#include <X11/IntrinsicP.h>
/*****
* X types & constants
* We need defines for these as typedefs would lead to a tremendous amount
* of warnings (with most compilers that is). Lint would go absolutely crazy...
*****/
/* common types */
#define XCOLOR XColor
#define COLORMAP Colormap
#define PIXMAP Pixmap
#define WINDOW Window
#define DRAWABLE Drawable
#define XIMAGE XImage
#define XFONTSTRUCT XFontStruct
#define XFONTSET XFontSet
#define VISUAL Visual
#define XGC GC
#define XCHARSTRUCT XCharStruct
#define XEVENT XEvent
#define XBUTTONPRESSEDEVENT XButtonPressedEvent
#define XBUTTONRELEASEDEVENT XButtonReleasedEvent
/* byte ordering for this host */
#define LSBFIRST LSBFirst
#define MSBFIRST MSBFirst
/* Color access macros */
#define GETP(c) (c).pixel
#define GETR(c) (c).red
#define GETG(c) (c).green
#define GETB(c) (c).blue
#define GETF(c) (c).flags
#define GETPP(c) (c)->pixel
#define GETPR(c) (c)->red
#define GETPG(c) (c)->green
#define GETPB(c) (c)->blue
#define GETPF(c) (c)->flags
/*****
* This macro should return a XFontStruct
*****/
#define FontIsXFont(font) font
#define XTEVENTPROC(f,a,b,c,d) \
f(a,b,c,d)
/*****
* Xlib Function Wrappers
*****/
#define TkaCurrentTime CurrentTime
/*****
* XFontStruct access macro's
*****/
#define TkaFont(XF) ((XF)->xfont)
#define TkaFontLeftBearing(XF) ((XF)->max_bounds.lbearing)
#define TkaFontRightBearing(XF) ((XF)->max_bounds.rbearing)
#define TkaFontWidth(XF) ((XF)->max_bounds.width)
#define TkaFontAscent(XF) ((XF)->ascent)
#define TkaFontDescent(XF) ((XF)->descent)
#define TkaFontMaxAscent(XF) ((XF)->max_bounds.ascent)
#define TkaFontMaxDescent(XF) ((XF)->max_bounds.descent)
#define TkaFontLineheight(XF) ((XF)->ascent + (XF)->descent)
/*****
* XImage wrappers & access macros.
*****/
#define TkaImageData(image) \
(image->data)
#define TkaImageBitsPerPixel(image) \
(image->bits_per_pixel)
#define TkaImageBytesPerLine(image) \
(image->bytes_per_line)
#define TkaImageByteOrder(image) \
(image->byte_order)
#define TkaImageBitmapBitOrder(image) \
(image->bitmap_bit_order)
/* check support for various combinations of bits per pixel */
#define TkaImageCheck2bpp(image) \
(image->bits_per_pixel == 2)
#define TkaImageCheck4bpp(image) \
(image->bits_per_pixel == 4)
#define TkaImageCheck24bpp(image) \
(image->bits_per_pixel == 24)
#define TkaImageCheck32bpp(image) \
(image->bits_per_pixel == 32)
/*****
* Xt Function wrappers
*****/
#define TkaWidgetName(w) XtName((Widget)w)
#define TkaWidgetClassName(w) (XtClass((Widget)w)->core_class.class_name)
/* Check for the presence of a callback function */
#define TkaHasCallback(W,D) ATTR_HTML(W, D)
/* Activate a callback function */
#define TkaCallCallbackList(W,C,D) \
XtCallCallbackList((Widget)W, ATTR_HTML(W,C##_callback), D)
/* Set the position of a scrollbar slider */
#define TkaScrollbarSliderSetPosition(W,V) \
XtVaSetValues(W, XmNvalue, V, NULL)
/*****
* Motif wrappers
*****/
/* none */
/*****
* Widget internal access wrappers
*****/
/* Main access method. *REQUIRES* a variable of html to be known */
#define HTML_ATTR(field) ((XmHTMLWidget)html)->html.field
#define CORE_ATTR(field) ((Widget)html)->core.field
#define MGR_ATTR(field) ((XmHTMLWidget)html)->manager.field
/* subclass access methods */
#define ATTR_CORE(widget,field) \
(widget)->core.field
#define ATTR_MGR(widget,field) \
(widget)->manager.field
#define ATTR_HTML(widget,field) \
((XmHTMLWidget)widget)->html.field
/* widely used subclass properties */
/* get XFont used by the default XmHTMLFont */
#define GetDefaultXFont(widget) \
ATTR_HTML(widget,default_font->xfont)
#define TkaGetBackground(widget) \
ATTR_CORE(widget,background_pixel)
#define TkaGetColormap(widget) ATTR_CORE(widget,colormap)
#define TkaVisualGetDepth(widget) \
ATTR_HTML(widget,xcc->visualInfo->depth)
#define TkaVisualGetMapEntries(visual) \
visual->map_entries
/* Don't add anything after this endif! */
#endif /* _toolkit_h_ */
|