Exemple #1
0
void
XltHelpOnStrokes(Widget W)
{
static Widget Dialog = NULL;
Widget Shell = W;

	while (!XtIsShell(Shell)) Shell = XtParent(Shell);
	if (Dialog == NULL)
	{
	XmString string;
	XtResource resources[] =
	{
	    {"messageString", "MessageString", XtRString, sizeof(String), XtOffset(AppResourcesPtr, DefaultHelpString), XtRImmediate, DefaultHelp},
	};
	    Dialog = XmCreateInformationDialog(Shell, "HelpOnStrokes", NULL, 0);
	    XtGetSubresources(W,
			      &AppResources,
			      XtName(Dialog),
			      XtClass(Dialog)->core_class.class_name,
			      resources,
			      XtNumber(resources),
			      NULL, 0);
	    string = XmStringCreateLtoR(AppResources.DefaultHelpString, XmFONTLIST_DEFAULT_TAG);
	    XtVaSetValues(Dialog,
		    XmNmessageString, string,
		    NULL);
	    XmStringFree(string);
	    XtUnmanageChild(XmMessageBoxGetChild(Dialog, XmDIALOG_HELP_BUTTON));
	}
	XtManageChild(Dialog);
}
Exemple #2
0
static void _VendorShellClassInitialize()
{
    static XtConvertArgRec screenConvertArg[] = {
        {XtWidgetBaseOffset, (caddr_t) XtOffset(Widget, core.screen),
	     sizeof(Screen *)}
    };

    XtAddConverter("String", "Cursor", XmuCvtStringToCursor,      
		   screenConvertArg, XtNumber(screenConvertArg));

    XtAddConverter("String", "Bitmap", XmuCvtStringToBitmap,
		   screenConvertArg, XtNumber(screenConvertArg));
}
Exemple #3
0
static MrmRegisterArg	callbackvec[] = {
{"setcolor_button_pressed",(caddr_t)setcolor_button_pressed},
{"toggle_button_pressed",(caddr_t)toggle_button_pressed},
{"color_selection_made",(caddr_t)color_selection_made},
{"create_colorform",(caddr_t)create_colorform},
{"destroy_colorform",(caddr_t)destroy_colorform},
{"scale_value_changed",(caddr_t)scale_value_changed},
{"exit_color",(caddr_t)exit_color},
{"load_rgb_text",(caddr_t)load_rgb_text}
};

static MrmCount callbacknum = sizeof(callbackvec) / sizeof(MrmRegisterArg);

static XtResource resources[] = {
{ XtNrgbTextFile, XtCRgbTextFile, XtRString, sizeof(String),
 XtOffset(ApplicationDataPtr,rgb_text_file),XtRString, "/usr/lib/X11/rgb.txt"}
};

Widget fetched;

typedef struct {
  int    item_to_adjust;
  char   colorname[40];
  char   redname[10];
  char   greenname[10];
  char   bluename[10];
  XColor color; 
  unsigned long fg_pixel;/* foreground   */
  unsigned long bg_pixel;/* background   */
  unsigned long ts_pixel;/* topshadow    */
  unsigned long bs_pixel;/* bottomshadow */
Exemple #4
0
                                     {"MouseUp", (XtActionProc)mouseUp}};

/*
 * Valid values for:
 * LBoxNlineMode: 0 (add), 1 (move), 2 (delete)
 * LBoxNleftMask: -FLT_MAX - FLT_MAX
 * LBoxNrightMask: -FLT_MAX - FLT_MAX
 * LBoxNshowLeftMask: False, True
 * LBoxNshowRightMask: False, True
 */

/* used to validate mode values */
static int mode_enums[] = {MODE_ADD, MODE_MOV, MODE_DEL, MODE_SHIFT, -1};

static XtResource resources[] = {
    {LBoxNlineMode, LBoxClineMode, XtRInt, sizeof(int), XtOffset(LineBoxWidget, lineBox.mode),
     XtRImmediate, (XtPointer)MODE_ADD},
    {LBoxNleftMask, LBoxCleftMask, XtRFloat, sizeof(float),
     XtOffset(LineBoxWidget, lineBox.leftMask), XtRFloat, (XtPointer)0},
    {LBoxNrightMask, LBoxCrightMask, XtRFloat, sizeof(float),
     XtOffset(LineBoxWidget, lineBox.rightMask), XtRFloat, (XtPointer)0},
    {LBoxNshowLeftMask, LBoxCshowLeftMask, XtRBool, sizeof(Bool),
     XtOffset(LineBoxWidget, lineBox.showLeftMask), XtRImmediate, (XtPointer)(False)},
    {LBoxNshowRightMask, LBoxCshowRightMask, XtRBool, sizeof(Bool),
     XtOffset(LineBoxWidget, lineBox.showRightMask), XtRImmediate, (XtPointer)(False)},
    {LBoxNhistXMin, LBoxChistXMin, XtRFloat, sizeof(float),
     XtOffset(LineBoxWidget, lineBox.hist_xMin), XtRFloat, (XtPointer)0},
    {LBoxNhistXMax, LBoxChistXMax, XtRFloat, sizeof(float),
     XtOffset(LineBoxWidget, lineBox.hist_xMax), XtRFloat, (XtPointer)0},
    {LBoxNhistYMin, LBoxChistYMin, XtRFloat, sizeof(float),
     XtOffset(LineBoxWidget, lineBox.hist_yMin), XtRFloat, (XtPointer)0},
Exemple #5
0
    int    marginWidth;
    int    marginHeight;
    int    leading;
    int    moveThreshold;
    int    initialDelay;
    int    repeatDelay;

    XmFontList userFont;
    Pixel  search_color;
  }
  DAArgs, *DAArgsPtr;

