Back to home page

EIC code displayed by LXR

 
 

    


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

0001 /* $XConsortium: NavigatorT.h /main/5 1995/07/15 20:53:08 drk $ */
0002 /*
0003  * Motif
0004  *
0005  * Copyright (c) 1987-2012, The Open Group. All rights reserved.
0006  *
0007  * These libraries and programs are free software; you can
0008  * redistribute them and/or modify them under the terms of the GNU
0009  * Lesser General Public License as published by the Free Software
0010  * Foundation; either version 2 of the License, or (at your option)
0011  * any later version.
0012  *
0013  * These libraries and programs are distributed in the hope that
0014  * they will be useful, but WITHOUT ANY WARRANTY; without even the
0015  * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
0016  * PURPOSE. See the GNU Lesser General Public License for more
0017  * details.
0018  *
0019  * You should have received a copy of the GNU Lesser General Public
0020  * License along with these librararies and programs; if not, write
0021  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
0022  * Floor, Boston, MA 02110-1301 USA
0023  */
0024 /*
0025  * HISTORY
0026  */
0027 #ifndef _XmNavigatorT_H
0028 #define _XmNavigatorT_H
0029 
0030 #include <Xm/Xm.h>
0031 
0032 #ifdef __cplusplus
0033 extern "C" {
0034 #endif
0035 
0036 externalref XrmQuark XmQTnavigator;
0037 
0038 /* Trait structures and typedefs, place typedefs first */
0039 
0040 
0041 /* this structure is equivalent to an XPoint but in int,
0042    not in Position, which are short */
0043 typedef struct _TwoDInt {
0044     int x;
0045     int y;
0046 } TwoDIntRec, *TwoDInt;
0047 
0048 
0049 /* this one can be expanded in the future */
0050 typedef struct _XmNavigatorDataRec {
0051     Mask valueMask ;
0052     Mask dimMask ;
0053     TwoDIntRec value;
0054     TwoDIntRec minimum;
0055     TwoDIntRec maximum;
0056     TwoDIntRec slider_size;
0057     TwoDIntRec increment;
0058     TwoDIntRec page_increment;
0059 } XmNavigatorDataRec, *XmNavigatorData;
0060 
0061 #define NavAllValid             (OxFFFF)
0062 #define NavDimMask      (1L<<0)
0063 #define NavValue        (1L<<1)
0064 #define NavMinimum              (1L<<2)
0065 #define NavMaximum      (1L<<3)
0066 #define NavSliderSize       (1L<<4)
0067 #define NavIncrement            (1L<<5)
0068 #define NavPageIncrement    (1L<<6)
0069 
0070 
0071 
0072 typedef void (*XmNavigatorMoveCBProc)(Widget nav, 
0073                       XtCallbackProc moveCB,
0074                       XtPointer closure,
0075                       Boolean setunset);
0076 typedef void (*XmNavigatorSetValueProc)(Widget nav, 
0077                     XmNavigatorData nav_data,
0078                     Boolean notify);
0079 typedef void (*XmNavigatorGetValueProc)(Widget nav, 
0080                     XmNavigatorData nav_data);
0081 
0082 
0083 
0084 /* Version 0: initial release. */
0085 
0086 typedef struct _XmNavigatorTraitRec {
0087   int             version;      /* 0 */
0088   XmNavigatorMoveCBProc   changeMoveCB;
0089   XmNavigatorSetValueProc setValue;
0090   XmNavigatorGetValueProc getValue;
0091 } XmNavigatorTraitRec, *XmNavigatorTrait;
0092 
0093 
0094 #define NavigDimensionX         (1L<<0)  
0095 #define NavigDimensionY         (1L<<1)  
0096 
0097 /* convenience Macros */
0098 #define ACCESS_DIM(mask,field) ((mask & NavigDimensionX)?(field.x):(field.y))
0099 
0100 #define ASSIGN_DIM(mask,field,val)  \
0101   {                 \
0102     if (mask & NavigDimensionX)     \
0103       (field.x)=(val);          \
0104     else                \
0105       (field.y)=(val);          \
0106   }
0107 
0108 
0109 #ifdef __cplusplus
0110 }  /* Close scope of 'extern "C"' declaration which encloses file. */
0111 #endif
0112 
0113 #endif /* _XmNavigatorT_H */