Back to home page

EIC code displayed by LXR

 
 

    


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

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 _XmPrimitiveP_h
0024 #define _XmPrimitiveP_h
0025 
0026 #ifndef _XmNO_BC_INCL
0027 #define _XmNO_BC_INCL
0028 #endif
0029 
0030 #include <Xm/XmP.h>
0031 
0032 #ifdef __cplusplus
0033 extern "C" {
0034 #endif
0035 
0036 
0037 /* Access Macros */
0038 
0039 #define Prim_ShadowThickness(w) (((XmPrimitiveWidget)(w))->primitive.shadow_thickness)
0040 #define Prim_HaveTraversal(w) (((XmPrimitiveWidget)(w))->primitive.have_traversal)
0041 
0042 #define PCEPTR(wc)  ((XmPrimitiveClassExt *)(&(((XmPrimitiveWidgetClass)(wc))->primitive_class.extension)))
0043 #define _XmGetPrimitiveClassExtPtr(wc, owner) \
0044   ((*PCEPTR(wc) && (((*PCEPTR(wc))->record_type) == owner))\
0045    ? PCEPTR(wc) \
0046    :((XmPrimitiveClassExt *) _XmGetClassExtensionPtr(((XmGenericClassExt *)PCEPTR(wc)), owner)))
0047 
0048 
0049 #define XmPrimitiveClassExtVersion 1L
0050 
0051 
0052 typedef struct _XmPrimitiveClassExtRec{
0053     XtPointer           next_extension;
0054     XrmQuark            record_type;
0055     long                version;
0056     Cardinal            record_size;
0057     XmWidgetBaselineProc widget_baseline;
0058     XmWidgetDisplayRectProc  widget_display_rect;
0059     XmWidgetMarginsProc widget_margins;
0060 } XmPrimitiveClassExtRec, *XmPrimitiveClassExt;
0061 
0062 typedef struct _XmPrimitiveClassPart
0063 {
0064    XtWidgetProc         border_highlight;
0065    XtWidgetProc         border_unhighlight;
0066    String               translations;
0067    XtActionProc         arm_and_activate;
0068    XmSyntheticResource * syn_resources;   
0069    int                  num_syn_resources;   
0070    XtPointer            extension;
0071 } XmPrimitiveClassPart;
0072 
0073 typedef struct _XmPrimitiveClassRec
0074 {
0075     CoreClassPart        core_class;
0076     XmPrimitiveClassPart primitive_class;
0077 } XmPrimitiveClassRec;
0078 
0079 externalref XmPrimitiveClassRec xmPrimitiveClassRec;
0080 
0081 
0082 /*  The Primitive instance record  */
0083 
0084 typedef struct _XmPrimitivePart
0085 {
0086    Pixel   foreground;
0087 
0088    Dimension   shadow_thickness;
0089    Pixel   top_shadow_color;
0090    Pixmap  top_shadow_pixmap;
0091    Pixel   bottom_shadow_color;
0092    Pixmap  bottom_shadow_pixmap;
0093 
0094    Dimension   highlight_thickness;
0095    Pixel   highlight_color;
0096    Pixmap  highlight_pixmap;
0097 
0098    XtCallbackList help_callback;
0099    XtPointer      user_data;
0100 
0101    Boolean traversal_on;
0102    Boolean highlight_on_enter;
0103    Boolean have_traversal;
0104 
0105    unsigned char unit_type;
0106    XmNavigationType navigation_type;
0107 
0108    Boolean highlight_drawn;
0109    Boolean highlighted;
0110 
0111    GC      highlight_GC;
0112    GC      top_shadow_GC;
0113    GC      bottom_shadow_GC;
0114 
0115    /* New fields in Motif 2.0 */
0116 
0117 #ifndef XM_PART_BC
0118 
0119    XtCallbackList   convert_callback;       /* Selection convert callback */
0120    XtCallbackList   popup_handler_callback;
0121 
0122    XmDirection layout_direction;
0123 #endif
0124 #ifdef OM22_COMPATIBILITY
0125    XmString tool_tip_string;
0126 #endif
0127 } XmPrimitivePart;
0128 
0129 #ifdef XM_PART_BC
0130 extern XmDirection XmPrimLayoutDir ;
0131 #define XmPrim_layout_direction(w) (XmPrimLayoutDir)
0132 #else
0133 #define XmPrim_layout_direction(w) ((w)->primitive.layout_direction)
0134 #endif
0135 
0136 
0137 typedef struct _XmPrimitiveRec
0138 {
0139    CorePart        core;
0140    XmPrimitivePart primitive;
0141 } XmPrimitiveRec;
0142 
0143 
0144 #ifdef __cplusplus
0145 }  /* Close scope of 'extern "C"' declaration which encloses file. */
0146 #endif
0147 
0148 #endif /* _XmPrimitiveP_h */
0149 /* DON'T ADD ANYTHING AFTER THIS #endif */