Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:15:24

0001 /* 
0002  * Motif
0003  *
0004  * Copyright (c) 1987-2012, The Open Group. All rights reserved.
0005  *
0006  * These libraries and programs are free software; you can
0007  * redistribute them and/or modify them under the terms of the GNU
0008  * Lesser General Public License as published by the Free Software
0009  * Foundation; either version 2 of the License, or (at your option)
0010  * any later version.
0011  *
0012  * These libraries and programs are distributed in the hope that
0013  * they will be useful, but WITHOUT ANY WARRANTY; without even the
0014  * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
0015  * PURPOSE. See the GNU Lesser General Public License for more
0016  * details.
0017  *
0018  * You should have received a copy of the GNU Lesser General Public
0019  * License along with these librararies and programs; if not, write
0020  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
0021  * Floor, Boston, MA 02110-1301 USA
0022 */ 
0023 #ifndef _XmDrawP_h
0024 #define _XmDrawP_h
0025 
0026 #include <Xm/XmP.h>
0027 
0028 #ifdef __cplusplus
0029 extern "C" {
0030 #endif
0031 
0032 /*---------------------------------------------------------------*/
0033 /*   Functions used by Xm widgets for the Motif visual drawing   */
0034 /*---------------------------------------------------------------*/
0035 /* All these functions have an Xlib draw like API: 
0036       a Display*, a Drawable, then GCs, Positions and Dimensions 
0037       and finally some specific paramaters */
0038 
0039 /******** The Draw.c file has been split in several module for
0040           a better link profile *********/
0041 
0042 /*---------------------------------------------------------------
0043   XmeDrawShadows, 
0044        use in place of the 1.1 _XmDrawShadow and _XmDrawShadowType
0045        with changes to the interface (widget vs window, offsets, new order)
0046        and in the implementation (uses XSegments instead of XRectangles).
0047        Both etched and regular shadows use now a single private routine
0048        xmDrawSimpleShadow.
0049     XmeDrawHighlight.
0050        Implementation using FillRectangles, for solid highlight only. 
0051     _XmDrawHighlight.
0052        Highlight using wide lines, so that dash mode works. 
0053     XmeClearBorder,    
0054        new name for _XmEraseShadow  (_XmClearShadowType, which clear half a 
0055        shadow with a 'widget' API stays in Manager.c ) 
0056        XmClearBorder is only usable on window, not on drawable.
0057     XmeDrawSeparator, 
0058        use in place of the duplicate redisplay method of both separator and 
0059        separatorgadget (highlight_thickness not used, must be incorporated
0060        in the function call parameters). use xmDrawSimpleShadow.
0061        Has 2 new separator types for dash shadowed lines.
0062     XmeDrawDiamond, 
0063        new interface for _XmDrawDiamondButton (_XmDrawSquareButton is
0064        really a simple draw shadow and will be in the widget file as is).
0065     XmeDrawArrow, 
0066        same algorithm as before but in one function that re-uses the malloced
0067        rects and does not store anything in the wigdet instance.
0068     XmeDrawPolygonShadow,
0069        new one that use the RegionDrawShadow API to implement an Xme call 
0070     XmeDrawCircle,
0071        new one for toggle visual
0072     XmeDrawIndicator
0073        new one for toggle drawing
0074 ---------------------------------------------------------------------------*/
0075 
0076 
0077 /********    Private Function Declarations    ********/
0078 
0079 extern void XmeDrawShadows( 
0080                         Display *display,
0081                         Drawable d,
0082                         GC top_gc,
0083                         GC bottom_gc,
0084 #if NeedWidePrototypes
0085                         int x,
0086                         int y,
0087                         int width,
0088                         int height,
0089                         int shad_thick,
0090 #else
0091                         Position x,
0092                         Position y,
0093                         Dimension width,
0094                         Dimension height,
0095                         Dimension shad_thick,
0096 #endif /* NeedWidePrototypes */
0097                         unsigned int shad_type);
0098 extern void XmeClearBorder( 
0099                         Display *display,
0100                         Window w,
0101 #if NeedWidePrototypes
0102                         int x,
0103                         int y,
0104                         int width,
0105                         int height,
0106                         int shadow_thick);
0107 #else
0108                         Position x,
0109                         Position y,
0110                         Dimension width,
0111                         Dimension height,
0112                         Dimension shadow_thick);
0113 #endif /* NeedWidePrototypes */
0114 extern void XmeDrawSeparator( 
0115                         Display *display,
0116                         Drawable d,
0117                         GC top_gc,
0118                         GC bottom_gc,
0119                         GC separator_gc,
0120 #if NeedWidePrototypes
0121                         int x,
0122                         int y,
0123                         int width,
0124                         int height,
0125                         int shadow_thick,
0126                         int margin,
0127                         unsigned int orientation,
0128                         unsigned int separator_type);
0129 #else
0130                         Position x,
0131                         Position y,
0132                         Dimension width,
0133                         Dimension height,
0134                         Dimension shadow_thick,
0135                         Dimension margin,
0136                         unsigned char orientation,
0137                         unsigned char separator_type);
0138 #endif /* NeedWidePrototypes */
0139 extern void XmeDrawDiamond( 
0140                         Display *display,
0141                         Drawable d,
0142                         GC top_gc,
0143                         GC bottom_gc,
0144                         GC center_gc,
0145 #if NeedWidePrototypes
0146                         int x,
0147                         int y,
0148                         int width,
0149                         int height,
0150                         int shadow_thick,
0151                         int margin);
0152 #else
0153                         Position x,
0154                         Position y,
0155                         Dimension width,
0156                         Dimension height,
0157                         Dimension shadow_thick,
0158                         Dimension margin);
0159 #endif /* NeedWidePrototypes */
0160 
0161 extern void XmeDrawCircle( 
0162                         Display *display,
0163                         Drawable d,
0164                         GC top_gc,
0165                         GC bottom_gc,
0166                         GC center_gc,
0167 #if NeedWidePrototypes
0168                         int x,
0169                         int y,
0170                         int width,
0171                         int height,
0172                         int shadow_thick,
0173                         int margin);
0174 #else
0175                         Position x,
0176                         Position y,
0177                         Dimension width,
0178                         Dimension height,
0179                         Dimension shadow_thick,
0180                         Dimension margin);
0181 #endif /* NeedWidePrototypes */
0182 
0183 extern void XmeDrawHighlight( 
0184                         Display *display,
0185                         Drawable d,
0186                         GC gc,
0187 #if NeedWidePrototypes
0188                         int x,
0189                         int y,
0190                         int width,
0191                         int height,
0192                         int highlight_thick
0193 #else
0194                         Position x,
0195                         Position y,
0196                         Dimension width,
0197                         Dimension height,
0198                         Dimension highlight_thick
0199 #endif /* NeedWidePrototypes */
0200                         );
0201 extern void XmeDrawArrow( 
0202                         Display *display,
0203                         Drawable d,
0204                         GC top_gc,
0205                         GC bot_gc,
0206                         GC cent_gc,
0207 #if NeedWidePrototypes
0208                         int x,
0209                         int y,
0210                         int width,
0211                         int height,
0212                         int shadow_thick,
0213                         unsigned int direction);
0214 #else
0215                         Position x,
0216                         Position y,
0217                         Dimension width,
0218                         Dimension height,
0219                         Dimension shadow_thick,
0220                         unsigned char direction);
0221 #endif /* NeedWidePrototypes */
0222 
0223 extern void XmeDrawPolygonShadow(
0224               Display *dpy,
0225               Drawable d,
0226               GC topGC,
0227               GC bottomGC,
0228               XPoint *points,
0229               int n_points,
0230 #if NeedWidePrototypes
0231               int shadowThickness,
0232               unsigned int shadowType);
0233 #else
0234               Dimension shadowThickness,
0235               unsigned char shadowType);
0236 #endif /* NeedWidePrototypes */
0237 
0238 extern void XmeDrawIndicator(Display *display, 
0239          Drawable d, 
0240          GC gc, 
0241 #if NeedWidePrototypes
0242          int x, int y, 
0243          int width, int height, 
0244          int margin,
0245          int type);
0246 #else
0247                  Position x, Position y, 
0248                  Dimension width, Dimension height,
0249          Dimension margin, 
0250                  XtEnum type);
0251 #endif /* NeedWidePrototypes */
0252 
0253 /********    End Private Function Declarations    ********/
0254 
0255 
0256 #ifdef __cplusplus
0257 }  /* Close scope of 'extern "C"' declaration which encloses file. */
0258 #endif
0259 
0260 #endif /* _XmDrawP_h */