static XtResource Resources[] = {
   {
     "leading", "Leading", XmRInt, sizeof(int),
     XtOffset(DAArgsPtr, leading), XmRImmediate, (XtPointer) 1
   },
    
   {
     XmNmarginWidth, XmCMarginWidth, XmRInt, sizeof(int),
     XtOffset(DAArgsPtr, marginWidth), XmRImmediate, (XtPointer) 5
   },
    
   {
     XmNmarginHeight, XmCMarginHeight, XmRInt, sizeof(int),
     XtOffset(DAArgsPtr, marginHeight), XmRImmediate, (XtPointer) 5
   },

   {
     "moveThreshold", "MoveThreshold", XmRInt, sizeof(int),
     XtOffset(DAArgsPtr, moveThreshold), XmRImmediate, (XtPointer) 10
Exemple #6
0
static void    select_dial ();
static void    Initialize();
static void    Redisplay();
static void    Resize();
static void    Destroy();
static Boolean SetValues();

static char defaultTranslations[] = "<Btn1Down>: select()";

static XtActionsRec actionsList[] = {
  { "select",   (XtActionProc) select_dial},
};

static XtResource resources[] = {
  {XtNmarkers, XtCMarkers, XtRInt, sizeof (int),
    XtOffset(XsDialWidget, dial.markers), XtRString, "10"  },
  {XtNminimum, XtCMin, XtRInt, sizeof (int),
    XtOffset(XsDialWidget, dial.minimum), XtRString, "0"   },
  {XtNmaximum, XtCMax, XtRInt, sizeof (int),
    XtOffset(XsDialWidget, dial.maximum), XtRString, "100" },
  {XtNindicatorColor, XtCColor, XtRPixel, sizeof (Pixel),
    XtOffset(XsDialWidget, dial.indicator_color), 
    XtRString, "Black"                                     },
  {XtNposition, XtCPosition, XtRPosition, sizeof (Position),
    XtOffset(XsDialWidget, dial.position), XtRString, "0"  },
  {XtNmarkerLength,XtCLength,XtRDimension,sizeof (Dimension),
    XtOffset(XsDialWidget, dial.marker_length),
    XtRString, "5"                                         },
  {XtNforeground, XtCForeground, XtRPixel, sizeof (Pixel),
    XtOffset(XsDialWidget, dial.foreground), 
    XtRString, "Black"                                     },
Exemple #7
0
#define Y(y) (Dimension) ((X11_YMAX-1-y) * yscale)
enum JUSTIFY { LEFT, CENTRE, RIGHT } jmode;
#define Nbuf 1024
char buf[Nbuf];
String *commands = NULL;

typedef struct {       /* See "X Toolkit Intrinsics Programming Manual"      */
  XFontStruct *font;   /* Nye and O'Reilly, O'Reilly & Associates, pp. 80-85 */
  unsigned long fg;
  unsigned long bg;
  } RValues, *RVptr; 
RValues rv;

XtResource resources[] = {
   { XtNfont, XtCFont, XtRFontStruct, sizeof(XFontStruct *), 
     XtOffset(RVptr, font), XtRString, "fixed" },
   { XtNforeground, XtCForeground, XtRPixel, sizeof(Pixel), 
     XtOffset(RVptr, fg), XtRString, XtDefaultForeground },
   { XtNbackground, XtCBackground, XtRPixel, sizeof(Pixel), 
     XtOffset(RVptr, bg), XtRString, XtDefaultBackground },
   };

void RGB_values();

/*-----------------------------------------------------------------------------
 *   main program - fire up application and callbacks
 *---------------------------------------------------------------------------*/

int main(argc, argv) int argc; char *argv[]; {

   signal(SIGINT, SIG_IGN);
Exemple #8
0
  {GLwNginitCallback, GLwCCallback, XtRCallback, sizeof (XtCallbackList),
       offset(ginitCallback), XtRImmediate, (XtPointer) NULL},

  {GLwNinputCallback, GLwCCallback, XtRCallback, sizeof (XtCallbackList),
       offset(inputCallback), XtRImmediate, (XtPointer) NULL},

  {GLwNresizeCallback, GLwCCallback, XtRCallback, sizeof (XtCallbackList),
       offset(resizeCallback), XtRImmediate, (XtPointer) NULL},

  {GLwNexposeCallback, GLwCCallback, XtRCallback, sizeof (XtCallbackList),
       offset(exposeCallback), XtRImmediate, (XtPointer) NULL},

#ifdef __GLX_MOTIF
  /* Changes to Motif primitive resources */
  {XmNtraversalOn, XmCTraversalOn, XmRBoolean, sizeof (Boolean),
       XtOffset (GLwDrawingAreaWidget, primitive.traversal_on), XmRImmediate,
       (XtPointer) FALSE},
  
  /* highlighting is normally disabled, as when Motif tries to disable
   * highlighting, it tries to reset the color back to the parent's
   * background (usually Motif blue).  Unfortunately, that is in a
   * different colormap, and doesn't work too well.
   */
  {XmNhighlightOnEnter, XmCHighlightOnEnter, XmRBoolean, sizeof (Boolean),
       XtOffset (GLwDrawingAreaWidget, primitive.highlight_on_enter),
       XmRImmediate, (XtPointer) FALSE},
  
  {XmNhighlightThickness, XmCHighlightThickness, XmRHorizontalDimension,
       sizeof (Dimension),
       XtOffset (GLwDrawingAreaWidget, primitive.highlight_thickness),
       XmRImmediate, (XtPointer) 0},
Exemple #9
0
#include "display.h"
#include "w_file.h"
#include "w_display.h"
#include "w_dialog.h"
#include "xt_env.h"


AppData	App_Data;	/* global data settable by user resources	*/

/*
 * resources returned in App_data
 */
static  XtResource      resources[] = {
        {
	XtNfont, XtCFont, XtRFontStruct, sizeof (XFontStruct *),
                XtOffset(AppDataPtr, x_font), XtRString, "Fixed" 
	},
        {
	"fileSelectAction", "FileSelectAction", XtRString, sizeof(XFontStruct*),
                XtOffset(AppDataPtr, select_action), XtRString, NULL 
	},
        {
	"translatorFont", "TranslatorFont", XtRString, sizeof (char *),
                XtOffset(AppDataPtr, font), XtRString, "font1" 
	},
        {
	"translatorDevice", "TranslatorDevice", XtRString, sizeof (char *),
                XtOffset(AppDataPtr, device), XtRString, "X11" 
	},
        {
	"history", "History", XtRBoolean, sizeof (Boolean),
Exemple #10
0
static void _GetRowValue(XmLGridWidget g, XmLGridRow r,
	XtArgVal value, long mask);
static int _SetRowValues(XmLGridWidget g, XmLGridRow r, long mask);
static int _SetCellValuesResize(XmLGridWidget g, XmLGridRow row,
	XmLGridColumn col, XmLGridCell cell, long mask);

static void GetManagerForeground(Widget w, int, XrmValue *value);
static void CreateDefaultPixmaps(XmLTreeWidget t);
static XmLTreeWidget WidgetToTree(Widget w, char *funcname);

static XtResource resources[] =
	{
		{
		XmNcollapseCallback, XmCCallback,
		XmRCallback, sizeof(XtCallbackList),
		XtOffset(XmLTreeWidget, tree.collapseCallback),
		XmRImmediate, (XtPointer)0,
		},
		{
		XmNconnectingLineColor, XmCConnectingLineColor,
		XmRPixel, sizeof(Pixel),
		XtOffset(XmLTreeWidget, tree.lineColor),
		XmRCallProc, (XtPointer)GetManagerForeground,
		},
		{
		XmNexpandCallback, XmCCallback,
		XmRCallback, sizeof(XtCallbackList),
		XtOffset(XmLTreeWidget, tree.expandCallback),
		XmRImmediate, (XtPointer)0,
		},
		{
Exemple #11
0
 *  Procedure declarations
 *
 ***************************************************************************/


/***************************************************************************
 *
 *  Global variables
 *
 ***************************************************************************/

        LogoInfo logoInfo;	/* logo resources			   */

static	XtResource logoResources[] = {
    {"bitmapFile", "BitmapFile",
	XtRString, sizeof(char *), XtOffset(LogoInfoPtr, bitmapFile),
#ifdef __osf__
        XtRString, "DECDtlogo"                                          },
#else
	XtRString, "Dtlogo"						},
#endif
};

 
/***************************************************************************
 *
 *  MakeLogo
 *
 *  make DT logo
 *
 *  Widgets: logo, logo_pixmap
Exemple #12
0
/*+++++++++++++++++++++++++++++++++++++++*/


/*+++++++++++++++++++++++++++++++++++++++*/
/* Internal Variables                    */
/*+++++++++++++++++++++++++++++++++++++++*/


/*++++++++++++++++++++++++++++++++++++++*/
/* Application Resources                */
/*++++++++++++++++++++++++++++++++++++++*/

XtResource sysFont_resources[] = {

  {"systemFont1", "SystemFont1", XmRFontList, sizeof (XmFontList), 
      XtOffset(ApplicationDataPtr, fontChoice[0].sysFont), XmRString, 
      "-adobe-helvetica-medium-r-normal--10-*-iso8859-1"
  },
  {"systemFont2", "SystemFont2", XmRFontList, sizeof (XmFontList), 
      XtOffset(ApplicationDataPtr, fontChoice[1].sysFont), XmRString, 
      "-adobe-helvetica-medium-r-normal--12-*-iso8859-1"
  },
  {"systemFont3", "SystemFont3", XmRFontList, sizeof (XmFontList), 
      XtOffset(ApplicationDataPtr, fontChoice[2].sysFont), XmRString,
      "-adobe-helvetica-medium-r-normal--14-*-iso8859-1"
  },
  {"systemFont4", "SystemFont4", XmRFontList, sizeof (XmFontList), 
      XtOffset(ApplicationDataPtr, fontChoice[3].sysFont), XmRString,
      "-adobe-helvetica-medium-r-normal--17-*-iso8859-1"
  },
  {"systemFont5", "SystemFont5", XmRFontList, sizeof (XmFontList), 
Exemple #13
0
     XtOffsetOf(struct _WorkAreaRec, workArea.auto_resize_width),
     XtRImmediate, (XtPointer) TRUE
   },
   { GuiNisList, XtCBoolean, XtRBoolean, sizeof(Boolean),
     XtOffsetOf(struct _WorkAreaRec, workArea.is_list),
     XtRImmediate, (XtPointer) FALSE
   }
};


/*  WorkArea Children Resources */

static XtResource workAreaConstraintResources[] =
{
   { GuiNsuperNode, GuiCSuperNode, XtRPointer, sizeof(Widget),
     XtOffset(WorkAreaConstraints, workArea.super_node), XtRPointer, NULL
   },
   { XmNorientation, XmCOrientation, XmROrientation, sizeof(unsigned char),
     XtOffset(WorkAreaConstraints, workArea.orientation),
     XtRImmediate, (XtPointer) XmVERTICAL
   },
   { GuiNisTransient, XtCBoolean, XtRBoolean, sizeof(Boolean),
     XtOffset(WorkAreaConstraints, workArea.is_transient),
     XtRImmediate, (XtPointer) FALSE
   },
   { GuiNisWorkArea, XtCBoolean, XtRBoolean, sizeof(Boolean),
     XtOffset(WorkAreaConstraints, workArea.is_workArea),
     XtRImmediate, (XtPointer) FALSE
   },
   { GuiNisOpened, XtCBoolean, XtRBoolean, sizeof(Boolean),
     XtOffset(WorkAreaConstraints, workArea.is_opened),
Exemple #14
0
  {"focusIn", (XtActionProc) _XwPrimitiveFocusIn},
  {"focusOut", (XtActionProc) _XwPrimitiveFocusOut},
  {"visibility", (XtActionProc) _XwPrimitiveVisibility},
  {"unmap", (XtActionProc) _XwPrimitiveUnmap},
};


/*  Resource definitions for Subclasses of Primitive */

static Cursor defaultCursor = None;

static XtResource resources[] =
{
   {
     XtNforeground, XtCForeground, XtRPixel, sizeof (Pixel),
     XtOffset (XwPrimitiveWidget, primitive.foreground),
     XtRString, "XtDefaultForeground"
   },

   {
     XtNbackgroundTile, XtCBackgroundTile, XtRTileType, sizeof (int),
     XtOffset (XwPrimitiveWidget, primitive.background_tile),
     XtRString, "background"
   },

   {
     XtNcursor, XtCCursor, XtRCursor, sizeof (Cursor),
     XtOffset (XwPrimitiveWidget, primitive.cursor),
     XtRCursor, (caddr_t) &defaultCursor
   },
Exemple #15
0
static Dimension default_width = 400;
static Dimension default_height = 250;
static int default_colors = 250;
static int default_hues = 250;
static char default_spectrum[] = 
 "blue-aquamarine-cyan-medium sea green-forest green-lime green-\
yellow green-yellow-coral-pink-black";
static Bool default_bw = False;
static Bool default_wrap = False;


static XtResource resources[] = 
{
  /* Core resources */
  { XtNwidth, XtCWidth, XtRDimension, sizeof(Dimension),
      XtOffset(Widget, core.width), XtRDimension, 
      (caddr_t) &default_width },
  { XtNheight, XtCHeight, XtRDimension, sizeof(Dimension),
      XtOffset(Widget, core.height), XtRDimension, 
      (caddr_t) &default_height },
  /* Noncore resources */
  { XtNSpectrum, XtCString, XtRString, sizeof(String),
      XtOffset(MamaWidget, mama.spectrum), XtRString,
      default_spectrum },
  { XtNColours, XtCValue, XtRInt, sizeof(int),
      XtOffset(MamaWidget, mama.n_colours), XtRInt,
      (caddr_t) &default_colors },
  { XtNHues, XtCValue, XtRInt, sizeof(int),
      XtOffset(MamaWidget, mama.n_hues), XtRInt,
      (caddr_t) &default_hues },
  { XtNBw, XtCValue, XtRBool, sizeof(Bool),
Exemple #16
0
static int my_error_handler(Display * display, XErrorEvent * xev);
static int (*error_old_handler) (Display *, XErrorEvent *);

static XtResource resources[] = {
#define offset(field) XtOffset(ExternalClientWidget, externalClient.field)
	{XtNshellTimeout, XtCShellTimeout,
	 XtRInt, sizeof(int),
	 offset(shell_timeout), XtRImmediate, (XtPointer) DEFAULT_WM_TIMEOUT},
	{XtNdeadShell, XtCDeadShell,
	 XtRBoolean, sizeof(Boolean),
	 offset(dead_shell), XtRImmediate, (XtPointer) False}
	,
#ifdef EXTW_USES_MOTIF
	{XmNnavigationType, XmCNavigationType,
	 XmRNavigationType, sizeof(XmNavigationType),
	 XtOffset(ExternalClientWidget, primitive.navigation_type),
	 XtRImmediate, (XtPointer) XmTAB_GROUP}
	,
#endif
	{XtNemacsProcID, XtCEmacsProcID,
	 XtRString, sizeof(String),
	 offset(emacs_procid), XtRImmediate, (XtPointer) NULL}
	,
	{XtNshellReadyCallback, XtCCallback,
	 XtRCallback, sizeof(XtCallbackList),
	 offset(shell_ready_callback), XtRImmediate, (XtPointer) NULL}
	,
	{XtNshellName, XtCShellName,
	 XtRString, sizeof(String),
	 offset(shell_name), XtRImmediate, (XtPointer) NULL}
};
Exemple #17
0
static AppResources_t AppResources;
static void InputAction(Widget W, XEvent *event);
static void ParentActivate(Widget w, XEvent *event, String *params, Cardinal *num_params);
static void ParentCancel(Widget w, XEvent *event, String *params, Cardinal *num_params);

static XtActionsRec Actions[] =
{
	{"Input", (XtActionProc)InputAction},
	{"StrokeInput", (XtActionProc)InputAction},
	{"ParentActivate", ParentActivate},
	{"ParentCancel", ParentCancel},
};

static XtResource resources[] =
{
	{"strokes", "Strokes", XtRString, sizeof(String), XtOffset(StrokeStatePtr, translations), XtRString, ""},
	{"strokeSound", "StrokeSound", XtRString, sizeof(String), XtOffset(StrokeStatePtr, Sound), XtRImmediate, NULL},
	{"strokeSlop", "StrokeSlop", XtRInt, sizeof(int), XtOffset(StrokeStatePtr, slop), XtRImmediate, (XtPointer)20},
	{"strokeDebug", "StrokeDebug", XtRBoolean, sizeof(Boolean), XtOffset(StrokeStatePtr, Debug), XtRImmediate, (XtPointer)False},
};

static StrokeStatePtr StrokeStateList = NULL;
static StrokeStatePtr StrokeMapList = NULL;

/* ***** */

static void 
CompileTranslations(StrokeStatePtr State)
{
	StrokeMapPtr NewMap;
	String StrokeName;
Exemple #18
0
extern int SFchdir(char *);
void SFvSliderMovedCallback(Widget, int, int);

typedef struct {
	char *fontname;
} TextData, *textPtr;

int SFcharWidth, SFcharAscent, SFcharHeight;

int SFcurrentInvert[3] = { -1, -1, -1 };

static GC SFlineGC, SFscrollGC, SFinvertGC, SFtextGC;

static XtResource textResources[] = {
	{XtNfont, XtCFont, XtRString, sizeof (char *),
		XtOffset(textPtr, fontname), XtRString, SF_DEFAULT_FONT},
};

static XFontStruct *SFfont;

static int SFcurrentListY;

static XtIntervalId SFscrollTimerId;

void
SFinitFont()
{
	TextData	*data;

	data = XtNew(TextData);
Exemple #19
0
typedef struct {
    Boolean help;
    float gamma;
    Boolean usePixmap;
    int viewportWidth;
    int viewportHeight;
    int translate;
    Boolean verbose;
} AppData, *AppDataPtr;

AppData appData;

XtResource clientResources[] = {
    {
        "help", XtCBoolean, XtRBoolean, sizeof(Boolean),
        XtOffset(AppDataPtr, help), XtRImmediate, (XtPointer) False
    }, {
        "gamma", "Gamma", XtRFloat, sizeof(float),
        XtOffset(AppDataPtr, gamma), XtRString, (XtPointer) TIFF_GAMMA
    }, {
        "usePixmap", "UsePixmap", XtRBoolean, sizeof(Boolean),
        XtOffset(AppDataPtr, usePixmap), XtRImmediate, (XtPointer) True
    }, {
        "viewportWidth", "ViewportWidth", XtRInt, sizeof(int),
        XtOffset(AppDataPtr, viewportWidth), XtRImmediate,
        (XtPointer) VIEWPORT_WIDTH
    }, {
        "viewportHeight", "ViewportHeight", XtRInt, sizeof(int),
        XtOffset(AppDataPtr, viewportHeight), XtRImmediate,
        (XtPointer) VIEWPORT_HEIGHT
    }, {
Exemple #20
0
                      ((ptr->class == CLASS_S) || (ptr->class == CLASS_D)) )

/*------------------------------------------------------------------------------

 Local variables:                                                             */

static char *cvsrev = "@(#)$RCSfile$ $Revision$ $Date$";
static struct descriptor_xd const empty_xd = {0, DTYPE_DSC, CLASS_XD, 0, 0};
/*------------------------------------------------------------------------------

 Global variables:                                                            */

static void Focus_In(Widget w,XEvent *event,String *params,Cardinal num_params);
static XtActionsRec actions[] = {{"Focus_In", (XtActionProc) Focus_In}};
static XtResource resources[] = {
  {XmdsNxd, "Xd", XtRPointer, sizeof(struct descriptor_xd *), XtOffset(XmdsExprWidget, expr.xd), XtRImmediate, (void *)0},
  {XmdsNdefaultNid, "Nid", XtRInt, sizeof(int), XtOffset(XmdsExprWidget, expr.default_nid), XtRImmediate, (XtPointer) -1},
  {XmdsNnid, "Nid", XtRInt, sizeof(int), XtOffset(XmdsExprWidget, expr.nid), XtRImmediate, (XtPointer)0},
  {XmdsNnidOffset, "NidOffset", XtRInt, sizeof(int), XtOffset(XmdsExprWidget, expr.nid_offset), XtRImmediate, (XtPointer)0},
  {XmdsNcompile,"Compile",XtRFunction,sizeof(int (*)()),XtOffset(XmdsExprWidget,expr.compile),XtRImmediate, (XtPointer)TdiCompile},
  {XmdsNdecompile,"Decompile",XtRFunction,sizeof(int (*)()),XtOffset(XmdsExprWidget,expr.decompile),XtRImmediate,(XtPointer) TdiDecompile},
  {XmdsNautoQuote, "AutoQuote", XtRBoolean, sizeof(Boolean), XtOffset(XmdsExprWidget, expr.auto_quote), XtRImmediate, (XtPointer) False},
  {XmdsNdefaultQuote, "DefaultQuote", XtRBoolean, sizeof(Boolean), XtOffset(XmdsExprWidget, expr.default_quote), XtRImmediate, 
   (XtPointer) True},
  {XmdsNputOnApply, "PutOnApply", XtRBoolean, sizeof(Boolean), XtOffset(XmdsExprWidget, expr.put_on_apply), XtRImmediate, (XtPointer) True}
};

static CompositeClassExtensionRec composite_extension = {
     /* next extension          */ NULL,
     /* record type             */ NULLQUARK,
     /* version                 */ XtCompositeExtensionVersion,
Exemple #21
0
/****************************************************************
 *
 * Full instance record declaration
 *
 ****************************************************************/

typedef  struct {
	CorePart 	core;
	CompositePart 	composite;
	TopLevelPart 	top;
} TopLevelRec, *TopLevelWidget;

static XtResource resources[]=
{
	{ XtNiconName, XtCIconPixmap, XrmRString, sizeof(caddr_t),
	    XtOffset(TopLevelWidget, top.icon_name), XrmRString, (caddr_t) NULL},
	{ XtNiconPixmap, XtCIconPixmap, XrmRPixmap, sizeof(caddr_t),
	    XtOffset(TopLevelWidget, top.icon_pixmap), XrmRPixmap, 
	    (caddr_t) NULL},
	{ XtNiconWindow, XtCIconWindow, XrmRWindow, sizeof(caddr_t),
	    XtOffset(TopLevelWidget, top.icon_window), XrmRWindow, 
	    (caddr_t) NULL},
	{ XtNallowtopresize, XtCAllowtopresize, XrmRBoolean, sizeof(Boolean),
	    XtOffset(TopLevelWidget, top.resizeable), XrmRString, "FALSE"},
	{ XtNgeometry, XtCGeometry, XrmRString, sizeof(caddr_t), 
	    XtOffset(TopLevelWidget, top.geostr), XrmRString, (caddr_t) NULL},
	{ XtNinput, XtCInput, XrmRBoolean, sizeof(Boolean),
	    XtOffset(TopLevelWidget, top.input), XrmRString, "FALSE"},
	{ XtNiconic, XtCIconic, XrmRBoolean, sizeof(Boolean),
	    XtOffset(TopLevelWidget, top.iconic), XrmRBoolean, "FALSE"},
	{ XtNtitle, XtCTitle, XrmRString, sizeof(char *),
Exemple #22
0
Widget options_last_dt;         /* user's last dt                         */



Widget lang_menu = NULL;	/* cascading menu on "Language" option	   */
Widget session_menu = NULL;     /* cascading menu on "Session" option      */

Widget chooser_list;		/* list of hosts displayed by chooser      */
Widget list_head;		/* the heading for the chooser list        */



static
    XtResource AppResources[] = {
    { "workspaceCursor", "WorkspaceCursor", 
	XtRBoolean, sizeof(Boolean), XtOffset(AppInfoPtr, workspaceCursor),
	XtRImmediate, (caddr_t)False					},

    { "labelFont", "LabelFont", 
	XmRFontList, sizeof(XmFontList), XtOffset(AppInfoPtr, labelFont),
	XmRString, "Fixed"						},

    { "textFont", "TextFont", 
	XmRFontList, sizeof(XmFontList), XtOffset(AppInfoPtr, textFont),
	XmRString, "Fixed"						},

    { "chlistFont", "ChlistFont",
        XmRFontList, sizeof(XmFontList), XtOffset(AppInfoPtr, chlistFont),
        XmRString, "Fixed"                                              },

    { "optionsDelay", "OptionsDelay", 
Exemple #23
0
} ApplicationData, *ApplicationDataPtr;

ApplicationData AppData;

#define XtNfontPattern "fontPattern"
#define XtCFontPattern "FontPattern"
#define XtNmaxFont     "maxFont"
#define XtCMaxFont     "MaxFont"
#define XtNmaxLen      "maxLen"
#define XtCMaxLen      "MaxLen"
#define XtNuseGadget   "useGadget"
#define XtCUseGadget   "UseGadget"

static XtResource resources[] = {
  { XtNfontPattern, XtCFontPattern, XmRString, sizeof(String),
    XtOffset(ApplicationDataPtr, fontpattern), XmRString, "*" },
  { XtNmaxFont, XtCMaxFont, XmRInt, sizeof(int),
    XtOffset(ApplicationDataPtr, maxfont), XmRImmediate, (caddr_t) 1000 },
  { XtNmaxLen, XtCMaxLen, XmRInt, sizeof(int),
    XtOffset(ApplicationDataPtr, maxlen), XmRImmediate, (caddr_t) 10 },
  { XtNuseGadget, XtCUseGadget, XmRBoolean, sizeof (Boolean),
    XtOffset(ApplicationDataPtr, usegadget), XmRImmediate, (caddr_t) TRUE }
};

/*-------------------------------------------------------------
**	main		- main logic for application
*/
int main (argc,argv) 
	int		argc;
	char 		**argv;
{
Exemple #24
0
#define BOTLABEL 1

typedef struct {
    int time;
    Boolean autoExit;
} AppResources_t, *AppResourcesPtr;
AppResources_t AppResources;

static String FallBack[] = {
    "*geometry: +500+500",
    "*borderWidth: 1",
    NULL
};

static XtResource resources[] = {
    {"time","time",XtRInt,sizeof(int),XtOffset(AppResourcesPtr,time),XtRImmediate, (void *)1000},
    {"autoExit","autoExit",XtRBoolean,sizeof(Boolean),XtOffset(AppResourcesPtr,autoExit),XtRImmediate, (void *)False},
};

static XrmOptionDescRec opTable[] = {
    {"-time",".time",XrmoptionSepArg, NULL},
    {"-autoExit",".autoExit",XrmoptionNoArg, "True"},
};


Boolean GlobalResult1 = True;
XtWidgetGeometry *ExpectedResults;

XtAppContext app;

static void FinishTest(Widget W);
#define XtNgutterWidth  "gutterWidth"
#define XtCGutterWidth  "GutterWidth"
#define XtNkeycapColor  "keycapColor"
#define XtNkeycodeColor "keycodeColor"
#define XtNkeycapFont   "keycapFont"
#define XtNkeycodeFont  "keycodeFont"
#define XtNcursorFont   "cursorFont"

#ifndef CURSORFONT
#define CURSORFONT "cursor"
#endif

static XtResource key_resources [] = {
  { XtNhighlight, XtCBackground, XtRPixel, sizeof (String),
      XtOffset (KeyWidget, key.highlight_pixel), XtRString,
      XtDefaultBackground },
  { XtNgutterWidth, XtCGutterWidth, XtRInt, sizeof (int),
      XtOffset (KeyWidget, key.gutter_width), XtRString, "3" },
  { XtNkeycapColor, XtCForeground, XtRPixel, sizeof (String),
      XtOffset (KeyWidget, key.keycap_pixel), XtRString,
      XtDefaultForeground },
  { XtNkeycodeColor, XtCForeground, XtRPixel, sizeof (String),
      XtOffset (KeyWidget, key.keycode_pixel), XtRString,
      XtDefaultForeground },
  { XtNkeycapFont, XtCFont, XtRFontStruct, sizeof (String),
      XtOffset (KeyWidget, key.keycap_font),
      XtRString, "*-helvetica-bold-r-*-*-*-100-*-*-*-*-*-*" },
  { XtNkeycodeFont, XtCFont, XtRFontStruct, sizeof (String),
      XtOffset (KeyWidget, key.keycode_font),
      XtRString, "*-courier-medium-r-*-*-*-100-*-*-*-*-*-*" },
Exemple #26
0
#include <stdio.h>

#define INITIAL_WIDTH 300
#define INITIAL_HEIGHT 300

/************************************************************************
 *                                                                      *
 * scrollBox Resources                                                  *
 *                                                                      *
 ************************************************************************/

static XtResource resources[] = 
{
    { XtNhSpace, XtCHSpace, XtRDimension, sizeof(Dimension),
        XtOffset(ScrollBoxWidget, scrollBox.h_space), 
        XtRImmediate, (XtPointer)4 },
    { XtNvSpace, XtCVSpace, XtRDimension, sizeof(Dimension),
        XtOffset(ScrollBoxWidget, scrollBox.v_space), 
        XtRImmediate, (XtPointer)4 },
    { XtNheightInc, XtCHeightInc, XtRDimension, sizeof(Dimension),
        XtOffset(ScrollBoxWidget, scrollBox.increment_height), 
        XtRImmediate, (XtPointer)13 },
    { XtNwidthInc, XtCWidthInc, XtRDimension, sizeof(Dimension),
        XtOffset(ScrollBoxWidget, scrollBox.increment_width), 
        XtRImmediate, (XtPointer)7 },
};

/************************************************************************
 *                                                                      *
 * Full class record constant                                           *
Exemple #27
0
static XtActionsRec actionsList[] =
{
  { "Arm", 	   (XtActionProc) Arm	    },
  { "Activate",    (XtActionProc) Activate  },
  { "Disarm", 	   (XtActionProc) Disarm    },
  { "Enter",       (XtActionProc) Enter     },
  { "Leave",       (XtActionProc) Leave     },
  { "Help",        (XtActionProc) Help	    }
};

static XtResource resources[] =
{
   {
     XmNshadowThickness, XmCShadowThickness, XmRShort, sizeof (short),
     XtOffset (XmPrimitiveWidget, primitive.shadow_thickness),
     XmRImmediate, (caddr_t) 2
   },

   {
     XmNiconOffset, XmCIconOffset, XmRShort, sizeof(short),
     XtOffset (IconWidget, icon.offset),
     XmRImmediate, (caddr_t) 0
   },

   {
     XmNshadowType, XmCShadowType, XmRShadowType, sizeof(unsigned char),
     XtOffset (IconWidget, icon.shadow_type),
     XmRImmediate, (caddr_t) XmSHADOW_OUT
   },
Exemple #28
0
	"*logWindow.width: 400",
	"*logWindow.height: 90",
	"*logWindow.scrollHorizontal: Always",
	"*logWindow.scrollVertical: Always",
	0
};

typedef struct {
	Bool mono;			/* force monochrome display */
} app_res_t, *app_resp_t;

static app_res_t app_res;

static XtResource res_list[] = {
	{ "monochrome", "Monochrome", XtRBool, sizeof(Bool),
		XtOffset(app_resp_t, mono), XtRString, "off" },
};

static XrmOptionDescRec knownargs[] = {
	{ "-mono", ".monochrome", XrmoptionNoArg, "on" },
	{ "+mono", ".monochrome", XrmoptionNoArg, "off" },
};

char *pvmgetrsh();

void pvm_cb();
void quit_cb();


hostcount()
{
Exemple #29
0
  XtWidgetGeometry *);
static void resize (KinoWidget, int, int);

static void KinoCvtStringToFontFamily (XrmValue *, Cardinal *, 
  XrmValue *, XrmValue *);

/* local variables */

static XtResource resources[] =
{
  {
    XtNtext,
    XtCString,
    XtRString,
    sizeof (String),
    XtOffset (KinoWidget, kino.text),
    XtRString,
    NULL
  },
  {
    XtNhtmlTitle,
    XtCReadOnly,
    XtRString,
    sizeof (String),
    XtOffset (KinoWidget, kino.title),
    XtRString,
    NULL
  },
  {
    XtNscriptCallback,
    XtCCallback,
Exemple #30
0
Author:  Dave Hale, Colorado School of Mines, 08/28/90
*******************************************************************************
Modified:  Craig Artley, Colorado School of Mines, 06/03/93, Rotate label for
	   vertical axis (Courtesy Dave Hale, Advance Geophysical).
******************************************************************************/
/**************** end self doc ********************************/



#include "Xtcwp/Xtcwp.h"
#include "Xtcwp/AxesP.h"

/* resources */
static XtResource resources[] = {
    {   XtNgrid1,XtcwpCAxesGrid,XtcwpRAxesGrid,sizeof(int),
        XtOffset(XtcwpAxesWidget,axes.grid1),
        XtRString,"none"
    },
    {   XtNgrid2,XtcwpCAxesGrid,XtcwpRAxesGrid,sizeof(int),
        XtOffset(XtcwpAxesWidget,axes.grid2),
        XtRString,"none"
    },
    {   XtNnTic1,XtCParameter,XtRInt,sizeof(int),
        XtOffset(XtcwpAxesWidget,axes.n1tic),
        XtRString,"1"
    },
    {   XtNnTic2,XtCParameter,XtRInt,sizeof(int),
        XtOffset(XtcwpAxesWidget,axes.n2tic),
        XtRString,"1"
    },
    {   XtNlabel1,XtCString,XtRString,sizeof(String),