Home | History | Annotate | Line # | Download | only in Xmu
      1 /*
      2 
      3 Copyright 1988, 1998  The Open Group
      4 
      5 Permission to use, copy, modify, distribute, and sell this software and its
      6 documentation for any purpose is hereby granted without fee, provided that
      7 the above copyright notice appear in all copies and that both that
      8 copyright notice and this permission notice appear in supporting
      9 documentation.
     10 
     11 The above copyright notice and this permission notice shall be included in
     12 all copies or substantial portions of the Software.
     13 
     14 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
     15 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
     16 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
     17 OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
     18 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
     19 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
     20 
     21 Except as contained in this notice, the name of The Open Group shall not be
     22 used in advertising or otherwise to promote the sale, use or other dealings
     23 in this Software without prior written authorization from The Open Group.
     24 
     25 */
     26 
     27 /*
     28  * The interfaces described by this header file are for miscellaneous utilities
     29  * and are not part of the Xlib standard.
     30  */
     31 
     32 #ifndef _XMU_STRCONVERT_H_
     33 #define _XMU_STRCONVERT_H_
     34 
     35 #include <X11/Intrinsic.h>
     36 #include <X11/Xfuncproto.h>
     37 
     38 _XFUNCPROTOBEGIN
     39 
     40 void XmuCvtFunctionToCallback
     41 (
     42  XrmValue		*args,
     43  Cardinal		*num_args,
     44  XrmValuePtr		fromVal,
     45  XrmValuePtr		toVal
     46  );
     47 
     48 #define XtNbackingStore "backingStore"
     49 #define XtCBackingStore "BackingStore"
     50 #define XtRBackingStore "BackingStore"
     51 #define XtEnotUseful "notUseful"
     52 #define XtEwhenMapped "whenMapped"
     53 #define XtEalways "always"
     54 #define XtEdefault "default"
     55 void XmuCvtStringToBackingStore
     56 (
     57  XrmValue		*args,
     58  Cardinal		*num_args,
     59  XrmValuePtr		fromVal,
     60  XrmValuePtr		toVal
     61  );
     62 
     63 Boolean XmuCvtBackingStoreToString
     64 (
     65  Display		*dpy,
     66  XrmValue		*args,
     67  Cardinal		*num_args,
     68  XrmValuePtr		fromVal,
     69  XrmValuePtr		toVal,
     70  XtPointer		*converter_data
     71  );
     72 
     73 void XmuCvtStringToCursor
     74 (
     75  XrmValue		*args,
     76  Cardinal		*num_args,
     77  XrmValuePtr		fromVal,
     78  XrmValuePtr		toVal
     79  );
     80 
     81 #define XtRColorCursor "ColorCursor"
     82 #define XtNpointerColor "pointerColor"
     83 #define XtNpointerColorBackground "pointerColorBackground"
     84 Boolean XmuCvtStringToColorCursor
     85 (
     86  Display		*dpy,
     87  XrmValue		*args,
     88  Cardinal		*num_args,
     89  XrmValuePtr		fromVal,
     90  XrmValuePtr		toVal,
     91  XtPointer		*converter_data
     92  );
     93 
     94 typedef int XtGravity;
     95 
     96 #ifndef XtRGravity
     97 #define XtRGravity "Gravity"
     98 #endif
     99 #define XtEForget "forget"
    100 #define XtENorthWest "northwest"
    101 #define XtENorth "north"
    102 #define XtENorthEast "northeast"
    103 #define XtEWest "west"
    104 #define XtECenter "center"
    105 #define XtEEast "east"
    106 #define XtESouthWest "southwest"
    107 #define XtESouth "south"
    108 #define XtESouthEast "southeast"
    109 #define XtEStatic "static"
    110 #define XtEUnmap "unmap"
    111 void XmuCvtStringToGravity
    112 (
    113  XrmValue		*args,
    114  Cardinal		*num_args,
    115  XrmValuePtr		fromVal,
    116  XrmValuePtr		toVal
    117  );
    118 
    119 Boolean XmuCvtGravityToString
    120 (
    121  Display		*dpy,
    122  XrmValue		*args,
    123  Cardinal		*num_args,
    124  XrmValuePtr		fromVal,
    125  XrmValuePtr		toVal,
    126  XtPointer		*converter_data
    127  );
    128 
    129 typedef enum {
    130     XtJustifyLeft,       /* justify text to left side of button   */
    131     XtJustifyCenter,     /* justify text in center of button      */
    132     XtJustifyRight       /* justify text to right side of button  */
    133 } XtJustify;
    134 #ifndef XtRJustify
    135 #define XtRJustify "Justify"
    136 #endif
    137 #define XtEleft "left"
    138 #define XtEcenter "center"
    139 #define XtEright "right"
    140 #define XtEtop "top"
    141 #define XtEbottom "bottom"
    142 void XmuCvtStringToJustify
    143 (
    144  XrmValue		*args,
    145  Cardinal		*num_args,
    146  XrmValuePtr		fromVal,
    147  XrmValuePtr		toVal
    148  );
    149 
    150 Boolean XmuCvtJustifyToString
    151 (
    152  Display		*dpy,
    153  XrmValue		*args,
    154  Cardinal		*num_args,
    155  XrmValuePtr		fromVal,
    156  XrmValuePtr		toVal,
    157  XtPointer		*converter_data
    158  );
    159 
    160 #define XtRLong "Long"
    161 void XmuCvtStringToLong
    162 (
    163  XrmValue		*args,
    164  Cardinal		*num_args,
    165  XrmValuePtr		fromVal,
    166  XrmValuePtr		toVal
    167  );
    168 Boolean XmuCvtLongToString
    169 (
    170  Display		*dpy,
    171  XrmValue		*args,
    172  Cardinal		*num_args,
    173  XrmValuePtr		fromVal,
    174  XrmValuePtr		toVal,
    175  XtPointer		*converter_data
    176  );
    177 
    178 typedef enum {
    179   XtorientHorizontal,
    180   XtorientVertical
    181 } XtOrientation;
    182 void XmuCvtStringToOrientation
    183 (
    184  XrmValue		*args,
    185  Cardinal		*num_args,
    186  XrmValuePtr		fromVal,
    187  XrmValuePtr		toVal
    188  );
    189 
    190 Boolean XmuCvtOrientationToString
    191 (
    192  Display		*dpy,
    193  XrmValue		*args,
    194  Cardinal		*num_args,
    195  XrmValuePtr		fromVal,
    196  XrmValuePtr		toVal,
    197  XtPointer		*converter_data
    198  );
    199 
    200 void XmuCvtStringToBitmap
    201 (
    202  XrmValue		*args,
    203  Cardinal		*num_args,
    204  XrmValuePtr		fromVal,
    205  XrmValuePtr		toVal
    206  );
    207 
    208 #define XtRShapeStyle "ShapeStyle"
    209 #define XtERectangle "Rectangle"
    210 #define XtEOval "Oval"
    211 #define XtEEllipse "Ellipse"
    212 #define XtERoundedRectangle "RoundedRectangle"
    213 
    214 #define XmuShapeRectangle 1
    215 #define XmuShapeOval 2
    216 #define XmuShapeEllipse 3
    217 #define XmuShapeRoundedRectangle 4
    218 
    219 Boolean XmuCvtStringToShapeStyle
    220 (
    221  Display		*dpy,
    222  XrmValue		*args,
    223  Cardinal		*num_args,
    224  XrmValuePtr		fromVal,
    225  XrmValuePtr		toVal,
    226  XtPointer		*converter_data
    227  );
    228 
    229 Boolean XmuCvtShapeStyleToString
    230 (
    231  Display		*dpy,
    232  XrmValue		*args,
    233  Cardinal		*num_args,
    234  XrmValuePtr		fromVal,
    235  XrmValuePtr		toVal,
    236  XtPointer		*converter_data
    237  );
    238 
    239 Boolean XmuReshapeWidget
    240 (
    241  Widget			w,
    242  int			shape_style,
    243  int			corner_width,
    244  int			corner_height
    245  );
    246 
    247 void XmuCvtStringToWidget
    248 (
    249  XrmValue		*args,
    250  Cardinal		*num_args,
    251  XrmValuePtr		fromVal,
    252  XrmValuePtr		toVal
    253  );
    254 
    255 Boolean XmuNewCvtStringToWidget
    256 (
    257  Display		*display,
    258  XrmValue		*args,
    259  Cardinal		*num_args,
    260  XrmValue		*fromVal,
    261  XrmValue		*toVal,
    262  XtPointer		*converter_data
    263  );
    264 
    265 Boolean XmuCvtWidgetToString
    266 (
    267  Display		*dpy,
    268  XrmValue		*args,
    269  Cardinal		*num_args,
    270  XrmValue		*fromVal,
    271  XrmValue		*toVal,
    272  XtPointer		*converter_data
    273  );
    274 
    275 _XFUNCPROTOEND
    276 
    277 #endif /* _XMU_STRCONVERT_H_ */
    278