The great includes migration of 2019 (autotools)

Ok - so one of the steps in building CDE is an early phase called the
includes phase (make includes).  At this point, all of the public
header files are exported to exports/include/Dt, DtI, ...

Then, the software is built using that include dir.

This of course does not work in autotools.  Much of the software does
things like #include <Dt/something.h>, so in order for the build to
succeed, this behavior must be represented/replicated in some way.

It seems the usual way of dealing with this is to place all public
headers (and in some projects, ALL headers) into a toplevel include
directory.

We now do this for all public headers - they have been moved from
wherever they were and placed in the appropriate spot in includes/

This will break the Imake 'make includes' phase unless the Imakefiles
are fixed (remove the HEADERS = stuff, and the incdir defines).  This
has not been done at this point since in reality, once autotools works
properly, there will be no need for the Imake stuff anymore, and I
intend to get rid of it.

This is just a warning for now - Imake builds in this tree will now
fail at the 'includes' stage.

This commit is only the migration.  In upcoming commits, libtt will be
fixed so that the hack being used before to get around this problem is
removed as there will no longer be any need.

And then the autotools work continues...
This commit is contained in:
Jon Trulson
2019-10-25 17:01:34 -06:00
parent 7c2983185d
commit 369308b737
180 changed files with 1 additions and 30 deletions

139
cde/include/Dt/Action.h Normal file
View File

@@ -0,0 +1,139 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $TOG: Action.h /main/4 1998/05/06 15:55:18 rafi $ */
/*
* (c) Copyright 1993, 1994 Hewlett-Packard Company
* (c) Copyright 1993, 1994 International Business Machines Corp.
* (c) Copyright 1993, 1994 Sun Microsystems, Inc.
* (c) Copyright 1993, 1994 Novell, Inc.
*/
#ifndef _Dt_Action_h
#define _Dt_Action_h
#include <X11/Intrinsic.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* Argument types
*/
#define DtACTION_FILE 1 /* file argument */
#define DtACTION_BUFFER 2 /* buffer argument */
#define DtACTION_STRING 3 /* string argument */
#define DtACTION_NULLARG 4 /* untyped return-only argument */
typedef struct {
void *bp; /* location of buffer */
int size; /* size of buffer in bytes */
char *type; /* (opt.) type of buffer */
char *name; /* (opt.) name of buffer object */
Boolean writable; /* allow changes to buffer object? */
} DtActionBuffer;
typedef struct {
char *name;
} DtActionFile;
typedef struct {
/*
* Structure containing argument information
*/
int argClass; /* see argument types */
union {
DtActionFile file;
DtActionBuffer buffer;
} u;
} DtActionArg;
/*
* DtActionStatus codes
*/
typedef enum {
DtACTION_OK, /* If not any of the below */
DtACTION_INVALID_ID, /* ID is not valid */
DtACTION_INVOKED, /* the action invocation step is done */
DtACTION_STATUS_UPDATE, /* status update */
DtACTION_DONE, /* normal action termination code */
DtACTION_FAILED, /* error running action */
DtACTION_CANCELED /* normal action termination by cancel*/
} DtActionStatus;
typedef void (*DtDbReloadCallbackProc)(
XtPointer clientData);
/*
* DtActionInvocationID is the fundamental user-space handle to invoked
* actions.
*/
typedef unsigned long DtActionInvocationID;
typedef void (*DtActionCallbackProc) (
DtActionInvocationID id,
XtPointer client_data,
DtActionArg *actionArgPtr,
int actionArgCount,
DtActionStatus status);
/*
* Functions
*/
extern Boolean DtActionExists(
char *actionName);
extern char * DtActionLabel(
char *actionName);
extern char * DtActionDescription(
char *actionName);
extern void DtDbReloadNotify (
DtDbReloadCallbackProc proc,
XtPointer clientData);
extern void DtDbLoad(void);
extern DtActionInvocationID DtActionInvoke (
Widget w,
char *action,
DtActionArg *args,
int argCount,
char *termOpts,
char *execHost,
char *contextDir,
int useIndicator,
DtActionCallbackProc statusUpdateCb,
XtPointer client_data);
extern char * DtActionIcon(
char *actionName);
#ifdef __cplusplus
}
#endif
#endif /* _Dt_Action_h */

241
cde/include/Dt/ActionDb.h Normal file
View File

@@ -0,0 +1,241 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/*****************************************************************************
*
* File: ActionDb.h
* RCS: $XConsortium: ActionDb.h /main/3 1995/10/26 14:58:38 rswiston $
* Description: Internal header file for the action database functions.
* Language: C
* Package: N/A
* Status: Experimental (Do Not Distribute)
*
*
** (c) Copyright 1993, 1994 Hewlett-Packard Company
** (c) Copyright 1993, 1994 International Business Machines Corp.
** (c) Copyright 1993, 1994 Sun Microsystems, Inc.
** (c) Copyright 1993, 1994 Novell, Inc.
*****************************************************************************/
#ifndef _Dt_ActionDb_h
#define _Dt_ActionDb_h
/*
* The following constants are used by the database parsing code to
* identify the field names for an action definition.
*
* Recognized Field names for any action definition.
*/
#define _DtACTION_NAME "ACTION"
#define _DtACTION_TYPE "TYPE"
#define _DtACTION_LABEL "LABEL"
#define _DtACTION_ARG_CLASS "ARG_CLASS"
#define _DtACTION_ARG_MODE "ARG_MODE"
#define _DtACTION_ARG_TYPE "ARG_TYPE"
#define _DtACTION_ARG_COUNT "ARG_COUNT"
#define _DtACTION_DESCRIPTION "DESCRIPTION"
#define _DtACTION_ICON "ICON"
#define _DtACTION_INSTANCE_ICON "INSTANCE_ICON"
/*
* Miscellaneous syntax strings
*/
#define _DtACT_ANY "*"
#define _DtACT_LIST_SEPARATOR_CHAR ','
#define _DtACT_GT_CHAR '>'
#define _DtACT_LT_CHAR '<'
/*
* Valid values for ACTION_TYPE
*/
#define _DtACTION_MAP "MAP"
#define _DtACTION_COMMAND "COMMAND"
#define _DtACTION_TT_MSG "TT_MSG"
#ifdef _DT_ALLOW_DT_MSGS
#define _DtACTION_DT_REQUEST "DT_REQUEST"
#define _DtACTION_DT_NOTIFY "DT_NOTIFY"
#endif /* _DT_ALLOW_DT_MSGS */
/*
* Field names for "MAP" type actions
*/
#define _DtACTION_MAP_ACTION "MAP_ACTION"
/*
* Field names for the "COMMAND" type actions.
*/
#define _DtACTION_EXEC_STRING "EXEC_STRING"
#define _DtACTION_EXEC_HOST "EXEC_HOST"
#define _DtACTION_CWD "CWD"
#define _DtACTION_WINDOW_TYPE "WINDOW_TYPE"
#define _DtACTION_TERM_OPTS "TERM_OPTS"
/*
* Field names for "TT_MSG" type actions
*/
#define _DtACTION_TT_CLASS "TT_CLASS"
#define _DtACTION_TT_SCOPE "TT_SCOPE"
#define _DtACTION_TT_OPERATION "TT_OPERATION"
#define _DtACTION_TT_FILE "TT_FILE"
/* definitions to decifer TT_ARGn_* fields */
#define _DtACTION_TTN_ARG "TT_ARG"
#define _DtACTION_TTN_MODE "_MODE"
#define _DtACTION_TTN_VTYPE "_VTYPE"
#define _DtACTION_TTN_REP_TYPE "_REP_TYPE"
#define _DtACTION_TTN_VALUE "_VALUE"
#ifdef _DT_ALLOW_DT_MSGS
/*
* Field names for "DT_REQUEST" type actions
*/
#define _DtACTION_DT_REQUEST_NAME "DT_REQUEST_NAME"
#define _DtACTION_DT_SVC "DT_SVC"
/*
* Field names for "DT_NOTIFY" type actions
*/
#define _DtACTION_DT_NOTIFY_NAME "DT_NOTIFY_NAME"
#define _DtACTION_DT_NGROUP "DT_NGROUP"
/*
* Field names for DT ARGn (either request or notify)
*/
#define _DtACTION_DTN_ARG "DT_ARG"
#define _DtACTION_DTN_VALUE "_VALUE"
#endif /* _DT_ALLOW_DT_MSGS */
/*
* Valid Field value strings
* for Command Actions Window Types
*/
#define _DtACTION_TERMINAL "TERMINAL"
#define _DtACTION_PERM_TERMINAL "PERM_TERMINAL"
#define _DtACTION_NO_STDIO "NO_STDIO"
/*
* Valid Field values for ARG_CLASS records.
*/
#define _DtACTION_BUFFER "BUFFER"
#define _DtACTION_FILE "FILE"
#define _DtACTION_STRING "STRING"
/*
* Valid Field values for ARG_MODE
*/
#define _DtACT_ARG_MODE_WRITE "w"
#define _DtACT_ARG_MODE_NOWRITE "!w"
#define _DtACT_ARG_MODE_ANY _DtACT_ANY
/*
* Valid Field values for TT_CLASS records.
*/
#define _DtACTION_TT_NOTICE "TT_NOTICE"
#define _DtACTION_TT_REQUEST "TT_REQUEST"
/*
* Valid Field values for TT_SCOPE records.
*/
#define _DtACTION_TT_SESSION "TT_SESSION"
#define _DtACTION_TT_BOTH "TT_BOTH"
#define _DtACTION_TT_FILE_IN_SESSION "TT_FILE_IN_SESSION"
/* --- same as TT_MSG's TT_FILE field name --------
#define _DtACTION_TT_FILE "TT_FILE"
*/
/*
* Valid Field values for TT_ARGn_MODE
*/
#define _DtACTION_TT_MODE_IN "TT_IN"
#define _DtACTION_TT_MODE_OUT "TT_OUT"
#define _DtACTION_TT_MODE_INOUT "TT_INOUT"
/*
* Valid Field values for TT_ARGn_REP_TYPE
*/
#define _DtACTION_TT_RTYP_UND "TT_REP_UNDEFINED"
#define _DtACTION_TT_RTYP_INT "TT_REP_INTEGER"
#define _DtACTION_TT_RTYP_BUF "TT_REP_BUFFER"
#define _DtACTION_TT_RTYP_STR "TT_REP_STRING"
/*
* Action Keywords --
* these keywords appear in the action database files
* in the form: %<qualifier><keyword><prompt string>%
* where the optional qualifier in enclosed in: ()
* and the optional prompt string is enclosed in: ""
*/
#define _DtACT_DATABASEHOST_STR "DatabaseHost"
#define _DtACT_DISPLAYHOST_STR "DisplayHost"
#define _DtACT_LOCALHOST_STR "LocalHost"
#define _DtACT_SESSIONHOST_STR "SessionHost"
#define _DtACT_ARGS_STR "Args"
#define _DtACT_ARG_UNDER_STR "Arg_"
#define _DtACT_STRING_QUALIFIER "(String)"
#define _DtACT_FILE_QUALIFIER "(File)"
/*
* Default action field value definitions (these should be strings)
* for recognized fields.
*/
#define _DtACT_LBL_DFLT NULL
#define _DtACT_TYPE_DFLT _DtACTION_COMMAND
#define _DtACT_ARG_CLASS_DFLT _DtACT_ANY
#define _DtACT_ARG_MODE_DFLT _DtACT_ANY
#define _DtACT_ARG_TYPE_DFLT _DtACT_ANY
#define _DtACT_ARG_CNT_DFLT _DtACT_ANY
#define _DtACT_DESC_DFLT NULL
#define _DtACT_ICON_DFLT NULL
#define _DtACT_MAP_ACT_DFLT NULL
#define _DtACT_EXEC_STRG_DFLT NULL
#define _DtACT_EXEC_HOST_DFLT \
"%" _DtACT_DATABASEHOST_STR "%,%" _DtACT_LOCALHOST_STR "%"
#define _DtACT_CWD_DFLT NULL
#define _DtACT_WIN_TYPE_DFLT _DtACTION_PERM_TERMINAL
#define _DtACT_TERM_OPTS_DFLT NULL
#define _DtACT_TT_CLASS_DFLT NULL
#define _DtACT_TT_SCOPE_DFLT NULL
#define _DtACT_TT_OP_DFLT NULL
#define _DtACT_TT_FILE_DFLT NULL
#ifdef _DT_ALLOW_DT_MSGS
#define _DtACT_DT_REQ_DFLT NULL
#define _DtACT_DT_SVC_DFLT NULL
#define _DtACT_DT_NTFY_DFLT NULL
#define _DtACT_DT_NGRP_DFLT NULL
#endif /* _DT_ALLOW_DT_MSGS */
#endif /* _Dt_ActionDb_h */
/* DON'T ADD ANYTHING AFTER THIS #endif */

143
cde/include/Dt/ActionDbP.h Normal file
View File

@@ -0,0 +1,143 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/*****************************************************************************
*
* File: ActionDbP.h
* RCS: $XConsortium: ActionDbP.h /main/3 1995/10/26 14:58:53 rswiston $
* Description: Private header file for the action database functions.
* Language: C
* Package: N/A
*
*
** (c) Copyright 1993, 1994 Hewlett-Packard Company
** (c) Copyright 1993, 1994 International Business Machines Corp.
** (c) Copyright 1993, 1994 Sun Microsystems, Inc.
** (c) Copyright 1993, 1994 Novell, Inc.
*****************************************************************************/
#ifndef _Dt_ActionDbP_h
#define _Dt_ActionDbP_h
#include <Dt/DbReader.h>
#include <Dt/ActionDb.h>
#define _DtMAX_NUM_FIELDS 30
#define _ActDb_MAX_NUM_FIELDS _DtMAX_NUM_FIELDS
/*
* Bitmask field definitions for the action converter bit mask.
* These are NOT the bits for the mask in struct ACTION.
*/
#define _ActDb_LABEL_SET (1<<0)
#define _ActDb_TYPE_SET (1<<1)
#define _ActDb_ARG_CLASS_SET (1<<2)
#define _ActDb_ARG_TYPE_SET (1<<3)
#define _ActDb_ARG_COUNT_SET (1<<4)
#define _ActDb_ARG_MODE_SET (1<<5)
#define _ActDb_DESCRIPTION_SET (1<<6)
#define _ActDb_ICON_SET (1<<7)
#define _ActDb_MAP_ACTION_SET (1<<10)
#define _ActDb_EXEC_STRING_SET (1<<12)
#define _ActDb_EXEC_HOST_SET (1<<13)
#define _ActDb_CWD_SET (1<<14)
#define _ActDb_WINDOW_TYPE_SET (1<<15)
#define _ActDb_TERM_OPTS_SET (1<<16)
#define _ActDb_TT_CLASS_SET (1<<18)
#define _ActDb_TT_SCOPE_SET (1<<19)
#define _ActDb_TT_OPERATION_SET (1<<20)
#define _ActDb_TT_FILE_SET (1<<21)
#define _ActDb_TT_ARGN_MODE_SET (1<<22)
#define _ActDb_TT_ARGN_VTYP_SET (1<<23)
#define _ActDb_TT_ARGN_RTYP_SET (1<<24)
#define _ActDb_TT_ARGN_VAL_SET (1<<25)
#ifdef _DT_ALLOW_DT_MSGS
#define _ActDb_DT_REQ_NAME_SET (1<<26)
#define _ActDb_DT_SVC_SET (1<<27)
#define _ActDb_DT_NTFY_NAME_SET (1<<28)
#define _ActDb_DT_NGROUP_SET (1<<29)
#define _ActDb_DT_ARGN_VAL_SET (1<<30)
/* no mask for ARGn strings */
#define _ActDb_DT_REQUEST_BITS ( _ActDb_DT_REQ_NAME_SET \
| _ActDb_DT_SVC_SET )
#define _ActDb_DT_NOTIFY_BITS ( _ActDb_DT_NTFY_NAME_SET \
| _ActDb_DT_NGROUP_SET )
#endif /* _DT_ALLOW_DT_MSGS */
#define _ActDb_TT_BITS ( _ActDb_TT_CLASS_SET \
| _ActDb_TT_SCOPE_SET \
| _ActDb_TT_OPERATION_SET \
| _ActDb_TT_ARGN_MODE_SET \
| _ActDb_TT_ARGN_VTYP_SET \
| _ActDb_TT_ARGN_RTYP_SET \
| _ActDb_TT_ARGN_VAL_SET \
| _ActDb_TT_FILE_SET )
#define _ActDb_CMD_BITS ( _ActDb_EXEC_STRING_SET \
| _ActDb_CWD_SET \
| _ActDb_WINDOW_TYPE_SET \
| _ActDb_TERM_OPTS_SET )
#define _ActDb_MAP_BITS ( _ActDb_MAP_ACTION_SET )
#define _ActDb_TT_ARGN_BITS ( _ActDb_TT_ARGN_MODE_SET \
| _ActDb_TT_ARGN_VTYP_SET \
| _ActDb_TT_ARGN_RTYP_SET \
| _ActDb_TT_ARGN_VAL_SET )
#ifdef _DT_ALLOW_DT_MSGS
#define _ActDb_ARGN_BITS ( _ActDb_TT_ARGN_BITS \
| _ActDb_DT_ARGN_VAL_SET )
#else
#define _ActDb_ARGN_BITS ( _ActDb_TT_ARGN_BITS )
#endif /* _DT_ALLOW_DT_MSGS */
/******************************************************************************
*
* Private (but external) entry points for internal use by Action Database
* Library code only.
*
*****************************************************************************/
# ifdef __cplusplus
extern "C" {
# endif
extern Boolean _DtActionConverter( DtDtsDbField *fields,
DtDbPathId pathId,
char *hostPrefix,
Boolean rejectionStatus);
# ifdef __cplusplus
}
# endif
#endif /* _Dt_ActionDbP_h */
/* DON'T ADD ANYTHING AFTER THIS #endif */

View File

@@ -0,0 +1,67 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: ActionFind.h /main/4 1995/10/26 14:59:41 rswiston $ */
/************************************<+>*************************************
****************************************************************************
**
** File: ActionFind.h
**
** Project: DT
**
** Description: Public include file for the ActionFind functions.
**
** (c) Copyright 1993, 1994 Hewlett-Packard Company
** (c) Copyright 1993, 1994 International Business Machines Corp.
** (c) Copyright 1993, 1994 Sun Microsystems, Inc.
** (c) Copyright 1993, 1994 Novell, Inc.
****************************************************************************
************************************<+>*************************************/
#ifndef _Dt_ActionFind_h
#define _Dt_ActionFind_h
#include <X11/Xlib.h>
#include <X11/Xresource.h>
#include <Dt/ActionP.h>
#include <Dt/DtsDb.h>
#include <Dt/DtsMM.h>
# ifdef __cplusplus
extern "C" {
# endif
extern void _DtSortActionDb(void);
extern ActionPtr
_DtActionFindDBEntry( ActionRequest *reqp,
DtShmBoson actQuark );
# ifdef __cplusplus
}
# endif
#endif /* _Dt_ActionFind_h */
/* DON'T ADD ANYTHING AFTER THIS #endif */

849
cde/include/Dt/ActionP.h Normal file
View File

@@ -0,0 +1,849 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: ActionP.h /main/3 1995/10/26 14:59:56 rswiston $ */
/************************************<+>*************************************
****************************************************************************
**
** File: ActionP.h
**
** Project: DT
**
** Description: Private include file for the Action Library.
**
**
** (c) Copyright 1993, 1994 Hewlett-Packard Company
** (c) Copyright 1993, 1994 International Business Machines Corp.
** (c) Copyright 1993, 1994 Sun Microsystems, Inc.
** (c) Copyright 1993, 1994 Novell, Inc.
****************************************************************************
************************************<+>*************************************/
#ifndef _ActionP_h
#define _ActionP_h
#include <Dt/DtP.h>
#include <Dt/DbReader.h>
#include <Dt/ActionDb.h>
#include <Dt/Action.h>
#include <Tt/tttk.h>
#include <Dt/DtShmDb.h>
/*
* Environment Variable Names
*/
#define ENV_SESSION_SVR "SESSION_SVR"
/*
* Define maximum static buffer size for action code.
*/
#define _DtAct_MAX_BUF_SIZE 1024
/*
* Data-type field which contains the template for producing filenames
* of a given type.
*/
#define _DtActNAME_TEMPLATE "NAME_TEMPLATE"
#define _DtActIS_EXECUTABLE "IS_EXECUTABLE"
/******************************************************************************
*
* MASK LAYOUT:
*
* The same layout is used for all the masks (defined herein);, independent of
* the data structure in which they are defined. That is, all bit fields for
* all masks are non-overlapping. In general, the mask in any given structure
* should ONLY contain information in the field appropriate for that structure.
*
* The action bit mask is broken into the following fields
*
* --------------------------------------------------------------------------
* |act'n |arg |arg |arg | win |args| request | object |treat| not |
* |type |class|count|typ | type | | status | status | as | |
* |bits |bits |bits |bit | bits |used| bits | bits |file |used |
* --------------------------------------------------------------------------
* 0 - 4,5 - 8,9 - 12, 13 ,14 - 17,18-19,20 ------- 22,23 ---- 28, 29 ,30-31
* | | | | | |
* |<-- action mask -->| |<- request->|<- obj. ->|< - >|
* mask data |
* mask msgCcomp.
* mask
******************************************************************************/
/*
* generic bit manipulation macros
*/
#define SET_ANY_BITS(mask,bits) ( mask |= (bits) )
#define RESET_ANY_BITS(mask,bits) ( mask &= ~(bits) )
#define TST_ANY_BITS(mask,bits) ( mask & (bits) )
/*
* Action type bits
*/
#define _DtAct_CMD_BIT (1<<0)
#define _DtAct_MAP_BIT (1<<1)
#define _DtAct_TT_MSG_BIT (1<<2)
#ifdef _DT_ALLOW_DT_MSGS
#define _DtAct_DT_REQ_MSG_BIT (1<<3)
#define _DtAct_DT_NTFY_MSG_BIT (1<<4)
#endif /* _DT_ALLOW_DT_MSGS */
/*
* Action structure mask bits
*/
#define _DtAct_ARG_CLASS_FILE_BIT (1<<5)
#define _DtAct_ARG_CLASS_STRING_BIT (1<<6)
#define _DtAct_ARG_CLASS_BUFFER_BIT (1<<7)
#define _DtAct_ARG_CLASS_WILD_BIT (1<<8)
#define _DtAct_ARG_COUNT_LT_BIT (1<<9)
#define _DtAct_ARG_COUNT_GT_BIT (1<<10)
#define _DtAct_ARG_COUNT_EQ_BIT (1<<11)
#define _DtAct_ARG_COUNT_WILD_BIT (1<<12)
#define _DtAct_ARG_TYPE_WILD_BIT (1<<13)
#define _DtAct_NO_STDIO_BIT (1<<14)
#define _DtAct_TERMINAL_BIT (1<<15)
#define _DtAct_PERM_TERM_BIT (1<<16)
/*
* Defines which reflect the actual number
* of %ARGn% instances found in the action definition
* NOTE: Is this JUST in the EXEC_STRING? or the total number of %ARGn%'s
* referenced in all parssed definitions?
*
*/
#define _DtAct_SINGLE_ARG_BIT (1<<18)
#define _DtAct_MULTI_ARG_BIT (1<<19)
#ifdef _DT_ALLOW_DT_MSGS
#define _DtAct_ACTION_TYPE_BITS ( _DtAct_CMD_BIT \
| _DtAct_MAP_BIT \
| _DtAct_DT_NTFY_MSG_BIT \
| _DtAct_DT_REQ_MSG_BIT \
| _DtAct_TT_MSG_BIT )
#else
#define _DtAct_ACTION_TYPE_BITS ( _DtAct_CMD_BIT \
| _DtAct_MAP_BIT \
| _DtAct_TT_MSG_BIT )
#endif /* _DT_ALLOW_DT_MSGS */
#define _DtAct_ARG_CLASS_BITS ( _DtAct_ARG_CLASS_FILE_BIT \
| _DtAct_ARG_CLASS_STRING_BIT\
| _DtAct_ARG_CLASS_BUFFER_BIT \
| _DtAct_ARG_CLASS_WILD_BIT )
#define _DtAct_ARG_TYPE_BITS ( _DtAct_ARG_TYPE_WILD_BIT )
#define _DtAct_ARG_COUNT_BITS ( _DtAct_ARG_COUNT_LT_BIT \
| _DtAct_ARG_COUNT_GT_BIT \
| _DtAct_ARG_COUNT_EQ_BIT \
| _DtAct_ARG_COUNT_WILD_BIT )
#define _DtAct_WINTYPE_BITS ( _DtAct_NO_STDIO_BIT \
| _DtAct_TERMINAL_BIT \
| _DtAct_PERM_TERM_BIT )
#define _DtAct_ARGS_USED_BITS ( _DtAct_SINGLE_ARG \
| _DtAct_MULTI_ARG )
#define _DtAct_ACTION_BITS ( _DtAct_ACTION_TYPE_BITS \
| _DtAct_ARG_CLASS_BITS \
| _DtAct_ARG_TYPE_BITS \
| _DtAct_ARG_COUNT_BITS \
| _DtAct_WINTYPE_BITS \
| _DtAct_ARGS_USED_BITS )
#define IS_CMD(mask) ( mask & _DtAct_CMD_BIT )
#define IS_MAP(mask) ( mask & _DtAct_MAP_BIT )
#define IS_TT_MSG(mask) ( mask & _DtAct_TT_MSG_BIT )
#ifdef _DT_ALLOW_DT_MSGS
#define IS_DT_REQ_MSG(mask) ( mask & _DtAct_DT_REQ_MSG_BIT )
#define IS_DT_NOTIFY_MSG(mask) ( mask & _DtAct_DT_NTFY_MSG_BIT )
#endif /* _DT_ALLOW_DT_MSGS */
#define SET_CMD_ACTION(mask) ( mask |= _DtAct_CMD_BIT )
#define SET_MAP_ACTION(mask) ( mask |= _DtAct_MAP_BIT )
#define SET_TT_MSG(mask) ( mask |= _DtAct_TT_MSG_BIT )
#ifdef _DT_ALLOW_DT_MSGS
#define SET_DT_REQUEST_MSG(mask) ( mask |= _DtAct_DT_REQ_MSG_BIT)
#define SET_DT_NOTIFY_MSG(mask) ( mask |= _DtAct_DT_NTFY_MSG_BIT)
#endif /* _DT_ALLOW_DT_MSGS */
#define RESET_CMD_ACTION(mask) ( mask &= ~(_DtAct_CMD_BIT))
#define RESET_MAP_ACTION(mask) ( mask &= ~(_DtAct_MAP_BIT))
#define RESET_TT_MSG(mask) ( mask &= ~(_DtAct_TT_MSG_BIT))
#ifdef _DT_ALLOW_DT_MSGS
#define RESET_DT_REQ_MSG(mask) ( mask &= ~(_DtAct_DT_REQ_MSG_BIT))
#define RESET_DT_NOTIFY_MSG(mask) ( mask &= ~(_DtAct_DT_NTFY_MSG_BIT))
#endif /* _DT_ALLOW_DT_MSGS */
#define IS_NO_STDIO(mask) ( mask & _DtAct_NO_STDIO_BIT )
#define IS_TERMINAL(mask) ( mask & _DtAct_TERMINAL_BIT )
#define IS_PERM_TERM(mask) ( mask & _DtAct_PERM_TERM_BIT)
#define SET_NO_STDIO(mask) ( mask |= _DtAct_NO_STDIO_BIT )
#define SET_TERMINAL(mask) ( mask |= _DtAct_TERMINAL_BIT )
#define SET_PERM_TERM(mask) ( mask |= _DtAct_PERM_TERM_BIT )
#define RESET_NO_STDIO(mask) ( mask &= ~(_DtAct_NO_STDIO_BIT ))
#define RESET_TERMINAL(mask) ( mask &= ~(_DtAct_TERMINAL_BIT ))
#define RESET_PERM_TERM(mask) ( mask &= ~(_DtAct_PERM_TERM_BIT ))
#define IS_ARG_CLASS_FILE(mask) ( mask & _DtAct_ARG_CLASS_FILE_BIT )
#define IS_ARG_CLASS_STRING(mask) ( mask & _DtAct_ARG_CLASS_STRING_BIT )
#define IS_ARG_CLASS_BUFFER(mask) ( mask & _DtAct_ARG_CLASS_BUFFER_BIT )
#define IS_ARG_CLASS_WILD(mask) ( mask & _DtAct_ARG_CLASS_WILD_BIT )
#define SET_ARG_CLASS_FILE(mask) ( mask |= _DtAct_ARG_CLASS_FILE_BIT )
#define SET_ARG_CLASS_STRING(mask) ( mask |= _DtAct_ARG_CLASS_STRING_BIT)
#define SET_ARG_CLASS_BUFFER(mask) ( mask |= _DtAct_ARG_CLASS_BUFFER_BIT)
#define SET_ARG_CLASS_WILD(mask) ( mask |= _DtAct_ARG_CLASS_WILD_BIT )
#define RESET_ARG_CLASS_FILE(mask) (mask &= ~(_DtAct_ARG_CLASS_FILE_BIT))
#define RESET_ARG_CLASS_STRING(mask) (mask &= ~(_DtAct_ARG_CLASS_STRING_BIT))
#define RESET_ARG_CLASS_BUFFER(mask) (mask &= ~(_DtAct_ARG_CLASS_BUFFER_BIT))
#define RESET_ARG_CLASS_WILD(mask) (mask &= ~(_DtAct_ARG_CLASS_WILD_BIT))
#define IS_ARG_TYPE_WILD(mask) ( mask & _DtAct_ARG_TYPE_WILD_BIT )
#define SET_ARG_TYPE_WILD(mask) ( mask |= _DtAct_ARG_TYPE_WILD_BIT )
#define RESET_ARG_TYPE_WILD(mask) ( mask &= ~(_DtAct_ARG_TYPE_WILD_BIT))
#define IS_ARG_COUNT_GT(mask) ( mask & _DtAct_ARG_COUNT_GT_BIT )
#define IS_ARG_COUNT_LT(mask) ( mask & _DtAct_ARG_COUNT_LT_BIT )
#define IS_ARG_COUNT_EQ(mask) ( mask & _DtAct_ARG_COUNT_EQ_BIT )
#define IS_ARG_COUNT_WILD(mask) ( mask & _DtAct_ARG_COUNT_WILD_BIT )
#define SET_ARG_COUNT_GT(mask) ( mask |= _DtAct_ARG_COUNT_GT_BIT )
#define SET_ARG_COUNT_LT(mask) ( mask |= _DtAct_ARG_COUNT_LT_BIT )
#define SET_ARG_COUNT_EQ(mask) ( mask |= _DtAct_ARG_COUNT_EQ_BIT )
#define SET_ARG_COUNT_WILD(mask) ( mask |= _DtAct_ARG_COUNT_WILD_BIT )
#define RESET_ARG_COUNT_GT(mask) ( mask &= ~(_DtAct_ARG_COUNT_GT_BIT ))
#define RESET_ARG_COUNT_LT(mask) ( mask &= ~(_DtAct_ARG_COUNT_LT_BIT ))
#define RESET_ARG_COUNT_EQ(mask) ( mask &= ~(_DtAct_ARG_COUNT_EQ_BIT ))
#define RESET_ARG_COUNT_WILD(mask) ( mask &= ~(_DtAct_ARG_COUNT_WILD_BIT ))
/*
* Use of the logical "NOT" operator(!) instead of the bitwise negation
* operator(~) is intentional in IS_ARG_NONE_FOUND.
*/
#define IS_ARG_NONE_FOUND(mask) !( mask & ( _DtAct_SINGLE_ARG_BIT \
| _DtAct_MULTI_ARG_BIT ))
#define IS_ARG_SINGLE_ARG(mask) ( mask & _DtAct_SINGLE_ARG_BIT )
#define IS_ARG_MULTI_ARG(mask) ( mask & _DtAct_MULTI_ARG_BIT )
#define SET_ARG_NONE_FOUND(mask) ( mask &= ~( _DtAct_SINGLE_ARG_BIT \
| _DtAct_MULTI_ARG_BIT ))
#define SET_ARG_SINGLE_ARG(mask) ((mask |= _DtAct_SINGLE_ARG_BIT), \
( mask &= ~(_DtAct_MULTI_ARG_BIT)))
#define SET_ARG_MULTI_ARG(mask) ((mask |= _DtAct_MULTI_ARG_BIT), \
( mask &= ~(_DtAct_SINGLE_ARG_BIT)))
#define RESET_ARG_SINGLE_ARG(mask) ( mask &= ~(_DtAct_SINGLE_ARG_BIT))
#define RESET_ARG_MULTI_ARG(mask) ( mask &= ~(_DtAct_MULTI_ARG_BIT))
/*
* ActionRequest structure mask bits
*/
#define _DtAct_REPROCESSING_BIT (1<<20)
#define _DtAct_TOO_MANY_MAPS_BIT (1<<21)
#define _DtAct_CLONED_REQUEST_BIT (1<<22)
#define _DtAct_ACTION_REQUEST_BITS ( _DtAct_REPROCESSING_BIT \
| _DtAct_TOO_MANY_MAPS_BIT \
| _DtAct_CLONED_REQUEST_BIT )
#define IS_REPROCESSING(mask) ( mask & _DtAct_REPROCESSING_BIT )
#define IS_TOO_MANY_MAPS(mask) ( mask & _DtAct_TOO_MANY_MAPS_BIT )
#define IS_CLONED_REQUEST(mask) ( mask & _DtAct_CLONED_REQUEST_BIT )
#define SET_REPROCESSING(mask) ( mask |= _DtAct_REPROCESSING_BIT )
#define SET_TOO_MANY_MAPS(mask) ( mask |= _DtAct_TOO_MANY_MAPS_BIT )
#define SET_CLONED_REQUEST(mask) ( mask |= _DtAct_CLONED_REQUEST_BIT )
#define RESET_REPROCESSING(mask) ( mask &= ~(_DtAct_REPROCESSING_BIT))
#define RESET_TOO_MANY_MAPS(mask) ( mask &= ~(_DtAct_TOO_MANY_MAPS_BIT))
#define RESET_CLONED_REQUEST(mask) ( mask &= ~(_DtAct_CLONED_REQUEST_BIT))
/*
* ObjectData structure mask bits
*
*/
#define _DtAct_WRITE_OBJ_BIT (1<<23)
#define _DtAct_FILE_OBJ_BIT (1<<24)
#define _DtAct_BUFFER_OBJ_BIT (1<<25)
#define _DtAct_STRING_OBJ_BIT (1<<26)
#define _DtAct_DIR_OBJ_BIT (1<<27)
#define _DtAct_UNKNOWN_IF_DIR_BIT (1<<28)
#define _DtAct_OBJ_DATA_BITS ( _DtAct_WRITE_OBJ_BIT \
| _DtAct_FILE_OBJ_BIT \
| _DtAct_DIR_OBJ_BIT \
| _DtAct_BUFFER_OBJ_BIT \
| _DtAct_STRING_OBJ_BIT \
| _DtAct_UNKNOWN_IF_DIR_BIT )
#define IS_WRITE_OBJ(mask) ( mask & _DtAct_WRITE_OBJ_BIT )
#define IS_FILE_OBJ(mask) ( mask & _DtAct_FILE_OBJ_BIT )
#define IS_BUFFER_OBJ(mask) ( mask & _DtAct_BUFFER_OBJ_BIT )
#define IS_STRING_OBJ(mask) ( mask & _DtAct_STRING_OBJ_BIT )
#define IS_UNKNOWN_IF_DIR(mask) ( mask & _DtAct_UNKNOWN_IF_DIR_BIT )
#define IS_DIR_OBJ(mask) ( mask & \
( _DtAct_UNKNOWN_IF_DIR_BIT \
| _DtAct_DIR_OBJ_BIT ) \
== _DtAct_DIR_OBJ_BIT)
#define SET_WRITE_OBJ(mask) ( mask |= _DtAct_WRITE_OBJ_BIT )
#define SET_FILE_OBJ(mask) ( mask |= _DtAct_FILE_OBJ_BIT )
#define SET_BUFFER_OBJ(mask) ( mask |= _DtAct_BUFFER_OBJ_BIT )
#define SET_STRING_OBJ(mask) ( mask |= _DtAct_STRING_OBJ_BIT )
#define SET_DIR_OBJ(mask) ( mask |= _DtAct_DIR_OBJ_BIT )
#define SET_UNKNOWN_IF_DIR(mask) ( mask |= _DtAct_UNKNOWN_IF_DIR_BIT)
#define RESET_WRITE_OBJ(mask) ( mask &= ~(_DtAct_WRITE_OBJ_BIT))
#define RESET_FILE_OBJ(mask) ( mask &= ~(_DtAct_FILE_OBJ_BIT))
#define RESET_BUFFER_OBJ(mask) ( mask &= ~(_DtAct_BUFFER_OBJ_BIT))
#define RESET_STRING_OBJ(mask) ( mask &= ~(_DtAct_STRING_OBJ_BIT))
#define RESET_DIR_OBJ(mask) ( mask &= ~(_DtAct_DIR_OBJ_BIT))
#define RESET_UNKNOWN_IF_DIR(mask) ( mask &= ~(_DtAct_UNKNOWN_IF_DIR_BIT))
/*
* MsgComponent structure mask bits (shared with Object Data?)
*/
#define _DtAct_TREAT_AS_FILE_BIT (1<<29)
#define _DtAct_MSG_COMP_BITS ( _DtAct_TREAT_AS_FILE_BIT )
#define IS_TREAT_AS_FILE(mask) ( mask & _DtAct_TREAT_AS_FILE_BIT )
#define SET_TREAT_AS_FILE(mask) ( mask |= _DtAct_TREAT_AS_FILE_BIT)
#define RESET_TREAT_AS_FILE(mask) ( mask &= ~(_DtAct_TREAT_AS_FILE_BIT))
/* Keyword defines */
#define NO_KEYWORD -1
#define LOCAL_HOST 0
#define DATA_HOST 1
#define DATABASE_HOST 2
#define ARG 3
#define DISPLAY_HOST 4
#define LABEL 5
#define SESSION_HOST 6
/* Special argNum values */
#define NO_ARG -1
#define ALL_ARGS 0
/*
* ToolTalk base representation type ( tt_argn_rep_type ) values
*/
#define DtACT_TT_REP_UNDEFINED 0
#define DtACT_TT_REP_INT 1
#define DtACT_TT_REP_BUFFER 2
#define DtACT_TT_REP_STRING 3
/*
* Resource name and class for the EXEC-HOST resource.
*/
#define DtEXEC_HOSTS_NAME "executionHosts"
#define DtEXEC_HOSTS_CLASS "ExecutionHosts"
#define DtEXEC_HOSTS_DEFAULT _DtACT_EXEC_HOST_DFLT
/* Flags to force special processing of filenames */
#define _DTAct_TT_VTYPE 1 << 0
#define _DTAct_TT_ARG 1 << 1
/* Structure used to hold the components of a message */
typedef struct {
char *precedingText;
char *prompt;
int keyword;
int argNum;
unsigned long mask; /* replaces isFile, isBuffer, isString boolean */
} MsgComponent;
typedef struct {
MsgComponent *parsedMessage;
int numMsgParts;
char *compiledMessage;
int msgLen;
} parsedMsg;
/******************************************************************************
*
* Structs used during the invocation of an action. Once DtActionInvoke()
* exits, these structs are generally freed.
*
*****************************************************************************/
typedef struct {
/*int winMask; ---> moved into the action mask*/
parsedMsg execString;
parsedMsg termOpts;
char *contextDir;
char *contextHost;
parsedMsg execHosts;
char **execHostArray;
int execHostCount;
} cmdAttr;
typedef struct {
DtShmBoson map_action;
} mapAttr;
typedef struct {
int tt_class;
int tt_scope;
parsedMsg tt_op;
parsedMsg tt_file; /* must be a single file name */
int *tt_argn_mode;
int mode_count;
parsedMsg *tt_argn_vtype;
int vtype_count;
parsedMsg *tt_argn_value;
int value_count;
int *tt_argn_rep_type; /* INT, STRING, BUFFER or UNDEFINED */
int rep_type_count;
} tt_msgAttr;
#ifdef _DT_ALLOW_DT_MSGS
typedef struct {
parsedMsg service; /* ICCCM service name */
parsedMsg request; /* request name string */
parsedMsg *argn_value;
int value_count;
} dt_reqAttr;
typedef struct {
parsedMsg ngroup; /* ICCCM notification group */
parsedMsg notify; /* notification to be sent */
parsedMsg *argn_value;
int value_count;
} dt_notifyAttr;
#endif /* _DT_ALLOW_DT_MSGS */
typedef struct {
DtShmBoson action; /* Might just use a char * here? */
DtDbPathId file_name_id; /* id of file wherein the action is defined */
char *label; /* localizable action label string */
char *description;
DtShmBoson *arg_types;
int type_count;
int arg_count; /* Number of arguments accepted by the action */
unsigned long mask; /* action mask -- class/type/arg info */
union { /* attributes for the different action kinds */
cmdAttr cmd;
mapAttr map;
tt_msgAttr tt_msg;
#ifdef _DT_ALLOW_DT_MSGS
dt_reqAttr dt_req;
dt_notifyAttr dt_notify;
#endif /* _DT_ALLOW_DT_MSGS */
} u;
} Action, *ActionPtr; /* new action structure and pointer */
/* Structure used to hold each of the object components */
typedef struct {
char * origFilename;
char * baseFilename;
char * origHostname;
int hostIndex;
int dirIndex;
void * bp; /* pointer to original buffer -- tmp files only */
int sizebp; /* size of original buf -- for tmp files only */
} fileAttr;
typedef struct {
char * string;
} stringAttr;
typedef struct {
int size;
void *bp;
} bufferAttr;
typedef struct {
DtShmBoson type;
unsigned long mask;
union {
fileAttr file;
stringAttr string;
bufferAttr buffer;
} u;
} ObjectData;
/*
* Structure attached to the button callbacks in the
* dialog used to collect missing parameters.
*
*/
typedef struct {
char *actionName;
int objOffset;
int objsUsed;
int numObjects;
ObjectData *objects;
int numPromptInputs;
char **promptInputs;
int numHostNames;
char **hostNames;
int numDirNames;
char **dirNames;
char *termOpts;
char *cwdHost;
char *cwdDir;
ActionPtr clonedAction;
unsigned long mask;
char *badHostList;
char *currentHost;
int hostIndex;
char *execHost;
DtActionInvocationID invocId;
unsigned long childId;
} ActionRequest;
/******************************************************************************
*
* Structs used to maintain information on invoked actions until they
* exit. A few select elements of the ActionRequest and Action structs
* will be copied into these strcuts.
*
*****************************************************************************/
/******************************************************************************
******************************************************************************
**
** Major data-structure diagram for the DtAction invocation layer:
**
** _DtActInvRec <=== _DtActInvRecArray[ actInvRecArraySize ]
** ------------------
** | info per |
** | DtActionInvoke |
** |----------------|
** | numChildren |
** |----------------|
** | childRecs[] | ===> _DtActChildRec
** ------------------ ------------------
** | info per |
** | child request |
** |----------------|
** | *request | ===> ActionRequest
** ------------------ ------------------
** | info on users |
** | action request |
** |----------------|
** Action <=== | *clonedAction |
** ------------------ ------------------
** |info on matching|
** | actionDB entry |
** |----------------|
** | cmd/map/tt/dt |
** | attributes of |
** | resulting msg |
** ------------------
**
** "ActionRequest" and "Action" were present in VUE 3.0, and have a
** scratch-pad like function within DtActionInvoke() to get actions
** started. They are not good long-term retainers of information.
** Action and ActionRequest are in fact freed when DtActionInvoke()
** exits.
**
** "_DtActInvRec" and "_DtActChildRec" have been introduced to retain
** information for the entire life of the actions. Some of the
** information from ActionRequest and Action will be copied (mirrored)
** up to these structures.
**
******************************************************************************
*****************************************************************************/
/******************************************************************************
*
* Child Status Macro Definitions -- These values are used in
* the status word of the _DtActChildRec child record.
*
* ****** IMPORTANT NOTE *** IMPORTANT NOTE *** IMPORTANT NOTE ******
*
* The _DtActCHILD_ macros are also used in cde1/dtexec/Main.c
* in the _DtActDtexecDone(Request) message, so in effect they
* are also protocol constants that should *never* be changed.
* If changed, libDtSvc and dtexec may mis-communicate status.
*
*****************************************************************************/
#define _DtActCHILD_UNKNOWN (1<<0) /* 1 - child status unknown */
#define _DtActCHILD_PENDING_START (1<<1) /* 2 - child start pending */
#define _DtActCHILD_ALIVE_UNKNOWN (1<<2) /* 4 - child alive but unknown*/
#define _DtActCHILD_ALIVE (1<<3) /* 8 - child alive and well */
#define _DtActCHILD_DONE (1<<4) /* 16 - child done */
#define _DtActCHILD_FAILED (1<<5) /* 32 - child failed */
#define _DtActCHILD_CANCELED (1<<6) /* 64 - child canceled */
#define _DtActCHILD_DONE_BITS ( (_DtActCHILD_DONE) | \
(_DtActCHILD_FAILED) | \
(_DtActCHILD_CANCELED) )
/*** IMPORTANT NOTE ABOVE *** IMPORTANT NOTE ABOVE *** IMPORTANT NOTE ABOVE ***/
#define ARE_CHILDREN_DONE(mask) ( (mask) & _DtActCHILD_DONE_BITS )
#define IS_CHILD_UNKNOWN(mask) ( (mask) == _DtActCHILD_UNKNOWN )
#define IS_CHILD_PENDING_START(mask) ( (mask) & _DtActCHILD_PENDING_START )
#define IS_CHILD_DONE(mask) ( (mask) & _DtActCHILD_DONE)
#define IS_CHILD_FAILED(mask) ( (mask) & _DtActCHILD_FAILED)
#define IS_CHILD_CANCELED(mask) ( (mask) & _DtActCHILD_CANCELED)
#define IS_CHILD_ALIVE(mask) ( (mask) & _DtActCHILD_ALIVE)
#define IS_CHILD_ALIVE_UNKOWN(mask) ( (mask) & _DtActCHILD_ALIVE_UNKNOWN)
/******************************************************************************
*
* Information per child of DtActionInvoke()
*
*****************************************************************************/
/*
* Structure useed to map returnable arguments to the child argument list.
*/
typedef struct {
int argN; /* Nth returned value (0 based for tooltalk) */
int argIdx; /* Nth child argument */
} _DtActArgMap;
typedef struct {
unsigned long childId; /* serial # with DtActInvId */
unsigned long childState; /* child state */
/*
* Information cloned from "ActionRequest *req"
*/
int numObjects; /* number of child args */
_DtActArgMap *argMap; /* map of returnable args to chd args */
/*
* Information cloned from "ActionPtr clonedAction"
*/
unsigned long mask; /* action type - IS_xxx() */
/* a list of tmp file names 5/11/94 --tomg */
union {
struct { /* COMMAND elements */
char *TTProcId; /* TT procID handle to child */
Tt_message reqMessage; /* Initiator TT Request */
Tt_pattern magic_cookie; /* dtexec to libDtSvc cookie */
} cmd;
struct { /* TT_MSG elements */
char *TTProcId; /* TT procID handle to child */
Tt_message reqMessage; /* Initiator TT Request */
int isTtMedia; /* handled by ttmedia_load ? */
Tttk_op TtMediaOp; /* if ttmedia_load, the op */
Tt_pattern *subConPats; /* for subcontract_manage */
} tt;
} u;
} _DtActChildRecT;
/******************************************************************************
*
* Invocation Status Macro Definitions -- These values are used in
* the state word of the _DtActInvRec invocation record.
*
*****************************************************************************/
#define _DtActINV_UNKNOWN 0 /* unknown invocation status */
#define _DtActINV_ERROR (1<<0) /* invocation error detected */
#define _DtActINV_CANCEL (1<<1) /* trying to cancel invocation*/
#define _DtActINV_PENDING (1<<2) /* invocation pending */
#define _DtActINV_WORKING (1<<3) /* invocation in process */
#define _DtActINV_DONE (1<<4) /* invocation step done */
#define _DtActINV_COMPLETE (1<<5) /* invocation steps all done */
#define _DtActINV_CB_CALLED (1<<6) /* invocation callback called */
#define _DtActINV_ID_RETURNED (1<<7) /* invocation id has returned */
#define _DtActINV_CMD_QUEUED (1<<8) /* command has been queued */
#define _DtActINV_INDICATOR_ON (1<<9) /* busy indicator active bit */
#define SET_INV_UNKNOWN(mask) (mask = 0)
#define SET_INV_ERROR(mask) (mask |= _DtActINV_ERROR)
#define SET_INV_CANCEL(mask) (mask |= _DtActINV_CANCEL)
#define SET_INV_PENDING(mask) (mask |= _DtActINV_PENDING)
#define SET_INV_WORKING(mask) (mask |= _DtActINV_WORKING)
#define SET_INV_DONE(mask) (mask |= _DtActINV_DONE)
#define SET_INV_COMPLETE(mask) (mask |= _DtActINV_COMPLETE)
#define SET_INV_CB_CALLED(mask) (mask |= _DtActINV_CB_CALLED)
#define SET_INV_ID_RETURNED(mask) (mask |= _DtActINV_ID_RETURNED)
#define SET_INV_CMD_QUEUED(mask) (mask |= _DtActINV_CMD_QUEUED)
#define SET_INV_INDICATOR_ON(mask) (mask |= _DtActINV_INDICATOR_ON)
#define RESET_INV_ERROR(mask) (mask &= ~(_DtActINV_ERROR))
#define RESET_INV_CANCEL(mask) (mask &= ~(_DtActINV_CANCEL))
#define RESET_INV_PENDING(mask) (mask &= ~(_DtActINV_PENDING))
#define RESET_INV_WORKING(mask) (mask &= ~(_DtActINV_WORKING))
#define RESET_INV_COMPLETE(mask) (mask &= ~(_DtActINV_COMPLETE))
#define RESET_INV_DONE(mask) (mask &= ~(_DtActINV_DONE))
#define RESET_INV_CB_CALLED(mask) (mask &= ~(_DtActINV_CB_CALLED))
#define RESET_INV_ID_RETURNED(mask) (mask &= ~(_DtActINV_ID_RETURNED))
#define RESET_INV_CMD_QUEUED(mask) (mask &= ~(_DtActINV_CMD_QUEUED))
#define RESET_INV_INDICATOR_ON(mask) (mask &= ~(_DtActINV_INDICATOR_ON))
#define IS_INV_FINISHED(mask) ( !((mask) & _DtActINV_CMD_QUEUED) \
&& ((mask) & (_DtActINV_COMPLETE \
| _DtActINV_CANCEL)) )
#define IS_INV_UNKNOWN(mask) ( (mask) == _DtActINV_UNKNOWN )
#define IS_INV_ERROR(mask) ((mask) & _DtActINV_ERROR )
#define IS_INV_CANCEL(mask) ((mask) & _DtActINV_CANCEL )
#define IS_INV_PENDING(mask) ((mask) & _DtActINV_PENDING )
#define IS_INV_WORKING(mask) ((mask) & _DtActINV_WORKING )
#define IS_INV_DONE(mask) ((mask) & _DtActINV_DONE )
#define IS_INV_COMPLETE(mask) ((mask) & _DtActINV_COMPLETE )
#define IS_INV_CB_CALLED(mask) ((mask) & _DtActINV_CB_CALLED )
#define IS_INV_ID_RETURNED(mask) ((mask) & _DtActINV_ID_RETURNED )
#define IS_INV_CMD_QUEUED(mask) ((mask) & _DtActINV_CMD_QUEUED )
#define IS_INV_INDICATOR_ON(mask) ((mask) & _DtActINV_INDICATOR_ON )
#define CALL_INV_CB(mask) ((IS_INV_FINISHED(mask)) && \
(IS_INV_ID_RETURNED(mask)) && \
!(IS_INV_CB_CALLED(mask)))
/******************************************************************************
*
* Information per DtActionInvoke()
*
* Note: For TT_MSG(NOTICE)'s during CDE 1.0, this struct will disappear
* immediately after the NOTICEs are sent.
*
*****************************************************************************/
typedef struct {
unsigned long mask; /* encodes object class and writable flag */
int size; /* original size (buffers only) */
char *type; /* original type (buffers only) */
char *name; /* encodes (tmp) file name associated with the
object (if any) */
} _DtActArgInfo;
typedef struct {
DtActionStatus userStatus;
DtActionArg *newArgp;
int newArgc;
} _DtActUpdateCache;
typedef struct _DtActInvRec {
unsigned long state; /* invocation state */
DtActionInvocationID id; /* identifying invocation ID */
Widget w; /* users widget id */
DtActionCallbackProc cb; /* users callback */
XtPointer client_data; /* users client data for cb */
_DtActArgInfo *info; /* template w/ .argClass info */
int ac; /* original # of arguments */
int numChildren; /* number of childRec's. */
_DtActChildRecT **childRec; /* array of child Rec's */
int cachedUploadCnt;/* cached callback updates */
_DtActUpdateCache *cachedUploads; /* data for */
} _DtActInvRecT;
/******************************************************************************
*
* Structs for dialogs/prompts
*
*****************************************************************************/
/* Structure used to hold a prompt string destined for a dialog */
typedef struct {
int argIndex;
char *prompt;
} PromptEntry;
/* Structure used to contain prompt dialog information */
typedef struct {
int argIndex;
Widget promptWidget;
} DialogPromptEntry;
typedef struct {
ActionRequest * request;
Widget topLevel;
Widget associatedWidget;
int numPrompts;
DialogPromptEntry * prompts;
} PromptDialog;
/* Structure used to contain abort/continue dialog information */
typedef struct {
ActionRequest * request;
Widget topLevel;
Widget associatedWidget;
int numPrompts;
PromptEntry * prompts;
} ContinueDialog;
/* Structure passed to request passed/failed callbacks */
typedef struct {
Widget associatedWidget;
char *actionLabel;
int offset;
ActionPtr actionPtr; /* Ptr to the action that
was invoked. */
ActionRequest *requestPtr;
DtActionInvocationID actInvId; /* A standard invocation id */
unsigned long childId; /* An id to further identify
children of actInvId */
} CallbackData;
/******************************************************************************
*
* Private External Function Declarations -- not for public consumption
*
******************************************************************************/
extern void _DtFreeActionStruct( ActionPtr action) ;
#endif /* _ActionP_h */
/* DON'T ADD ANYTHING AFTER THIS #endif */

View File

@@ -0,0 +1,114 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: ActionUtilP.h /main/3 1995/10/26 15:01:19 rswiston $ */
/************************************<+>*************************************
****************************************************************************
**
** File: ActionUtilP.h
**
** Project: DT
**
** Description: Private include file for the Action Library Utilities.
**
**
** (c) Copyright 1993, 1994 Hewlett-Packard Company
** (c) Copyright 1993, 1994 International Business Machines Corp.
** (c) Copyright 1993, 1994 Sun Microsystems, Inc.
** (c) Copyright 1993, 1994 Novell, Inc.
****************************************************************************
************************************<+>*************************************/
#ifndef _ActionUtilP_h
#define _ActionUtilP_h
#include <X11/Intrinsic.h> /* for Display struct definition */
#include "ActionP.h"
/*****************************************************************************
*
* Macro to protect against sending a NULL pointer to certain
* library functions (i.e. sprintf, strlen, ...) with on some
* systems choke on a NULL pointer.
*
****************************************************************************/
#define _DtActNULL_GUARD(s) ((s) ? (s) : "")
/******************************************************************************
External Utility Function Declarations
These functions are for internal use and are not part of the
public Action API. Each of the following functions returns a
newly allocated version of the desired string. It is up to the
caller to free the strings obtained.
******************************************************************************/
extern char *_DtBasename(const char *s);
extern char *_DtDirname(const char *s);
extern char *_DtPathname(const char *s);
extern char *_DtHostString(const char *s);
extern char *_DtGetSessionHostName( void );
extern char *_DtGetDisplayHostName( Display *d);
extern char *_DtGetLocalHostName( void );
extern char *_DtGetExecHostsDefault (void);
extern char *_DtGetActionIconDefault (void);
extern char *_DtGetDtTmpDir(void);
extern char *_DtActGenerateTmpFile(char *dir,
char *format,
mode_t mode,
int *fd );
extern int _DtIsSameHost( const char *host1, const char *host2 );
extern void _DtRemoveTrailingBlanksInPlace(char **s);
extern int _DtExecuteAccess(const char *path);
extern DtActionInvocationID _DtActAllocID();
extern _DtActInvRecT *_DtActAllocInvRec();
extern _DtActChildRecT *_DtActAllocChildRec( _DtActInvRecT *recp );
extern int _DtActDeleteInvRec( DtActionInvocationID id);
extern _DtActInvRecT *_DtActFindInvRec( DtActionInvocationID id);
extern _DtActChildRecT *_DtActFindChildRec(
DtActionInvocationID id,
unsigned long childId);
extern unsigned long _DtActEvalChildren(DtActionInvocationID id);
extern void _DtActExecutionLeafNodeCleanup(
DtActionInvocationID id,
DtActionArg *newArgp,
int newArgc,
int respectQuitBlock);
extern DtActionArg *_DtActMallocEmptyArgArray(int ac);
extern void _DtActFreeArgArray( DtActionArg *argp, int ac );
extern void *_DtActReadTmpFileToBuffer (
char *fname,
int *sizep);
extern int _DtActGetCmdReturnArgs (
DtActionInvocationID invId,
_DtActChildRecT *childp,
DtActionArg **aargv );
/******************************************************************************/
#endif /* _ActionUtilP_h */
/* DON'T ADD ANYTHING AFTER THIS #endif */

514
cde/include/Dt/CanvasP.h Normal file
View File

@@ -0,0 +1,514 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $TOG: CanvasP.h /main/17 1999/10/14 13:19:41 mgreess $ */
/*************************************<+>*************************************
*****************************************************************************
**
** File: CanvasP.h
**
** Project: Cde Help System
**
** Description: Private Header file for the UI independent core engine
** of the help system. It contains function prototypes,
** structure definitions, typedefs, etc.
**
** (c) Copyright 1987, 1988, 1989, 1990, 1991, 1992 Hewlett-Packard Company
**
** (c) Copyright 1993, 1994 Hewlett-Packard Company
** (c) Copyright 1993, 1994 International Business Machines Corp.
** (c) Copyright 1993, 1994 Sun Microsystems, Inc.
** (c) Copyright 1993, 1994 Novell, Inc.
*****************************************************************************
*************************************<+>*************************************/
#ifndef _DtCanvasP_h
#define _DtCanvasP_h
#ifdef __cplusplus
extern "C" {
#endif
/******** Public Re-defines ********/
#if !defined(_AIX)
#define _DtCvStrCaseCmp(s1,s2) strcasecmp(s1,s2)
#define _DtCvStrNCaseCmp(s1,s2, n) strncasecmp(s1,s2,n)
#else
#define _DtCvStrCaseCmp(s1,s2) _DtHelpCeStrCaseCmp(s1,s2)
#define _DtCvStrNCaseCmp(s1,s2,n) _DtHelpCeStrNCaseCmp(s1,s2, n)
#endif /* _AIX */
/******** Public Defines Declarations ********/
/*
* true, false and null
*/
#ifndef Null
#define Null 0
#endif
#ifndef NULL
#define NULL 0
#endif
#ifndef False
#define False 0
#endif
#ifndef True
#define True 1
#endif
#ifndef FALSE
#define FALSE 0
#endif
#ifndef TRUE
#define TRUE 1
#endif
/*
* Get Selection Type Declarations
*/
#define _DtCvSELECTED_TEXT (1 << 0)
#define _DtCvSELECTED_REGION (1 << 1)
#define _DtCvSELECTED_ALL (~((unsigned int) 0))
/*
* hypertext link types
*/
#define _DtCvLinkType_Execute 3
#define _DtCvLinkType_ManPage 4
#define _DtCvLinkType_AppDefine 5
#define _DtCvLinkType_SameVolume 6
#define _DtCvLinkType_CrossLink 7
#define _DtCvLinkType_TextFile 8
/*
* hypertext window hints
*/
#define _DtCvWindowHint_PopupWindow 1
#define _DtCvWindowHint_CurrentWindow 2
#define _DtCvWindowHint_NewWindow 3
#define _DtCvWindowHint_Original 4
/*********************
* Rendering flags
*********************/
/*
* Rendering flags - Link
*/
#define _DtCvLINK_FLAG (0x01 << 0)
#define _DtCvLINK_BEGIN (0x01 << 1)
#define _DtCvLINK_END (0x01 << 2)
#define _DtCvLINK_POP_UP (0x01 << 3)
#define _DtCvLINK_NEW_WINDOW (0x01 << 4)
/*
* Rendering flags - Search
*
* a gap is left for the search flags on a segment in CanvasSegP.h. If these
* change value, the other values must move to accommodate it. */
#define _DtCvSEARCH_FLAG (0x01 << 5)
#define _DtCvSEARCH_BEGIN (0x01 << 6)
#define _DtCvSEARCH_END (0x01 << 7)
#define _DtCvSEARCH_CURR (0x01 << 8)
/*
* Rendering flags - Mark
*/
#define _DtCvMARK_FLAG (0x01 << 9)
#define _DtCvMARK_BEGIN (0x01 << 10)
#define _DtCvMARK_END (0x01 << 11)
#define _DtCvMARK_ON (0x01 << 12)
/*
* Rendering flags - Traversal
*/
#define _DtCvTRAVERSAL_FLAG (0x01 << 13)
#define _DtCvTRAVERSAL_BEGIN (0x01 << 14)
#define _DtCvTRAVERSAL_END (0x01 << 15)
/*
* Rendering flags - Application defined flags.
*/
#define _DtCvAPP_FIELD_OFFSET (16)
#define _DtCvAPP_FIELD_MASK (0x0f << _DtCvAPP_FIELD_OFFSET)
#define _DtCvAPP_FIELD_S_MASK (0x03 << _DtCvAPP_FIELD_OFFSET)
#define _DtCvAPP_FLAG1 (0x01 << (_DtCvAPP_FIELD_OFFSET + 0))
#define _DtCvAPP_FLAG2 (0x01 << (_DtCvAPP_FIELD_OFFSET + 1))
#define _DtCvAPP_FLAG3 (0x01 << (_DtCvAPP_FIELD_OFFSET + 2))
#define _DtCvAPP_FLAG4 (0x01 << (_DtCvAPP_FIELD_OFFSET + 3))
/*
* Rendering flags - Selection
*/
#define _DtCvSELECTED_FLAG (0x01 << 20)
#define _DtCvEND_OF_LINE (0x01 << 21)
/*
* Activation masks
*/
#define _DtCvACTIVATE_SELECTION (0x01 << 0)
#define _DtCvACTIVATE_MARK (0x01 << 1)
#define _DtCvDEACTIVATE (0x01 << 2)
#define _DtCvACTIVATE_MARK_ON (0x01 << 3)
#define _DtCvACTIVATE_MARK_OFF (0x01 << 4)
/******** Public Enum Declarations ********/
/*
* Element types
*/
enum _dtCvElemType
{
_DtCvBAD_TYPE,
_DtCvCANVAS_TYPE,
_DtCvLINE_TYPE,
_DtCvLINK_TYPE,
_DtCvLOCALE_TYPE,
_DtCvMARK_TYPE,
_DtCvREGION_TYPE,
_DtCvSTRING_TYPE,
_DtCvTRAVERSAL_TYPE
};
typedef enum _dtCvElemType _DtCvElemType;
/*
* Canvas Engine values. Either parameters or return values.
*/
enum _dtCvValue
{
/*
* status types. i.e. True/False, Ok/Bad, etc.
*/
_DtCvFALSE = False,
_DtCvSTATUS_OK = False,
_DtCvTRUE = True,
_DtCvSTATUS_BAD = True,
_DtCvSTATUS_ID_BAD,
_DtCvSTATUS_NONE,
_DtCvSTATUS_LINK,
_DtCvSTATUS_MARK,
/*
* Render types
*/
_DtCvRENDER_PARTIAL,
_DtCvRENDER_COMPLETE,
/*
* Traversal defines
*/
_DtCvTRAVERSAL_OFF,
_DtCvTRAVERSAL_ON,
_DtCvTRAVERSAL_TOP,
_DtCvTRAVERSAL_NEXT,
_DtCvTRAVERSAL_PREV,
_DtCvTRAVERSAL_BOTTOM,
_DtCvTRAVERSAL_ID,
_DtCvTRAVERSAL_MARK,
/*
* processing a selection types
*/
_DtCvSELECTION_CLEAR,
_DtCvSELECTION_START,
_DtCvSELECTION_UPDATE,
_DtCvSELECTION_END,
/*
* honor the right boundary when laying out information
*/
_DtCvUSE_BOUNDARY,
_DtCvUSE_BOUNDARY_MOVE,
_DtCvIGNORE_BOUNDARY
};
typedef enum _dtCvValue _DtCvValue;
typedef enum _dtCvValue _DtCvStatus;
typedef enum _dtCvValue _DtCvRenderType;
typedef enum _dtCvValue _DtCvTraversalCmd;
typedef enum _dtCvValue _DtCvSelectMode;
/*
* line wrap mode types.
*/
enum _dtCvModeType
{
_DtCvModeWrapNone,
_DtCvModeWrapDown,
_DtCvModeWrapUp
};
typedef enum _dtCvModeType _DtCvModeType;
/******** Public Typedef Declarations ********/
typedef void* _DtCvPointer;
typedef void* _DtCvHandle;
typedef int _DtCvUnit;
typedef unsigned long _DtCvFlags;
typedef struct _dtCvSegPts _DtCvSegPts;
typedef struct _dtCvSegment _DtCvSegment;
/******** Public Structures Declarations ********/
typedef struct _dtCvMetrics {
_DtCvUnit width; /* max width of canvas area */
_DtCvUnit height; /* max height of canvas area */
_DtCvUnit top_margin; /* top margin to allow for */
_DtCvUnit side_margin; /* left margin to allow for */
_DtCvUnit line_height; /* the height of an average line of */
/* text */
_DtCvUnit horiz_pad_hint; /* the optimul spacing to use if */
/* lines have to be squeezed for */
/* _DtCvUSE_BOUNDARY */
} _DtCvMetrics;
typedef struct _dtCvSpaceMetrics {
_DtCvUnit space_before;
_DtCvUnit space_after;
_DtCvUnit space_above;
_DtCvUnit space_below;
} _DtCvSpaceMetrics;
typedef struct _dtCvLocale {
_DtCvModeType line_wrap_mode; /* specifies the wrap mode */
const wchar_t *cant_begin_chars; /* specifies the characters */
/* that can't begin a line */
const wchar_t *cant_end_chars; /* specifies the characters */
/* that can't end a line */
} _DtCvLocale;
typedef struct _dtCvStringInfo {
const void *string;
int byte_len;
int wc;
_DtCvPointer font_ptr;
_DtCvPointer csd;
} _DtCvStringInfo;
typedef struct _dtCvLineInfo {
_DtCvUnit x2;
_DtCvUnit y2;
_DtCvUnit width;
_DtCvPointer data;
} _DtCvLineInfo;
typedef struct _dtCvRenderInfo {
_DtCvPointer info;
_DtCvUnit box_x;
_DtCvUnit box_y;
_DtCvUnit box_height;
_DtCvUnit box_width;
} _DtCvRenderInfo;
typedef struct _dtCvLinkInfo {
char *specification;
char *description;
int hyper_type;
int win_hint;
_DtCvUnit offset_x;
_DtCvUnit offset_y;
} _DtCvLinkInfo;
typedef struct _dtCvPointInfo {
_DtCvPointer client_data;
_DtCvSegPts **segs;
} _DtCvPointInfo;
/******** Public Structure Typedef Declarations ********/
typedef struct _dtCvTopicInfo* _DtCvTopicPtr;
/******** Public Prototyped Procedures ********/
typedef void (*_DtCvGetMetrics)(
_DtCvPointer /* client_data */,
_DtCvElemType /* elem_type */,
_DtCvPointer /* ret_metrics */
);
typedef void (*_DtCvRenderElem)(
_DtCvPointer /* client_data */,
_DtCvElemType /* elem_type */,
_DtCvUnit /* x */,
_DtCvUnit /* y */,
int /* link_type */,
_DtCvFlags /* old_flags */,
_DtCvFlags /* new_flags */,
_DtCvElemType /* trav_type */,
_DtCvPointer /* trav_data */,
_DtCvPointer /* data */
);
typedef _DtCvUnit (*_DtCvGetElemWidth)(
_DtCvPointer /* client_data */,
_DtCvElemType /* elem_type */,
_DtCvPointer /* data */
);
typedef void (*_DtCvGetFontMetrics)(
_DtCvPointer /* client_data */,
_DtCvPointer /* font_ptr */,
_DtCvUnit* /* *ret_ascent */,
_DtCvUnit* /* *ret_descent */,
_DtCvUnit* /* *ret_width */,
_DtCvUnit* /* *ret_super */,
_DtCvUnit* /* *ret_sub */
);
typedef _DtCvStatus (*_DtCvBuildSelection)(
_DtCvPointer /* client_data */,
_DtCvElemType /* elem_type */,
unsigned int /* mask */,
_DtCvPointer* /* prev_info */,
_DtCvUnit /* space */,
_DtCvUnit /* width */,
_DtCvFlags /* flags */,
_DtCvPointer /* data */
);
typedef int (*_DtCvFilterExecCmd)(
_DtCvPointer /* client_data */,
const char* /* cmd */,
char** /* ret_cmd */
);
/******** Public Structures Declarations ********/
typedef struct _dtCvVirtualInfo {
_DtCvGetMetrics get_metrics;
_DtCvRenderElem render_elem;
_DtCvGetElemWidth get_width;
_DtCvGetFontMetrics get_font_metrics;
_DtCvBuildSelection build_selection;
_DtCvFilterExecCmd exec_cmd_filter;
} _DtCvVirtualInfo;
typedef struct _dtCvMarkPos {
_DtCvPointer client_data;
_DtCvUnit x1;
_DtCvUnit y1;
_DtCvUnit baseline1;
_DtCvUnit x2;
_DtCvUnit y2;
_DtCvUnit baseline2;
} _DtCvMarkPos;
/******** Public Macro Declarations ********/
/******** Semi-Public Function Declarations ********/
extern int _DtCvGetSearchLineMetrics(
_DtCvHandle canvas_handle,
int search_hit_index,
_DtCvUnit* baseline,
_DtCvUnit* descent,
_DtCvUnit* ascent);
/******** Public Function Declarations ********/
extern _DtCvStatus _DtCanvasActivatePts(
_DtCvHandle canvas_handle,
unsigned int mask,
_DtCvPointInfo *info,
_DtCvUnit *ret_y1,
_DtCvUnit *ret_y2);
extern void _DtCanvasClean(
_DtCvHandle canvas_handle);
extern _DtCvHandle _DtCanvasCreate(
_DtCvVirtualInfo virt_info,
_DtCvPointer client_data);
extern void _DtCanvasDestroy(
_DtCvHandle canvas_handle);
extern _DtCvStatus _DtCanvasGetCurLink(
_DtCvHandle canvas_handle,
_DtCvLinkInfo *ret_info);
extern _DtCvStatus _DtCanvasGetCurTraversal(
_DtCvHandle canvas_handle,
_DtCvLinkInfo *ret_info,
_DtCvPointer *ret_data);
extern _DtCvStatus _DtCanvasGetMarkPositions(
_DtCvHandle canvas_handle,
_DtCvMarkPos ***ret_pos);
extern _DtCvStatus _DtCanvasGetPosLink(
_DtCvHandle canvas_handle,
_DtCvUnit x1,
_DtCvUnit y1,
_DtCvUnit x2,
_DtCvUnit y2,
_DtCvLinkInfo *ret_info);
extern _DtCvStatus _DtCanvasGetSelection(
_DtCvHandle canvas_handle,
unsigned int mask,
_DtCvPointer *ret_select);
extern _DtCvStatus _DtCanvasGetSelectionPoints(
_DtCvHandle canvas_handle,
_DtCvSegPts ***ret_segs,
_DtCvUnit *ret_y1,
_DtCvUnit *ret_y2);
extern _DtCvStatus _DtCanvasGetSpotInfo(
_DtCvHandle canvas_handle,
_DtCvUnit x,
_DtCvUnit y,
_DtCvSegment **ret_seg,
_DtCvUnit *ret_offx,
_DtCvUnit *ret_offy,
_DtCvElemType *ret_element);
extern _DtCvStatus _DtCanvasMoveTraversal(
_DtCvHandle canvas_handle,
_DtCvTraversalCmd cmd,
_DtCvValue wrap,
_DtCvValue render,
_DtCvPointer rid,
_DtCvUnit *ret_x,
_DtCvUnit *ret_y,
_DtCvUnit *ret_baseline,
_DtCvUnit *ret_height);
extern void _DtCanvasProcessSelection (
_DtCvHandle canvas_handle,
_DtCvUnit x,
_DtCvUnit y,
_DtCvSelectMode mode);
extern void _DtCanvasRender(
_DtCvHandle canvas_handle,
_DtCvUnit x1,
_DtCvUnit y1,
_DtCvUnit x2,
_DtCvUnit y2,
_DtCvRenderType flag,
_DtCvValue pg_break,
_DtCvUnit *max_y,
_DtCvUnit *next_y);
extern _DtCvStatus _DtCanvasResize(
_DtCvHandle canvas_handle,
_DtCvValue force,
_DtCvUnit *ret_width,
_DtCvUnit *ret_height);
extern _DtCvStatus _DtCanvasSetTopic(
_DtCvHandle canvas_handle,
_DtCvTopicPtr topic_handle,
_DtCvValue honor_size,
_DtCvUnit *ret_width,
_DtCvUnit *ret_height,
_DtCvUnit *ret_y);
extern void _DtCanvasLoadMetrics(
_DtCvHandle canvas_handle);
#ifdef __cplusplus
} /* Close scope of 'extern "C"' declaration which encloses file. */
#endif
#endif /* _DtCanvasP_h */
/* DON'T ADD ANYTHING AFTER THIS #endif */

538
cde/include/Dt/CanvasSegP.h Normal file
View File

@@ -0,0 +1,538 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: CanvasSegP.h /main/19 1996/10/04 18:30:19 rswiston $ */
/*************************************<+>*************************************
*****************************************************************************
**
** File: CanvasSegP.h
**
** Project:
**
** Description: Public Header file for Canvas Engine
**
** (c) Copyright 1987, 1988, 1989, 1990, 1991, 1992 Hewlett-Packard Company
**
** (c) Copyright 1993, 1994 Hewlett-Packard Company
** (c) Copyright 1993, 1994 International Business Machines Corp.
** (c) Copyright 1993, 1994 Sun Microsystems, Inc.
** (c) Copyright 1993, 1994 Novell, Inc.
*******************************************************************
*************************************<+>*************************************/
#ifndef _DtCanvasSegP_h
#define _DtCanvasSegP_h
#ifdef __cplusplus
extern "C" {
#endif
/******** Public Defines Declarations ********/
/*****************************************************************************
* Some bits in passed in as a _DtCvFlags and the 'type' in _DtCvSegment
* must match because they are passed straight thought from the segment
* to the application. The following map is to help prevent colisions.
*
* (-------------------------> _DtCvEND_OF_LINE
* | (-----------------------> _DtCvSELECTED_FLAG
* | |
* | | (-------------------------> _DtCvAPP_FLAG4 \
* | | | (-----------------------> _DtCvAPP_FLAG3 \
* | | | | (---------------------> _DtCvAPP_FLAG2 / _DtCvAPP_FIELD
* | | | | | (-------------------> _DtCvAPP_FLAG1 /
* | | | | | |
* | | | | | | (---------------------> _DtCvTRAVERSAL_END
* | | | | | | | (-------------------> _DtCvTRAVERSAL_BEGIN
* | | | | | | | | (-----------------> _DtCvTRAVERSAL_FLAG
* | | | | | | | | |
* | | | | | | | | | (-------------------> _DtCvMARK_ON
* | | | | | | | | | | (-----------------> _DtCvMARK_END
* | | | | | | | | | | | (---------------> _DtCvMARK_BEGIN
* | | | | | | | | | | | | (-------------> _DtCvMARK_FLAG
* | | | | | | | | | | | | |
* | | | | | | | | | | | | | (-------------> _DtCvSEARCH_CURR
* | | | | | | | | | | | | | | (-----------> _DtCvSEARCH_END
* | | | | | | | | | | | | | | | (---------> _DtCvSEARCH_BEGIN
* | | | | | | | | | | | | | | | | (-------> _DtCvSEARCH_FLAG
* | | | | | | | | | | | | | | | | |
* | | | | | | | | | | | | | | | | | (---------> _DtCvLINK_NEW_WINDOW
* | | | | | | | | | | | | | | | | | | (-------> _DtCvLINK_POP_UP
* | | | | | | | | | | | | | | | | | | | (-----> _DtCvLINK_END
* | | | | | | | | | | | | | | | | | | | | (---> _DtCvLINK_BEGIN
* | | | | | | | | | | | | | | | | | | | | | (-> _DtCvLINK_FLAG
* | | | | | | | | | | | | | | | | | | | | | |
* v v v v v v#v v v v v v v v#v v v v v v v v
* 1 0 9 8 7 6#5 4 3 2 1 0 9 8#7 6 5 4 3 2 1 0
* ------------#---------------#----------------
* |.|.|.|.|.|.#.|.|.|.|.|.|.|.#.|.|.|.|.|.|.|.|
* ------------#---------------#----------------
* ^ ^ ^ ^ ^#^ ^ ^ ^ ^ ^ ^ ^#^ ^ ^ ^ ^^^^^
* | | | | | | | | | | | | | | | | | \|/
* | | | | | | | | | | | | | | | | | |
* | | | | | | | | | | | | | | | | | (-> Segment type
* | | | | | | | | | | | | | | | | (-----> _DtCvWIDE_CHAR
* | | | | | | | | | | | | | | | |
* | | | | | | | | | | | | | | | (-----> _DtCvSEARCH_FLAG
* | | | | | | | | | | | | | | (-------> _DtCvSEARCH_BEGIN
* | | | | | | | | | | | | | (---------> _DtCvSEARCH_END
* | | | | | | | | | | | | (-----------> _DtCvSEARCH_CURR
* | | | | | | | | | | | |
* | | | | | | | | | | | (---------> _DtCvCONTROLLER/_DtCvBLOCK_LINE/
* | | | | | | | | | | | _DtCvNEW_LINE
* | | | | | | | | | | (-----------> _DtCvSUB_SCRIPT
* | | | | | | | | | (-------------> _DtCvSUPER_SCRIPT
* | | | | | | | | (---------------> _DtCvGHOST_LINK
* | | | | | | | (-----------------> _DtCvHYPER_TEXT
* | | | | | | (-------------------> _DtCvNON_BREAK
* | | | | | (---------------------> _DtCvIN_LINE
* | | | | |
* | | | | (---------------> _DtCvAPP_FLAG1 \
* | | | (-----------------> _DtCvAPP_FLAG2 \ _DtCvAPP_FIELD
* | | (-------------------> _DtCvAPP_FLAG3 /
* | (---------------------> _DtCvAPP_FLAG4 /
* |
* (------------------> _DtCvPAGE_BREAK
*
*****************************************************************************/
/*
* segment types
*/
#define _DtCvNOOP (0x00)
#define _DtCvCONTAINER (0x01)
#define _DtCvLINE (0x02)
#define _DtCvMARKER (0x03)
#define _DtCvREGION (0x04)
#define _DtCvSTRING (0x05)
#define _DtCvTABLE (0x06)
#define _DtCvPRIMARY_MASK (0x07)
#define _DtCvSHIFT_PAST_PRIMARY 3
/*
* character size manipulation
*/
#define _DtCvWIDE_CHAR (0x01 << _DtCvSHIFT_PAST_PRIMARY)
/*
* segment flags
*/
/* leave a gap for the search flags defined in CanvasP.h */
#define _DtCvSHIFT_TO_FLAGS 9
/* container only */
#define _DtCvCONTROLLER (0x01 << (_DtCvSHIFT_TO_FLAGS + 0))
/* line type */
#define _DtCvBLOCK_LINE (0x01 << (_DtCvSHIFT_TO_FLAGS + 0))
/* string & region (_DtCvNEW_LINE works on _DtCvNOOP too) */
#define _DtCvNEW_LINE (0x01 << (_DtCvSHIFT_TO_FLAGS + 0))
#define _DtCvSUB_SCRIPT (0x01 << (_DtCvSHIFT_TO_FLAGS + 1))
#define _DtCvSUPER_SCRIPT (0x01 << (_DtCvSHIFT_TO_FLAGS + 2))
#define _DtCvGHOST_LINK (0x01 << (_DtCvSHIFT_TO_FLAGS + 3))
#define _DtCvHYPER_TEXT (0x01 << (_DtCvSHIFT_TO_FLAGS + 4))
#define _DtCvNON_BREAK (0x01 << (_DtCvSHIFT_TO_FLAGS + 5))
/* region only */
#define _DtCvIN_LINE (0x01 << (_DtCvSHIFT_TO_FLAGS + 6))
/* application flags - defined in CanvasP.h (starting at 16th bit for 4 bits) */
/* valid on any segment */
#define _DtCvPAGE_BREAK (0x01 << (_DtCvSHIFT_TO_FLAGS + 11))
/* highlight macros */
#define HILITE_OVERLINE 0
#define HILITE_STRIKETHROUGH 1
#define HILITE_UNDERLINE 2
/******** Public Enum Declarations ********/
enum _dtCvFrmtOption
{
_DtCvOPTION_BAD,
/*
* string breaking types
*/
_DtCvLITERAL,
_DtCvDYNAMIC,
/*
* table border types
*/
_DtCvBORDER_NONE,
_DtCvBORDER_FULL,
_DtCvBORDER_HORZ,
_DtCvBORDER_VERT,
_DtCvBORDER_TOP,
_DtCvBORDER_BOTTOM,
_DtCvBORDER_LEFT,
_DtCvBORDER_RIGHT,
_DtCvBORDER_TOP_LEFT,
_DtCvBORDER_TOP_RIGHT,
_DtCvBORDER_BOTTOM_LEFT,
_DtCvBORDER_BOTTOM_RIGHT,
/*
* controller horizontal orientation
*/
_DtCvJUSTIFY_LEFT_CORNER,
_DtCvJUSTIFY_LEFT, /* also container horizontal text placement */
_DtCvJUSTIFY_LEFT_MARGIN,
_DtCvJUSTIFY_CENTER, /* also container horiz/vert text placement */
_DtCvJUSTIFY_RIGHT_MARGIN,
_DtCvJUSTIFY_RIGHT, /* also container horizontal text placement */
_DtCvJUSTIFY_RIGHT_CORNER,
/*
* extra container horizontal text placement
*/
_DtCvJUSTIFY_NUM,
_DtCvJUSTIFY_CHAR,
/*
* inherit the parent's horizontal text placement
*/
_DtCvINHERIT,
/*
* controller vertical orientation, includes _DtCvJUSTIFY_CENTER
*/
_DtCvJUSTIFY_TOP, /* also container vertical text placement */
_DtCvJUSTIFY_BOTTOM, /* also container vertical text placement */
/*
* controller flow types
*/
_DtCvWRAP,
_DtCvWRAP_NONE,
_DtCvWRAP_JOIN
};
typedef enum {
hilite_overline = 0x01 << HILITE_OVERLINE,
hilite_strikethrough = 0x01 << HILITE_STRIKETHROUGH,
hilite_underline = 0x01 << HILITE_UNDERLINE
} text_hilite_t;
/******** Public Enum Typedef Declarations ********/
typedef enum _dtCvFrmtOption _DtCvFrmtOption;
/******** Public Structures Declarations ********/
typedef struct _dtCvLine {
_DtCvUnit width;
_DtCvPointer data;
} _DtCvLine;
typedef struct _dtCvContainer {
char *id;
char *justify_char;
_DtCvFrmtOption type;
_DtCvFrmtOption border;
_DtCvFrmtOption justify;
_DtCvFrmtOption vjustify;
_DtCvFrmtOption orient;
_DtCvFrmtOption vorient;
_DtCvFrmtOption flow;
int percent;
_DtCvUnit leading;
_DtCvUnit fmargin;
_DtCvUnit lmargin;
_DtCvUnit rmargin;
_DtCvUnit tmargin;
_DtCvUnit bmargin;
_DtCvLine bdr_info;
struct _dtCvSegment *seg_list;
} _DtCvContainer;
typedef struct _DtCvString {
void *string;
_DtCvPointer font;
} _DtCvString;
typedef struct _dtCvRegion {
_DtCvPointer info;
_DtCvUnit width;
_DtCvUnit height;
_DtCvUnit ascent;
} _DtCvRegion;
typedef struct _dtCvTable {
int num_cols;
char **col_w;
_DtCvFrmtOption *col_justify;
char *justify_chars;
char **cell_ids;
struct _dtCvSegment **cells;
} _DtCvTable;
typedef union _dtCvSegHandles {
_DtCvContainer container;
_DtCvString string;
_DtCvRegion region;
_DtCvTable table;
_DtCvLine rule;
char *marker;
} _DtCvSegHandles;
struct _dtCvSegment {
unsigned long type;
int link_idx;
_DtCvSegHandles handle;
struct _dtCvSegment *next_seg;
struct _dtCvSegment *next_disp;
_DtCvPointer client_use;
_DtCvPointer internal_use;
};
struct _dtCvSegPts {
struct _dtCvSegment *segment;
int offset;
int len;
};
typedef struct _dtCvTopicInfo {
char *id_str;
struct _dtCvSegment *seg_list;
_DtCvPointInfo **mark_list;
struct _dtCvLinkDb *link_data;
} _DtCvTopicInfo;
typedef struct _dtCvStringClientData {
unsigned int vcc;
unsigned int vclen;
unsigned int hilite_type;
char* bg_color;
char* fg_color;
unsigned long bg_pixel;
unsigned long fg_pixel;
} _DtCvStringClientData;
typedef struct _dtCvRegionClientData {
_DtCvPointer GraphicHandle;
} _DtCvRegionClientData;
typedef union _dtCvClientData {
_DtCvRegionClientData region;
_DtCvStringClientData string;
} _DtCvClientData;
/******** Public Structure Typedef Declarations ********/
/******** Public Prototyped Procedures ********/
/******** Public Macro Declarations ********/
/*
* set segment type
*/
#define _DtCvSetTypeToContainer(x) \
(((x) & ~(_DtCvPRIMARY_MASK)) | _DtCvCONTAINER)
#define _DtCvSetTypeToLine(x) \
(((x) & ~(_DtCvPRIMARY_MASK)) | _DtCvLINE)
#define _DtCvSetTypeToMarker(x) \
(((x) & ~(_DtCvPRIMARY_MASK)) | _DtCvMARKER)
#define _DtCvSetTypeToNoop(x) \
(((x) & ~(_DtCvPRIMARY_MASK)) | _DtCvNOOP)
#define _DtCvSetTypeToRegion(x) \
(((x) & ~(_DtCvPRIMARY_MASK)) | _DtCvREGION)
#define _DtCvSetTypeToString(x) \
(((x) & ~(_DtCvPRIMARY_MASK)) | _DtCvSTRING)
#define _DtCvSetTypeToTable(x) \
(((x) & ~(_DtCvPRIMARY_MASK)) | _DtCvTABLE)
/*
* set segment flags
*/
#define _DtCvSetTypeToBlockLine(x) ((x) | _DtCvBLOCK_LINE)
#define _DtCvSetTypeToController(x) ((x) | _DtCvCONTROLLER)
#define _DtCvSetTypeToGhostLink(x) ((x) | _DtCvGHOST_LINK)
#define _DtCvSetTypeToHyperText(x) ((x) | _DtCvHYPER_TEXT)
#define _DtCvSetTypeToInLine(x) ((x) | _DtCvIN_LINE)
#define _DtCvSetTypeToNewLine(x) ((x) | _DtCvNEW_LINE)
#define _DtCvSetTypeToNonBreak(x) ((x) | _DtCvNON_BREAK)
#define _DtCvSetTypeToSearch(x) ((x) | _DtCvSEARCH_FLAG)
#define _DtCvSetTypeToSearchBegin(x) ((x) | _DtCvSEARCH_BEGIN)
#define _DtCvSetTypeToSearchEnd(x) ((x) | _DtCvSEARCH_END)
#define _DtCvSetTypeToSubScript(x) ((x) | _DtCvSUB_SCRIPT)
#define _DtCvSetTypeToSuperScript(x) ((x) | _DtCvSUPER_SCRIPT)
/*
* set character size
*/
#define _DtCvSetTypeToWideChar(x) ((x) | _DtCvWIDE_CHAR)
/*
* set application flags and/or field
*/
#define _DtCvSetAppFlag1(x) ((x) | _DtCvAPP_FLAG1)
#define _DtCvSetAppFlag2(x) ((x) | _DtCvAPP_FLAG2)
#define _DtCvSetAppFlag3(x) ((x) | _DtCvAPP_FLAG3)
#define _DtCvSetAppFlag4(x) ((x) | _DtCvAPP_FLAG4)
#define _DtCvSetAppField(x,y) \
(((x) & ~(_DtCvAPP_FIELD_MASK)) | \
((y & _DtCvAPP_FIELD_MASK) << _DtCvAPP_FIELD_OFFSET))
#define _DtCvSetAppFieldSmall(x,y) \
(((x) & ~(_DtCvAPP_FIELD_S_MASK)) | \
((y & _DtCvAPP_FIELD_S_MASK) << _DtCvAPP_FIELD_OFFSET))
/*
* get the application field value
*/
#define _DtCvGetAppField(x) \
(((x) & _DtCvAPP_FIELD_MASK) >> _DtCvAPP_FIELD_OFFSET)
#define _DtCvGetAppFieldSmall(x) \
(((x) & _DtCvAPP_FIELD_S_MASK) >> _DtCvAPP_FIELD_OFFSET)
/******** Semi-Public Macro Declarations ********/
/*
* get segment type
*/
#define _DtCvPrimaryTypeOfSeg(x) ((x->type) & _DtCvPRIMARY_MASK)
#define _DtCvIsSegContainer(x) \
(((((x)->type) & _DtCvPRIMARY_MASK) == _DtCvCONTAINER) ? 1 : 0)
#define _DtCvIsSegLine(x) \
(((((x)->type) & _DtCvPRIMARY_MASK) == _DtCvLINE) ? 1 : 0)
#define _DtCvIsSegMarker(x) \
(((((x)->type) & _DtCvPRIMARY_MASK) == _DtCvMARKER) ? 1 : 0)
#define _DtCvIsSegNoop(x) \
(((((x)->type) & _DtCvPRIMARY_MASK) == _DtCvNOOP) ? 1 : 0)
#define _DtCvIsSegRegion(x) \
(((((x)->type) & _DtCvPRIMARY_MASK) == _DtCvREGION) ? 1 : 0)
#define _DtCvIsSegString(x) \
(((((x)->type) & _DtCvPRIMARY_MASK) == _DtCvSTRING) ? 1 : 0)
#define _DtCvIsSegTable(x) \
(((((x)->type) & _DtCvPRIMARY_MASK) == _DtCvTABLE) ? 1 : 0)
/*
* get segment flags
*/
#define _DtCvIsSegController(x) \
((((x)->type) & _DtCvCONTROLLER) ? 1 : 0)
#define _DtCvIsSegBlockLine(x) \
((((x)->type) & _DtCvBLOCK_LINE) ? 1 : 0)
#define _DtCvIsSegGhostLink(x) \
((((x)->type) & _DtCvGHOST_LINK) ? 1 : 0)
#define _DtCvIsSegHyperText(x) \
((((x)->type) & _DtCvHYPER_TEXT) ? 1 : 0)
#define _DtCvIsSegInLine(x) \
((((x)->type) & _DtCvIN_LINE) ? 1 : 0)
#define _DtCvIsSegNewLine(x) \
((((x)->type) & _DtCvNEW_LINE) ? 1 : 0)
#define _DtCvIsSegNonBreakingChar(x) \
((((x)->type) & _DtCvNON_BREAK) ? 1 : 0)
#define _DtCvIsSegPageBreak(x) \
((((x)->type) & _DtCvPAGE_BREAK) ? 1 : 0)
#define _DtCvIsSegRegChar(x) \
((((x)->type) & _DtCvWIDE_CHAR) ? 0 : 1)
#define _DtCvIsSegSubScript(x) \
((((x)->type) & _DtCvSUB_SCRIPT) ? 1 : 0)
#define _DtCvIsSegSuperScript(x) \
((((x)->type) & _DtCvSUPER_SCRIPT) ? 1 : 0)
#define _DtCvIsSegWideChar(x) \
((((x)->type) & _DtCvWIDE_CHAR) ? 1 : 0)
/*
* segment access
*/
#define _DtCvNextSeg(x) ((x)->next_seg)
#define _DtCvNextDisp(x) ((x)->next_disp)
/*
* container access
*/
#define _DtCvContainerOfSeg(x) \
((x)->handle.container)
#define _DtCvContainerBMarginOfSeg(x) \
((x)->handle.container.bmargin)
#define _DtCvContainerBorderOfSeg(x) \
((x)->handle.container.border)
#define _DtCvContainerFlowOfSeg(x) \
((x)->handle.container.flow)
#define _DtCvContainerFMarginOfSeg(x) \
((x)->handle.container.fmargin)
#define _DtCvContainerIdOfSeg(x) \
((x)->handle.container.id)
#define _DtCvContainerJustifyCharOfSeg(x) \
((x)->handle.container.justify_char)
#define _DtCvContainerJustifyOfSeg(x) \
((x)->handle.container.justify)
#define _DtCvContainerLeadingOfSeg(x) \
((x)->handle.container.leading)
#define _DtCvContainerLineWidthOfSeg(x) \
((x)->handle.container.bdr_info.width)
#define _DtCvContainerLineDataOfSeg(x) \
((x)->handle.container.bdr_info.data)
#define _DtCvContainerListOfSeg(x) \
((x)->handle.container.seg_list)
#define _DtCvContainerLMarginOfSeg(x) \
((x)->handle.container.lmargin)
#define _DtCvContainerOrientOfSeg(x) \
((x)->handle.container.orient)
#define _DtCvContainerPercentOfSeg(x) \
((x)->handle.container.percent)
#define _DtCvContainerRMarginOfSeg(x) \
((x)->handle.container.rmargin)
#define _DtCvContainerTMarginOfSeg(x) \
((x)->handle.container.tmargin)
#define _DtCvContainerTypeOfSeg(x) \
((x)->handle.container.type)
#define _DtCvContainerVJustifyOfSeg(x) \
((x)->handle.container.vjustify)
#define _DtCvContainerVOrientOfSeg(x) \
((x)->handle.container.vorient)
/*
* marker access
*/
#define _DtCvIdOfMarkerSeg(x) ((x)->handle.marker)
/*
* marker access
*/
#define _DtCvDataOfLineSeg(x) ((x)->handle.rule.data)
#define _DtCvWidthOfLineSeg(x) ((x)->handle.rule.width)
/*
* string access
*/
#define _DtCvStringOfStringSeg(x) ((x)->handle.string.string)
#define _DtCvFontOfStringSeg(x) ((x)->handle.string.font)
/*
* region access
*/
#define _DtCvInfoOfRegionSeg(x) ((x)->handle.region.info)
#define _DtCvWidthOfRegionSeg(x) ((x)->handle.region.width)
#define _DtCvHeightOfRegionSeg(x) ((x)->handle.region.height)
#define _DtCvAscentOfRegionSeg(x) ((x)->handle.region.ascent)
/*
* table access
*/
#define _DtCvNumColsOfTableSeg(x) ((x)->handle.table.num_cols)
#define _DtCvColWOfTableSeg(x) ((x)->handle.table.col_w)
#define _DtCvColJustifyOfTableSeg(x) ((x)->handle.table.col_justify)
#define _DtCvJustifyCharsOfTableSeg(x) ((x)->handle.table.justify_chars)
#define _DtCvCellIdsOfTableSeg(x) ((x)->handle.table.cell_ids)
#define _DtCvCellsOfTableSeg(x) ((x)->handle.table.cells)
/******** Semi-Public Function Declarations ********/
/******** Public Function Declarations ********/
#ifdef __cplusplus
} /* Close scope of 'extern "C"' declaration which encloses file. */
#endif
#endif /* _DtCanvasSegP_h */
/* DON'T ADD ANYTHING AFTER THIS #endif */

133
cde/include/Dt/ChkpntP.h Normal file
View File

@@ -0,0 +1,133 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/*
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
* (c) Copyright 1993, 1994 International Business Machines Corp. *
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
* (c) Copyright 1993, 1994 Novell, Inc. *
*/
/* -*-C-*-
**************************************************************************
*
* File: Chkpnt.h
* Description: CDE Private header file. Private API for sending checkpoint
* messages between compliant clients and the checkpoint service
* provider. This API is designed for use by performance
* measurement programs.
*
* Created: Mon Sep 6 09:00 1993
* Language: C
*
* $XConsortium: ChkpntP.h /main/4 1995/10/26 15:18:33 rswiston $
*
* (C) Copyright 1993, Hewlett-Packard, all rights reserved.
*
**************************************************************************
*/
#ifndef _Dt_Perf_Checkpoint_P_h
#define _Dt_Perf_Checkpoint_P_h
#include <X11/Xlib.h>
#include <X11/Xatom.h>
#include <X11/Intrinsic.h>
/*************************************************************************/
/************* Data types ************************************************/
/*************************************************************************/
/* The following definition is ONLY meant for union that follows */
typedef struct {
char *pname; /* Client program name */
char *window; /* Window Id for client */
char *type; /* Type of message */
char *count; /* Running count of messages */
char *seconds; /* Time in seconds from gettimeofday() */
char *message; /* Actual message */
} _DtChkpntMsgFormat;
#define DT_PERF_CHKPNT_MSG_SIZE (sizeof(_DtChkpntMsgFormat) / sizeof(char *))
/* Use the following union for actual message declaration */
typedef union {
_DtChkpntMsgFormat record;
char *array[DT_PERF_CHKPNT_MSG_SIZE];
} DtChkpntMsg;
#define DT_PERF_CHKPNT_MSG_INIT "Init"
#define DT_PERF_CHKPNT_MSG_CHKPNT "Chkpnt"
#define DT_PERF_CHKPNT_MSG_END "End"
/*************************************************************************/
/************* Atom Names ************************************************/
/*************************************************************************/
/* Selection for ICCCM style interaction of client and listener*/
/* This selection is owned by the listener */
#define DT_PERF_CHKPNT_SEL "_DT_PERF_CHKPNT_SEL"
/* Properties attached to the client: Used for message transmission */
#define DT_PERF_CLIENT_CHKPNT_PROP "_DT_PERF_CHKPNT_PROP"
/*************************************************************************/
/************* Client Functions ******************************************/
/*************************************************************************/
/* Note: It is expected that users will invoke the following functions within
#ifdef DT_PERFORMANCE directives. The DT_PERFORMANCE flag should be set,
in the build environment, for the performance-test-enabled builds.
*/
/* Initialize the checkpointing mechanism */
extern int _DtPerfChkpntInit(
Display *display, /* Display pointer */
Window parentwin, /* Parent window id */
char *prog_name, /* Name of the client program (argv[0]) */
Boolean bChkpnt /* Boolean: True or False */
);
/* Send a checkpoint message to the listener */
extern void _DtPerfChkpntMsgSend(
char *message /* Acual message for transmission */
);
/* End the checkpointing message delivery */
extern int _DtPerfChkpntEnd(
);
/*************************************************************************/
/************* Listener Service Functions ********************************/
/*************************************************************************/
/* Initialize the listener */
extern int _DtPerfChkpntListenInit(
Display *display, /* Current display */
Window parentwin /* Parent of window associated with listener */
);
/* Fetch a message from message queue */
extern Bool _DtPerfChkpntMsgReceive(
DtChkpntMsg *dtcp_msg, /* Above message available as a structure */
Bool bBlock /* Block until a message is received ? */
);
#endif /*_Dt_Perf_Checkpoint_h*/
/* Do not add anything after this endif. */

199
cde/include/Dt/CmdInv.h Normal file
View File

@@ -0,0 +1,199 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: CmdInv.h /main/6 1996/01/23 10:41:03 barstow $ */
/***************************************************************************
*
* File: CmdInv.h
* Description: Public header for the command invocation system.
* Language: C
*
** (c) Copyright 1993, 1994 Hewlett-Packard Company
** (c) Copyright 1993, 1994 International Business Machines Corp.
** (c) Copyright 1993, 1994 Sun Microsystems, Inc.
** (c) Copyright 1993, 1994 Novell, Inc.
***************************************************************************/
#ifndef _CmdInv_h
#define _CmdInv_h
#include <X11/Xlib.h>
#include <Dt/Message.h>
#include <Dt/Spc.h>
/******************************************************************************
*
* DtCmdInvExecuteProc - This type is is used to define the parameters
* needed in the callback functions for success and failure notification
* of a Command Invoker execution call.
*
*****************************************************************************/
typedef void (*DtCmdInvExecuteProc) (
char *message, /* NULL if the request is successful.
* Otherwise an error message. */
void *client_data
);
/******************************************************************************
*
* Function: void _DtInitializeCommandInvoker (
* Display *display,
* char *toolClass,
* char *applicationClass,
* DtSvcReceiveProc reloadDBHandler,
* XtAppContext appContext)
*
* Parameters:
*
* display - The X server display connection.
*
* toolClass - The BMS tool class of the client.
*
* applicationClass - The application class of the client (see
* XtInitialize). This is needed to add the
* Command Invoker's resources to the client's
* resources.
*
* reloadDBHandler - Function to be called if a RELOAD-TYPES-DB
* request is made. If the client does not read
* DT action and/or filetype databases, NULL must
* be used.
*
* appContext - The client's application context. Must be NULL
* if the client does not use an application
* context.
*
* Purpose:
*
* This function allows a client to internalize the functionality
* of the DT "Command Invoker". By using this library and the
* Action Library, requests for the Command Invoker will be done
* internally instead of sending a request to a separate Command
* Invoker process.
*
* For local execution, the "fork" and "execvp" system calls are
* used. For remote execution, the "SPCD" is used.
*
*****************************************************************************/
extern void
_DtInitializeCommandInvoker(
Display *display,
char *toolClass,
char *applicationClass,
DtSvcReceiveProc reloadDBHandler,
XtAppContext appContext);
/******************************************************************************
*
* Function: void _DtCommandInvokerExecute (
* char *request_name,
* char *context_host,
* char *context_dir,
* char *context_file,
* char *exec_parameters,
* char *exec_host,
* char *exec_string,
* DtCmdInvExecProc success_proc,
* void *success_data,
* DtCmdInvExecProc failure_proc,
* void *failure_data)
*
* Parameters:
*
* request_name - The request name (defined in "CommandM.h").
*
* context_host - Name of the host where request is executed from. If
* NULL, the "exec_host" parameter is used. Note: this
* should not be confused with execution host, described
* below.
*
* context_dir - Directory where the request should be executed. If
* NULL, the HOME directory is used.
*
* context_file - Not currently used by the Command Invoker.
*
* exec_parameters - Command Invoker execution parameters. See External
* Specification for more information.
* If set to NULL, "-" is used.
*
* exec_host - Name of the host where the request is executed.
*
* exec_string - The command line to execute.
*
* success_proc - The function to be invoked if the request is
* successfully executed.
*
* success_data - Client data for successful execution.
*
* failure_proc - The function to be invoked if an attempt to exeucte
* the request fails.
*
* failure_data - Client data for unsuccessful execution.
*
* Purpose:
*
* This function allows a client to use the DT "Command Invoker"
* Library for its' process execution. This function is intended
* for processes which do not use the Action Library.
*
* For local execution, the "fork" and "execvp" system calls are
* used. For remote execution, the "SPCD" is used.
*
* Notes:
*
* This function must be preceded by a call to
* "_DtInitializeCommandInvoker".
*
*****************************************************************************/
extern void
_DtCommandInvokerExecute(
char *request_name,
char *context_host,
char *context_dir,
char *context_file,
char *exec_parameters,
char *exec_host,
char *exec_string,
DtCmdInvExecuteProc success_proc,
void *success_data,
DtCmdInvExecuteProc failure_proc,
void *failure_data);
extern SPC_Channel_Ptr _DtSPCOpen( char *hostname,
int iomode,
char *errorMessage); /* MODIFIED */
extern int _DtSPCSpawn(
char *path,
char *context,
char **args,
char **env,
SPC_Channel_Ptr chan,
char *execHost,
char *contextHost,
char *contextDir,
char *errorMessage); /* MODIFIED */
#endif /* _CmdInv_h */

206
cde/include/Dt/CmdInvP.h Normal file
View File

@@ -0,0 +1,206 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $TOG: CmdInvP.h /main/5 1998/07/30 12:10:30 mgreess $ */
/***************************************************************************
*
* File: CmdInvP.h
* Description: Command execution system private externs and includes
* Language: C
*
** (c) Copyright 1993, 1994 Hewlett-Packard Company
** (c) Copyright 1993, 1994 International Business Machines Corp.
** (c) Copyright 1993, 1994 Sun Microsystems, Inc.
** (c) Copyright 1993, 1994 Novell, Inc.
***************************************************************************/
#ifndef _CmdInvP_h
#define _CmdInvP_h
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/param.h> /* MAXPATHNAMELEN */
#include <X11/Intrinsic.h>
#include <Dt/DtP.h>
#include <Dt/DtNlUtils.h>
#include <Dt/Message.h>
#include <bms/SbEvent.h>
#include <bms/XeUserMsg.h>
#include <Dt/Spc.h>
#include <Dt/CmdInv.h>
#include <Dt/ActionP.h>
#include <Dt/Connect.h>
#ifndef CDE_INSTALLATION_TOP
#define CDE_INSTALLATION_TOP "/opt/dt"
#endif
/*
* Resource names and classes for the Command Invoker.
*/
#define DtLOCAL_TERMINAL_NAME "localTerminal"
#define DtLOCAL_TERMINAL_CLASS "LocalTerminal"
#define DtREMOTE_TERMINALS_NAME "remoteTerminals"
#define DtREMOTE_TERMINALS_CLASS "RemoteTerminals"
#define DtWAIT_TIME_NAME "waitTime"
#define DtWAIT_TIME_CLASS "WaitTime"
#define DtDTEXEC_PATH_NAME "dtexecPath"
#define DtDTEXEC_PATH_CLASS "DtexecPath"
#define DtEXECUTION_HOST_LOGGING_NAME "executionHostLogging"
#define DtEXECUTION_HOST_LOGGING_CLASS "ExecutionHostLogging"
/*
* Structure for saving the "state" of a remote request that is
* queued while waiting for a remote subprocess to terminate.
*/
typedef struct _Cmd_RequestQueue {
SPC_Channel_Ptr channel;
char *context;
char *exec_host;
char *exec_string;
char **argv;
int winType;
unsigned long request_num;
DtSvcMsgContext replyContext;
DtCmdInvExecuteProc success_proc;
void *success_data;
DtCmdInvExecuteProc failure_proc;
void *failure_data;
struct _Cmd_RequestQueue *next;
} Cmd_RequestQueue;
/*
* Command invocation resources.
*/
typedef struct {
char *localTerminal;
char **remoteHosts;
char **remoteTerminals;
int waitTime;
char *dtexecPath;
Boolean executionHostLogging;
} Cmd_Resources;
/*
* Command invocation global variables.
*/
typedef struct {
Boolean terminal_ok;
Boolean subprocess_ok;
XtAppContext app_context;
char **path_list;
char *error_directory_name_map;
char *error_subprocess;
char *error_terminal;
} Cmd_Globals;
/*
* Defaults for the Resources.
*/
#define DtWAIT_TIME_DEFAULT 3 /* In seconds. */
#define DtTERMINAL_DEFAULT "dtterm"
#define DtCMD_INV_SUB_PROCESS CDE_INSTALLATION_TOP "/bin/dtexec"
/*
* Temporary buffer size.
*/
#define MAX_BUF_SIZE 1024
/*
* Window types:
*/
#define NO_STDIO 0
#define TERMINAL 1
#define PERM_TERMINAL 2
/*
* Command execution return status:
*/
#define _CMD_EXECUTE_SUCCESS 1
#define _CMD_EXECUTE_FAILURE 2
#define _CMD_EXECUTE_QUEUED 3
#define _CMD_EXECUTE_FATAL 4
/*
* External declarations for the global Command Invoker variables.
*/
extern Cmd_Resources cmd_Resources;
extern Cmd_Globals cmd_Globals;
/*
******* Public Function Declarations for CmdSpc.c *******
*/
extern SbInputId _DtCmdSPCAddInputHandler (
int fd,
SbInputCallbackProc proc,
void *data);
extern SbInputId _DtCmdSPCAddExceptionHandler (
int fd,
SbInputCallbackProc proc,
void *data);
extern void _DtCmdLogErrorMessage(
char *message) ;
/*
******* Public Function Declarations for CmdProcess.c *******
*/
extern void _DtCmdCreateTerminalCommand(
char **theCommand,
int windowType,
char *execString,
char *execParms,
char *execHost,
char *procId,
char *tmpFiles) ;
extern Boolean _DtCmdCheckForExecutable(
char *fileName) ;
extern Boolean _DtCmdValidDir(
char *clientHost,
char *contextDir,
char *contextHost) ;
extern void _DtCmdGetResources(
Display *display);
/*
******* Public Function Declarations for CmdUtilityP.c *******
*/
extern void _DtCmdBuildPathList( void ) ;
/******** End Public Function Declarations ********/
#endif /* _CmdInvP_h */

51
cde/include/Dt/Collate.h Normal file
View File

@@ -0,0 +1,51 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: Collate.h /main/3 1995/10/26 15:18:49 rswiston $ */
/*
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
* (c) Copyright 1993, 1994 International Business Machines Corp. *
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
* (c) Copyright 1993, 1994 Novell, Inc. *
*/
/* Hp DT's version of an 8.0 include file; needed for Fnmatch */
#ifndef DtCOLLATE_INCLUDED
#define DtCOLLATE_INCLUDED
#define MASK077 077
#define ENDTABLE 0377 /* end mark of 2 to 1 character */
struct col_21tab {
unsigned char ch1; /* first char of 2 to 1 */
unsigned char ch2; /* second char of 2 to 1 */
unsigned char seqnum; /* sequence number */
unsigned char priority; /* priority */
};
struct col_12tab {
unsigned char seqnum; /* seqnum of second char of 1 to 2 */
unsigned char priority; /* priority of 1 to 2 char */
};
#endif /* DtCOLLATE_INCLUDED */

587
cde/include/Dt/ComboBox.h Normal file
View File

@@ -0,0 +1,587 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: ComboBox.h /main/4 1995/10/26 09:29:51 rswiston $ */
/*
* (c) Copyright 1993, 1994 Hewlett-Packard Company
* (c) Copyright 1993, 1994 International Business Machines Corp.
* (c) Copyright 1993, 1994 Novell, Inc.
* (c) Copyright 1993, 1994 Sun Microsystems, Inc.
*/
/***********************************************************
Copyright 1993 Interleaf, Inc.
Permission to use, copy, modify, and distribute this software
and its documentation for any purpose without fee is granted,
provided that the above copyright notice appear in all copies
and that both copyright notice and this permission notice appear
in supporting documentation, and that the name of Interleaf not
be used in advertising or publicly pertaining to distribution of
the software without specific written prior permission.
Interleaf makes no representation about the suitability of this
software for any purpose. It is provided "AS IS" without any
express or implied warranty.
******************************************************************/
#ifndef _Dt_ComboBox_h
#define _Dt_ComboBox_h
/*
* This widget is deprecated in favor of XmComboBox. The two are very
* similar, but do have minor differences. Applications doing new
* development are encouraged to use XmComboBox directly. Existing
* applications may wish to recompile with DT_USE_XM_COMBOBOX.
*/
#include <Xm/Xm.h>
#ifdef DT_USE_XM_COMBOBOX
#include <Xm/ComboBox.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
/*
* Constants
*/
/* Resources */
#ifndef DT_USE_XM_COMBOBOX
/***********************************************************************
*
* NOTE:
* Because of future development of the ComboBox, not all of the
* following resources should be used. The only ones which are
* supported are the ones found in the Common Desktop Environment:
* Programmer's Guide. The supported resources include:
* DtNmarginHeight, DtNmarginWidth, DtNselectedItem,
* DtNselectedPosition, DtNselectionCallback, and DtNcomboBoxType.
*
* The use of the unsupported resources found in this header
* file may cause dangerous and unexpected behavior.
*
**********************************************************************/
/* WARNING: DtNactivateCallback is an unsupported resource in CDE 1.0 */
#ifndef DtNactivateCallback
#define DtNactivateCallback XmNactivateCallback
#endif
/* WARNING: DtNalignment is an unsupported resource in CDE 1.0 */
#ifndef DtNalignment
#define DtNalignment XmNalignment
#endif
/* WARNING: DtNarrowSize is an unsupported resource in CDE 1.0 */
#ifndef DtNarrowSize
#define DtNarrowSize "arrowSize"
#endif
/* WARNING: DtNarrowSpacing is an unsupported resource in CDE 1.0 */
#ifndef DtNarrowSpacing
#define DtNarrowSpacing "arrowSpacing"
#endif
/* WARNING: DtNarrowType is an unsupported resource in CDE 1.0 */
#ifndef DtNarrowType
#define DtNarrowType "arrowType"
#endif
/* WARNING: DtNcolumns is an unsupported resource in CDE 1.0 */
#ifndef DtNcolumns
#define DtNcolumns XmNcolumns
#endif
#ifndef DtNcomboBoxType
#define DtNcomboBoxType "comboBoxType"
#endif
/* WARNING: DtNfocusCallback is an unsupported resource in CDE 1.0 */
#ifndef DtNfocusCallback
#define DtNfocusCallback XmNfocusCallback
#endif
/* WARNING: DtNhorizontalSpacing is an unsupported resource in CDE 1.0 */
#ifndef DtNhorizontalSpacing
#define DtNhorizontalSpacing XmNhorizontalSpacing
#endif
/* WARNING: DtNitemCount is an unsupported resource in CDE 1.0 */
#ifndef DtNitemCount
#define DtNitemCount XmNitemCount
#endif
/* WARNING: DtNitems is an unsupported resource in CDE 1.0 */
#ifndef DtNitems
#define DtNitems XmNitems
#endif
/* WARNING: DtNlabelString is an unsupported resource in CDE 1.0 */
#ifndef DtNlabelString
#define DtNlabelString XmNlabelString
#endif
/* WARNING: DtNlist is an unsupported resource in CDE 1.0 */
#ifndef DtNlist
#define DtNlist "list"
#endif
/* WARNING: DtNlistFontList is an unsupported resource in CDE 1.0 */
#ifndef DtNlistFontList
#define DtNlistFontList "listFontList"
#endif
/* WARNING: DtNlistMarginHeight is an unsupported resource in CDE 1.0 */
#ifndef DtNlistMarginHeight
#define DtNlistMarginHeight XmNlistMarginHeight
#endif
/* WARNING: DtNlistMarginWidth is an unsupported resource in CDE 1.0 */
#ifndef DtNlistMarginWidth
#define DtNlistMarginWidth XmNlistMarginWidth
#endif
/* WARNING: DtNlistSpacing is an unsupported resource in CDE 1.0 */
#ifndef DtNlistSpacing
#define DtNlistSpacing XmNlistSpacing
#endif
/* WARNING: DtNlosingFocusCallback is an unsupported resource in CDE 1.0 */
#ifndef DtNlosingFocusCallback
#define DtNlosingFocusCallback XmNlosingFocusCallback
#endif
#ifndef DtNmarginHeight
#define DtNmarginHeight XmNmarginHeight
#endif
#ifndef DtNmarginWidth
#define DtNmarginWidth XmNmarginWidth
#endif
/* WARNING: DtNmaxLength is an unsupported resource in CDE 1.0 */
#ifndef DtNmaxLength
#define DtNmaxLength XmNmaxLength
#endif
/* WARNING: DtNmenuPostCallback is an unsupported resource in CDE 1.0 */
#ifndef DtNmenuPostCallback
#define DtNmenuPostCallback "menuPostCallback"
#endif
/* WARNING: DtNorientation is an unsupported resource in CDE 1.0 */
#ifndef DtNorientation
#define DtNorientation XmNorientation
#endif
/* WARNING: DtNpoppedUp is an unsupported resource in CDE 1.0 */
#ifndef DtNpoppedUp
#define DtNpoppedUp "poppedUp"
#endif
/* WARNING: DtNrecomputeSize is an unsupported resource in CDE 1.0 */
#ifndef DtNrecomputeSize
#define DtNrecomputeSize XmNrecomputeSize
#endif
#ifndef DtNselectedItem
#define DtNselectedItem "selectedItem"
#endif
#ifndef DtNselectedPosition
#define DtNselectedPosition "selectedPosition"
#endif
#ifndef DtNselectionCallback
#define DtNselectionCallback "selectionCallback"
#endif
/* WARNING: DtNtextField is an unsupported resource in CDE 1.0 */
#ifndef DtNtextField
#define DtNtextField "textField"
#endif
/* WARNING: DtNtopItemPosition is an unsupported resource in CDE 1.0 */
#ifndef DtNtopItemPosition
#define DtNtopItemPosition XmNtopItemPosition
#endif
/* WARNING: DtNupdateLabel is an unsupported resource in CDE 1.0 */
#ifndef DtNupdateLabel
#define DtNupdateLabel "updateLabel"
#endif
/* WARNING: DtNverticalSpacing is an unsupported resource in CDE 1.0 */
#ifndef DtNverticalSpacing
#define DtNverticalSpacing XmNverticalSpacing
#endif
/* WARNING: DtNvisibleItemCount is an unsupported resource in CDE 1.0 */
#ifndef DtNvisibleItemCount
#define DtNvisibleItemCount XmNvisibleItemCount
#endif
#ifndef DtCAlignment
#define DtCAlignment XmCAlignment
#endif
#ifndef DtCArrowSize
#define DtCArrowSize "ArrowSize"
#endif
#ifndef DtCArrowSpacing
#define DtCArrowSpacing "ArrowSpacing"
#endif
#ifndef DtCArrowType
#define DtCArrowType "ArrowType"
#endif
#ifndef DtCCallback
#define DtCCallback XmCCallback
#endif
#ifndef DtCColumns
#define DtCColumns XmCColumns
#endif
#ifndef DtCComboBoxType
#define DtCComboBoxType "ComboBoxType"
#endif
#ifndef DtCHorizontalSpacing
#define DtCHorizontalSpacing "HorizontalSpacing"
#endif
#ifndef DtCItemCount
#define DtCItemCount XmCItemCount
#endif
#ifndef DtCItems
#define DtCItems XmCItems
#endif
#ifndef DtCList
#define DtCList "List"
#endif
#ifndef DtCListFontList
#define DtCListFontList "ListFontList"
#endif
#ifndef DtCListMarginHeight
#define DtCListMarginHeight XmCListMarginHeight
#endif
#ifndef DtCListMarginWidth
#define DtCListMarginWidth XmCListMarginWidth
#endif
#ifndef DtCListSpacing
#define DtCListSpacing XmCListSpacing
#endif
#ifndef DtCMarginHeight
#define DtCMarginHeight XmCMarginHeight
#endif
#ifndef DtCMarginWidth
#define DtCMarginWidth XmCMarginWidth
#endif
#ifndef DtCMaxLength
#define DtCMaxLength XmCMaxLength
#endif
#ifndef DtCOrientation
#define DtCOrientation XmCOrientation
#endif
#ifndef DtCPoppedUp
#define DtCPoppedUp "PoppedUp"
#endif
#ifndef DtCRecomputeSize
#define DtCRecomputeSize XmCRecomputeSize
#endif
#ifndef DtCSelectedItem
#define DtCSelectedItem "SelectedItem"
#endif
#ifndef DtCSelectedPosition
#define DtCSelectedPosition "SelectedPosition"
#endif
#ifndef DtCTextField
#define DtCTextField "TextField"
#endif
#ifndef DtCTopItemPosition
#define DtCTopItemPosition XmCTopItemPosition
#endif
#ifndef DtCUpdateLabel
#define DtCUpdateLabel "UpdateLabel"
#endif
#ifndef DtCVerticalSpacing
#define DtCVerticalSpacing "VerticalSpacing"
#endif
#ifndef DtCVisibleItemCount
#define DtCVisibleItemCount XmCVisibleItemCount
#endif
#ifndef DtCXmString
#define DtCXmString XmCXmString
#endif
#else /* DT_USE_XM_COMBOBOX */
#ifndef DtNarrowSize
#define DtNarrowSize XmNarrowSize
#endif
#ifndef DtNarrowSpacing
#define DtNarrowSpacing XmNarrowSpacing
#endif
#ifndef DtNcolumns
#define DtNcolumns XmNcolumns
#endif
#ifndef DtNcomboBoxType
#define DtNcomboBoxType XmNcomboBoxType
#endif
#ifndef DtNitemCount
#define DtNitemCount XmNitemCount
#endif
#ifndef DtNitems
#define DtNitems XmNitems
#endif
#ifndef DtNlabelString
#define DtNlabelString XmNlabelString
#endif
#ifndef DtNlist
#define DtNlist XmNlist
#endif
#ifndef DtNmarginHeight
#define DtNmarginHeight XmNmarginHeight
#endif
#ifndef DtNmarginWidth
#define DtNmarginWidth XmNmarginWidth
#endif
#ifndef DtNselectedItem
#define DtNselectedItem XmNselectedItem
#endif
#ifndef DtNselectedPosition
#define DtNselectedPosition XmNselectedPosition
#endif
#ifndef DtNselectionCallback
#define DtNselectionCallback XmNselectionCallback
#endif
#ifndef DtNtextField
#define DtNtextField XmNtextField
#endif
#ifndef DtNvisibleItemCount
#define DtNvisibleItemCount XmNvisibleItemCount
#endif
#ifndef DtCArrowSize
#define DtCArrowSize XmCArrowSize
#endif
#ifndef DtCArrowSpacing
#define DtCArrowSpacing XmCArrowSpacing
#endif
#ifndef DtCCallback
#define DtCCallback XmCCallback
#endif
#ifndef DtCColumns
#define DtCColumns XmCColumns
#endif
#ifndef DtCComboBoxType
#define DtCComboBoxType XmCComboBoxType
#endif
#ifndef DtCItemCount
#define DtCItemCount XmCItemCount
#endif
#ifndef DtCItems
#define DtCItems XmCItems
#endif
#ifndef DtCList
#define DtCList XmCList
#endif
#ifndef DtCMarginHeight
#define DtCMarginHeight XmCMarginHeight
#endif
#ifndef DtCMarginWidth
#define DtCMarginWidth XmCMarginWidth
#endif
#ifndef DtCSelectedItem
#define DtCSelectedItem XmCSelectedItem
#endif
#ifndef DtCSelectedPosition
#define DtCSelectedPosition XmCSelectedPosition
#endif
#ifndef DtCTextField
#define DtCTextField XmCTextField
#endif
#ifndef DtCVisibleItemCount
#define DtCVisibleItemCount XmCVisibleItemCount
#endif
#ifndef DtCXmString
#define DtCXmString XmCXmString
#endif
#endif /* DT_USE_XM_COMBOBOX */
/* Representation types */
#ifndef DT_USE_XM_COMBOBOX
#ifndef DtRArrowType
#define DtRArrowType "ArrowType"
#endif
#ifndef DtRComboBoxType
#define DtRComboBoxType "ComboBoxType"
#endif
#else /* DT_USE_XM_COMBOBOX */
#ifndef DtRComboBoxType
#define DtRComboBoxType XmRComboBoxType
#endif
#endif /* DT_USE_XM_COMBOBOX */
/* DtNorientation values */
#ifndef DT_USE_XM_COMBOBOX
#ifndef DtLEFT
#define DtLEFT 1
#endif
#ifndef DtRIGHT
#define DtRIGHT 2
#endif
#endif /* not DT_USE_XM_COMBOBOX */
/* DtNarrowType values */
#ifndef DT_USE_XM_COMBOBOX
#ifndef DtMOTIF
#define DtMOTIF 0
#endif
#ifndef DtWINDOWS
#define DtWINDOWS 1
#endif
#endif /* not DT_USE_XM_COMBOBOX */
/* DtNcomboBoxType values */
#ifndef DT_USE_XM_COMBOBOX
#ifndef DtDROP_DOWN_LIST
#define DtDROP_DOWN_LIST 2
#endif
#ifndef DtDROP_DOWN_COMBO_BOX
#define DtDROP_DOWN_COMBO_BOX 1
#endif
#else /* DT_USE_XM_COMBOBOX */
#ifndef DtDROP_DOWN_LIST
#define DtDROP_DOWN_LIST XmDROP_DOWN_LIST
#endif
#ifndef DtDROP_DOWN_COMBO_BOX
#define DtDROP_DOWN_COMBO_BOX XmDROP_DOWN_COMBO_BOX
#endif
#endif /* DT_USE_XM_COMBOBOX */
/* DtNalignment values */
#ifndef DT_USE_XM_COMBOBOX
#ifndef DtALIGNMENT_BEGINNING
#define DtALIGNMENT_BEGINNING XmALIGNMENT_BEGINNING
#endif
#ifndef DtALIGNMENT_CENTER
#define DtALIGNMENT_CENTER XmALIGNMENT_CENTER
#endif
#ifndef DtALIGNMENT_END
#define DtALIGNMENT_END XmALIGNMENT_END
#endif
#endif /* not DT_USE_XM_COMBOBOX */
/* Callback reasons */
#ifndef DT_USE_XM_COMBOBOX
#ifndef DtCR_SELECT
#define DtCR_SELECT 57 /* Large #, so no collisions with XM */
#endif
#ifndef DtCR_MENU_POST
#define DtCR_MENU_POST 129 /* Large #, so no collisions with XM */
#endif
#endif /* not DT_USE_XM_COMBOBOX */
/*
* Types
*/
#ifndef DT_USE_XM_COMBOBOX
typedef struct {
int reason;
XEvent *event;
XmString item_or_text;
int item_position;
} DtComboBoxCallbackStruct;
/* Widget class and instance */
typedef struct _DtComboBoxClassRec *DtComboBoxWidgetClass;
typedef struct _DtComboBoxRec *DtComboBoxWidget;
#else /* DT_USE_XM_COMBOBOX */
#define DtComboBoxCallbackStruct XmComboBoxCallbackStruct
#define DtComboBoxWidgetClass XmComboBoxWidgetClass
#define DtComboBoxWidget XmComboBoxWidget
#endif /* DT_USE_XM_COMBOBOX */
/*
* Data
*/
#ifndef DT_USE_XM_COMBOBOX
/* Widget class record */
externalref WidgetClass dtComboBoxWidgetClass;
#else /* DT_USE_XM_COMBOBOX */
#define dtComboBoxWidgetClass xmComboBoxWidgetClass;
#endif /* DT_USE_XM_COMBOBOX */
/*
* Functions
*/
#ifndef DT_USE_XM_COMBOBOX
extern Widget DtCreateComboBox(
Widget parent,
char *name,
ArgList arglist,
Cardinal argcount);
extern void DtComboBoxAddItem(
Widget combo,
XmString item,
int pos,
Boolean unique);
extern void DtComboBoxDeletePos(
Widget combo,
int pos);
extern void DtComboBoxSetItem(
Widget combo,
XmString item);
extern void DtComboBoxSelectItem(
Widget combo,
XmString item);
#else /* DT_USE_XM_COMBOBOX */
#define DtCreateComboBox XmCreateComboBox
#define DtComboBoxAddItem XmComboBoxAddItem
#define DtComboBoxDeletePos XmComboBoxDeletePos
#define DtComboBoxSetItem XmComboBoxSetItem
#define DtComboBoxSelectItem XmComboBoxSelectItem
#endif /* DT_USE_XM_COMBOBOX */
#ifdef __cplusplus
}
#endif
#endif /* _Dt_ComboBox_h */

255
cde/include/Dt/ComboBoxP.h Normal file
View File

@@ -0,0 +1,255 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: ComboBoxP.h /main/3 1995/10/26 09:29:58 rswiston $ */
/*
* DtWidget/ComboBoxP.h
*/
/*
* (c) Copyright 1993, 1994 Hewlett-Packard Company
* (c) Copyright 1993, 1994 International Business Machines Corp.
* (c) Copyright 1993, 1994 Novell, Inc.
* (c) Copyright 1993, 1994 Sun Microsystems, Inc.
*/
/***********************************************************
Copyright 1993 Interleaf, Inc.
Permission to use, copy, modify, and distribute this software
and its documentation for any purpose without fee is granted,
provided that the above copyright notice appear in all copies
and that both copyright notice and this permission notice appear
in supporting documentation, and that the name of Interleaf not
be used in advertising or publicly pertaining to distribution of
the software without specific written prior permission.
Interleaf makes no representation about the suitability of this
software for any purpose. It is provided "AS IS" without any
express or implied warranty.
******************************************************************/
/*
* (C) Copyright 1991,1992, 1993
* Interleaf, Inc.
* Nine Hillside Avenue, Waltham, MA 02154
*
* ComboBoxP.h:
*
* Private header file for DtComboBoxWidget.
*/
#ifndef _ComboBoxP_h
#define _ComboBoxP_h
#include <X11/IntrinsicP.h>
#include <X11/ShellP.h>
#include <Xm/DrawnB.h>
#include <Xm/ArrowB.h>
#include <Xm/TextFP.h>
#include <Xm/Label.h>
#include <Xm/Frame.h>
#include <Xm/ListP.h>
#include <Xm/Separator.h>
#include <Xm/ScrolledWP.h>
#include <Xm/ScrollBarP.h>
#include <Xm/ManagerP.h>
#include "ComboBox.h"
#ifdef __cplusplus
extern "C" {
#endif
/*
* External definitions of syn_resources for our list widget.
*/
#define SYN_RESOURCE_AA (Widget w, int resource_offset, XtArgVal *value)
extern void _DtComboBoxGetArrowSize SYN_RESOURCE_AA;
extern void _DtComboBoxGetLabelString SYN_RESOURCE_AA;
extern void _DtComboBoxGetListItemCount SYN_RESOURCE_AA;
extern void _DtComboBoxGetListItems SYN_RESOURCE_AA;
extern void _DtComboBoxGetListFontList SYN_RESOURCE_AA;
extern void _DtComboBoxGetListMarginHeight SYN_RESOURCE_AA;
extern void _DtComboBoxGetListMarginWidth SYN_RESOURCE_AA;
extern void _DtComboBoxGetListSpacing SYN_RESOURCE_AA;
extern void _DtComboBoxGetListTopItemPosition SYN_RESOURCE_AA;
extern void _DtComboBoxGetListVisibleItemCount SYN_RESOURCE_AA;
#define ARROW_MULT .45
#define ARROW_MIN 13
#define MARGIN 2
#define LABEL_PADDING 2
#define LABEL_SHADOW 2
#define TEXT_FIELD_SHADOW 1
#define TEXT_CONTEXT_MARGIN 4
/****************************************************************
*
* Message Defines
*
****************************************************************/
#define CB_ALIGNMENT DTWIDGET_GETMESSAGE( \
MS_ComboBox, COMBO_ALIGNMENT, _DtMsgComboBox_0000)
#define CB_MARGIN_HEIGHT DTWIDGET_GETMESSAGE( \
MS_ComboBox, COMBO_MARGIN_HEIGHT, _DtMsgComboBox_0001)
#define CB_MARGIN_WIDTH DTWIDGET_GETMESSAGE( \
MS_ComboBox, COMBO_MARGIN_WIDTH, _DtMsgComboBox_0002)
#define CB_HORIZONTAL_SPACING DTWIDGET_GETMESSAGE( \
MS_ComboBox, COMBO_HORIZONTAL_SPACING, _DtMsgComboBox_0003)
#define CB_VERTICAL_SPACING DTWIDGET_GETMESSAGE( \
MS_ComboBox, COMBO_VERTICAL_SPACING, _DtMsgComboBox_0004)
#define CB_ORIENTATION DTWIDGET_GETMESSAGE( \
MS_ComboBox, COMBO_ORIENTATION, _DtMsgComboBox_0005)
#define CB_ITEM_COUNT DTWIDGET_GETMESSAGE( \
MS_ComboBox, COMBO_ITEM_COUNT, _DtMsgComboBox_0006)
#define CB_VISIBLE_ITEM DTWIDGET_GETMESSAGE( \
MS_ComboBox, COMBO_VISIBLE_ITEM, _DtMsgComboBox_0007)
#define CB_TEXT DTWIDGET_GETMESSAGE( \
MS_ComboBox, COMBO_TEXT, _DtMsgComboBox_0008)
#define CB_SET_ITEM DTWIDGET_GETMESSAGE( \
MS_ComboBox, COMBO_SET_ITEM, _DtMsgComboBox_0009)
#define CB_SELECT_ITEM DTWIDGET_GETMESSAGE( \
MS_ComboBox, COMBO_SELECT_ITEM, _DtMsgComboBox_0010)
#define CB_RESIZE DTWIDGET_GETMESSAGE( \
MS_ComboBox, COMBO_RESIZE, _DtMsgComboBox_0011)
#define CB_LABEL DTWIDGET_GETMESSAGE( \
MS_ComboBox, COMBO_LABEL, _DtMsgComboBox_0012)
#define CB_CVTSTRING DTWIDGET_GETMESSAGE( \
MS_ComboBox, COMBO_CVTSTRING, _DtMsgComboBox_0013)
#define CB_DEL_POS DTWIDGET_GETMESSAGE( \
MS_ComboBox, COMBO_DEL_POS, _DtMsgComboBox_0014)
/*
* Class Records
*/
typedef struct {
Boolean junk; /* Need something */
} DtComboBoxClassPart;
typedef struct _DtComboBoxClassRec {
CoreClassPart core_class;
CompositeClassPart composite_class;
ConstraintClassPart constraint_class;
XmManagerClassPart manager_class;
DtComboBoxClassPart combo_box_class;
} DtComboBoxClassRec;
extern DtComboBoxClassRec dtComboBoxClassRec;
/*
* Instance Record.
*/
typedef struct _DtComboBoxPart {
/* Private data */
Widget arrow;
Widget shell;
Widget frame;
Widget label;
Widget sep;
Dimension old_width;
Dimension old_height;
Dimension label_max_length;
Dimension label_max_height;
/*
* max_shell_width is the width that is needed to hold the
* list if the longest item was visible. We then use this
* width to figure out if the shell is not wide enough,
* when it gets popped on the screen. This is needed in case the
* combo-box resizes, or if items changes (list will resize).
* Sometimes we change the size of the shell to fit on the screen, or
* to make it at least as large as the combo_box. The next time we pop
* the shell up the size may be different; therefore, we set the shell
* size to the maximum everytime it gets popped up, then we will
* make adjustments, only if needed.
* This value gets saved every time the user updates DtNitems.
*/
Dimension max_shell_width;
Dimension max_shell_height;
/* ComboBox specific public resources */
Dimension margin_height;
Dimension margin_width;
XmString selected_item;
int selected_position;
XtCallbackList selection_callback;
unsigned char type;
Dimension arrow_spacing;
/* ComboBox specific private resources */
Dimension arrow_size;
XtCallbackList activate_callback;
unsigned char alignment;
unsigned char arrow_type;
short text_columns;
XtCallbackList focus_callback;
Dimension horizontal_spacing;
int item_count;
XmStringTable items;
XmStringTable list_items;
XmString label_string;
Widget list;
XmFontList list_font_list;
Dimension list_margin_height;
Dimension list_margin_width;
Dimension list_spacing;
XtCallbackList losing_focus_callback;
unsigned int text_max_length;
XtCallbackList menu_post_callback;
unsigned char orientation;
Boolean popped_up;
Boolean recompute_size;
Widget text;
int top_item_position;
Boolean update_label;
Dimension vertical_spacing;
int visible_item_count;
} DtComboBoxPart;
typedef struct _DtComboBoxRec {
CorePart core;
CompositePart composite;
ConstraintPart constraint;
XmManagerPart manager;
DtComboBoxPart combo_box;
} DtComboBoxRec;
#ifdef __cplusplus
} /* Close scope of 'extern "C"' declaration which encloses file. */
#endif
#endif /* _XmComboBoxP_h */

58
cde/include/Dt/CommandM.h Normal file
View File

@@ -0,0 +1,58 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/*
* File: CommandM.h $XConsortium: CommandM.h /main/3 1995/10/26 15:18:58 rswiston $
* Language: C
*
* (c) Copyright 1988, Hewlett-Packard Company, all rights reserved.
*
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
* (c) Copyright 1993, 1994 International Business Machines Corp. *
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
* (c) Copyright 1993, 1994 Novell, Inc. *
*/
#ifndef _Dt_CommandM_h
#define _Dt_CommandM_h
/*
* Command Invoker execution window types. Note that a success or
* failure notification will be sent for each request. For
* failures, the only data returned is an error message.
*/
#define DtNO_STDIO "NO_STDIO"
#define DtTERMINAL "TERMINAL"
#define DtPERM_TERMINAL "PERM_TERMINAL"
#define DtOUTPUT_ONLY "OUTPUT_ONLY"
#define DtSHARED_OUTPUT "SHARED_OUTPUT"
/*
* When the session manager starts, it needs a window type (NO-STDIO),
* but if a failure occurs, it does NOT want an error message, but
* instead wants to receive the execution host and the execution
* string. The following define is for this type of request.
*/
#define DtSTART_SESSION "START-SESSION"
#endif /* _Dt_CommandM_h */
/* Do not add anything after this endif. */

179
cde/include/Dt/Connect.h Normal file
View File

@@ -0,0 +1,179 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/*
* File: Connect.h $XConsortium: Connect.h /main/3 1995/10/26 15:19:09 rswiston $
* Language: C
*
* (c) Copyright 1990, Hewlett-Packard Company, all rights reserved.
*
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
* (c) Copyright 1993, 1994 International Business Machines Corp. *
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
* (c) Copyright 1993, 1994 Novell, Inc. *
*/
#ifndef _Dt_connect_h
#define _Dt_connect_h
#include <Dt/DtP.h>
#include <bms/connect.h>
#include <codelibs/pathutils.h>
#define DtGetShortHostname Xegetshorthostname
#define DtGetHostname Xegethostname
/*
DESCRIPTION:
These functions are similiar to gethostname(2), however
DtGetHostname always returns a full domain-qualified name
and DtGetShortHostname returns a simple name.
SYNOPSIS:
status = DtGet[Short]Hostname (hostname, size)
int status; Returns 0 on success, -1 on failure.
[Actually it returns what gethostname(2)
returns, which is ambiguous in the
HP-UX manual.]
char *hostname; The hostname is returned here.
int size; The name is truncated to "size - 1" and
is null-terminated.
*/
#define DtGetcwd Xegetcwd
/*
DESCRIPTION:
This function is similar to getcwd except it first checks $PWD.
It only calls getcwd if $PWD is not set.
SYNOPSIS:
cwd = DtGetcwd (buf, size)
char *cwd; Pointer to the returned value. (Typically
the same value as 'buf' that is passed in.)
char *buf; Pointer to memory allocated by the caller.
Buf must be large enough to hold the string.
int size; Size of buf in bytes.
*/
#define DtIsLocalHostP XeIsLocalHostP
/*
DESCRIPTION:
Tests whether a passed-in hostname identifies the host on which
the function is being executed. This handles all combinations of
simple and domain-qualified names for either the hostname passed
in or the one defined on the local host.
WARNING: Returns BOOLEAN, not INT. DONT TREAT IT AS AN INT!
SYNOPSIS:
status = XeIsLocalHostP (hostname);
Boolean status; Returns TRUE if "hostname" identifies the
local host, FALSE otherwise.
char *hostname; The hostname (either simple or domain-
qualified) to test.
*/
#define DtIsSameHostP XeIsSameHostP
/*
DESCRIPTION:
Compares two hostnames to see if they specify the same host.
This handles combinations of simple and domain-qualified names.
This function canonicalizes both names and then compares them.
WARNING: Returns BOOLEAN, not INT. DONT TREAT IT AS AN INT!
SYNOPSIS:
status = DtIsSameHostP (host1, host2);
Boolean status; Returns TRUE if host1 and host2 identify
the same host, FALSE otherwise.
char *host1, *host2; The two hostnames (either simple or
domain-qualified) to compare.
*/
#define DtCreateContextString XeCreateContextString
/*
DESCRIPTION:
DtCreateContextString takes the three parts of a context and
puts them into a single string, in the form "host:/dir/file".
A NEW STRING, OWNED BY THE CALLER, is returned.
SYNOPSIS:
context_string = DtCreateContextString (host, dir, file);
DtString context_string; The returned context. The memory is owned
by the caller. "NULL" is returned if the
context cannot be created.
DtString host; The name of the host.
DtString dir; The directory.
DtString file; The name of the file.
*/
#define DtEliminateDots XeEliminateDots
/*
DESCRIPTION:
This routine removes /./'s and /../'s from a path. It will
OVERWRITE the path IT WAS PASSED. If there are too many /../'s
in the path this function will return NULL, so you better keep
a pointer to the path if you hope to reclaim it.
This function does not handle "host:/directory/file", shell
variables, or other exotic animals.
SYNOPSIS:
fixed_path = DtEliminateDots (path);
DtString fixed_path; A pointer to the same path that was passed in
(though now it is fixed up) or NULL if problems
were encountered.
DtString path; The path that needs fixing up.
*/
#define DtParseFileString XeParseFileString
#endif /* _Dt_connect_h */
/* Do not add anything after this endif. */

109
cde/include/Dt/Control.h Normal file
View File

@@ -0,0 +1,109 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: Control.h /main/4 1995/10/26 09:30:15 rswiston $ */
/**---------------------------------------------------------------------
***
*** file: Control.h
***
*** project: MotifPlus Widgets
***
*** description: Public include file for DtControl class.
***
***
*** (c) Copyright 1992 by Hewlett-Packard Company.
***
***
***-------------------------------------------------------------------*/
#ifndef _DtControl_h
#define _DtControl_h
#include <Xm/Xm.h>
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
#endif
#define XmCONTROL_NONE 0
#define XmCONTROL_BLANK 1
#define XmCONTROL_BUSY 2
#define XmCONTROL_BUTTON 3
#define XmCONTROL_CLIENT 4
#define XmCONTROL_DATE 5
#define XmCONTROL_MAIL 6
#define XmCONTROL_MONITOR 7
#define XmCONTROL_SWITCH 8
#define NUM_LIST_ITEMS 10
#define XmCR_BUSY_START 60
#define XmCR_BUSY_STOP 61
#define XmCR_MONITOR 62
#define DtMONITOR_OFF 0
#define DtMONITOR_ON 1
#define XmNuseLabelAdjustment "use_label_adjustment"
#ifndef DtIsControl
#define DtIsControl(w) XtIsSubclass(w, dtControlGadgetClass)
#endif /* DtIsControl */
extern Widget _DtCreateControl (Widget, String, ArgList, int);
extern void _DtControlSetFileChanged (Widget, Boolean);
extern void _DtControlSetBusy (Widget, Boolean);
extern void _DtControlAddDropAnimationImage (Widget, String, int);
extern void _DtControlDoDropAnimation (Widget);
extern void _DtControlAddPushAnimationImage (Widget, String, int);
extern void _DtControlDoPushAnimation (Widget);
extern char _DtControlGetMonitorState(Widget);
extern WidgetClass dtControlGadgetClass;
typedef struct _DtControlClassRec * DtControlClass;
typedef struct _DtControlRec * DtControlGadget;
#define XmCR_FILE_CHANGED 51
typedef struct
{
int reason;
XEvent *event;
Boolean set;
unsigned char control_type;
XtPointer push_function;
XtPointer push_argument;
Widget subpanel;
long file_size;
} DtControlCallbackStruct;
#if defined(__cplusplus) || defined(c_plusplus)
} /* Close scope of 'extern "C"' declaration which encloses file. */
#endif
#endif /* _DtControl_h */
/* DON'T ADD ANYTHING AFTER THIS #endif */

245
cde/include/Dt/ControlP.h Normal file
View File

@@ -0,0 +1,245 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: ControlP.h /main/6 1996/03/25 11:17:48 rswiston $ */
/**---------------------------------------------------------------------
***
*** file: ControlP.h
***
*** project: MotifPlus Widgets
***
*** description: Private include file for DtControl class.
***
***
*** (c) Copyright 1992 by Hewlett-Packard Company.
***
***
***-------------------------------------------------------------------*/
#ifndef _DtControlP_h
#define _DtControlP_h
#include <Xm/XmP.h>
#include <Dt/IconP.h>
#include <Dt/Control.h>
typedef struct _DtControlCacheObjClassPart
{
XtPointer dummy;
} DtControlCacheObjClassPart;
typedef struct _DtControlCacheObjClassRec /* label cache class record */
{
ObjectClassPart object_class;
XmExtClassPart ext_class;
DtControlCacheObjClassPart control_class_cache;
} DtControlCacheObjClassRec;
externalref DtControlCacheObjClassRec dtControlCacheObjClassRec;
/* The Control Gadget Cache instance record */
typedef struct _DtControlCacheObjPart
{
XtPointer dummy;
} DtControlCacheObjPart;
typedef struct _DtControlCacheObjRec
{
ObjectPart object;
XmExtPart ext;
DtControlCacheObjPart control_cache;
} DtControlCacheObjRec;
/*-------------------------------------------------------------
** Class Structure
*/
/* Class Part
*/
typedef struct _DtControlClassPart
{
XmCacheClassPartPtr cache_part;
caddr_t extension;
} DtControlClassPart;
/* Full Class Record
*/
typedef struct _DtControlClassRec
{
RectObjClassPart rect_class;
XmGadgetClassPart gadget_class;
DtIconClassPart icon_class;
DtControlClassPart control_class;
} DtControlClassRec;
/* Actual Class
*/
extern DtControlClassRec dtControlClassRec;
/*-------------------------------------------------------------
** Instance Structure
*/
/* Instance Part
*/
typedef struct _DtControlPart
{
XtPointer push_function;
XtPointer push_argument;
String push_action;
int num_push_images;
int max_push_images;
int push_image_position;
int *push_delays;
Pixmap *push_pixmaps;
Pixmap *push_masks;
String drop_action;
int num_drop_images;
int max_drop_images;
int drop_image_position;
int *drop_delays;
Pixmap *drop_pixmaps;
Pixmap *drop_masks;
Widget subpanel;
Pixmap alt_pix;
Pixmap alt_mask;
String alt_image;
XmString alt_string;
Dimension alt_string_width;
Dimension alt_string_height;
String format;
String format_jp;
String file_name;
long file_size;
XtIntervalId monitor_timer;
int monitor_time;
Boolean chime;
Boolean file_changed;
Boolean _do_update;
Boolean use_embossed_text;
Boolean use_label_adj;
unsigned char control_type;
GC top_shadow_gc;
GC bottom_shadow_gc;
XtIntervalId click_timer;
int click_time;
short busy;
int blink_elapsed;
int max_blink_time;
int blink_time;
XtIntervalId blink_timer;
XtIntervalId date_timer;
XtIntervalId push_animation_timer;
XtIntervalId drop_animation_timer;
} DtControlPart;
/* Full Instance Record
*/
typedef struct _DtControlRec
{
ObjectPart object;
RectObjPart rectangle;
XmGadgetPart gadget;
DtIconPart icon;
DtControlPart control;
} DtControlRec;
/*-------------------------------------------------------------
** Class and Instance Macros
*/
/* DtControl Class Macros
*/
/* DtControl Instance Macros
*/
#define G_Format(g) (g -> control.format)
#define G_TopShadowGC(g) (g -> control.top_shadow_gc)
#define G_BottomShadowGC(g) (g -> control.bottom_shadow_gc)
#define G_Busy(g) (g -> control.busy)
#define G_PushImagePosition(g) (g -> control.push_image_position)
#define G_NumPushImages(g) (g -> control.num_push_images)
#define G_MaxPushImages(g) (g -> control.max_push_images)
#define G_PushDelays(g) (g -> control.push_delays)
#define G_PushPixmaps(g) (g -> control.push_pixmaps)
#define G_PushMasks(g) (g -> control.push_masks)
#define G_DropImagePosition(g) (g -> control.drop_image_position)
#define G_NumDropImages(g) (g -> control.num_drop_images)
#define G_MaxDropImages(g) (g -> control.max_drop_images)
#define G_DropDelays(g) (g -> control.drop_delays)
#define G_DropPixmaps(g) (g -> control.drop_pixmaps)
#define G_DropMasks(g) (g -> control.drop_masks)
#define G_DropAction(g) (g -> control.drop_action)
#define G_PushAction(g) (g -> control.push_action)
#define G__DoUpdate(g) (g -> control._do_update)
#define G_PushFunction(g) (g -> control.push_function)
#define G_PushArgument(g) (g -> control.push_argument)
#define G_Subpanel(g) (g -> control.subpanel)
#define G_AltMask(g) (g -> control.alt_mask)
#define G_AltPix(g) (g -> control.alt_pix)
#define G_AltString(g) (g -> control.alt_string)
#define G_AltStringWidth(g) (g -> control.alt_string_width)
#define G_AltStringHeight(g) (g -> control.alt_string_height)
#define G_ControlType(g) (g -> control.control_type)
#define G_AltImage(g) (g -> control.alt_image)
#define G_FileChanged(g) (g -> control.file_changed)
#define G_FileName(g) (g -> control.file_name)
#define G_FileSize(g) (g -> control.file_size)
#define G_Chime(g) (g -> control.chime)
#define G_MonitorTimer(g) (g -> control.monitor_timer)
#define G_MonitorTime(g) (g -> control.monitor_time)
#define G_ClickTime(g) (g -> control.click_time)
#define G_ClickTimer(g) (g -> control.click_timer)
#define G_DateTimer(g) (g -> control.date_timer)
#define G_PushAnimationTimer(g) (g -> control.push_animation_timer)
#define G_DropAnimationTimer(g) (g -> control.drop_animation_timer)
#define G_BlinkCount(g) (g -> control.blink_count)
#define G_BlinkElapsed(g) (g -> control.blink_elapsed)
#define G_MaxBlinkTime(g) (g -> control.max_blink_time)
#define G_BlinkTime(g) (g -> control.blink_time)
#define G_BlinkTimer(g) (g -> control.blink_timer)
#define G_BlinkTime(g) (g -> control.blink_time)
#define G_UseEmbossedText(g) (g -> control.use_embossed_text)
#define G_UseLabelAdjustment(g) (g -> control.use_label_adj)
#endif /* _DtControlP_h */
/* DON'T ADD ANYTHING AFTER THIS #endif */

View File

@@ -0,0 +1,58 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: DataTypes.h /main/3 1995/10/26 15:19:20 rswiston $ */
/*
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
* (c) Copyright 1993, 1994 International Business Machines Corp. *
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
* (c) Copyright 1993, 1994 Novell, Inc. *
*/
/* -*-C-*-
*******************************************************************************
*
* File: DataTypes.h
* Description: This file defines data types that are used throughout the
* DT code.
*
* Common Desktop Environment (CDE)
*
* (c) Copyright 1993 Hewlett-Packard Company
* (c) Copyright 1993 International Business Machines Corp.
* (c) Copyright 1993 Sun Microsystems, Inc.
*
*
* Disclaimer: This file could change between the 10/93 snapshot and the
* final release of CDE 1.0
*
*******************************************************************************
*/
#ifndef _Dt_DataTypes_h
#define _Dt_DataTypes_h
#include <X11/Intrinsic.h>
typedef XtPointer Pointer;
#endif /* _Dt_DataTypes_h */
/* Do not add anything after this endif. */

188
cde/include/Dt/DbReader.h Normal file
View File

@@ -0,0 +1,188 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/*
* File: DbReader.h $XConsortium: DbReader.h /main/4 1995/10/26 15:03:35 rswiston $
*
* Description: Public include file for the database reader.
*
* (c) Copyright 1987, 1988, 1989 by Hewlett-Packard Company
*
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
* (c) Copyright 1993, 1994 International Business Machines Corp. *
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
* (c) Copyright 1993, 1994 Novell, Inc. *
*/
#ifndef _Dt_DbReader_h
#define _Dt_DbReader_h
#include <X11/Xlib.h>
#include <X11/Xresource.h>
#include <Dt/DbUtil.h>
#define DTRECORDIDENTIFIER NULL
#define DTUNLIMITEDFIELDS 0
/* one set of attribute/pair */
typedef struct
{
XrmQuark fieldName;
char *fieldValue;
} DtDtsDbField;
/*
* Opaque identifier used for identifying a database file name. The opaque
* identifier can be converted to an ascii string, using the function
* _DtDbPathIdToString().
*/
#define DtDbPathId long
/*
* All record converters should expect to be called with the parameters
* indicated below:
*
* fields: This is an array of keyword/value pair strings, each
* representing one field value for this database record. NOTE:
* the keywords have not been validated; this is the
* responsibility of the converter, and is usually accomplished
* by calling _DtValidateFieldNames(). The array is NULL
* terminated, with the last entry having both the 'fieldName'
* and 'fieldValue' pointers set to NULL. The first entry always
* represents the record identifier, with the 'fieldName' set
* to the record type string, and the 'fieldValue' set to any
* remaining data specified on the record identifier line.
*
* pathId: Is an opaque identifier, which can be used to retrieve the name
* of the database file from which this record was obtained. By
* calling _DtDbPathIdToString(), the database file, in
* "host:/path" format, can be obtained.
*
* hostPrefix: If the database file was loaded from a machine other than the
* local machine, then this string indicates the host prefix, in
* "/nfs/<host>" format. If the host was the local host, then
* this value is set to NULL.
*
* rejectionStatus: This flag indicates whether any of the earlier record
* converters had rejected this entry. Certain classes
* of converters may choose to ignore entries if they
* had already been rejected.
*
* It is the responsibility of the converter to perform any necessary
* verification of the passed in set of keywords; the function
* _DtValidateFieldNames() is provided as a convenience function for performing
* this type of validation. Typically, the converter will write an error to
* the user's errorlog file, if an invalid record is encountered.
*
* It is also the responsibility of the converter to allocate any memory needed
* to store the new record. The strings contained within the 'fields' array
* will all be freed when the converter returns to _DtDbRead(), so the
* converter should make copies of any information it wishes to use in the
* future. The converter is also responsible for adding the new record to
* whatever storage array it is using to save record information.
*
* If the converter decides to reject the record, then it should return a
* 'True' value. If the record was acceptable, then 'False' should be
* returned.
*/
typedef Boolean (*DtDbConverter) (DtDtsDbField * fields,
DtDbPathId pathId,
char * hostPrefix,
Boolean rejectionStatus);
/*
* This structure defines each record type which should be loaded by
* _DtDbRead(). Since _DtDbRead() is capable of loading multiple record types
* (i.e ACTION, DATA_CRITERIA, etc) in a single pass, the invoking function will
* pass in an array of these structures, for which each element will define a
* record type which should be loaded. Each record definition requires the
* following information:
*
* recordKeyword: This is the keyword which uniquely identifies the record
* which matches this definition. Examples are "ACTION" and
* "DATA_CRITERIA".
*
* maxFields: Indicates the maximum number of fields which is expected
* by this record type; typically, this corresponds to the
* number of distinct field keywords supported by this type
* of record. This feature is used to prevent runaway database
* records from getting out of hand; a runaway database record
* typically occurs when the user forgets to include line
* continuation characters, and a long 'description' field
* is entered. If this parameter is set to
* DTUNLIMITEDFIELDS, then the check for runaway records
* will be disabled for records of this type.
*
* converters: This is a NULL-terminated array of function pointers,
* corresponding to the set of record converters which will
* be called, whenever a record of this type is encountered.
* The converters are called in order, and all converters will
* be called, even if an earlier one rejects the record. The
* last entry in the array must be set to NULL.
*/
typedef struct {
char * recordKeyword;
int maxFields;
DtDbConverter * converters;
} DtDbRecordDesc;
/*
* _DtDbRead() is the function which causes the specified set of directories to
* be searched for files ending with the specified suffix. Although not
* required, the set of directories to search is typically obtained by calling
* _DtGetDatabaseDirPaths(). This function supports the loading of multiple
* field types, all in a single pass of the database files. This function does
* not attempt to manage the memory used to store the information extracted from
* the database files; it is the responsibility of the function calling this
* procedure to initialize any storage, and it is the responsibility of the
* record converters to allocate any memory needed to store and record, along
* with adding the record to the appropriate storage array.
*
* dirs: The set of directories to be searched for database files.
*
* suffix: The file suffix (i.e. ".vf") used to qualify which files within
* the database directories should be loaded.
*
* recordDescriptions: An array, where each entry describes a database record
* which should be loaded during this pass of _DtDbRead().
* See the definition for this structure, for more details.
*
* int numRecordDescriptions: The number of entries in the above array.
*/
extern void _DtDbRead (DtDirPaths * dirs,
char * suffix,
DtDbRecordDesc * recordDescriptions,
int numRecordDescriptions);
/*
* _DtDbPathIdToString() is used to map a filename identifier, represented
* by an opaque DtDbPathId value, into its corresponding ascii string
* representation. The returned string is owned by the calling application,
* which should free it up when no longer needed.
*/
extern char * _DtDbPathIdToString ( DtDbPathId pathId );
#endif /* _Dt_DbReader_h */
/* DON'T ADD ANYTHING AFTER THIS #endif */

103
cde/include/Dt/DbUtil.h Normal file
View File

@@ -0,0 +1,103 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/*
* File: DbUtil.h $XConsortium: DbUtil.h /main/4 1995/10/26 15:04:04 rswiston $
* Language: C
*
* (c) Copyright 1988, Hewlett-Packard Company, all rights reserved.
*
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
* (c) Copyright 1993, 1994 International Business Machines Corp. *
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
* (c) Copyright 1993, 1994 Novell, Inc. *
*/
#ifndef _Dt_DbUtil_h
#define _Dt_DbUtil_h
#include <X11/Intrinsic.h> /* Boolean */
/*
* This structure is used by many of the database functions. It is used to
* specify a collection of filenames or directory names. Each file/directory
* name is returned in two forms:
*
* dirs[n] The fully host-qualified pathname for the file or directory,
* in "host:/path" format.
*
* paths[n] The internal format of the file or directory anme, which
* can be passed to any of the standard tools which expect a
* valid filename; i.e. /nfs/host/path.
*
* Both of the arrays are NULL-terminated.
*/
typedef struct {
char ** dirs;
char ** paths;
} DtDirPaths;
/*****************************************************************************
*
*
*
****************************************************************************/
extern DtDirPaths * _DtFindMatchingFiles( DtDirPaths * dirs,
char * suffix,
Boolean sortFiles );
/*****************************************************************************
*
* _DtGetDatabaseDirPaths() returns a NULL-terminated array of directories,
* which are to be searched for database files. The paths are obtained by
* querying the DTDATABASESEARCHPATH environment variable, which specifies
* a set of comma separated pathnames, int "host:/path" format. The
* return structure should be freed up, when no longer needed, by invoking
* _DtFreeDatabaseDirPaths().
*
* The returned directory names are represented in two formats:
*
* 1) Fully host qualified; i.e. "host:/path"
* 2) Internal format; i.e. "/nfs/host/path"
*
****************************************************************************/
extern DtDirPaths * _DtGetDatabaseDirPaths( void );
/*****************************************************************************
*
* _DtFreeDatabaseDirPaths() is used to free the memory occupied by the
* passed-in instance of the DtDirPaths structure. Typically, this
* information was originally obtained by a call to DtGetDatabasePaths()
* or _DtFindMatchingFiles().
*
* Parameters:
*
* dirs The structure which is to be freed up.
*
****************************************************************************/
extern void _DtFreeDatabaseDirPaths( DtDirPaths * dirs );
#endif /* _Dt_DbUtil_h */
/* DON'T ADD ANYTHING AFTER THIS #endif */

View File

@@ -0,0 +1,88 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: DialogBox.h /main/4 1995/10/26 09:30:36 rswiston $ */
/**---------------------------------------------------------------------
***
*** file: DialogBox.h
***
*** project: MotifPlus Widgets
***
*** description: Public include file for DtDialogBox class.
***
***
*** (c) Copyright 1990 by Hewlett-Packard Company.
***
***
***-------------------------------------------------------------------*/
#ifndef _DtDialogBox_h
#define _DtDialogBox_h
#include <Xm/Xm.h>
#include <Dt/DtStrDefs.h>
#ifndef DtIsDialogBox
#define DtIsDialogBox(w) XtIsSubclass(w, dtDialogBoxWidgetClass)
#endif /* XmIsDialogBox */
extern Widget _DtCreateDialogBox(
Widget parent,
char *name,
ArgList arglist,
Cardinal argcount) ;
extern Widget __DtCreateDialogBoxDialog(
Widget ds_p,
String name,
ArgList db_args,
Cardinal db_n) ;
extern Widget _DtDialogBoxGetButton(
Widget w,
Cardinal pos) ;
extern Widget _DtDialogBoxGetWorkArea(
Widget w) ;
extern WidgetClass dtDialogBoxWidgetClass;
typedef struct _DtDialogBoxClassRec * DtDialogBoxWidgetClass;
typedef struct _DtDialogBoxRec * DtDialogBoxWidget;
#define XmBUTTON 11
#define XmCR_DIALOG_BUTTON 100
typedef struct
{
int reason;
XEvent * event;
Cardinal button_position;
Widget button;
} DtDialogBoxCallbackStruct;
#endif /* _DtDialogBox_h */
/* DON'T ADD ANYTHING AFTER THIS #endif */

169
cde/include/Dt/DialogBoxP.h Normal file
View File

@@ -0,0 +1,169 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: DialogBoxP.h /main/5 1996/03/27 20:16:24 drk $ */
/**---------------------------------------------------------------------
***
*** file: DialogBoxP.h
***
*** project: Motif Widgets
***
*** description: Private include file for DtDialogBox class.
***
***
*** (c) Copyright 1990 by Hewlett-Packard Company.
***
***
***-------------------------------------------------------------------*/
#ifndef _DtDialogBoxP_h
#define _DtDialogBoxP_h
#include <Xm/XmP.h>
#include <Xm/BulletinBP.h>
#include <Xm/FormP.h>
#include <Dt/DialogBox.h>
typedef void (*DlgGetSizeProc)(
Widget,
Dimension,
Dimension,
Dimension,
Dimension,
Dimension *,
Dimension *
);
/*-------------------------------------------------------------
** Class Structure
*/
/* Class Part
*/
typedef struct _DtDialogBoxClassPart
{
XtWidgetProc create_children;
XtWidgetProc configure_children;
DlgGetSizeProc get_size;
XtCallbackProc button_callback;
caddr_t extension;
} DtDialogBoxClassPart;
/* Full Class Record
*/
typedef struct _DtDialogBoxClassRec
{
CoreClassPart core_class;
CompositeClassPart composite_class;
ConstraintClassPart constraint_class;
XmManagerClassPart manager_class;
XmBulletinBoardClassPart bulletin_board_class;
XmFormClassPart form_class;
DtDialogBoxClassPart dialog_box_class;
} DtDialogBoxClassRec;
/* Actual Class
*/
extern DtDialogBoxClassRec dtDialogBoxClassRec;
/*-------------------------------------------------------------
** Instance Structure
*/
/* Instance Part
*/
typedef struct _DtDialogBoxPart
{
XtCallbackList callback;
Widget work_area;
Widget separator;
WidgetList button;
Cardinal button_count;
Boolean minimize_buttons;
XmStringTable button_label_strings;
} DtDialogBoxPart;
/* Full Instance Record
*/
typedef struct _DtDialogBoxRec
{
CorePart core;
CompositePart composite;
ConstraintPart constraint;
XmManagerPart manager;
XmBulletinBoardPart bulletin_board;
XmFormPart form;
DtDialogBoxPart dialog_box;
} DtDialogBoxRec;
/*-------------------------------------------------------------
** Constraint Structure
*/
/* Constraint Part
*/
typedef struct _DtDialogBoxConstraintPart
{
unsigned char child_type;
} DtDialogBoxConstraintPart, * DtDialogBoxConstraint;
/* Full Constraint Record
*/
typedef struct _DtDialogBoxConstraintRec
{
XmManagerConstraintPart manager_constraint;
XmFormConstraintPart form_constraint;
DtDialogBoxConstraintPart dialog_box_constraint;
} DtDialogBoxConstraintRec, * DtDialogBoxConstraintPtr;
/*-------------------------------------------------------------
** Class and Instance Macros
*/
/* DtDialogBox Class Macros
*/
/**** WARNING: These macros are not thread-safe! ****/
#define C_CreateChildren(mc) ((mc) -> dialog_box_class.create_children)
#define C_ConfigureChildren(mc) ((mc) -> dialog_box_class.configure_children)
#define C_GetSize(mc) ((mc) -> dialog_box_class.get_size)
#define C_ButtonCallback(mc) ((mc) -> dialog_box_class.button_callback)
/* DtDialogBox Instance Macros
*/
#define M_DialogBoxConstraint(w) \
(&((DtDialogBoxConstraintPtr) (w)->core.constraints) \
-> dialog_box_constraint)
#define M_WorkArea(m) (m -> dialog_box.work_area)
#define M_Separator(m) (m -> dialog_box.separator)
#define M_MinimizeButtons(m) (m -> dialog_box.minimize_buttons)
#define M_Button(m) (m -> dialog_box.button)
#define M_ButtonCount(m) (m -> dialog_box.button_count)
#define M_ButtonLabelStrings(m) (m -> dialog_box.button_label_strings)
#define M_Callback(m) (m -> dialog_box.callback)
#endif /* _DtDialogBoxP_h */
/* DON'T ADD ANYTHING AFTER THIS #endif */

210
cde/include/Dt/Dnd.h Normal file
View File

@@ -0,0 +1,210 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: Dnd.h /main/3 1995/10/26 15:04:35 rswiston $ */
/*
* (c) Copyright 1993, 1994 Hewlett-Packard Company
* (c) Copyright 1993, 1994 International Business Machines Corp.
* (c) Copyright 1993, 1994 Sun Microsystems, Inc.
* (c) Copyright 1993, 1994 Novell, Inc.
*/
#ifndef _Dt_Dnd_h
#define _Dt_Dnd_h
#include <Xm/DragIcon.h>
#include <Xm/DragC.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* Constants
*/
/* Dnd Callback Reasons */
enum {
DtCR_DND_CONVERT_DATA,
DtCR_DND_CONVERT_DELETE,
DtCR_DND_DRAG_FINISH,
DtCR_DND_TRANSFER_DATA,
DtCR_DND_DROP_ANIMATE,
DtCR_DND_ROOT_TRANSFER
};
#define DtCR_DND_TRANSFER DtCR_DND_TRANSFER_DATA
/*
* Dnd Drag Start Resources
* dropOnRootCallback is private and should not be used
*/
#define DtNdropOnRootCallback "dropOnRootCallback"
#define DtCDropOnRootCallback "DropOnRootCallback"
#define DtNsourceIcon "sourceIcon"
#define DtCSourceIcon "SourceIcon"
#define DtNbufferIsText "bufferIsText"
#define DtCBufferIsText "BufferIsText"
/*
*Dnd Drop Register Resources
*/
#define DtNdropAnimateCallback "dropAnimateCallback"
#define DtCDropAnimateCallback "DropAnimateCallback"
#define DtNpreserveRegistration "preserveRegistration"
#define DtCPreserveRegistration "PreserveRegistration"
#define DtNregisterChildren "registerChildren"
#define DtCRegisterChildren "RegisterChildren"
#define DtNtextIsBuffer "textIsBuffer"
#define DtCTextIsBuffer "TextIsBuffer"
/*
* Types
*/
typedef enum {
DtDND_SUCCESS,
DtDND_FAILURE
} DtDndStatus;
typedef unsigned long DtDndProtocol;
enum {
DtDND_NOOP_TRANSFER = 0L,
DtDND_TEXT_TRANSFER = (1L << 0),
DtDND_FILENAME_TRANSFER = (1L << 1),
DtDND_BUFFER_TRANSFER = (1L << 2)
};
typedef struct _DtDndBuffer {
void * bp;
int size;
String name;
} DtDndBuffer;
typedef struct _DtDndContext {
DtDndProtocol protocol;
Cardinal numItems;
union {
XmString * strings;
String * files;
DtDndBuffer * buffers;
} data;
} DtDndContext;
/*
* Dnd Callback Structures
*/
typedef struct _DtDndConvertCallbackStruct {
int reason;
XEvent * event;
DtDndContext * dragData;
DtDndStatus status;
} DtDndConvertCallbackStruct, *DtDndConvertCallback;
typedef struct _DtDndDragFinishCallbackStruct {
int reason;
XEvent * event;
DtDndContext * dragData;
Widget sourceIcon;
} DtDndDragFinishCallbackStruct, *DtDndDragFinishCallback;
typedef struct _DtDndTransferCallbackStruct {
int reason;
XEvent * event;
Position x, y;
unsigned char operation;
DtDndContext * dropData;
Widget dragContext;
Boolean completeMove;
DtDndStatus status;
} DtDndTransferCallbackStruct, *DtDndTransferCallback;
typedef DtDndTransferCallbackStruct DtDndDropCallbackStruct, *DtDndDropCallback;
typedef struct _DtDndDropAnimateCallbackStruct {
int reason;
XEvent * event;
Position x, y;
unsigned char operation;
DtDndContext * dropData;
} DtDndDropAnimateCallbackStruct, *DtDndDropAnimateCallback;
/*
* Functions
*/
extern Widget DtDndCreateSourceIcon(
Widget widget,
Pixmap source,
Pixmap mask);
extern Widget DtDndDragStart(
Widget dragInitiator,
XEvent* event,
DtDndProtocol protocol,
Cardinal numItems,
unsigned char operations,
XtCallbackList convertCallback,
XtCallbackList dragFinishCallback,
ArgList argList,
Cardinal argCount);
extern Widget DtDndVaDragStart(
Widget dragInitiator,
XEvent* event,
DtDndProtocol protocol,
Cardinal numItems,
unsigned char operations,
XtCallbackList convertCallback,
XtCallbackList dragFinishCallback,
...);
extern void DtDndDropRegister(
Widget dropSite,
DtDndProtocol protocols,
unsigned char operations,
XtCallbackList transferCallback,
ArgList argList,
Cardinal argCount);
extern void DtDndVaDropRegister(
Widget dropSite,
DtDndProtocol protocols,
unsigned char operations,
XtCallbackList transferCallback,
...);
extern void DtDndDropUnregister(
Widget widget);
#ifdef __cplusplus
}
#endif
#endif /* _Dt_Dnd_h */

423
cde/include/Dt/DndIconI.h Normal file
View File

@@ -0,0 +1,423 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: DndIconI.h /main/3 1995/10/26 15:05:58 rswiston $ */
/*********************************************************************
*
* File: DndIconI.h
*
* Description: Private include file containing DND drag icons bitmaps
*
*********************************************************************
*
*+SNOTICE
*
* RESTRICTED CONFIDENTIAL INFORMATION:
*
* The information in this document is subject to special
* restrictions in a confidential disclosure agreement between
* HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
* document outside HP, IBM, Sun, USL, SCO, or Univel without
* Sun's specific written approval. This documment and all copies
* and derivative works thereof must be returned or destroyed at
* Sun's request.
*
* Copyright 1993 Sun Microsystems, Inc. All rights reserved.
*
* (c) Copyright 1993, 1994 Hewlett-Packard Company
* (c) Copyright 1993, 1994 International Business Machines Corp.
* (c) Copyright 1993, 1994 Sun Microsystems, Inc.
* (c) Copyright 1993, 1994 Novell, Inc.
*
*+ENOTICE
*/
#ifndef _Dt_DndIconI_h
#define _Dt_DndIconI_h
#ifdef __cplusplus
extern "C" {
#endif
/*-------------------------------------------------------------------
* Motif Defaults
*-------------------------------------------------------------------*/
#define motif_x_hot 1
#define motif_y_hot 1
#define motif_x_offset_state -8
#define motif_y_offset_state -2
#define motif_x_offset_delta 0
#define motif_y_offset_delta 0
/*-------------------------------------------------------------------
* Text Drags: Cursors
*-------------------------------------------------------------------*/
#define text_x_hot 1
#define text_y_hot 1
#define text_x_offset_state 1
#define text_y_offset_state 1
#define text_x_offset_delta 7
#define text_y_offset_delta 3
/*
* Text: State Valid
*/
#define text_valid_width 16
#define text_valid_height 16
static unsigned char text_valid_bits[] = {
#ifdef OLDTEXTVALID
0x00, 0x00, 0x02, 0x00, 0x06, 0x00, 0x0e, 0x00, 0x1e, 0x00, 0x3e, 0x00,
0x7e, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
#else
0x00, 0x00, 0xfe, 0x01, 0xfe, 0x00, 0x7e, 0x00, 0x3e, 0x00, 0x1e, 0x00,
0x0e, 0x00, 0x06, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
#endif
static unsigned char text_valid_m_bits[] = {
#ifdef OLDTEXTVALID
0x03, 0x00, 0x07, 0x00, 0x0f, 0x00, 0x1f, 0x00, 0x3f, 0x00, 0x7f, 0x00,
0xff, 0x00, 0xff, 0x01, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
#else
0xff, 0x07, 0xff, 0x03, 0xff, 0x01, 0xff, 0x00, 0x7f, 0x00, 0x3f, 0x00,
0x1f, 0x00, 0x0f, 0x00, 0x07, 0x00, 0x03, 0x00, 0x01, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
#endif
/*
* Text: State Invalid
*/
#define text_invalid_width 16
#define text_invalid_height 16
static unsigned char text_invalid_bits[] = {
0x00, 0x00, 0xe0, 0x03, 0xf8, 0x0f, 0x1c, 0x1c, 0x0c, 0x1e, 0x06, 0x37,
0x86, 0x33, 0xc6, 0x31, 0xe6, 0x30, 0x76, 0x30, 0x3c, 0x18, 0x1c, 0x1c,
0xf8, 0x0f, 0xe0, 0x03, 0x00, 0x00, 0x00, 0x00};
static unsigned char text_invalid_m_bits[] = {
0xe0, 0x03, 0xf8, 0x0f, 0xfc, 0x1f, 0xfe, 0x3f, 0x1e, 0x3f, 0x8f, 0x7f,
0xcf, 0x7f, 0xef, 0x7b, 0xff, 0x79, 0xff, 0x78, 0x7e, 0x3c, 0xfe, 0x3f,
0xfc, 0x1f, 0xf8, 0x0f, 0xe0, 0x03, 0x00, 0x00};
/*
* Text: None
*/
#define text_none_width 16
#define text_none_height 16
static unsigned char text_none_bits[] = {
0x00, 0x00, 0xe0, 0x03, 0xf8, 0x0f, 0x1c, 0x1c, 0x0c, 0x1e, 0x06, 0x37,
0x86, 0x33, 0xc6, 0x31, 0xe6, 0x30, 0x76, 0x30, 0x3c, 0x18, 0x1c, 0x1c,
0xf8, 0x0f, 0xe0, 0x03, 0x00, 0x00, 0x00, 0x00};
static unsigned char text_none_m_bits[] = {
0xe0, 0x03, 0xf8, 0x0f, 0xfc, 0x1f, 0xfe, 0x3f, 0x1e, 0x3f, 0x8f, 0x7f,
0xcf, 0x7f, 0xef, 0x7b, 0xff, 0x79, 0xff, 0x78, 0x7e, 0x3c, 0xfe, 0x3f,
0xfc, 0x1f, 0xf8, 0x0f, 0xe0, 0x03, 0x00, 0x00};
/*-------------------------------------------------------------------
* Text Drags: Operation Cursors
*-------------------------------------------------------------------*/
/* Use Data Operation Cursors */
/*
* Text: Operation Move
*/
/*
* Text: Operation Copy
*/
/*
* Text: Operation Link
*/
/*-------------------------------------------------------------------
* Text Drags: Source Cursor
*-------------------------------------------------------------------*/
#define text_source_width 32
#define text_source_height 32
static unsigned char text_source_bits[] = {
#ifdef OLDTEXTSOURCE
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xd8, 0xdb, 0xcd, 0x0d, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xbe, 0x7f, 0x1f,
0x00, 0x00, 0x00, 0x00, 0xb8, 0xf6, 0xfd, 0x16, 0x00, 0x00, 0x00, 0x00,
0xe8, 0x7b, 0x76, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xb8, 0xbb, 0xff, 0x06,
0x00, 0x00, 0x00, 0x00, 0xd8, 0xde, 0x7b, 0x1d, 0x00, 0x00, 0x00, 0x00,
0x78, 0xd7, 0xb4, 0x0b, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xad, 0xd5, 0x0f,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
#else
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xc0, 0xcd, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, 0x7f, 0x1f,
0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfd, 0x16, 0x00, 0x00, 0x00, 0x00,
0x00, 0x7b, 0x76, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xbb, 0xff, 0x06,
0x00, 0x00, 0x00, 0x00, 0xf0, 0xde, 0x7b, 0x1d, 0x00, 0x00, 0x00, 0x00,
0x78, 0x77, 0xb7, 0x0b, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xbd, 0xdd, 0x0f,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
#endif
static unsigned char text_source_m_bits[] = {
#ifdef OLDTEXTSOURCE
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0x3f,
0xfc, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0x3f,
0xfc, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0x3f,
0xfc, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0x3f,
0xfc, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0x3f,
0xfc, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0x3f,
0xfc, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
#else
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0x3f,
0x00, 0xf0, 0xff, 0x3f, 0x00, 0xf8, 0xff, 0x3f, 0x00, 0xfc, 0xff, 0x3f,
0x00, 0xfe, 0xff, 0x3f, 0x00, 0xff, 0xff, 0x3f, 0x80, 0xff, 0xff, 0x3f,
0xc0, 0xff, 0xff, 0x3f, 0xe0, 0xff, 0xff, 0x3f, 0xf0, 0xff, 0xff, 0x3f,
0xf8, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0x3f,
0xfc, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0x3f,
0xfc, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
#endif
/*-------------------------------------------------------------------
* Data Drags: Cursors
*------------------------------------------------------------------*/
#define data_x_hot 3
#define data_y_hot 3
#define data_x_offset_state 11
#define data_y_offset_state 11
#define data_x_offset_delta 7
#define data_y_offset_delta 7
/*
* Data: State Valid
*/
#define data_valid_width 16
#define data_valid_height 16
static unsigned char data_valid_bits[] = {
0x00, 0x00, 0x06, 0x00, 0x1e, 0x00, 0x7c, 0x00, 0xfc, 0x01, 0xf8, 0x07,
0xf8, 0x07, 0xf0, 0x01, 0xf0, 0x03, 0x60, 0x07, 0x60, 0x0e, 0x00, 0x1c,
0x00, 0x38, 0x00, 0x70, 0x00, 0x60, 0x00, 0x00};
static unsigned char data_valid_m_bits[] = {
0x07, 0x00, 0x1f, 0x00, 0x7f, 0x00, 0xfe, 0x01, 0xfe, 0x07, 0xfc, 0x0f,
0xfc, 0x0f, 0xf8, 0x07, 0xf8, 0x07, 0xf0, 0x0f, 0xf0, 0x1f, 0x60, 0x3e,
0x00, 0x7c, 0x00, 0xf8, 0x00, 0xf0, 0x00, 0x60};
/*
* Data: State Invalid
*/
#define data_invalid_width 16
#define data_invalid_height 16
static unsigned char data_invalid_bits[] = {
0x00, 0x00, 0xe0, 0x03, 0xf8, 0x0f, 0x1c, 0x1c, 0x0c, 0x1e, 0x06, 0x37,
0x86, 0x33, 0xc6, 0x31, 0xe6, 0x30, 0x76, 0x30, 0x3c, 0x18, 0x1c, 0x1c,
0xf8, 0x0f, 0xe0, 0x03, 0x00, 0x00, 0x00, 0x00};
static unsigned char data_invalid_m_bits[] = {
0xe0, 0x03, 0xf8, 0x0f, 0xfc, 0x1f, 0xfe, 0x3f, 0x1e, 0x3f, 0x8f, 0x7f,
0xcf, 0x7f, 0xef, 0x7b, 0xff, 0x79, 0xff, 0x78, 0x7e, 0x3c, 0xfe, 0x3f,
0xfc, 0x1f, 0xf8, 0x0f, 0xe0, 0x03, 0x00, 0x00};
/*
* Data: State None
*/
#define data_none_width 16
#define data_none_height 16
static unsigned char data_none_bits[] = {
0x00, 0x00, 0xe0, 0x03, 0xf8, 0x0f, 0x1c, 0x1c, 0x0c, 0x1e, 0x06, 0x37,
0x86, 0x33, 0xc6, 0x31, 0xe6, 0x30, 0x76, 0x30, 0x3c, 0x18, 0x1c, 0x1c,
0xf8, 0x0f, 0xe0, 0x03, 0x00, 0x00, 0x00, 0x00};
static unsigned char data_none_m_bits[] = {
0xe0, 0x03, 0xf8, 0x0f, 0xfc, 0x1f, 0xfe, 0x3f, 0x1e, 0x3f, 0x8f, 0x7f,
0xcf, 0x7f, 0xef, 0x7b, 0xff, 0x79, 0xff, 0x78, 0x7e, 0x3c, 0xfe, 0x3f,
0xfc, 0x1f, 0xf8, 0x0f, 0xe0, 0x03, 0x00, 0x00};
/*-------------------------------------------------------------------
* Data Drags: Operation Cursors
*-------------------------------------------------------------------*/
/*
* Data: Operation Move
*/
#define data_move_width 16
#define data_move_height 16
static unsigned char data_move_bits[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
static unsigned char data_move_m_bits[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
/*
* Data: Operation Copy
*/
#define data_copy_width 16
#define data_copy_height 16
static unsigned char data_copy_bits[] = {
0x00, 0x00, 0xfe, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x1f, 0x02, 0x11,
0x02, 0x11, 0x02, 0x11, 0x02, 0x11, 0x02, 0x11, 0xfe, 0x11, 0x20, 0x10,
0x20, 0x10, 0xe0, 0x1f, 0x00, 0x00, 0x00, 0x00};
static unsigned char data_copy_m_bits[] = {
0xff, 0x03, 0xff, 0x03, 0xff, 0x03, 0xff, 0x3f, 0xff, 0x3f, 0xff, 0x3f,
0xff, 0x3f, 0xff, 0x3f, 0xff, 0x3f, 0xff, 0x3f, 0xff, 0x3f, 0xff, 0x3f,
0xf0, 0x3f, 0xf0, 0x3f, 0xf0, 0x3f, 0x00, 0x00};
/*
* Data: Operation Link
*/
#define data_link_width 16
#define data_link_height 16
static unsigned char data_link_bits[] = {
0x00, 0x00, 0xfe, 0x03, 0x02, 0x02, 0x02, 0x02, 0x32, 0x02, 0x32, 0x3e,
0x42, 0x20, 0x82, 0x20, 0x02, 0x21, 0x3e, 0x26, 0x20, 0x26, 0x20, 0x20,
0x20, 0x20, 0xe0, 0x3f, 0x00, 0x00, 0x00, 0x00};
static unsigned char data_link_m_bits[] = {
0xff, 0x07, 0xff, 0x07, 0xff, 0x07, 0xff, 0x07, 0xff, 0x7f, 0xff, 0x7f,
0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0xf0, 0x7f,
0xf0, 0x7f, 0xf0, 0x7f, 0xf0, 0x7f, 0x00, 0x00};
/*-------------------------------------------------------------------
* Data Drags: Source Icons
*-------------------------------------------------------------------*/
/*
* Data Source: Single
*/
#define data_single_width 32
#define data_single_height 32
static unsigned char data_single_bits[] = {
0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x7f, 0x00, 0x10, 0x00, 0xc0, 0x00,
0x10, 0x00, 0x40, 0x01, 0x10, 0x00, 0x40, 0x02, 0x10, 0x00, 0x40, 0x04,
0x10, 0x00, 0xc0, 0x0f, 0x10, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08,
0x10, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08,
0x10, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08,
0x10, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08,
0x10, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08,
0x10, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08,
0x10, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08,
0x10, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08,
0x10, 0x00, 0x00, 0x08, 0xf0, 0xff, 0xff, 0x0f};
static unsigned char data_single_m_bits[] = {
0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x7f, 0x00, 0xf0, 0xff, 0xff, 0x00,
0xf0, 0xff, 0xff, 0x01, 0xf0, 0xff, 0xff, 0x03, 0xf0, 0xff, 0xff, 0x07,
0xf0, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0x0f,
0xf0, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0x0f,
0xf0, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0x0f,
0xf0, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0x0f,
0xf0, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0x0f,
0xf0, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0x0f,
0xf0, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0x0f,
0xf0, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0x0f,
0xf0, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0x0f};
/*
* Data Source: Multiple
*/
#define data_multiple_width 32
#define data_multiple_height 32
static unsigned char data_multiple_bits[] = {
0xfc, 0xff, 0x0f, 0x00, 0x04, 0x00, 0x30, 0x00, 0x04, 0x00, 0xd0, 0x1f,
0x04, 0x00, 0x90, 0x10, 0x04, 0x00, 0x10, 0xf1, 0x04, 0x00, 0xf0, 0x93,
0x04, 0x00, 0x00, 0x92, 0x04, 0x00, 0x00, 0x92, 0x04, 0x00, 0x00, 0x92,
0x04, 0x00, 0x00, 0x92, 0x04, 0x00, 0x00, 0x92, 0x04, 0x00, 0x00, 0x92,
0x04, 0x00, 0x00, 0x92, 0x04, 0x00, 0x00, 0x92, 0x04, 0x00, 0x00, 0x92,
0x04, 0x00, 0x00, 0x92, 0x04, 0x00, 0x00, 0x92, 0x04, 0x00, 0x00, 0x92,
0x04, 0x00, 0x00, 0x92, 0x04, 0x00, 0x00, 0x92, 0x04, 0x00, 0x00, 0x92,
0x04, 0x00, 0x00, 0x92, 0x04, 0x00, 0x00, 0x92, 0x04, 0x00, 0x00, 0x92,
0x04, 0x00, 0x00, 0x92, 0x04, 0x00, 0x00, 0x92, 0x04, 0x00, 0x00, 0x92,
0xfc, 0xff, 0xff, 0x93, 0x20, 0x00, 0x00, 0x90, 0xe0, 0xff, 0xff, 0x9f,
0x00, 0x01, 0x00, 0x80, 0x00, 0xff, 0xff, 0xff};
static unsigned char data_multiple_m_bits[] = {
0xfc, 0xff, 0x0f, 0x00, 0xfc, 0xff, 0x3f, 0x00, 0xfc, 0xff, 0xff, 0x1f,
0xfc, 0xff, 0xff, 0x1f, 0xfc, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff,
0xfc, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff,
0xfc, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff,
0xfc, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff,
0xfc, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff,
0xfc, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff,
0xfc, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff,
0xfc, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff,
0xfc, 0xff, 0xff, 0xff, 0xe0, 0xff, 0xff, 0xff, 0xe0, 0xff, 0xff, 0xff,
0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff};
#ifdef __cplusplus
}
#endif
#endif /* _Dt_DndIconI_h */

332
cde/include/Dt/DndP.h Normal file
View File

@@ -0,0 +1,332 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: DndP.h /main/4 1996/06/21 17:28:31 ageorge $ */
/*********************************************************************
*
* File: DndP.h
*
* Description: Private include file for DND Convenience API.
*
*********************************************************************
*
*+SNOTICE
*
* RESTRICTED CONFIDENTIAL INFORMATION:
*
* The information in this document is subject to special
* restrictions in a confidential disclosure agreement bertween
* HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
* document outside HP, IBM, Sun, USL, SCO, or Univel wihtout
* Sun's specific written approval. This documment and all copies
* and derivative works thereof must be returned or destroyed at
* Sun's request.
*
* Copyright 1993 Sun Microsystems, Inc. All rights reserved.
*
* (c) Copyright 1993, 1994 Hewlett-Packard Company
* (c) Copyright 1993, 1994 International Business Machines Corp.
* (c) Copyright 1993, 1994 Sun Microsystems, Inc.
* (c) Copyright 1993, 1994 Novell, Inc.
*
*+ENOTICE
*/
#ifndef _Dt_DndP_h
#define _Dt_DndP_h
#include <stdarg.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* Drag and Drop selection targets
*/
extern Atom XA_TARGETS;
extern Atom XA_TIMESTAMP;
extern Atom XA_MULTIPLE;
extern Atom XA_DELETE;
extern Atom XA_NULL;
extern Atom XA_TEXT;
extern Atom XA_HOST_NAME;
extern Atom XA_SUN_FILE_HOST_NAME;
extern Atom XA_SUN_ENUM_COUNT;
extern Atom XA_SUN_DATA_LABEL;
extern Atom XA_SUN_SELN_READONLY;
extern Atom XA_SUN_ATM_FILE_NAME;
extern Atom XA_SUN_ATM_METHODS;
#define DtGetAtom(display, atomname) \
XmInternAtom((display),(atomname),False)
/*
* Drag Icon Styles
*/
typedef enum {
DtDND_DRAG_SOURCE_DEFAULT,
DtDND_DRAG_SOURCE_TEXT,
DtDND_DRAG_SOURCE_DATA,
DtDND_DRAG_SOURCE_MULTIPLE
} DtDndDragSource;
/*
* Drag-n-Drop Data Transfer Protocol
*/
typedef struct _DtDndTransfer {
Atom * targets;
Cardinal numTargets;
struct _DtDndMethods * methods;
} DtDndTransfer;
/*
* Drag Initiator Structure
*/
typedef struct _DtDragInfo {
Widget dragInitiator;
Widget dragContext;
DtDndProtocol protocol;
Cardinal numItems;
unsigned char operations;
XtCallbackList dragConvertCallback;
XtCallbackList dragFinishCallback;
XtCallbackList dropOnRootCallback;
XtCallbackList dragDropFinishCallback;
XtCallbackList dropFinishCallback;
XtCallbackList topLevelEnterCallback;
XtCallbackList topLevelLeaveCallback;
XtCallbackList dropStartCallback;
Widget sourceIcon;
Boolean bufferIsText;
DtDndTransfer * transfer;
DtDndContext * dragData;
Boolean inRoot;
Window backdropWindow;
DtDndStatus status;
XtPointer clientData;
} DtDragInfo;
/*
* Drop Receiver Existing Registration Structure
*/
typedef struct _DtDropSiteInfo {
XtCallbackProc dropProc;
unsigned char operations;
Atom * importTargets;
int numImportTargets;
} DtDropSiteInfo;
/*
* Drop Receiver Data Transfer Structure
*/
typedef struct _DtTransferInfo {
Widget dragContext;
DtDndProtocol protocol;
unsigned char operation;
struct _DtDndMethods * methods;
Atom * transferTargets;
Cardinal numTransferTargets;
Cardinal currentTransfer;
Boolean appTransferCalled;
XEvent * event;
Position x, y;
XtPointer clientData;
XtCallbackList dropAnimateCallback;
} DtTransferInfo;
/*
* Drop Receiver Registration Structure
*/
typedef struct _DtDropInfo {
Widget dropReceiver;
DtDndProtocol protocols;
unsigned char operations;
XtCallbackList dropTransferCallback;
XtCallbackList dropAnimateCallback;
Boolean textIsBuffer;
DtDropSiteInfo * dropSiteInfo;
DtDndTransfer * transfers;
Cardinal numTransfers;
DtTransferInfo * transferInfo;
DtDndContext * dropData;
DtDndStatus status;
} DtDropInfo;
/*
* Drag-n-Drop Data Transfer Protocol Function Prototypes
*/
typedef void
(*DtDndGetAvailTargetsProc)(
DtDragInfo * dtDragInfo,
Atom ** returnAvailTargetsList,
Cardinal * returnNumAvailTargets);
typedef void
(*DtDndGetExportTargetsProc)(
DtDragInfo * dtDragInfo,
Atom ** returnExportTargetsList,
Cardinal * returnNumExportTargets);
typedef void
(*DtDndGetImportTargetsProc)(
DtDropInfo * dtDropInfo,
Atom ** returnImportTargetsList,
Cardinal * returnNumImportTargets);
typedef void
(*DtDndConvertInitProc)(
DtDragInfo * dtDragInfo);
typedef Boolean
(*DtDndConvertProc)(
Widget dragContext,
DtDragInfo * dtDragInfo,
Atom * selection,
Atom * target,
Atom * returnType,
XtPointer * returnValue,
unsigned long * returnLength,
int * returnFormat,
XSelectionRequestEvent *selectionRequestEvent);
typedef void
(*DtDndConvertFinishProc)(
DtDragInfo * dtDragInfo);
typedef void
(*DtDndTransferTargetsProc)(
DtDropInfo * dtDropInfo,
Atom * exportTargets,
Cardinal numExportTargets,
Atom ** returnTransferTargetsList,
Cardinal * returnNumTransferTargets);
typedef void
(*DtDndTransferProc)(
Widget dropTransfer,
DtDropInfo * dtDropInfo,
Atom * selection,
Atom * target,
Atom * type,
XtPointer value,
unsigned long * length,
int * format);
typedef void
(*DtDndTransferFinishProc)(
DtDropInfo * dtDropInfo);
/*
* Drag-n-Drop Data Transfer Methods
*/
typedef struct _DtDndMethods {
String name;
DtDndProtocol protocol;
DtDndDragSource sourceType;
DtDndGetAvailTargetsProc getAvailTargets;
DtDndGetExportTargetsProc getExportTargets;
DtDndGetImportTargetsProc getImportTargets;
DtDndConvertInitProc convertInit;
DtDndConvertProc convert;
DtDndConvertFinishProc convertFinish;
DtDndTransferTargetsProc transferTargets;
DtDndTransferProc transfer;
DtDndTransferFinishProc transferFinish;
} DtDndMethods;
/*
* Drag-n-Drop Private Utility Functions
*/
extern DtDndTransfer *
_DtDndCreateExportTransfer(
DtDragInfo * dtDragInfo);
extern DtDndTransfer *
_DtDndCreateImportTransfers(
DtDropInfo * dtDropInfo,
Cardinal * numTransfers);
extern void
_DtDndDestroyTransfers(
DtDndTransfer * transfers,
Cardinal numTransfers);
extern DtDndTransfer *
_DtDndTransferFromTargets(
DtDndTransfer * transfers,
Cardinal numTransfers,
Atom * targets,
Cardinal numTargets);
extern void
_DtDndTransferAdd(
Widget dropTransfer,
DtDropInfo * dtDropInfo,
Atom * transferTargets,
Cardinal numTransferTargets);
extern XtCallbackList
_DtDndCopyCallbackList(
XtCallbackList callbacks);
extern void
_DtDndCallCallbackList(
Widget widget,
XtCallbackList callbacks,
XtPointer calldata);
extern void
_DtDndSelectDragSource(
Widget anyWidget,
DtDndDragSource sourceType,
Widget sourceIcon);
extern void
_DtDndGetIconOffset(
Widget dragContext,
DtDndDragSource sourceType,
int * offsetXReturn,
int * offsetYReturn);
extern String
_DtDndGetHostName(void);
#ifdef DEBUG
extern void _DtDndPrintTargets(Display*,Atom*,Cardinal);
extern void _DtDndPrintTransfers(Display*,DtDndTransfer*,Cardinal);
#endif
#ifdef __cplusplus
}
#endif
#endif /* _Dt_DndP_h */

93
cde/include/Dt/Dt.h Normal file
View File

@@ -0,0 +1,93 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $TOG: Dt.h /main/12 1999/10/18 14:49:57 samborn $ */
/*
* (c) Copyright 1997, The Open Group
*/
/*
* (c) Copyright 1996 Digital Equipment Corporation.
* (c) Copyright 1993,1994,1996 Hewlett-Packard Company.
* (c) Copyright 1993,1994,1996 International Business Machines Corp.
* (c) Copyright 1993-1996 Sun Microsystems, Inc.
* (c) Copyright 1993,1994,1996 Novell, Inc.
* (c) Copyright 1996 FUJITSU LIMITED.
* (c) Copyright 1996 Hitachi.
*/
#ifndef _Dt_Dt_h
#define _Dt_Dt_h
#include <X11/Intrinsic.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* Constants
*/
/* CDE Version information */
#define DtVERSION 2
#define DtREVISION 3
#define DtUPDATE_LEVEL 0
#define DtVERSION_NUMBER (DtVERSION * 10000 + \
DtREVISION * 100 + \
DtUPDATE_LEVEL)
#define DtVERSION_STRING "CDE Version 2.3.0a"
/*
* CDE Version information
*/
externalref const int DtVersion;
externalref const char *DtVersionString;
/*
* Functions
*/
extern Boolean DtInitialize(
Display *display,
Widget widget,
char *name,
char *tool_class);
extern Boolean DtAppInitialize(
XtAppContext app_context,
Display *display,
Widget widget,
char *name,
char *tool_class);
#ifdef __cplusplus
}
#endif
#endif /* _Dt_Dt_h */

View File

@@ -0,0 +1,69 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $TOG: DtGetMessageP.h /main/5 1998/07/30 12:14:37 mgreess $
*
* (c) Copyright 1995 Digital Equipment Corporation.
* (c) Copyright 1995 Hewlett-Packard Company.
* (c) Copyright 1995 International Business Machines Corp.
* (c) Copyright 1995 Sun Microsystems, Inc.
* (c) Copyright 1995 Novell, Inc.
* (c) Copyright 1995 FUJITSU LIMITED.
* (c) Copyright 1995 Hitachi.
*
* DtGetMessage.h - Interfaces for the DtSvc library's private message
* catalog APIs
*/
#ifndef _DtGetMessage_h
#define _DtGetMessage_h
#ifdef __cplusplus
extern "C" {
#endif
/*
* External declarations
*/
extern char *Dt11GetMessage (
char *filename,
int set,
int number,
char *string);
/*
* Dt11GETMESSAGE macro
*/
#ifndef NO_MESSAGE_CATALOG
# define _MESSAGE_CAT_NAME "dt"
# define Dt11GETMESSAGE(set, number, string)\
Dt11GetMessage(_MESSAGE_CAT_NAME, set, number, string)
#else
# define Dt11GETMESSAGE(set, number, string)\
string
#endif
#ifdef __cplusplus
}
#endif
#endif /* _DtGetMessage_h */

49
cde/include/Dt/DtHash.h Normal file
View File

@@ -0,0 +1,49 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: DtHash.h /main/5 1996/08/29 15:42:13 cde-dec $ */
#ifndef _DtHash_h
#define _DtHash_h
typedef void * DtHashTbl;
DtHashTbl _DtUtilMakeHash(int size);
DtHashTbl _DtUtilMakeIHash(int size);
void ** _DtUtilGetHash(DtHashTbl tbl, const unsigned char * key);
void ** _DtUtilFindHash(DtHashTbl tbl,const unsigned char * key);
void * _DtUtilDelHash(DtHashTbl tbl, const unsigned char * key);
int _DtUtilOperateHash(DtHashTbl tbl, void (*op_func)(), void * usr_arg);
void _DtUtilDestroyHash(DtHashTbl tbl, int (*des_func)(), void * usr_arg);
typedef void (*DtHashOperateFunc)();
typedef int (*DtHashDestroyFunc)();
#endif /* _DtHash_h */

232
cde/include/Dt/DtMsgsP.h Normal file
View File

@@ -0,0 +1,232 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: DtMsgsP.h /main/7 1996/06/19 11:27:42 cde-dec $ */
/*
* DtWidget/DtMsgsP.h
*/
/*
* DtMsgsP.h:
*
* Private header file for libDtWidget
*/
#ifndef _DtMessages_h
#define _DtMessages_h
/*** const causes the HP compiler to complain. Remove reference until ***
*** the build and integration people can figure out how to get this to ***
*** work. ***/
/* #define CONST const */
#define CONST
#ifdef I18N_MSG
#include <nl_types.h>
#define DTWIDGET_GETMESSAGE(set, number, string)\
(char *) _DtWidgetGetMessage(set, number, string)
#else /* I18N_MSG */
#define DTWIDGET_GETMESSAGE(set, number, string) string
#endif /* I18N_MSG */
extern CONST char _DtMsgCommon_0000[];
extern CONST char _DtMsgCommon_0001[];
extern CONST char _DtMsgComboBox_0000[];
extern CONST char _DtMsgComboBox_0001[];
extern CONST char _DtMsgComboBox_0002[];
extern CONST char _DtMsgComboBox_0003[];
extern CONST char _DtMsgComboBox_0004[];
extern CONST char _DtMsgComboBox_0005[];
extern CONST char _DtMsgComboBox_0006[];
extern CONST char _DtMsgComboBox_0007[];
extern CONST char _DtMsgComboBox_0008[];
extern CONST char _DtMsgComboBox_0009[];
extern CONST char _DtMsgComboBox_0010[];
extern CONST char _DtMsgComboBox_0011[];
extern CONST char _DtMsgComboBox_0012[];
extern CONST char _DtMsgComboBox_0013[];
extern CONST char _DtMsgComboBox_0014[];
extern CONST char _DtMsgDialogBox_0000[];
extern CONST char _DtMsgDialogBox_0001[];
extern CONST char _DtMsgEditor_0000[];
extern CONST char _DtMsgEditor_0001[];
extern CONST char _DtMsgEditor_0002[];
extern CONST char _DtMsgEditor_0003[];
extern CONST char _DtMsgEditor_0004[];
extern CONST char _DtMsgEditor_0005[];
extern CONST char _DtMsgEditor_0006[];
extern CONST char _DtMsgEditor_0007[];
extern CONST char _DtMsgEditor_0008[];
extern CONST char _DtMsgEditor_0009[];
extern CONST char _DtMsgEditor_0010[];
extern CONST char _DtMsgEditor_0011[];
extern CONST char _DtMsgEditor_0012[];
extern CONST char _DtMsgEditor_0013[];
extern CONST char _DtMsgEditor_0014[];
extern CONST char _DtMsgEditor_0015[];
extern CONST char _DtMsgEditor_0016[];
extern CONST char _DtMsgEditor_0017[];
extern CONST char _DtMsgEditor_0018[];
extern CONST char _DtMsgEditor_0019[];
extern CONST char _DtMsgEditor_0020[];
extern CONST char _DtMsgEditor_0021[];
extern CONST char _DtMsgEditor_0022[];
extern CONST char _DtMsgEditor_0023[];
extern CONST char _DtMsgEditor_0024[];
extern CONST char _DtMsgEditor_0025[];
extern CONST char _DtMsgIcon_0000[];
extern CONST char _DtMsgIcon_0001[];
extern CONST char _DtMsgIcon_0002[];
extern CONST char _DtMsgIcon_0003[];
extern CONST char _DtMsgIcon_0004[];
extern CONST char _DtMsgIcon_0005[];
extern CONST char _DtMsgIndicator_0000[];
extern CONST char _DtMsgMenuButton_0000[];
extern CONST char _DtMsgMenuButton_0001[];
extern CONST char _DtMsgMenuButton_0002[];
extern CONST char _DtMsgSpinBox_0000[];
extern CONST char _DtMsgSpinBox_0001[];
extern CONST char _DtMsgSpinBox_0002[];
extern CONST char _DtMsgSpinBox_0003[];
extern CONST char _DtMsgSpinBox_0004[];
extern CONST char _DtMsgSpinBox_0005[];
extern CONST char _DtMsgSpinBox_0006[];
extern CONST char _DtMsgSpinBox_0007[];
extern CONST char _DtMsgSpinBox_0008[];
extern CONST char _DtMsgSpinBox_0009[];
extern CONST char _DtMsgSpinBox_0010[];
extern CONST char _DtMsgSpinBox_0011[];
extern CONST char _DtMsgSpinBox_0012[];
extern CONST char _DtMsgSpinBox_0013[];
extern CONST char _DtMsgSpinBox_0014[];
extern CONST char _DtMsgTitleBox_0000[];
extern CONST char _DtMsgTitleBox_0001[];
extern CONST char _DtMsgTitleBox_0002[];
extern CONST char _DtMsgTitleBox_0003[];
extern CONST char _DtMsgTitleBox_0004[];
#ifdef I18N_MSG
/*
* Message set for shared messages
*/
#define MS_Common 2
/* Message IDs for shared messages */
#define MSG_CLOSE 1
#define MSG_HELP 2
/*
* Message set for Editor widget
*/
#define MS_Editor 3
/* Message IDs for Editor */
#define EDITOR_FORMAT_SETTINGS 1
#define EDITOR_RIGHT_MARGIN 2
#define EDITOR_LEFT_MARGIN 3
#define EDITOR_LEFT_ALIGN 4
#define EDITOR_RIGHT_ALIGN 5
#define EDITOR_JUSTIFY 6
#define EDITOR_CENTER 7
#define EDITOR_PARAGRAPH 8
#define EDITOR_ALL 9
#define EDITOR_SPELL_TITLE 20
#define EDITOR_FIND_TITLE 21
#define EDITOR_MISSPELLED 22
#define EDITOR_FIND_LABEL 23
#define EDITOR_CHANGE_LABEL 24
#define EDITOR_FIND_BUTTON 25
#define EDITOR_CHANGE_BUTTON 26
#define EDITOR_CHNG_ALL_BUTTON 27
#define EDITOR_NO_FIND 30
#define EDITOR_INFO_TITLE 31
#define EDITOR_LINE 40
#define EDITOR_TOTAL 41
#define EDITOR_OVR 42
#define EDITOR_INS 43
#define EDITOR_FILTER_ERROR 50
#define EDITOR_FILTER_ERROR2 51
#define EDITOR_ERROR_TITLE 52
/*
* Message set for MenuButton widget
*/
#define MS_MenuButton 4
/* Message IDs for MenuButton*/
#define MENU_POST 1
#define MENU_PARENT 2
#define MENU_SUBMENU 3
/*
* Message set for ComboBox widget
*/
#define MS_ComboBox 5
/* Message IDs for ComboBox */
#define COMBO_ALIGNMENT 1
#define COMBO_MARGIN_HEIGHT 2
#define COMBO_MARGIN_WIDTH 3
#define COMBO_HORIZONTAL_SPACING 4
#define COMBO_VERTICAL_SPACING 5
#define COMBO_ORIENTATION 6
#define COMBO_ITEM_COUNT 7
#define COMBO_VISIBLE_ITEM 8
#define COMBO_TEXT 9
#define COMBO_SET_ITEM 10
#define COMBO_SELECT_ITEM 11
#define COMBO_RESIZE 12
#define COMBO_LABEL 13
#define COMBO_CVTSTRING 14
#define COMBO_DEL_POS 15
/*
* Message set for SpinBox widget
*/
#define MS_SpinBox 6
/* Message IDs for SpinBox */
#define SPIN_ARROW_SENSITIVE 1
#define SPIN_ALIGNMENT 2
#define SPIN_INIT_DELAY 3
#define SPIN_MARGIN_HEIGHT 4
#define SPIN_MARGIN_WIDTH 5
#define SPIN_ARROW_LAYOUT 6
#define SPIN_REPEAT_DELAY 7
#define SPIN_ITEM_COUNT 8
#define SPIN_POSITION_STRING 9
#define SPIN_POSITION_NUMERIC 10
#define SPIN_DECIMAL_POINTS 11
#define SPIN_MIN_MAX 12
#define SPIN_TEXT 13
#define SPIN_SET_ITEM 14
#define SPIN_LABEL 15
extern char * _DtWidgetGetMessage(
int set,
int n,
char *s );
#endif /* I18N_MSG */
#endif /* _DtMessageh */

127
cde/include/Dt/DtNlUtils.h Normal file
View File

@@ -0,0 +1,127 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: DtNlUtils.h /main/4 1996/06/21 17:22:30 ageorge $ */
/*
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
* (c) Copyright 1993, 1994 International Business Machines Corp. *
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
* (c) Copyright 1993, 1994 Novell, Inc. *
*/
/**************************************************************************/
/* */
/* Public include file for Dt localization functions. */
/* */
/**************************************************************************/
#ifdef NLS16
#include <stdlib.h>
#include <locale.h>
#include <string.h>
#include <limits.h>
#include <nl_types.h>
#include <langinfo.h>
#endif
#include <X11/Intrinsic.h>
#ifdef NLS16
#define is_multibyte _DtNl_is_multibyte
extern Boolean _DtNl_is_multibyte;
extern void Dt_nlInit( void ) ;
extern char * Dt_strtok(
char *s1,
char *s2) ;
extern char * Dt_strtok_r(
char *s1,
char *s2,
char **ptr) ;
extern int Dt_strspn(
char *s1,
char *s2) ;
extern int Dt_strcspn(
char *s1,
char *s2) ;
extern char * Dt_strchr(
char *s,
char c) ;
extern char * Dt_strrchr(
char *s,
char c) ;
extern void Dt_lastChar(
char *s,
char **cptr,
int *lenptr) ;
extern int Dt_charCount(
char *s) ;
extern char * _Dt_NextChar(char *s);
extern char * _Dt_PrevChar(const char *start,char *s);
extern int _Dt_isspace(char *s);
extern int _Dt_isdigit(char *s);
#define DtNlInitialize() (Dt_nlInit())
#define DtStrtok(s1, s2) (Dt_strtok(s1, s2))
#define DtStrtok_r(s1, s2, ptr) (Dt_strtok_r(s1, s2, ptr))
#define DtStrspn(s1, s2) (Dt_strspn(s1, s2))
#define DtStrcspn(s1, s2) (Dt_strcspn(s1, s2))
#define DtStrchr(s1, c) (Dt_strchr(s1, c))
#define DtStrrchr(s1, c) (Dt_strrchr(s1, c))
#define DtLastChar(s1, cp, lp) (Dt_lastChar(s1, cp, lp))
#define DtCharCount(s1) (Dt_charCount(s1))
#define DtNextChar(s) (is_multibyte?_Dt_NextChar(s):((s)+1))
#define DtPrevChar(st,s) (is_multibyte?_Dt_PrevChar(st,s):((s)-1))
#define DtIsspace(s) (is_multibyte?_Dt_isspace(s):isspace(*(s)))
#define DtIsdigit(s) (is_multibyte?_Dt_isdigit(s):isdigit(*(s)))
#else /* NLS16 */
#define DtNlInitialize()
#define DtStrtok(s1, s2) (strtok(s1, s2))
#define DtStrtok_r(s1, s2, ptr) (strtok_r(s1, s2, ptr))
#define DtStrspn(s1, s2) (strspn(s1, s2))
#define DtStrcspn(s1, s2) (strcspn(s1, s2))
#define DtStrchr(s1, c) (strchr(s1, c))
#define DtStrrchr(s1, c) (strrchr(s1, c))
#define DtLastChar(s1, cp, lp) {(*cp = s1 + strlen(s1) - 1); *lp = 1;}
#define DtCharCount(s1) (strlen(s1))
#define DtNextChar(s) ((s)+1)
#define DtPrevChar(st,s) ((s)-1)
#define DtIsspace(s) (isspace(*s))
#define DtIsdigit(s) (isdigit(*s))
#endif /* NLS16 */
extern char * _DtGetNthChar(
char *s,
int n) ;
extern char * _dt_strpbrk(
char *cs,
char *ct);
extern int _is_previous_single(
char *s1,
char *s2);

145
cde/include/Dt/DtP.h Normal file
View File

@@ -0,0 +1,145 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/*
* File: DtP.h $TOG: DtP.h /main/7 1998/07/30 12:12:49 mgreess $
* Language: C
*/
#ifndef _DtP_h
#define _DtP_h
#include <X11/Xmd.h> /* for protocol typedefs */
#include <X11/Intrinsic.h>
#include <Dt/DtPStrings.h>
#include <Dt/DtGetMessageP.h>
#include <bms/sbport.h>
#include <bms/bms.h>
#ifdef __cplusplus
extern "C" {
#endif
/*********************************
*
* Miscellaneous Data Types
*
*********************************/
#define DtChar XeChar
#define DtString XeString
/*********************************
*
* Initalization
*
*********************************/
#define DtToolClass XeToolClass
/*********************************
*
* Global variables (defined in DtUtil.c)
*
*********************************/
extern Display * _DtDisplay;
extern char * _DtApplicationName;
extern char * _DtApplicationClass;
extern char * _DtToolClass;
extern XtAppContext _DtAppContext;
extern XrmDatabase _DtResourceDatabase;
extern Widget _DtInitTtContextWidget;
extern XtAppContext * _DtInitAppContextp;
extern void _DtAddToResource( Display *, const char * );
extern void _DtAddResString( Display *, const char *, unsigned int);
extern char * _DtGetResString( Display *dpy, unsigned int);
#define _DT_ATR_RESMGR (1 << 0)
#define _DT_ATR_PREFS (1 << 1)
/*
DESCRIPTION:
Add strings to XA_RESOURCE_MANAGER property on the default root
window. Correctly merges resource specifications with the same
name and different values. The new value overwrites the old.
_DtAddToResource() may be used where you would have used xrdb to
add a resource.
SYNOPSIS:
void _DtAddToResource(dpy,data)
Display *dpy; The application's display structure.
char *data; The string to be added to the
XA_RESOURCE_MANAGER property.
*/
extern char *_DtCreateDtDirs( Display * );
/*
DESCRIPTION:
Creates the directories needed for dt to operate in. When an
application saves its state inside a file, it should call this
routine to set up the directories before saving any files. The
routine constructs the path to which all save files should be saved
to when responding the the WM_SAVE_YOURSELF message issued by the
session manager. The routine returns the path to save to. It also
allocates the memory for the path so when you are done with it you
should free() it.
WARNING: If it can't create the directory it returns NULL
SYNOPSIS:
dirName = _DtCreateDtDirs (display);
char *dirName; The path to save to.
Display *display; The application's display structure.
*/
/*
* The following string globals are available for use by any DT
* component. They represent the button labels in most dialogs,
* and will be automatically localized by DtInitialize().
*/
extern const char * _DtOkString;
extern const char * _DtCancelString;
extern const char * _DtHelpString;
extern const char * _DtApplyString;
extern const char * _DtCloseString;
#ifdef __cplusplus
}
#endif
/* Do not add anything after this endif. */
#endif /* _DtP_h */

View File

@@ -0,0 +1,87 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/*
* File: DtPStrings.h $XConsortium: DtPStrings.h /main/5 1995/12/14 11:02:36 barstow $
* Language: C
*/
#ifndef _DtPStrings_h
#define _DtPStrings_h
/*
* DT applications should use this name to look up DT-global
* resources instead of argv[0].
*/
#define DtDT_PROG_NAME "dt"
/*
* DT applications should use this class name to look up DT-global
* resources.
*/
#define DtDT_PROG_CLASS "Dt"
/*
* The following string constants define the standard DT configuration
* directories.
*/
#define DtPERSONAL_CONFIG_DIRECTORY ".dt"
#define DtSM_SESSION_DIRECTORY "sessions"
#define DtSM_SESSION_DISPLAY_DIRECTORY "display"
#define DtCURRENT_DT_VERSION "3.0"
/*
* If you change the following two #defines, you must also change the
* related one below (DtDB_DIRS_DEFAULT).
*/
#define DtPERSONAL_DB_DIRECTORY ".dt/types"
#define DtPERSONAL_TMP_DIRECTORY ".dt/tmp"
/*
* Names for the message log files
*/
#define DtERRORLOG_FILE "errorlog"
#define DtOLD_ERRORLOG_FILE "errorlog.old"
#define DtOLDER_ERRORLOG_FILE "errorlog.older"
/*
* Strings for default types and icons
*/
#define DtDEFAULT_DATA_FT_NAME "DATA"
/*
* The following string constants define the resource name,
* resource class and default values for the action bitmaps.
*/
#define DtACTION_ICON_RESOURCE_NAME "actionIcon"
#define DtACTION_ICON_RESOURCE_CLASS "ActionIcon"
#define DtACTION_ICON_DEFAULT "Dtactn"
/*
* The following string constants define the resource name,
* resource class and default values for the Dt tmp directory path.
*/
#define DtACTION_DTTMPDIR_RESOURCE_NAME "dtTmpDir"
#define DtACTION_DTTMPDIR_RESOURCE_CLASS "DtTmpDir"
#define DtACTION_DTTMPDIR_DEFAULT ".dt/tmp"
/* Do not add anything after this endif. */
#endif /* _DtPStrings_h */

76
cde/include/Dt/DtShmDb.h Normal file
View File

@@ -0,0 +1,76 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: DtShmDb.h /main/4 1996/05/09 04:22:30 drk $ */
#ifndef DtShmDb_h
#define DtShmDb_h
/*
this include file provides prototypes for the various
shared memory database routines
*/
typedef void * DtShmProtoStrtab;
typedef void * DtShmProtoInttab;
typedef void * DtShmProtoIntList;
typedef const void * DtShmStrtab;
typedef const void * DtShmInttab;
typedef const int * DtShmIntList;
typedef int DtShmBoson;
/*
routines used while building shared memory databases
*/
DtShmProtoStrtab _DtShmProtoInitStrtab (int estimated_entries);
DtShmBoson _DtShmProtoAddStrtab (DtShmProtoStrtab prototab, const char * string, int * isnew);
const char * _DtShmProtoLookUpStrtab (DtShmProtoStrtab prototab, DtShmBoson boson);
int _DtShmProtoSizeStrtab (DtShmProtoStrtab prototab);
DtShmStrtab _DtShmProtoCopyStrtab (DtShmProtoStrtab prototab, void * dataspace);
int _DtShmProtoDestroyStrtab (DtShmProtoStrtab prototab);
DtShmProtoInttab _DtShmProtoInitInttab (int estimated_entries);
int _DtShmProtoAddInttab (DtShmProtoInttab prototab, unsigned int keyin, int datain);
int * _DtShmProtoLookUpInttab (DtShmProtoInttab prototab, unsigned int keyin);
int _DtShmProtoSizeInttab (DtShmProtoInttab prototab);
DtShmInttab _DtShmProtoCopyInttab (DtShmProtoInttab prototab, void * dataspace);
int _DtShmProtoDestroyInttab (DtShmProtoInttab prototab);
DtShmProtoIntList _DtShmProtoInitIntLst (int estimated_entries);
int * _DtShmProtoAddIntLst (DtShmProtoIntList protolist, int size, int * index_value);
int _DtShmProtoSizeIntLst (DtShmProtoIntList protolist);
DtShmIntList _DtShmProtoCopyIntLst (DtShmProtoIntList protolist, void * dataspace);
int _DtShmProtoDestroyIntLst (DtShmProtoIntList protolist);
/*
run-time routines once shared memory area is built
*/
DtShmBoson _DtShmStringToBoson (DtShmStrtab tab, const char * string);
const char * _DtShmBosonToString (DtShmStrtab tab, DtShmBoson boson);
const int * _DtShmFindIntTabEntry (DtShmInttab tab, unsigned int key);
#endif /* DtShmDb_h */

542
cde/include/Dt/DtStrDefs.h Normal file
View File

@@ -0,0 +1,542 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: DtStrDefs.h /main/4 1996/03/25 11:18:44 rswiston $ */
/* This file is automatically generated. */
/* Do not edit. */
#ifndef _DtStrDefs_h_
#define _DtStrDefs_h_
#ifdef DTSTRINGDEFINES
#define DtCAlternateImage "AlternateImage"
#define DtCBehavior "Behavior"
#define DtRBehavior "Behavior"
#define DtCBorderType "BorderType"
#define DtRBorderType "BorderType"
#define DtCBoxType "BoxType"
#define DtRBoxType "BoxType"
#define DtCButtonLabelStrings "ButtonLabelStrings"
#define DtCControlType "ControlType"
#define DtRControlType "ControlType"
#define DtCCursorFont "CursorFont"
#define DtCDrawShadow "DrawShadow"
#define DtCDropAction "DropAction"
#define DtCDropCallback "DropCallback"
#define DtCFillMode "FillMode"
#define DtRFillMode "FillMode"
#define DtCFormat "Format"
#define DtCHighResFontList "HighResFontList"
#define DtCLowResFontList "LowResFontList"
#define DtCMediumResFontList "MediumResFontList"
#define DtCPixmapPosition "PixmapPosition"
#define DtRPixmapPosition "PixmapPosition"
#define DtCPushArgument "PushArgument"
#define DtCPushFunction "PushFunction"
#define DtCStringPosition "StringPosition"
#define DtRStringPosition "StringPosition"
#define DtCSubpanel "Subpanel"
#define DtCTitleSpacing "TitleSpacing"
#define DtCTitlePosition "TitlePosition"
#define DtRTitlePosition "TitlePosition"
#define DtCUnderline "Underline"
#define DtNalternateImage "alternateImage"
#define DtNbehavior "behavior"
#define DtNbottomInset "bottomInset"
#define DtNborderType "borderType"
#define DtNboxType "boxType"
#define DtNbuttonLabelStrings "buttonLabelStrings"
#define DtNchime "chime"
#define DtNclientTimeoutInterval "clientTimeoutInterval"
#define DtNclockInterval "clockInterval"
#define DtNcontrolType "controlType"
#define DtNcursorFont "cursorFont"
#define DtNdrawShadow "drawShadow"
#define DtNdropAction "dropAction"
#define DtNdropCallback "dropCallback"
#define DtNfileName "fileName"
#define DtNfillMode "fillMode"
#define DtNformat "format"
#define DtNheightIncrement "heightIncrement"
#define DtNhighResFontList "highResFontList"
#define DtNimageName "imageName"
#define DtNleftInset "leftInset"
#define DtNlowResFontList "lowResFontList"
#define DtNmediumResFontList "mediumResFontList"
#define DtNmonitorTime "monitorTime"
#define DtNpixmapForeground "pixmapForeground"
#define DtNpixmapBackground "pixmapBackground"
#define DtNmaxPixmapWidth "maxPixmapWidth"
#define DtNmaxPixmapHeight "maxPixmapHeight"
#define DtNpixmapPosition "pixmapPosition"
#define DtNpushArgument "pushArgument"
#define DtNpushButtonClickTime "pushButtonClickTime"
#define DtNpushFunction "pushFunction"
#define DtNrightInset "rightInset"
#define DtNstringPosition "stringPosition"
#define DtNsubpanel "subpanel"
#define DtNresolution "resolution"
#define DtNtitleSpacing "titleSpacing"
#define DtNtitlePosition "titlePosition"
#define DtNtitleAlignment "titleAlignment"
#define DtNtopInset "topInset"
#define DtNunderline "underline"
#define DtNuseEmbossedText "useEmbossedText"
#define DtNwaitingBlinkRate "waitingBlinkRate"
#define DtNwidthIncrement "widthIncrement"
#define DtSicon_label "icon_label"
#define DtSicon_button "icon_button"
#define DtSicon_toggle "icon_toggle"
#define DtSicon_drag "icon_drag"
#define DtSwork_area "work_area"
#define DtStitle_area "title_area"
#define DtSseparator "separator"
#define DtSbutton "button"
#define DtSfill_none "fill_none"
#define DtSfill_parent "fill_parent"
#define DtSfill_transparent "fill_transparent"
#define DtSfill_self "fill_self"
#define DtSpixmap_top "pixmap_top"
#define DtSpixmap_bottom "pixmap_bottom"
#define DtSpixmap_left "pixmap_left"
#define DtSpixmap_right "pixmap_right"
#define DtSstring_top "string_top"
#define DtSstring_bottom "string_bottom"
#define DtSstring_left "string_left"
#define DtSstring_right "string_right"
#define DtStitle_top "title_top"
#define DtStitle_bottom "title_bottom"
#define DtNformatJP "formatJP"
#define DtCFormatJP "FormatJP"
#else
#ifndef _DtConst
#define _DtConst /**/
#endif
extern _DtConst char _DtStrings[];
#ifndef DtCAlternateImage
#define DtCAlternateImage ((char*)&_DtStrings[0])
#endif
#ifndef DtCBehavior
#define DtCBehavior ((char*)&_DtStrings[15])
#endif
#ifndef DtRBehavior
#define DtRBehavior ((char*)&_DtStrings[24])
#endif
#ifndef DtCBorderType
#define DtCBorderType ((char*)&_DtStrings[33])
#endif
#ifndef DtRBorderType
#define DtRBorderType ((char*)&_DtStrings[44])
#endif
#ifndef DtCBoxType
#define DtCBoxType ((char*)&_DtStrings[55])
#endif
#ifndef DtRBoxType
#define DtRBoxType ((char*)&_DtStrings[63])
#endif
#ifndef DtCButtonLabelStrings
#define DtCButtonLabelStrings ((char*)&_DtStrings[71])
#endif
#ifndef DtCControlType
#define DtCControlType ((char*)&_DtStrings[90])
#endif
#ifndef DtRControlType
#define DtRControlType ((char*)&_DtStrings[102])
#endif
#ifndef DtCCursorFont
#define DtCCursorFont ((char*)&_DtStrings[114])
#endif
#ifndef DtCDrawShadow
#define DtCDrawShadow ((char*)&_DtStrings[125])
#endif
#ifndef DtCDropAction
#define DtCDropAction ((char*)&_DtStrings[136])
#endif
#ifndef DtCDropCallback
#define DtCDropCallback ((char*)&_DtStrings[147])
#endif
#ifndef DtCFillMode
#define DtCFillMode ((char*)&_DtStrings[160])
#endif
#ifndef DtRFillMode
#define DtRFillMode ((char*)&_DtStrings[169])
#endif
#ifndef DtCFormat
#define DtCFormat ((char*)&_DtStrings[178])
#endif
#ifndef DtCHighResFontList
#define DtCHighResFontList ((char*)&_DtStrings[185])
#endif
#ifndef DtCLowResFontList
#define DtCLowResFontList ((char*)&_DtStrings[201])
#endif
#ifndef DtCMediumResFontList
#define DtCMediumResFontList ((char*)&_DtStrings[216])
#endif
#ifndef DtCPixmapPosition
#define DtCPixmapPosition ((char*)&_DtStrings[234])
#endif
#ifndef DtRPixmapPosition
#define DtRPixmapPosition ((char*)&_DtStrings[249])
#endif
#ifndef DtCPushArgument
#define DtCPushArgument ((char*)&_DtStrings[264])
#endif
#ifndef DtCPushFunction
#define DtCPushFunction ((char*)&_DtStrings[277])
#endif
#ifndef DtCStringPosition
#define DtCStringPosition ((char*)&_DtStrings[290])
#endif
#ifndef DtRStringPosition
#define DtRStringPosition ((char*)&_DtStrings[305])
#endif
#ifndef DtCSubpanel
#define DtCSubpanel ((char*)&_DtStrings[320])
#endif
#ifndef DtCTitleSpacing
#define DtCTitleSpacing ((char*)&_DtStrings[329])
#endif
#ifndef DtCTitlePosition
#define DtCTitlePosition ((char*)&_DtStrings[342])
#endif
#ifndef DtRTitlePosition
#define DtRTitlePosition ((char*)&_DtStrings[356])
#endif
#ifndef DtCUnderline
#define DtCUnderline ((char*)&_DtStrings[370])
#endif
#ifndef DtNalternateImage
#define DtNalternateImage ((char*)&_DtStrings[380])
#endif
#ifndef DtNbehavior
#define DtNbehavior ((char*)&_DtStrings[395])
#endif
#ifndef DtNbottomInset
#define DtNbottomInset ((char*)&_DtStrings[404])
#endif
#ifndef DtNborderType
#define DtNborderType ((char*)&_DtStrings[416])
#endif
#ifndef DtNboxType
#define DtNboxType ((char*)&_DtStrings[427])
#endif
#ifndef DtNbuttonLabelStrings
#define DtNbuttonLabelStrings ((char*)&_DtStrings[435])
#endif
#ifndef DtNchime
#define DtNchime ((char*)&_DtStrings[454])
#endif
#ifndef DtNclientTimeoutInterval
#define DtNclientTimeoutInterval ((char*)&_DtStrings[460])
#endif
#ifndef DtNclockInterval
#define DtNclockInterval ((char*)&_DtStrings[482])
#endif
#ifndef DtNcontrolType
#define DtNcontrolType ((char*)&_DtStrings[496])
#endif
#ifndef DtNcursorFont
#define DtNcursorFont ((char*)&_DtStrings[508])
#endif
#ifndef DtNdrawShadow
#define DtNdrawShadow ((char*)&_DtStrings[519])
#endif
#ifndef DtNdropAction
#define DtNdropAction ((char*)&_DtStrings[530])
#endif
#ifndef DtNdropCallback
#define DtNdropCallback ((char*)&_DtStrings[541])
#endif
#ifndef DtNfileName
#define DtNfileName ((char*)&_DtStrings[554])
#endif
#ifndef DtNfillMode
#define DtNfillMode ((char*)&_DtStrings[563])
#endif
#ifndef DtNformat
#define DtNformat ((char*)&_DtStrings[572])
#endif
#ifndef DtNheightIncrement
#define DtNheightIncrement ((char*)&_DtStrings[579])
#endif
#ifndef DtNhighResFontList
#define DtNhighResFontList ((char*)&_DtStrings[595])
#endif
#ifndef DtNimageName
#define DtNimageName ((char*)&_DtStrings[611])
#endif
#ifndef DtNleftInset
#define DtNleftInset ((char*)&_DtStrings[621])
#endif
#ifndef DtNlowResFontList
#define DtNlowResFontList ((char*)&_DtStrings[631])
#endif
#ifndef DtNmediumResFontList
#define DtNmediumResFontList ((char*)&_DtStrings[646])
#endif
#ifndef DtNmonitorTime
#define DtNmonitorTime ((char*)&_DtStrings[664])
#endif
#ifndef DtNpixmapForeground
#define DtNpixmapForeground ((char*)&_DtStrings[676])
#endif
#ifndef DtNpixmapBackground
#define DtNpixmapBackground ((char*)&_DtStrings[693])
#endif
#ifndef DtNpixmapPosition
#define DtNpixmapPosition ((char*)&_DtStrings[710])
#endif
#ifndef DtNpushArgument
#define DtNpushArgument ((char*)&_DtStrings[725])
#endif
#ifndef DtNpushButtonClickTime
#define DtNpushButtonClickTime ((char*)&_DtStrings[738])
#endif
#ifndef DtNpushFunction
#define DtNpushFunction ((char*)&_DtStrings[758])
#endif
#ifndef DtNrightInset
#define DtNrightInset ((char*)&_DtStrings[771])
#endif
#ifndef DtNstringPosition
#define DtNstringPosition ((char*)&_DtStrings[782])
#endif
#ifndef DtNsubpanel
#define DtNsubpanel ((char*)&_DtStrings[797])
#endif
#ifndef DtNresolution
#define DtNresolution ((char*)&_DtStrings[806])
#endif
#ifndef DtNtitleSpacing
#define DtNtitleSpacing ((char*)&_DtStrings[817])
#endif
#ifndef DtNtitlePosition
#define DtNtitlePosition ((char*)&_DtStrings[830])
#endif
#ifndef DtNtitleAlignment
#define DtNtitleAlignment ((char*)&_DtStrings[844])
#endif
#ifndef DtNtopInset
#define DtNtopInset ((char*)&_DtStrings[859])
#endif
#ifndef DtNunderline
#define DtNunderline ((char*)&_DtStrings[868])
#endif
#ifndef DtNuseEmbossedText
#define DtNuseEmbossedText ((char*)&_DtStrings[878])
#endif
#ifndef DtNwaitingBlinkRate
#define DtNwaitingBlinkRate ((char*)&_DtStrings[894])
#endif
#ifndef DtNwidthIncrement
#define DtNwidthIncrement ((char*)&_DtStrings[911])
#endif
#ifndef DtSicon_label
#define DtSicon_label ((char*)&_DtStrings[926])
#endif
#ifndef DtSicon_button
#define DtSicon_button ((char*)&_DtStrings[937])
#endif
#ifndef DtSicon_toggle
#define DtSicon_toggle ((char*)&_DtStrings[949])
#endif
#ifndef DtSicon_drag
#define DtSicon_drag ((char*)&_DtStrings[961])
#endif
#ifndef DtSwork_area
#define DtSwork_area ((char*)&_DtStrings[971])
#endif
#ifndef DtStitle_area
#define DtStitle_area ((char*)&_DtStrings[981])
#endif
#ifndef DtSseparator
#define DtSseparator ((char*)&_DtStrings[992])
#endif
#ifndef DtSbutton
#define DtSbutton ((char*)&_DtStrings[1002])
#endif
#ifndef DtSfill_none
#define DtSfill_none ((char*)&_DtStrings[1009])
#endif
#ifndef DtSfill_parent
#define DtSfill_parent ((char*)&_DtStrings[1019])
#endif
#ifndef DtSfill_transparent
#define DtSfill_transparent ((char*)&_DtStrings[1031])
#endif
#ifndef DtSfill_self
#define DtSfill_self ((char*)&_DtStrings[1048])
#endif
#ifndef DtSpixmap_top
#define DtSpixmap_top ((char*)&_DtStrings[1058])
#endif
#ifndef DtSpixmap_bottom
#define DtSpixmap_bottom ((char*)&_DtStrings[1069])
#endif
#ifndef DtSpixmap_left
#define DtSpixmap_left ((char*)&_DtStrings[1083])
#endif
#ifndef DtSpixmap_right
#define DtSpixmap_right ((char*)&_DtStrings[1095])
#endif
#ifndef DtSstring_top
#define DtSstring_top ((char*)&_DtStrings[1108])
#endif
#ifndef DtSstring_bottom
#define DtSstring_bottom ((char*)&_DtStrings[1119])
#endif
#ifndef DtSstring_left
#define DtSstring_left ((char*)&_DtStrings[1133])
#endif
#ifndef DtSstring_right
#define DtSstring_right ((char*)&_DtStrings[1145])
#endif
#ifndef DtStitle_top
#define DtStitle_top ((char*)&_DtStrings[1158])
#endif
#ifndef DtStitle_bottom
#define DtStitle_bottom ((char*)&_DtStrings[1168])
#endif
#ifndef DtNmaxPixmapWidth
#define DtNmaxPixmapWidth ((char*)&_DtStrings[1181])
#endif
#ifndef DtNmaxPixmapHeight
#define DtNmaxPixmapHeight ((char*)&_DtStrings[1196])
#endif
#endif
extern _DtConst char _AIXJPStrings[];
#ifndef DtNformatJP
#define DtNformatJP ((char*)&_AIXJPStrings[0])
#endif
#ifndef DtCFormatJP
#define DtCFormatJP ((char*)&_AIXJPStrings[9])
#endif
/*
* Resource name mapping to Xm prefix. If Motif defines on of these
* resources, the redefined resource definition should be removed.
*/
#define XmCAlternateImage DtCAlternateImage
#define XmCBehavior DtCBehavior
#define XmRBehavior DtRBehavior
#define XmCBorderType DtCBorderType
#define XmRBorderType DtRBorderType
#define XmCBoxType DtCBoxType
#define XmRBoxType DtRBoxType
#define XmCButtonLabelStrings DtCButtonLabelStrings
#define XmCControlType DtCControlType
#define XmRControlType DtRControlType
#define XmCCursorFont DtCCursorFont
#define XmCDrawShadow DtCDrawShadow
#define XmCDropAction DtCDropAction
#define XmCDropCallback DtCDropCallback
#define XmCFillMode DtCFillMode
#define XmRFillMode DtRFillMode
#define XmCFormat DtCFormat
#define XmCHighResFontList DtCHighResFontList
#define XmCLowResFontList DtCLowResFontList
#define XmCMediumResFontList DtCMediumResFontList
#define XmCPixmapPosition DtCPixmapPosition
#define XmRPixmapPosition DtRPixmapPosition
#define XmCPushArgument DtCPushArgument
#define XmCPushFunction DtCPushFunction
#define XmCStringPosition DtCStringPosition
#define XmRStringPosition DtRStringPosition
#define XmCSubpanel DtCSubpanel
#define XmCTitleSpacing DtCTitleSpacing
#define XmCTitlePosition DtCTitlePosition
#define XmRTitlePosition DtRTitlePosition
#define XmCUnderline DtCUnderline
#define XmNalternateImage DtNalternateImage
#define XmNbehavior DtNbehavior
#define XmNbottomInset DtNbottomInset
#define XmNborderType DtNborderType
#define XmNboxType DtNboxType
#define XmNbuttonLabelStrings DtNbuttonLabelStrings
#define XmNchime DtNchime
#define XmNclientTimeoutInterval DtNclientTimeoutInterval
#define XmNclockInterval DtNclockInterval
#define XmNcontrolType DtNcontrolType
#define XmNcursorFont DtNcursorFont
#define XmNdrawShadow DtNdrawShadow
#define XmNdropAction DtNdropAction
#define XmNdropCallback DtNdropCallback
#define XmNfileName DtNfileName
#define XmNfillMode DtNfillMode
#define XmNformat DtNformat
#define XmNheightIncrement DtNheightIncrement
#define XmNhighResFontList DtNhighResFontList
#define XmNimageName DtNimageName
#define XmNleftInset DtNleftInset
#define XmNlowResFontList DtNlowResFontList
#define XmNmediumResFontList DtNmediumResFontList
#define XmNmonitorTime DtNmonitorTime
#define XmNpixmapForeground DtNpixmapForeground
#define XmNpixmapBackground DtNpixmapBackground
#define XmNmaxPixmapWidth DtNmaxPixmapWidth
#define XmNmaxPixmapHeight DtNmaxPixmapHeight
#define XmNpixmapPosition DtNpixmapPosition
#define XmNpushArgument DtNpushArgument
#define XmNpushButtonClickTime DtNpushButtonClickTime
#define XmNpushFunction DtNpushFunction
#define XmNrightInset DtNrightInset
#define XmNstringPosition DtNstringPosition
#define XmNsubpanel DtNsubpanel
#define XmNresolution DtNresolution
#define XmNtitleSpacing DtNtitleSpacing
#define XmNtitlePosition DtNtitlePosition
#define XmNtitleAlignment DtNtitleAlignment
#define XmNtopInset DtNtopInset
#define XmNunderline DtNunderline
#define XmNuseEmbossedText DtNuseEmbossedText
#define XmNwaitingBlinkRate DtNwaitingBlinkRate
#define XmNwidthIncrement DtNwidthIncrement
#define XmNformatJP DtNformatJP
#define XmCFormatJP DtCFormatJP
/*
* String defines for converter string names.
*/
#define STR_ICON_LABEL DtSicon_label
#define STR_ICON_BUTTON DtSicon_button
#define STR_ICON_TOGGLE DtSicon_toggle
#define STR_ICON_DRAG DtSicon_drag
#define STR_WORK_AREA DtSwork_area
#define STR_TITLE_AREA DtStitle_area
#define STR_SEPARATOR DtSseparator
#define STR_BUTTON DtSbutton
#define STR_FILL_NONE DtSfill_none
#define STR_FILL_PARENT DtSfill_parent
#define STR_FILL_TRANSPARENT DtSfill_transparent
#define STR_FILL_SELF DtSfill_self
#define STR_PIXMAP_TOP DtSpixmap_top
#define STR_PIXMAP_BOTTOM DtSpixmap_bottom
#define STR_PIXMAP_LEFT DtSpixmap_left
#define STR_PIXMAP_RIGHT DtSpixmap_right
#define STR_STRING_TOP DtSstring_top
#define STR_STRING_BOTTOM DtSstring_bottom
#define STR_STRING_LEFT DtSstring_left
#define STR_STRING_RIGHT DtSstring_right
#define STR_TITLE_TOP DtStitle_top
#define STR_TITLE_BOTTOM DtStitle_bottom
#endif

248
cde/include/Dt/DtosP.h Normal file
View File

@@ -0,0 +1,248 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $TOG: DtosP.h /main/4 1998/01/21 16:37:29 mgreess $ */
/*
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
* (c) Copyright 1993, 1994 International Business Machines Corp. *
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
* (c) Copyright 1993, 1994 Novell, Inc. *
*/
#ifdef REV_INFO
#ifndef lint
static char SCCSID[] = "OSF/Motif: @(#)_DtosP.h 4.16 91/09/12";
#endif /* lint */
#endif /* REV_INFO */
/******************************************************************************
*******************************************************************************
*
* (c) Copyright 1989, 1990, 1991 OPEN SOFTWARE FOUNDATION, INC.
* (c) Copyright 1989, DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.
* (c) Copyright 1987, 1988, 1989, 1990, 1991 HEWLETT-PACKARD COMPANY
* ALL RIGHTS RESERVED
*
* THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED
* AND COPIED ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND
* WITH THE INCLUSION OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE OR
* ANY OTHER COPIES THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE
* AVAILABLE TO ANY OTHER PERSON. NO TITLE TO AND OWNERSHIP OF THE
* SOFTWARE IS HEREBY TRANSFERRED.
*
* THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT
* NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY OPEN SOFTWARE
* FOUNDATION, INC. OR ITS THIRD PARTY SUPPLIERS
*
* OPEN SOFTWARE FOUNDATION, INC. AND ITS THIRD PARTY SUPPLIERS,
* ASSUME NO RESPONSIBILITY FOR THE USE OR INABILITY TO USE ANY OF ITS
* SOFTWARE . OSF SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
* KIND, AND OSF EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES, INCLUDING
* BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE.
*
* Notice: Notwithstanding any other lease or license that may pertain to,
* or accompany the delivery of, this computer software, the rights of the
* Government regarding its use, reproduction and disclosure are as set
* forth in Section 52.227-19 of the FARS Computer Software-Restricted
* Rights clause.
*
* (c) Copyright 1989, 1990, 1991 Open Software Foundation, Inc. Unpublished - all
* rights reserved under the Copyright laws of the United States.
*
* RESTRICTED RIGHTS NOTICE: Use, duplication, or disclosure by the
* Government is subject to the restrictions as set forth in subparagraph
* (c)(1)(ii) of the Rights in Technical Data and Computer Software clause
* at DFARS 52.227-7013.
*
* Open Software Foundation, Inc.
* 11 Cambridge Center
* Cambridge, MA 02142
* (617)621-8700
*
* RESTRICTED RIGHTS LEGEND: This computer software is submitted with
* "restricted rights." Use, duplication or disclosure is subject to the
* restrictions as set forth in NASA FAR SUP 18-52.227-79 (April 1985)
* "Commercial Computer Software- Restricted Rights (April 1985)." Open
* Software Foundation, Inc., 11 Cambridge Center, Cambridge, MA 02142. If
* the contract contains the Clause at 18-52.227-74 "Rights in Data General"
* then the "Alternate III" clause applies.
*
* (c) Copyright 1989, 1990, 1991 Open Software Foundation, Inc.
* ALL RIGHTS RESERVED
*
*
* Open Software Foundation is a trademark of The Open Software Foundation, Inc.
* OSF is a trademark of Open Software Foundation, Inc.
* OSF/Motif is a trademark of Open Software Foundation, Inc.
* Motif is a trademark of Open Software Foundation, Inc.
* DEC is a registered trademark of Digital Equipment Corporation
* DIGITAL is a registered trademark of Digital Equipment Corporation
* X Window System is a trademark of the Massachusetts Institute of Technology
*
*******************************************************************************
******************************************************************************/
#ifndef __DtosP_h
#define __DtosP_h
#ifndef NO_MEMMOVE
# ifndef X_NOT_STDC_ENV
# include <stdlib.h> /* Needed for MB_CUR_MAX, mbtowc, mbstowcs and mblen */
# endif
#else
# define memmove( p1, p2, p3 ) bcopy( p2, p1, p3 )
#endif
#ifdef BOGUS_MB_MAX /* some systems don't properly set MB_[CUR|LEN]_MAX */
# undef MB_LEN_MAX
# define MB_LEN_MAX 1 /* temp fix */
# undef MB_CUR_MAX
# define MB_CUR_MAX 1 /* temp fix */
#endif /* BOGUS_MB_MAX */
/**********************************************************************/
/* here we duplicate Xtos.h, since we can't include this private file */
#ifdef INCLUDE_ALLOCA_H
# include <alloca.h>
#endif
#ifdef CRAY
# define WORD64
#endif
/* stolen from server/include/os.h */
#ifndef NO_ALLOCA
/*
* os-dependent definition of local allocation and deallocation
* If you want something other than XtMalloc/XtFree for ALLOCATE/DEALLOCATE
* LOCAL then you add that in here.
*/
# if defined(__HIGHC__)
# if HCVERSION < 21003
# define ALLOCATE_LOCAL(size) alloca((int)(size))
#pragma on(alloca);
# else /* HCVERSION >= 21003 */
# define ALLOCATE_LOCAL(size) _Alloca((int)(size))
# endif /* HCVERSION < 21003 */
# define DEALLOCATE_LOCAL(ptr) /* as nothing */
# endif /* defined(__HIGHC__) */
# ifdef __GNUC__
# ifdef alloca
# undef alloca
# endif
# define alloca __builtin_alloca
# define ALLOCATE_LOCAL(size) alloca((int)(size))
# define DEALLOCATE_LOCAL(ptr) /* as nothing */
# else /* ! __GNUC__ */
/*
* warning: mips alloca is unsuitable, do not use.
*/
# if defined(vax) || defined(sun) || defined(stellar)
/*
* Some System V boxes extract alloca.o from /lib/libPW.a; if you
* decide that you don't want to use alloca, you might want to fix it here.
*/
char *alloca();
# define ALLOCATE_LOCAL(size) alloca((int)(size))
# define DEALLOCATE_LOCAL(ptr) /* as nothing */
# endif /* who does alloca */
# endif /* __GNUC__ */
#endif /* NO_ALLOCA */
#ifndef ALLOCATE_LOCAL
# define ALLOCATE_LOCAL(size) XtMalloc((unsigned long)(size))
# define DEALLOCATE_LOCAL(ptr) XtFree((XtPointer)(ptr))
#endif /* ALLOCATE_LOCAL */
/* End of Xtos.h */
/*****************/
/*
* Default Icon Search Paths
*
* The following are default starter values for XMICONSEARCHPATH and
* XMICONBMSEARCHPATH, respectively. Code elsewhere must ensure that paths
* into the user's home directory occur in front of these paths in the
* environment variables. Note the apparently redundant use of ANSI C string
* constant concatenation; this is necessary in order to avoid the sequence of
* characters % B %, which form an SCCS id keyword.
*/
#define DTPMSYSDEFAULT \
CDE_CONFIGURATION_TOP "/appconfig/icons/%L/%B" "%M.pm:" \
CDE_CONFIGURATION_TOP "/appconfig/icons/%L/%B" "%M.bm:" \
CDE_CONFIGURATION_TOP "/appconfig/icons/%L/%B:" \
\
CDE_CONFIGURATION_TOP "/appconfig/icons/C/%B" "%M.pm:" \
CDE_CONFIGURATION_TOP "/appconfig/icons/C/%B" "%M.bm:" \
CDE_CONFIGURATION_TOP "/appconfig/icons/C/%B:" \
\
CDE_INSTALLATION_TOP "/appconfig/icons/%L/%B" "%M.pm:" \
CDE_INSTALLATION_TOP "/appconfig/icons/%L/%B" "%M.bm:" \
CDE_INSTALLATION_TOP "/appconfig/icons/%L/%B:" \
\
CDE_INSTALLATION_TOP "/appconfig/icons/C/%B" "%M.pm:" \
CDE_INSTALLATION_TOP "/appconfig/icons/C/%B" "%M.bm:" \
CDE_INSTALLATION_TOP "/appconfig/icons/C/%B"
#define DTBMSYSDEFAULT \
CDE_CONFIGURATION_TOP "/appconfig/icons/%L/%B" "%M.bm:" \
CDE_CONFIGURATION_TOP "/appconfig/icons/%L/%B" "%M.pm:" \
CDE_CONFIGURATION_TOP "/appconfig/icons/%L/%B:" \
\
CDE_CONFIGURATION_TOP "/appconfig/icons/C/%B" "%M.bm:" \
CDE_CONFIGURATION_TOP "/appconfig/icons/C/%B" "%M.pm:" \
CDE_CONFIGURATION_TOP "/appconfig/icons/C/%B:" \
\
CDE_INSTALLATION_TOP "/appconfig/icons/%L/%B" "%M.bm:" \
CDE_INSTALLATION_TOP "/appconfig/icons/%L/%B" "%M.pm:" \
CDE_INSTALLATION_TOP "/appconfig/icons/%L/%B:" \
\
CDE_INSTALLATION_TOP "/appconfig/icons/C/%B" "%M.bm:" \
CDE_INSTALLATION_TOP "/appconfig/icons/C/%B" "%M.pm:" \
CDE_INSTALLATION_TOP "/appconfig/icons/C/%B"
#ifdef __cplusplus
extern "C" {
#endif
/******** Private Function Declarations ********/
/******** End Private Function Declarations ********/
#ifdef __cplusplus
} /* Close scope of 'extern "C"' declaration which encloses file. */
#endif
#endif /* __DtosP_h */
/* DON'T ADD ANYTHING AFTER THIS #endif */

61
cde/include/Dt/DtpadM.h Normal file
View File

@@ -0,0 +1,61 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: DtpadM.h /main/3 1995/10/26 15:20:56 rswiston $ */
/************************************<+>*************************************
****************************************************************************
**
** File: DtpadM.h
**
** Project: HP-DT "dtpad" text editor
**
** Description: Defines for the tool class and messages for the
** dtpad text editor
**
**
** (c) Copyright 1993, 1994 Hewlett-Packard Company
** (c) Copyright 1993, 1994 International Business Machines Corp.
** (c) Copyright 1993, 1994 Sun Microsystems, Inc.
** (c) Copyright 1993, 1994 Novell, Inc.
**
**
**
****************************************************************************
************************************<+>*************************************/
#ifndef _DtpadM_h
#define _DtpadM_h
#define DTPAD_TOOL_CLASS "DTPAD"
/*
* Request Messages which the editor understands
*/
#define DTPAD_RUN_SESSION_MSG "RUN_SESSION"
#define DTPAD_OPEN_FILE_MSG "OPEN_FILE"
/*
* Notification Messages which the Editor sends
*/
#define DTPAD_DONE "DONE"
#endif /*_DtpadM_h*/

181
cde/include/Dt/Dts.h Normal file
View File

@@ -0,0 +1,181 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: Dts.h /main/5 1996/03/05 13:30:59 drk $ */
/*
* (c) Copyright 1993, 1994 Hewlett-Packard Company
* (c) Copyright 1993, 1994 International Business Machines Corp.
* (c) Copyright 1993, 1994 Sun Microsystems, Inc.
* (c) Copyright 1993, 1994 Novell, Inc.
*/
#ifndef _Dt_Dts_h
#define _Dt_Dts_h
#include <sys/stat.h>
#include <X11/Intrinsic.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* Constants
*/
#define DtDTS_DC_NAME "DATA_CRITERIA"
#define DtDTS_NAME_PATTERN "NAME_PATTERN"
#define DtDTS_PATH_PATTERN "PATH_PATTERN"
#define DtDTS_CONTENT "CONTENT"
#define DtDTS_MODE "MODE"
#define DtDTS_LINK_PATH "LINK_PATH"
#define DtDTS_LINK_NAME "LINK_NAME"
#define DtDTS_DATA_ATTRIBUTES_NAME "DATA_ATTRIBUTES_NAME"
#define DtDTS_DT_RECURSIVE_LINK "RECURSIVE_LINK"
#define DtDTS_DT_BROKEN_LINK "BROKEN_LINK"
#define DtDTS_DT_UNKNOWN "UNKNOWN"
#define DtDTS_DA_IS_SYNTHETIC "IS_SYNTHETIC"
#define DtDTS_DA_LABEL "LABEL"
#define DtDTS_DA_NAME "DATA_ATTRIBUTES"
#define DtDTS_DA_DESCRIPTION "DESCRIPTION"
#define DtDTS_DA_DATA_HOST "DATA_HOST"
#define DtDTS_DA_ICON "ICON"
#define DtDTS_DA_INSTANCE_ICON "INSTANCE_ICON"
#define DtDTS_DA_PROPERTIES "PROPERTIES"
#define DtDTS_DA_ACTION_LIST "ACTIONS"
#define DtDTS_DA_NAME_TEMPLATE "NAME_TEMPLATE"
#define DtDTS_DA_MODE_TEMPLATE "MODE_TEMPLATE"
#define DtDTS_DA_MOVE_TO_ACTION "MOVE_TO_ACTION"
#define DtDTS_DA_COPY_TO_ACTION "COPY_TO_ACTION"
#define DtDTS_DA_LINK_TO_ACTION "LINK_TO_ACTION"
#define DtDTS_DA_IS_TEXT "IS_TEXT"
#define DtDTS_DA_MEDIA "MEDIA"
#define DtDTS_DA_MIME_TYPE "MIME_TYPE"
#define DtDTS_DA_MIME_TO_MEDIA_FILTER "MIME_TO_MEDIA_FILTER"
#define DtDTS_DA_MEDIA_TO_MIME_FILTER "MEDIA_TO_MIME_FILTER"
#define DtDTS_DA_X400_TYPE "X400_TYPE"
#define DtDTS_DA_X400_TO_MEDIA_FILTER "X400_TO_MEDIA_FILTER"
#define DtDTS_DA_MEDIA_TO_X400_FILTER "MEDIA_TO_X400_FILTER"
#define DtDTS_DA_IS_ACTION "IS_ACTION"
#define DtDTS_DA_IS_EXECUTABLE "IS_EXECUTABLE"
#define DtDTS_DT_DIR ".DtDirDataType"
/*
* Types
*/
typedef struct _DtDtsAttribute
{
char *name;
char *value;
} DtDtsAttribute;
/*
* Functions
*/
extern void DtDtsLoadDataTypes(void);
extern void DtDtsRelease(void);
extern char *DtDtsDataToDataType(
const char *filepath,
const void *buffer,
const int size,
const struct stat *stat_buff,
const char *link_name,
const struct stat *link_stat_buff,
const char *opt_name);
extern char *DtDtsFileToDataType(
const char *filepath);
extern char *DtDtsFileToAttributeValue(
const char *filepath,
const char *attr);
extern DtDtsAttribute **DtDtsFileToAttributeList(
const char *filepath);
extern char *DtDtsBufferToDataType(
const void *buffer,
const int size,
const char *opt_name);
extern char *DtDtsBufferToAttributeValue(
const void *buffer,
const int size,
const char *attr,
const char *opt_name);
extern DtDtsAttribute **DtDtsBufferToAttributeList(
const void *buffer,
const int size,
const char *opt_name);
extern char *DtDtsDataTypeToAttributeValue(
const char *datatype,
const char *attr,
const char *opt_name);
extern DtDtsAttribute **DtDtsDataTypeToAttributeList(
const char *datatype,
const char *opt_name);
extern void DtDtsFreeDataTypeNames(
char **namelist);
extern void DtDtsFreeAttributeList(
DtDtsAttribute **attr_list);
extern void DtDtsFreeAttributeValue(
char *attr_value);
extern void DtDtsFreeDataType(
char *datatype);
extern char **DtDtsDataTypeNames(void);
extern char **DtDtsFindAttribute(
const char *name,
const char *value);
extern char *DtDtsSetDataType(
const char *filepath,
const char *datatype,
const int override);
extern int DtDtsDataTypeIsAction(
const char *datatype);
extern Boolean DtDtsIsTrue(
const char *str);
#ifdef __cplusplus
}
#endif
#endif /* _Dt_Dts_h */

154
cde/include/Dt/DtsDb.h Normal file
View File

@@ -0,0 +1,154 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/*
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
* (c) Copyright 1993, 1994 International Business Machines Corp. *
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
* (c) Copyright 1993, 1994 Novell, Inc. *
*/
/*
*+SNOTICE
*
* $XConsortium: DtsDb.h /main/5 1996/08/28 14:32:17 rswiston $
*
* RESTRICTED CONFIDENTIAL INFORMATION:
*
* The information in this document is subject to special
* restrictions in a confidential disclosure agreement bertween
* HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
* document outside HP, IBM, Sun, USL, SCO, or Univel wihtout
* Sun's specific written approval. This documment and all copies
* and derivative works thereof must be returned or destroyed at
* Sun's request.
*
* Copyright 1993 Sun Microsystems, Inc. All rights reserved.
*
*+ENOTICE
*/
#ifndef DT_DTS_DB_H
#define DT_DTS_DB_H
#include <X11/Xresource.h>
#include <Dt/DbReader.h>
typedef int OtBoolean;
/* typedefs for casting comparison functions if needed */
typedef int (*_DtDtsDbFieldCompare)(DtDtsDbField **fld1, DtDtsDbField **fld2);
/* entry of a list of attribute/pairs */
typedef struct
{
XrmQuark recordName;
_DtDtsDbFieldCompare compare;
long pathId;
int seq;
int fieldCount;
DtDtsDbField **fieldList;
} DtDtsDbRecord;
/* typedefs for casting record comparison functions if needed */
typedef int (*_DtDtsDbRecordCompare)(DtDtsDbRecord **rec1, DtDtsDbRecord **rec2);
/* a "database" of a collection of entrys (i.e. OBJECT-TYPE, ACTION, FILE-TYPE
This is a private Structure to the DtDtsDb component.
*/
typedef struct
{
char *databaseName;
_DtDtsDbRecordCompare compare;
int recordCount;
DtDtsDbRecord **recordList;
unsigned long ActionSequenceNumber;
} DtDtsDbDatabase;
/* for the mmaped database this the use_in_memory_db variable is used
to call the old API while the database is being built and is set to
false when the mmaped versions are being accessed.
*/
extern int use_in_memory_db;
/*
* adds a new database to the list of databases -- returns a pointer to the
* new database. If a database of the given name already exists it returns
* a pointer to that database.
*/
extern DtDtsDbDatabase *_DtDtsDbAddDatabase( char *dbname );
/* returns the handle for the database where name is the Database name */
extern DtDtsDbDatabase *_DtDtsDbGet(char *name);
extern char **_DtDtsDbListDb(void);
/* Record Sort function:
* sorts the specified database, usually obtained from _DtDtsDbGet(), in the
* order specified by the comparison function. If (*compare) == 0 then
* _DtDtsDbCompareRecordNames() is used as the (*compare) function.
*/
extern void _DtDtsDbRecordSort(DtDtsDbDatabase *database,
_DtDtsDbRecordCompare compare);
/* Field Sort function:
* sorts the specified Record in the order specified by the comparison function
* If (*compare) == 0 then _DtDtsDbCompareFieldNames() is used as the
* (*compare) function.
*/
extern void _DtDtsDbFieldSort(DtDtsDbRecord *record,
_DtDtsDbFieldCompare compare);
/* Name Comparison functions:
* These routines can be passed in to the corresponding sort function to
* sort by name.
*
*/
extern int _DtDtsDbCompareRecordNames(DtDtsDbRecord **entry1, DtDtsDbRecord **entry2);
extern int _DtDtsDbCompareFieldNames(DtDtsDbField **entry1, DtDtsDbField **entry2);
/* retrieves the Record that matches the specified entry from the record */
extern DtDtsDbField *_DtDtsDbGetField(DtDtsDbRecord *record,
char *value);
/* retrieves the entry of the specified entry from the specified database */
extern DtDtsDbRecord *_DtDtsDbGetRecord(DtDtsDbDatabase *database,
DtDtsDbRecord *value);
/* Get By Name functions:
* retrieves the entry of the specified name from the specified database
* ** IF ** the _DtDtsDb*Sort routine has been called with the corresponding
* _DtDtsDbCompare*Name comparison function. Otherwise use the standard
* _DtDtsDbGet* functions.
*/
extern char *_DtDtsDbGetFieldByName(DtDtsDbRecord *record, char *name);
extern DtDtsDbRecord *_DtDtsDbGetRecordByName(DtDtsDbDatabase *database, char *name);
extern DtDtsDbRecord *_DtDtsDbAddRecord(DtDtsDbDatabase *db);
extern DtDtsDbField *_DtDtsDbAddField(DtDtsDbRecord *rec);
extern int _DtDtsDbDeleteDb(DtDtsDbDatabase *db);
extern int _DtDtsDbDeleteRecord(DtDtsDbRecord *rec, DtDtsDbDatabase *db);
extern int _DtDtsDbDeleteRecords(DtDtsDbDatabase *db);
extern int _DtDtsDbDeleteField(DtDtsDbField *fld, DtDtsDbRecord *rec);
extern int _DtDtsDbDeleteFields(DtDtsDbRecord *rec);
#endif

174
cde/include/Dt/DtsMM.h Normal file
View File

@@ -0,0 +1,174 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: DtsMM.h /main/8 1996/08/28 14:27:26 rswiston $ */
/*
*
* RESTRICTED CONFIDENTIAL INFORMATION:
*
*
* Copyright 1993 Sun Microsystems, Inc. All rights reserved.
*
*+ENOTICE
*/
#ifndef DT_DTS_MM_H
#define DT_DTS_MM_H
#include <stdio.h>
#include <Dt/DtShmDb.h>
#include <X11/Intrinsic.h>
#include "Dt/DbReader.h"
#define DTDTSDB_TMPDATABASENAME "%s/.dt/.tmp_dt_db_cache.%s\0"
#define DTDTSDB_DATABASENAME "%s/.dt/.dt_db_cache.%s\0"
#define _DTDTSMMTEMPFILE "dtdbcache_"
/*
* NOTE: _DTDTSMMTEMPDIR affects the location of the dtdbcache
* file, and therefore affects the Xsession.src, Xreset.src, and
* Xstartup.src scripts in dtlogin/config.
*/
#define _DTDTSMMTEMPDIR "/tmp"
typedef int DtDtsMMSeqNo; /* the order it occures in db */
typedef int DtDtsMMFieldCount; /* number of fields in record */
typedef int DtDtsMMRecordCount; /* number of records in field */
typedef int DtDtsMMDataBaseCount; /* how many databases */
typedef int DtDtsMMFieldStart; /* index in table where field list starts */
typedef int DtDtsMMRecordStart; /* index in table where record list starts */
typedef int DtDtsMMDataBaseStart; /* index in table where database list starts */
typedef int DtDtsMMIndexOffset;
typedef int DtDtsMMNameIndex;
typedef int DtDtsMMPathHash;
typedef struct
{
DtDtsMMPathHash pathhash; /* hash of dir. we visit */
DtDtsMMDataBaseCount num_db; /* number of databases */
DtDtsMMDataBaseStart db_offset; /* index to databases */
DtDtsMMNameIndex name_list_offset; /* index to name list */
DtDtsMMNameIndex no_name_offset; /* index to nonunique names */
DtDtsMMNameIndex buffer_start_index; /* index to list of buffers */
DtDtsMMIndexOffset str_tbl_offset; /* index to table of strings */
DtDtsMMIndexOffset files_count; /* number of loaded files */
DtDtsMMIndexOffset files_offset; /* index to list of loaded files */
DtDtsMMIndexOffset mtimes_offset; /* index to modified times of files */
} DtDtsMMHeader;
/* one set of attribute/pair */
typedef struct
{
DtShmBoson fieldName; /* name of attribute */
DtShmBoson fieldValue; /* value of attribute */
} DtDtsMMField;
/* typedefs for casting comparison functions if needed */
typedef int (*_DtDtsMMFieldCompare)(DtDtsMMField *fld1, DtDtsMMField *fld2);
/* entry of a list of attribute/pairs */
typedef struct
{
DtShmBoson recordName; /* name of this entry */
DtShmBoson pathId; /* file entry is located in */
DtDtsMMSeqNo seq; /* sequence this got loaded */
DtDtsMMFieldCount fieldCount; /* number of fields in record */
DtDtsMMFieldStart fieldList; /* index to field table */
} DtDtsMMRecord;
/* typedefs for casting record comparison functions if needed */
typedef int (*_DtDtsMMRecordCompare)(DtDtsMMRecord *rec1, DtDtsMMRecord *rec2);
/* a "database" of a collection of entrys (i.e. OBJECT-TYPE, ACTION, FILE-TYPE
This is a private Structure to the DtDtsMM component.
*/
typedef struct
{
DtShmBoson databaseName; /* name of database */
DtDtsMMIndexOffset nameIndex; /* index for DataCriteria quick find */
DtDtsMMRecordCount recordCount; /* number of records */
DtDtsMMRecordStart recordList; /* index to records table */
} DtDtsMMDatabase;
/* Db Internal pointers */
int * _DtDtsMMGetDCNameIndex(int *size);
int * _DtDtsMMGetBufferIndex(int *size);
int * _DtDtsMMGetNoNameIndex(int *size);
void * _DtDtsMMGetPtr(int index);
DtShmInttab _DtDtsMMGetFileList(void);
int _DtDtsMMGetPtrSize(int index);
int _DtDtsMMInit(int);
void _DtDtsMMPrint(FILE *org_fd);
int _DtDtsMMCreateDb(DtDirPaths *dirs, const char *CacheFile, int override);
int _DtDtsMMCreateFile(DtDirPaths *dirs, const char *CacheFile);
char * _DtDtsMMCacheName(int);
int _DtDtsMMapDB(const char *CacheFile);
const char * _DtDtsMMBosonToString(DtShmBoson boson);
DtShmBoson _DtDtsMMStringToBoson(const char *string);
extern int use_in_memory_db;
/* returns the handle for the database where name is the Database name */
extern DtDtsMMDatabase *_DtDtsMMGet(const char *name);
extern char **_DtDtsMMListDb(void);
/* FIXME: document */
extern int *_DtDtsMMGetDbName(DtDtsMMDatabase *db, DtShmBoson boson);
/* Name Comparison functions:
* These routines can be passed in to the corresponding sort function to
* sort by name.
*
*/
extern int _DtDtsMMCompareRecordNames(DtDtsMMRecord *entry1, DtDtsMMRecord *entry2);
extern int _DtDtsMMCompareFieldNames(DtDtsMMField *entry1, DtDtsMMField *entry2);
/* retrieves the Record that matches the specified entry from the record */
extern DtDtsMMField *_DtDtsMMGetField(DtDtsMMRecord *record,
const char *value);
extern const char *_DtDtsMMGetFieldByName(DtDtsMMRecord *rec, const char *name);
/* retrieves the entry of the specified entry from the specified database */
extern DtDtsMMRecord *_DtDtsMMGetRecord(DtDtsMMDatabase *database,
DtDtsMMRecord *value);
extern DtDtsMMRecord *_DtDtsMMGetRecordByName(DtDtsMMDatabase *database,
const char *value);
/* Get By Name functions:
* retrieves the entry of the specified name from the specified database
* ** IF ** the _DtDtsMM*Sort routine has been called with the corresponding
* _DtDtsMMCompare*Name comparison function. Otherwise use the standard
* _DtDtsMMGet* functions.
*/
char * _DtDtsMMExpandValue(const char *value);
void _DtDtsMMSafeFree(char *value);
int _DtDtsMMIsMemory(const char *value);
extern DtShmBoson _DtDtsMMNameStringToBoson(const char *string);
#endif /* DT_DTS_MM_H */

616
cde/include/Dt/Editor.h Normal file
View File

@@ -0,0 +1,616 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: Editor.h /main/3 1995/10/26 09:32:07 rswiston $ */
/*
* (c) Copyright 1993, 1994 Hewlett-Packard Company
* (c) Copyright 1993, 1994 International Business Machines Corp.
* (c) Copyright 1993, 1994 Sun Microsystems, Inc.
* (c) Copyright 1993, 1994 Novell, Inc.
*/
#ifndef _Dt_Editor_h
#define _Dt_Editor_h
#include <Xm/Xm.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* Constants
*/
/* Sources of Help requests */
/* Used with XmNhelpCallback */
#define DtEDITOR_HELP_EDIT_WINDOW 1
#define DtEDITOR_HELP_STATUS_LINE 2
#define DtEDITOR_HELP_STATUS_CURRENT_LINE 3
#define DtEDITOR_HELP_STATUS_TOTAL_LINES 4
#define DtEDITOR_HELP_STATUS_MESSAGE 5
#define DtEDITOR_HELP_STATUS_OVERSTRIKE 6
#define DtEDITOR_HELP_FORMAT_DIALOG 7
#define DtEDITOR_HELP_FORMAT_LEFT_MARGIN 8
#define DtEDITOR_HELP_FORMAT_RIGHT_MARGIN 9
#define DtEDITOR_HELP_FORMAT_ALIGNMENT 10
#define DtEDITOR_HELP_CHANGE_DIALOG 11
#define DtEDITOR_HELP_CHANGE_FIND 12
#define DtEDITOR_HELP_CHANGE_CHANGE 13
#define DtEDITOR_HELP_SPELL_DIALOG 14
#define DtEDITOR_HELP_SPELL_MISSPELLED_WORDS 15
#define DtEDITOR_HELP_SPELL_CHANGE 16
/* Specifies the last line in the edit area */
/* Used with DtEditorGoToLine */
#define DtEDITOR_LAST_LINE -999
/* Resource constants */
#ifndef DtNautoShowCursorPosition
#define DtNautoShowCursorPosition XmNautoShowCursorPosition
#endif
#ifndef DtCAutoShowCursorPosition
#define DtCAutoShowCursorPosition XmCAutoShowCursorPosition
#endif
#ifndef DtNblinkRate
#define DtNblinkRate XmNblinkRate
#endif
#ifndef DtCBlinkRate
#define DtCBlinkRate XmCBlinkRate
#endif
#ifndef DtNbuttonFontList
#define DtNbuttonFontList XmNbuttonFontList
#endif
#ifndef DtCFontList
#define DtCFontList XmCFontList
#endif
#ifndef DtNcenterToggleLabel
#define DtNcenterToggleLabel "centerToggleLabel"
#endif
#ifndef DtCCenterToggleLabel
#define DtCCenterToggleLabel "CenterToggleLabel"
#endif
#ifndef DtNchangeAllButtonLabel
#define DtNchangeAllButtonLabel "changeAllButtonLabel"
#endif
#ifndef DtCChangeAllButtonLabel
#define DtCChangeAllButtonLabel "ChangeAllButtonLabel"
#endif
#ifndef DtNchangeButtonLabel
#define DtNchangeButtonLabel "changeButtonLabel"
#endif
#ifndef DtCChangeButtonLabel
#define DtCChangeButtonLabel "ChangeButtonLabel"
#endif
#ifndef DtNchangeFieldLabel
#define DtNchangeFieldLabel "changeFieldLabel"
#endif
#ifndef DtCChangeFieldLabel
#define DtCChangeFieldLabel "ChangeFieldLabel"
#endif
#ifndef DtNcolumns
#define DtNcolumns XmNcolumns
#endif
#ifndef DtCColumns
#define DtCColumns XmCColumns
#endif
#ifndef DtNcurrentLineLabel
#define DtNcurrentLineLabel "currentLineLabel"
#endif
#ifndef DtCCurrentLineLabel
#define DtCCurrentLineLabel "CurrentLineLabel"
#endif
#ifndef DtNcursorPosition
#define DtNcursorPosition XmNcursorPosition
#endif
#ifndef DtCCursorPosition
#define DtCCursorPosition XmCCursorPosition
#endif
#ifndef DtNcursorPositionVisible
#define DtNcursorPositionVisible XmNcursorPositionVisible
#endif
#ifndef DtCCursorPositionVisible
#define DtCCursorPositionVisible XmCCursorPositionVisible
#endif
#ifndef DtNdialogTitle
#define DtNdialogTitle "dialogTitle"
#endif
#ifndef DtCDialogTitle
#define DtCDialogTitle XmCDialogTitle
#endif
#ifndef DtNeditable
#define DtNeditable XmNeditable
#endif
#ifndef DtCEditable
#define DtCEditable XmCEditable
#endif
#ifndef DtNfindButtonLabel
#define DtNfindButtonLabel "findButtonLabel"
#endif
#ifndef DtCFindButtonLabel
#define DtCFindButtonLabel "FindButtonLabel"
#endif
#ifndef DtNfindChangeDialogTitle
#define DtNfindChangeDialogTitle "findChangeDialogTitle"
#endif
#ifndef DtCFindChangeDialogTitle
#define DtCFindChangeDialogTitle "FindChangeDialogTitle"
#endif
#ifndef DtNfindFieldLabel
#define DtNfindFieldLabel "findFieldLabel"
#endif
#ifndef DtCFindFieldLabel
#define DtCFindFieldLabel "FindFieldLabel"
#endif
#ifndef DtNformatAllButtonLabel
#define DtNformatAllButtonLabel "formatAllButtonLabel"
#endif
#ifndef DtCFormatAllButtonLabel
#define DtCFormatAllButtonLabel "FormatAllButtonLabel"
#endif
#ifndef DtNformatParagraphButtonLabel
#define DtNformatParagraphButtonLabel "formatParagraphButtonLabel"
#endif
#ifndef DtCFormatParagraphButtonLabel
#define DtCFormatParagraphButtonLabel "FormatParagraphButtonLabel"
#endif
#ifndef DtNformatSettingsDialogTitle
#define DtNformatSettingsDialogTitle "formatSettingsDialogTitle"
#endif
#ifndef DtCFormatSettingsDialogTitle
#define DtCFormatSettingsDialogTitle "FormatSettingsDialogTitle"
#endif
#ifndef DtNinformationDialogTitle
#define DtNinformationDialogTitle "informationDialogTitle"
#endif
#ifndef DtCInformationDialogTitle
#define DtCInformationDialogTitle "InformationDialogTitle"
#endif
#ifndef DtNinsertLabel
#define DtNinsertLabel "insertLabel"
#endif
#ifndef DtCInsertLabel
#define DtCInsertLabel "InsertLabel"
#endif
#ifndef DtNjustifyToggleLabel
#define DtNjustifyToggleLabel "justifyToggleLabel"
#endif
#ifndef DtCJustifyToggleLabel
#define DtCJustifyToggleLabel "JustifyToggleLabel"
#endif
#ifndef DtNlabelFontList
#define DtNlabelFontList XmNlabelFontList
#endif
#ifndef DtNleftAlignToggleLabel
#define DtNleftAlignToggleLabel "leftAlignToggleLabel"
#endif
#ifndef DtCLeftAlignToggleLabel
#define DtCLeftAlignToggleLabel "LeftAlignToggleLabel"
#endif
#ifndef DtNleftMarginFieldLabel
#define DtNleftMarginFieldLabel "leftMarginFieldLabel"
#endif
#ifndef DtCLeftMarginFieldLabel
#define DtCLeftMarginFieldLabel "LeftMarginFieldLabel"
#endif
#ifndef DtNmaxLength
#define DtNmaxLength XmNmaxLength
#endif
#ifndef DtCMaxLength
#define DtCMaxLength XmCMaxLength
#endif
#ifndef DtNmisspelledListLabel
#define DtNmisspelledListLabel "misspelledListLabel"
#endif
#ifndef DtCMisspelledListLabel
#define DtCMisspelledListLabel "MisspelledListLabel"
#endif
#ifndef DtNoverstrike
#define DtNoverstrike "overstrike"
#endif
#ifndef DtCOverstrike
#define DtCOverstrike "Overstrike"
#endif
#ifndef DtNoverstrikeLabel
#define DtNoverstrikeLabel "overstrikeLabel"
#endif
#ifndef DtCOverstrikeLabel
#define DtCOverstrikeLabel "OverstrikeLabel"
#endif
#ifndef DtNrightAlignToggleLabel
#define DtNrightAlignToggleLabel "rightAlignToggleLabel"
#endif
#ifndef DtCRightAlignToggleLabel
#define DtCRightAlignToggleLabel "RightAlignToggleLabel"
#endif
#ifndef DtNrightMarginFieldLabel
#define DtNrightMarginFieldLabel "rightMarginFieldLabel"
#endif
#ifndef DtCRightMarginFieldLabel
#define DtCRightMarginFieldLabel "RightMarginFieldLabel"
#endif
#ifndef DtNrows
#define DtNrows XmNrows
#endif
#ifndef DtCRows
#define DtCRows XmCRows
#endif
#ifndef DtNscrollHorizontal
#define DtNscrollHorizontal XmNscrollHorizontal
#endif
#ifndef DtCScroll
#define DtCScroll XmCScroll
#endif
#ifndef DtNscrollLeftSide
#define DtNscrollLeftSide XmNscrollLeftSide
#endif
#ifndef DtCScrollSide
#define DtCScrollSide XmCScrollSide
#endif
#ifndef DtNscrollTopSide
#define DtNscrollTopSide XmNscrollTopSide
#endif
#ifndef DtNscrollVertical
#define DtNscrollVertical XmNscrollVertical
#endif
#ifndef DtNshowStatusLine
#define DtNshowStatusLine "showStatusLine"
#endif
#ifndef DtCShowStatusLine
#define DtCShowStatusLine "ShowStatusLine"
#endif
#ifndef DtNspellDialogTitle
#define DtNspellDialogTitle "spellDialogTitle"
#endif
#ifndef DtCSpellDialogTitle
#define DtCSpellDialogTitle "SpellDialogTitle"
#endif
#ifndef DtNspellFilter
#define DtNspellFilter "spellFilter"
#endif
#ifndef DtCSpellFilter
#define DtCSpellFilter "SpellFilter"
#endif
#ifndef DtNtextBackground
#define DtNtextBackground "textBackground"
#endif
#ifndef DtCBackground
#define DtCBackground XmCBackground
#endif
#ifndef DtNtextDeselectCallback
#define DtNtextDeselectCallback "textDeselectCallback"
#endif
#ifndef DtNtextFontList
#define DtNtextFontList XmNtextFontList
#endif
#ifndef DtNtextForeground
#define DtNtextForeground "textForeground"
#endif
#ifndef DtCForeground
#define DtCForeground XmCForeground
#endif
#ifndef DtNtextSelectCallback
#define DtNtextSelectCallback "textSelectCallback"
#endif
#ifndef DtNtextTranslations
#define DtNtextTranslations XmNtextTranslations
#endif
#ifndef DtCTranslations
#define DtCTranslations XmCTranslations
#endif
#ifndef DtCCallback
#define DtCCallback XmCCallback
#endif
#ifndef DtNtopCharacter
#define DtNtopCharacter XmNtopCharacter
#endif
#ifndef DtCTopCharacter
#define DtCTopCharacter XmCTopCharacter
#endif
#ifndef DtNtotalLineCountLabel
#define DtNtotalLineCountLabel "totalLineCountLabel"
#endif
#ifndef DtCTotalLineCountLabel
#define DtCTotalLineCountLabel "TotalLineCountLabel"
#endif
#ifndef DtNwordWrap
#define DtNwordWrap XmNwordWrap
#endif
#ifndef DtCWordWrap
#define DtCWordWrap XmCWordWrap
#endif
#ifndef DtEditorHelpCallbackStruct
#define DtEditorHelpCallbackStruct XmAnyCallbackStruct
#endif
#ifndef DtEditorSelectCallbackStruct
#define DtEditorSelectCallbackStruct XmAnyCallbackStruct
#endif
#ifndef DtEditorDeselectCallbackStruct
#define DtEditorDeselectCallbackStruct XmAnyCallbackStruct
#endif
/* Used with DtEditorChange() */
enum {
DtEDITOR_CURRENT_SELECTION,
DtEDITOR_NEXT_OCCURRENCE,
DtEDITOR_ALL_OCCURRENCES
};
/* Used with DtEditorFormat() */
enum {
DtEDITOR_FORMAT_ALL,
DtEDITOR_FORMAT_PARAGRAPH
};
enum {
DtEDITOR_ALIGN_CENTER,
DtEDITOR_ALIGN_JUSTIFY,
DtEDITOR_ALIGN_LEFT,
DtEDITOR_ALIGN_RIGHT
};
/* Used with DtNtextSelectCallback */
enum {
DtEDITOR_TEXT_SELECT,
DtEDITOR_TEXT_DESELECT
};
/*
* Types
*/
typedef enum _DtEditorErrorCode{
DtEDITOR_NO_ERRORS,
DtEDITOR_INVALID_TYPE,
DtEDITOR_INVALID_RANGE,
DtEDITOR_NULL_ITEM,
DtEDITOR_ILLEGAL_SIZE,
DtEDITOR_SPELL_FILTER_FAILED,
DtEDITOR_NO_TMP_FILE,
DtEDITOR_INVALID_FILENAME,
DtEDITOR_NONEXISTENT_FILE,
DtEDITOR_UNREADABLE_FILE,
DtEDITOR_READ_ONLY_FILE,
DtEDITOR_NO_FILE_ACCESS,
DtEDITOR_DIRECTORY,
DtEDITOR_CHAR_SPECIAL_FILE,
DtEDITOR_BLOCK_MODE_FILE,
DtEDITOR_UNWRITABLE_FILE,
DtEDITOR_WRITABLE_FILE,
DtEDITOR_SAVE_FAILED,
DtEDITOR_INSUFFICIENT_MEMORY,
DtEDITOR_NULLS_REMOVED
} DtEditorErrorCode;
/* Used with DtEditorChange() to specify Find and Change To strings */
typedef struct _DtEditorChangeValues {
char *find;
char *changeTo;
} DtEditorChangeValues;
/* Used with DtEditorFormat() to specify left margin, right margin *
* and justification styles. */
typedef struct _DtEditorFormatSettings {
int leftMargin;
int rightMargin;
unsigned int alignment;
} DtEditorFormatSettings;
/* Types used to tag data to/from the editor widget */
typedef enum _DtEditorDataFormat{
DtEDITOR_TEXT,
DtEDITOR_WCHAR,
DtEDITOR_DATA
} DtEditorDataFormat;
/* Types used to pass data to/from the editor widget */
typedef struct _DtEditor_DataObj {
unsigned int length;
void *buf;
} DtEditor_DataObj;
typedef struct _DtEditorContentRec {
DtEditorDataFormat type;
union {
char *string;
wchar_t *wchar;
DtEditor_DataObj data;
} value;
} DtEditorContentRec;
/* Widget class and instance */
typedef struct _DtEditorClassRec *DtEditorClass;
typedef struct _DtEditorRec *DtEditorWidget;
/*
* Data
*/
/* Widget class */
externalref WidgetClass dtEditorWidgetClass;
/*
* Functions
*/
extern Widget DtCreateEditor(
Widget parent,
char *name,
ArgList arglist,
Cardinal argcount);
extern DtEditorErrorCode DtEditorAppend(
Widget widget,
DtEditorContentRec *data);
extern DtEditorErrorCode DtEditorAppendFromFile(
Widget widget,
char *fileName);
extern Boolean DtEditorChange(
Widget widget,
DtEditorChangeValues *findChangeStrings,
unsigned int instanceToChange);
extern Boolean DtEditorCheckForUnsavedChanges(
Widget widget);
extern Boolean DtEditorClearSelection(
Widget widget);
extern Boolean DtEditorCopyToClipboard(
Widget widget);
extern Boolean DtEditorCutToClipboard(
Widget widget);
extern Boolean DtEditorDeleteSelection(
Widget widget);
extern Boolean DtEditorDeselect(
Widget widget);
extern void DtEditorDisableRedisplay(
Widget widget);
extern void DtEditorEnableRedisplay(
Widget widget);
extern Boolean DtEditorFind(
Widget widget,
char * find);
extern DtEditorErrorCode DtEditorFormat(
Widget widget,
DtEditorFormatSettings *formatSettings,
unsigned int amountToFormat);
extern DtEditorErrorCode DtEditorGetContents(
Widget widget,
DtEditorContentRec *data,
Boolean hardCarriageReturns,
Boolean markContentsAsSaved);
extern XmTextPosition DtEditorGetInsertionPosition(
Widget widget);
extern XmTextPosition DtEditorGetLastPosition(
Widget widget);
extern Widget DtEditorGetMessageTextFieldID(
Widget widget);
extern void DtEditorGetSizeHints(
Widget widget,
XSizeHints *pHints);
extern void DtEditorGoToLine(
Widget widget,
int lineNumber);
extern DtEditorErrorCode DtEditorInsert(
Widget widget,
DtEditorContentRec *data);
extern DtEditorErrorCode DtEditorInsertFromFile(
Widget widget,
char *fileName);
extern void DtEditorInvokeFindChangeDialog(
Widget widget);
extern void DtEditorInvokeFormatDialog(
Widget widget);
extern DtEditorErrorCode DtEditorInvokeSpellDialog(
Widget widget);
extern Boolean DtEditorPasteFromClipboard(
Widget widget);
extern DtEditorErrorCode DtEditorReplace(
Widget widget,
XmTextPosition startPos,
XmTextPosition endPos,
DtEditorContentRec *data);
extern DtEditorErrorCode DtEditorReplaceFromFile(
Widget widget,
XmTextPosition startPos,
XmTextPosition endPos,
char *fileName);
extern void DtEditorReset(
Widget widget);
extern DtEditorErrorCode DtEditorSaveContentsToFile(
Widget widget,
char *fileName,
Boolean overwriteIfExists,
Boolean hardCarriageReturns,
Boolean markContentsAsSaved);
extern Boolean DtEditorSelectAll(
Widget widget);
extern DtEditorErrorCode DtEditorSetContents(
Widget widget,
DtEditorContentRec *data);
extern DtEditorErrorCode DtEditorSetContentsFromFile(
Widget widget,
char *fileName);
extern void DtEditorSetInsertionPosition(
Widget widget,
XmTextPosition position);
extern void DtEditorTraverseToEditor(
Widget widget);
extern Boolean DtEditorUndoEdit(
Widget widget);
#ifdef __cplusplus
}
#endif
#endif /* _Dt_Editor_h */

710
cde/include/Dt/EditorP.h Normal file
View File

@@ -0,0 +1,710 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: EditorP.h /main/4 1996/06/19 11:28:20 cde-dec $ */
/**********************************<+>*************************************
***************************************************************************
**
** File: EditorP.h
**
** Project: DtEditor widget
**
** Description:
** -----------
** Private include file for the DtEditor widget, text editor class.
**
*******************************************************************
*
* (c) Copyright 1993, 1994 Hewlett-Packard Company
* (c) Copyright 1993, 1994 International Business Machines Corp.
* (c) Copyright 1993, 1994 Sun Microsystems, Inc.
* (c) Copyright 1993, 1994 Unix System Labs, Inc., a subsidiary of Novell, Inc.
*
********************************************************************
**
**
**************************************************************************
**********************************<+>*************************************/
#ifndef _DtEditorP_h
#define _DtEditorP_h
#include <Dt/Editor.h>
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <X11/StringDefs.h>
#include <X11/Intrinsic.h>
#include <X11/Xatom.h>
#include <Xm/Protocols.h>
#include <Xm/XmP.h>
#include <Xm/FormP.h>
#include <Xm/TextP.h>
#include "MacrosP.h"
#include <Dt/Dts.h>
#ifdef SENTINEL
#include <sentinel.h>
#endif /* SENTINEL */
/****************************************************************
*
* Defines
*
****************************************************************/
#define READ_ACCESS 1
#define WRITE_ACCESS 2
#define REPLACE 0
#define FIND 1
#define SPELL 2
#define UNKNOWN_ACTION -1
#define EXTEND_SELECTION 0
#define ICON_FOCUSED 1
#define NO_DELETION_IN_PROGRESS -999
#ifndef DtUNSPECIFIED
#define DtUNSPECIFIED (~0)
#endif
#define CLOSE_BUTTON DTWIDGET_GETMESSAGE( \
MS_Common, MSG_CLOSE, _DtMsgCommon_0000)
#define HELP_BUTTON DTWIDGET_GETMESSAGE( \
MS_Common, MSG_HELP, _DtMsgCommon_0001)
#define FORMAT_SETTINGS DTWIDGET_GETMESSAGE( \
MS_Editor, EDITOR_FORMAT_SETTINGS, _DtMsgEditor_0000)
#define RIGHT_MARGIN DTWIDGET_GETMESSAGE( \
MS_Editor, EDITOR_RIGHT_MARGIN, _DtMsgEditor_0001)
#define LEFT_MARGIN DTWIDGET_GETMESSAGE( \
MS_Editor, EDITOR_LEFT_MARGIN, _DtMsgEditor_0002)
#define LEFT_ALIGN DTWIDGET_GETMESSAGE( \
MS_Editor, EDITOR_LEFT_ALIGN, _DtMsgEditor_0003)
#define RIGHT_ALIGN DTWIDGET_GETMESSAGE( \
MS_Editor, EDITOR_RIGHT_ALIGN, _DtMsgEditor_0004)
#define JUSTIFY DTWIDGET_GETMESSAGE( \
MS_Editor, EDITOR_JUSTIFY, _DtMsgEditor_0005)
#define CENTER DTWIDGET_GETMESSAGE( \
MS_Editor, EDITOR_CENTER, _DtMsgEditor_0006)
#define PARAGRAPH DTWIDGET_GETMESSAGE( \
MS_Editor, EDITOR_PARAGRAPH, _DtMsgEditor_0007)
#define ALL DTWIDGET_GETMESSAGE( \
MS_Editor, EDITOR_ALL, _DtMsgEditor_0008)
#define SPELL_TITLE DTWIDGET_GETMESSAGE( \
MS_Editor, EDITOR_SPELL_TITLE, _DtMsgEditor_0009)
#define FIND_TITLE DTWIDGET_GETMESSAGE( \
MS_Editor, EDITOR_FIND_TITLE, _DtMsgEditor_0010)
#define MISSPELLED DTWIDGET_GETMESSAGE( \
MS_Editor, EDITOR_MISSPELLED, _DtMsgEditor_0011)
#define FIND_LABEL DTWIDGET_GETMESSAGE( \
MS_Editor, EDITOR_FIND_LABEL, _DtMsgEditor_0012)
#define CHANGE_LABEL DTWIDGET_GETMESSAGE( \
MS_Editor, EDITOR_CHANGE_LABEL, _DtMsgEditor_0013)
#define FIND_BUTTON DTWIDGET_GETMESSAGE( \
MS_Editor, EDITOR_FIND_BUTTON, _DtMsgEditor_0014)
#define CHANGE_BUTTON DTWIDGET_GETMESSAGE( \
MS_Editor, EDITOR_CHANGE_BUTTON, _DtMsgEditor_0015)
#define CHNG_ALL_BUTTON DTWIDGET_GETMESSAGE( \
MS_Editor, EDITOR_CHNG_ALL_BUTTON, _DtMsgEditor_0016)
#define NO_FIND DTWIDGET_GETMESSAGE( \
MS_Editor, EDITOR_NO_FIND, _DtMsgEditor_0017)
#define INFO_TITLE DTWIDGET_GETMESSAGE( \
MS_Editor, EDITOR_INFO_TITLE, _DtMsgEditor_0018)
#define LINE DTWIDGET_GETMESSAGE( \
MS_Editor, EDITOR_LINE, _DtMsgEditor_0019)
#define TOTAL DTWIDGET_GETMESSAGE( \
MS_Editor, EDITOR_TOTAL, _DtMsgEditor_0020)
#define OVR DTWIDGET_GETMESSAGE( \
MS_Editor, EDITOR_OVR, _DtMsgEditor_0021)
#define INS DTWIDGET_GETMESSAGE( \
MS_Editor, EDITOR_INS, _DtMsgEditor_0022)
#define BAD_FILTER DTWIDGET_GETMESSAGE( \
MS_Editor, EDITOR_FILTER_ERROR, _DtMsgEditor_0023)
#define BAD_FILTER2 DTWIDGET_GETMESSAGE( \
MS_Editor, EDITOR_FILTER_ERROR2, _DtMsgEditor_0024)
#define ERROR_TITLE DTWIDGET_GETMESSAGE( \
MS_Editor, EDITOR_ERROR_TITLE, _DtMsgEditor_0025)
/****************************************************************
*
* Structures
*
****************************************************************/
typedef struct _AdjRec {
int bflag; /* -b (blanks) option */
int cflag; /* -c (center) option */
int jflag; /* -j (justify) option */
int rflag; /* -r (right justify) */
int tabsize; /* tab size in use */
long margin;
FILE *infp; /* file pointer for unformatted data */
FILE *outfp; /* file pointer for formatted data */
} AdjRec, *AdjRecPtr;
/****************************************************************
*
* Deleted text structure definition
*
****************************************************************/
typedef struct _DtEditorUndoRec {
char *deletedText;
XmTextPosition deletionStart;
XmTextPosition insertStart;
int insertionLength;
} DtEditorUndoRec;
/****************************************************************
*
* Data structures for miscellaneous edit information
*
****************************************************************/
typedef struct _DtEditorEditStuff
{
int blinkRate,
maxLength;
short columns, rows;
XmTextPosition cursorPos,
topCharacter;
Boolean autoShowCursorPos,
cursorPosVisible,
editable,
overstrikeMode,
scrollHorizontal,
scrollLeft,
scrollTop,
scrollVertical,
wordWrap;
Pixel background,
foreground;
int fontWidth, /* widest font, used for formatting */
fontHeight; /* font height; used for WM size hints */
DtEditorUndoRec undo; /* holds deleted text for undo */
Boolean loadingAllNewData,
unreadChanges; /* Data changed since read by app? */
SetSelectionProc setSelection;
} DtEditorEditStuff;
/****************************************************************
*
* Data structures for Search
*
****************************************************************/
typedef struct _DtEditorSearchWidgets {
Widget formDlg,
listLbl,
spellList,
findLbl,
findText,
replaceLbl,
replaceText,
separator,
findBtn,
replaceBtn,
replaceAllBtn,
closeBtn,
helpBtn;
} DtEditorSearchWidgets;
typedef struct _DtEditorSearchStuff {
DtEditorSearchWidgets widgets;
int search_dialog_mode;
char *search_string, /* last string searched for */
*replace_string, /* last replacement string */
*misspelled_string, /* last misspelled word selected */
*spellFilter;
Boolean misspelled_found;
Dimension buttonHeight;
XmString spellTitle,
fndChngTitle,
changeAllButtonLabel,
changeButtonLabel,
changeFieldLabel,
findButtonLabel,
findFieldLabel,
misspelledListLabel;
} DtEditorSearchStuff;
/****************************************************************
*
* Data structures for Format
*
****************************************************************/
typedef struct _DtEditorFormatWidgets {
Widget format_dialog,
right_label,
left_label,
rightMargField, /* format right margin text field */
leftMargField, /* format left margin text field */
radio_box,
left_just, /* format type toggle button */
right_just, /* format type toggle button */
both_just, /* format type toggle button */
center, /* format type toggle button */
separator,
paragraph,
all,
close,
help;
} DtEditorFormatWidgets;
typedef struct _DtEditorFormatStuff {
DtEditorFormatWidgets widgets;
XmString centerToggleLabel,
formatAllButtonLabel,
formatParaButtonLabel,
formatDialogTitle,
justifyToggleLabel,
leftAlignToggleLabel,
leftMarginFieldLabel,
rightAlignToggleLabel,
rightMarginFieldLabel;
} DtEditorFormatStuff;
/****************************************************************
*
* Data structures for the Status Line
*
****************************************************************/
typedef struct _status {
Boolean showStatusLine;
int currentLine,
lastLine;
XmString ovr,
ins,
currentLineLabel,
totalLineLabel;
Widget statusArea,
lineLabel,
lineText,
totalLabel,
totalText,
overstrikeLabel,
messageText;
} DtEditorStatusStuff;
/****************************************************************
*
* Data structures for holding warning dialogs
*
****************************************************************/
typedef struct _textlibwarning {
Widget warningDialog;
XmString infoDialogTitle;
} DtEditorWarningStuff;
/****************************************************************
*
* Class Part structure definition
*
****************************************************************/
typedef struct _DtEditorClassPart
{
int ignore;
} DtEditorClassPart;
/****************************************************************
*
* Full Class Record declaration
*
****************************************************************/
typedef struct _DtEditorClassRec
{
CoreClassPart core_class;
CompositeClassPart composite_class;
ConstraintClassPart constraint_class;
XmManagerClassPart manager_class;
XmBulletinBoardClassPart bulletin_board_class;
XmFormClassPart form_class;
DtEditorClassPart editor_class;
} DtEditorClassRec;
externalref DtEditorClassRec dtEditorClassRec;
/****************************************************************
*
* Resources added by the Editor widget
*
****************************************************************/
typedef struct _DtEditorPart
{
Display *display;
Widget topLevelShell,
/*
* scrolled text widget
*/
text;
Dimension width; /* the text widget width */
/* All data for Edit functions */
DtEditorEditStuff editStuff;
/* All data for Search functions */
DtEditorSearchStuff searchStuff;
/* All data for Format functions */
DtEditorFormatStuff formatStuff;
/* All data for warning dialogs functions */
DtEditorWarningStuff warningStuff;
/* All data for the status line */
DtEditorStatusStuff statusStuff;
XtAppContext app_context;
/*
* The editor widget's callbacks
*/
Boolean textSelectCbCalled;
XtCallbackList textSelect;
XtCallbackList textDeselect;
} DtEditorPart;
/****************************************************************
*
* Full Instance Record declaration
*
****************************************************************/
typedef struct _DtEditorRec
{
CorePart core;
CompositePart composite;
ConstraintPart constraint;
XmManagerPart manager;
XmBulletinBoardPart bulletin_board;
XmFormPart form;
DtEditorPart editor;
} DtEditorRec;
/****************************************************************
*
* MACRO DEFINITIONS
*
****************************************************************/
/*
* Class and Instance Macros
*/
/*
* Note: DtEditor utilizes the bulletin board's dialog_title and
* text_translations fields to hold its dialogTitle and textTranslations
* resources
*/
#define E_dialogTitle(m) (m -> bulletin_board.dialog_title)
#define E_textTranslations(m) (m -> bulletin_board.text_translations)
#define E_buttonFontList(m) (m -> bulletin_board.button_font_list)
#define E_labelFontList(m) (m -> bulletin_board.label_font_list)
#define E_textFontList(m) (m -> bulletin_board.text_font_list)
#define M_app_context(m) (m -> editor.app_context)
#define M_display(m) (m -> editor.display)
#define M_topLevelShell(m) (m -> editor.topLevelShell)
#define M_text(m) (m -> editor.text)
#define M_textWidth(m) (m -> editor.width)
/* callbacks */
#define M_textSelect(m) (m -> editor.textSelect)
#define M_textDeselect(m) (m -> editor.textDeselect)
#define M_textSelectCbCalled(m) (m -> editor.textSelectCbCalled)
/* editStuff - scrolled text resources */
#define M_autoShowCursorPos(m) (m->editor.editStuff.autoShowCursorPos)
#define M_blinkRate(m) (m -> editor.editStuff.blinkRate)
#define M_columns(m) (m -> editor.editStuff.columns)
#define M_cursorPos(m) (m -> editor.editStuff.cursorPos)
#define M_cursorPosVisible(m) (m -> editor.editStuff.cursorPosVisible)
#define M_editable(m) (m -> editor.editStuff.editable)
#define M_fontWidth(m) (m -> editor.editStuff.fontWidth)
#define M_fontHeight(m) (m -> editor.editStuff.fontHeight)
#define M_maxLength(m) (m -> editor.editStuff.maxLength)
#define M_overstrikeMode(m) (m -> editor.editStuff.overstrikeMode)
#define M_rows(m) (m -> editor.editStuff.rows)
#define M_scrollHorizontal(m) (m -> editor.editStuff.scrollHorizontal)
#define M_scrollLeftSide(m) (m -> editor.editStuff.scrollLeft)
#define M_scrollTopSide(m) (m -> editor.editStuff.scrollTop)
#define M_scrollVertical(m) (m -> editor.editStuff.scrollVertical)
#define M_topCharacter(m) (m -> editor.editStuff.topCharacter)
#define M_wordWrap(m) (m -> editor.editStuff.wordWrap)
#define M_textBackground(m) (m -> editor.editStuff.background)
#define M_textForeground(m) (m -> editor.editStuff.foreground)
/* editStuff - scrolled text related data */
#define M_deletionStart(m) (m -> editor.editStuff.undo.deletionStart)
#define M_deletedText(m) (m -> editor.editStuff.undo.deletedText)
#define M_insertStart(m) (m -> editor.editStuff.undo.insertStart)
#define M_insertionLength(m) (m -> editor.editStuff.undo.insertionLength)
#define M_loadingAllNewData(m) (m -> editor.editStuff.loadingAllNewData)
#define M_unreadChanges(m) (m -> editor.editStuff.unreadChanges)
#define M_setSelection(m) (m -> editor.editStuff.setSelection)
/* searchStuff */
#define M_search_dialogMode(m) (m ->editor.searchStuff.search_dialog_mode)
#define M_spellTitle(m) (m -> editor.searchStuff.spellTitle)
#define M_fndChngTitle(m) (m -> editor.searchStuff.fndChngTitle)
#define E_changeAllButtonLabel(m) (m->editor.searchStuff.changeAllButtonLabel)
#define E_changeButtonLabel(m) (m->editor.searchStuff.changeButtonLabel)
#define E_changeFieldLabel(m) (m->editor.searchStuff.changeFieldLabel)
#define E_findButtonLabel(m) (m->editor.searchStuff.findButtonLabel)
#define E_findFieldLabel(m) (m->editor.searchStuff.findFieldLabel)
#define E_misspelledListLabel(m) (m->editor.searchStuff.misspelledListLabel)
#define M_search_string(m) (m -> editor.searchStuff.search_string)
#define M_replace_string(m) (m -> editor.searchStuff.replace_string)
#define M_misspelled_string(m) (m -> editor.searchStuff.misspelled_string)
#define M_misspelled_found(m) (m -> editor.searchStuff.misspelled_found)
#define M_spellFilter(m) (m -> editor.searchStuff.spellFilter)
#define M_replaceText(m) (m -> editor.searchStuff.widgets.replaceText)
#define M_findText(m) (m -> editor.searchStuff.widgets.findText)
#define M_search_replaceLbl(m) (m -> editor.searchStuff.widgets.replaceLbl)
#define M_search_buttonHeight(m) (m -> editor.searchStuff.buttonHeight)
#define M_search_dialog(m) (m -> editor.searchStuff.widgets.formDlg)
#define M_search_closeBtn(m) (m -> editor.searchStuff.widgets.closeBtn)
#define M_search_helpBtn(m) (m -> editor.searchStuff.widgets.helpBtn)
#define M_search_findBtn(m) (m -> editor.searchStuff.widgets.findBtn)
#define M_search_replaceBtn(m) (m -> editor.searchStuff.widgets.replaceBtn)
#define M_search_replaceAllBtn(m)\
(m -> editor.searchStuff.widgets.replaceAllBtn)
#define M_search_spellList(m) (m -> editor.searchStuff.widgets.spellList)
#define M_search_listLbl(m) (m -> editor.searchStuff.widgets.listLbl)
#define M_search_findLbl(m) (m -> editor.searchStuff.widgets.findLbl)
#define M_search_separator(m) (m -> editor.searchStuff.widgets.separator)
/* formatStuff */
#define E_format_centerToggleLabel(m) (m->editor.formatStuff.centerToggleLabel)
#define E_format_formatAllButtonLabel(m)\
(m->editor.formatStuff.formatAllButtonLabel)
#define E_format_formatParagraphButtonLabel(m)\
(m->editor.formatStuff.formatParaButtonLabel)
#define E_format_dialogTitle(m) (m->editor.formatStuff.formatDialogTitle)
#define E_format_justifyToggleLabel(m)\
(m->editor.formatStuff.justifyToggleLabel)
#define E_format_leftAlignToggleLabel(m)\
(m->editor.formatStuff.leftAlignToggleLabel)
#define E_format_leftMarginFieldLabel(m)\
(m->editor.formatStuff.leftMarginFieldLabel)
#define E_format_rightAlignToggleLabel(m)\
(m->editor.formatStuff.rightAlignToggleLabel)
#define E_format_rightMarginFieldLabel(m)\
(m->editor.formatStuff.rightMarginFieldLabel)
#define M_format_all(m) (m -> editor.formatStuff.widgets.all)
#define M_format_bothJust(m) (m -> editor.formatStuff.widgets.both_just)
#define M_format_center(m) (m -> editor.formatStuff.widgets.center)
#define M_format_close(m) (m -> editor.formatStuff.widgets.close)
#define M_format_dialog(m) (m -> editor.formatStuff.widgets.format_dialog)
#define M_format_help(m) (m -> editor.formatStuff.widgets.help)
#define M_format_leftJust(m) (m -> editor.formatStuff.widgets.left_just)
#define M_format_leftLabel(m) (m -> editor.formatStuff.widgets.left_label)
#define M_format_leftMarginField(m) (m -> editor.formatStuff.widgets.leftMargField)
#define M_format_paragraph(m) (m -> editor.formatStuff.widgets.paragraph)
#define M_format_radioBox(m) (m -> editor.formatStuff.widgets.radio_box)
#define M_format_rightJust(m) (m -> editor.formatStuff.widgets.right_just)
#define M_format_rightLabel(m) (m -> editor.formatStuff.widgets.right_label)
#define M_format_rightMarginField(m) (m -> editor.formatStuff.widgets.rightMargField)
#define M_format_separator(m) (m -> editor.formatStuff.widgets.separator)
/* statusStuff */
#define M_status_showStatusLine(m) (m -> editor.statusStuff.showStatusLine)
#define M_status_currentLine(m) (m -> editor.statusStuff.currentLine)
#define M_status_lastLine(m) (m -> editor.statusStuff.lastLine)
#define M_status_overstrikeLabel(m) (m -> editor.statusStuff.ovr)
#define M_status_insertLabel(m) (m -> editor.statusStuff.ins)
#define E_status_currentLineLabel(m) (m -> editor.statusStuff.currentLineLabel)
#define E_status_totalLineCountLabel(m) (m->editor.statusStuff.totalLineLabel)
#define M_status_statusArea(m) (m -> editor.statusStuff.statusArea)
#define M_status_lineLabel(m) (m -> editor.statusStuff.lineLabel)
#define M_status_lineText(m) (m -> editor.statusStuff.lineText)
#define M_status_totalLabel(m) (m -> editor.statusStuff.totalLabel)
#define M_status_totalText(m) (m -> editor.statusStuff.totalText)
#define M_status_overstrikeWidget(m) (m->editor.statusStuff.overstrikeLabel)
#define M_status_messageText(m) (m -> editor.statusStuff.messageText)
/* warningStuff */
#define M_gen_warning(m) (m ->editor.warningStuff.warningDialog)
#define E_infoDialogTitle(m) (m ->editor.warningStuff.infoDialogTitle)
/*
* Misc macros
*/
#define M_editor(m) ((DtEditorWidget) m ->core.parent -> core.parent)
/****************************************************************
*
* Private library functions
*
****************************************************************/
/*** library-private functions in Editor.c ***/
extern void _DtEditorResetUndo(
DtEditorWidget editor);
extern void _DtEditorUpdateLineDisplay(
DtEditorWidget editor,
int currentLine,
Boolean forceUpdate );
extern int _DtEditorGetLineIndex(
XmTextWidget tw,
XmTextPosition pos);
extern void _DtEditorWarning(
DtEditorWidget pPriv,
char *mess,
unsigned char dialogType);
extern DtEditorErrorCode _DtEditorValidateFileAccess(
char *fileName,
int accessType );
extern void _DtEditorHelpSearchCB (
Widget w,
caddr_t client_data ,
caddr_t call_data );
extern void _DtEditorHelpSearchSpellCB (
Widget w,
caddr_t client_data ,
caddr_t call_data );
extern void _DtEditorHelpSearchFindCB (
Widget w,
caddr_t client_data ,
caddr_t call_data );
extern void _DtEditorHelpSearchChangeCB (
Widget w,
caddr_t client_data ,
caddr_t call_data );
/*** library-private functions in EditAreaData.c ***/
extern char *_DtEditorGetPointer(
char *pString,
int startChar);
/*** library-private functions in EditorCalls.c ***/
extern void _DtEditorModifyVerifyCB(
Widget w,
caddr_t client_data,
caddr_t call_data );
/*** library-private functions in SearchCalls.c ***/
extern void _DtEditorSearchMapCB(
Widget w,
caddr_t client_data,
caddr_t call_data );
extern int _DtEditor_CountCharacters(
char *str,
int num_count_bytes);
extern void _DtEditorDialogSearchCB(
Widget w,
caddr_t client_data,
caddr_t call_data );
extern void _DtEditorDialogReplaceCB(
Widget w,
caddr_t client_data,
caddr_t call_data );
extern void _DtEditorDialogReplaceAllCB(
Widget w,
caddr_t client_data,
caddr_t call_data );
extern void _DtEditorDialogFindCancelCB(
Widget w,
caddr_t client_data,
caddr_t call_data );
extern void _DtEditorMisspelledSelectCB(
Widget w,
caddr_t client_data,
caddr_t call_data );
extern void _DtEditorMisspelledDblClickCB(
Widget w,
caddr_t client_data,
caddr_t call_data );
extern void _DtEditorFindTextChangedCB(
Widget w,
caddr_t client_data,
caddr_t call_data );
extern void _DtEditorReplaceTextChangedCB(
Widget w,
caddr_t client_data,
caddr_t call_data );
extern void _DtEditorSetFindSensitivity(
DtEditorWidget pPriv,
Boolean sensitivity);
extern void _DtEditorSetReplaceSensitivity(
DtEditorWidget pPriv,
Boolean sensitivity);
extern void _DtEditorSetReplaceAllSensitivity(
DtEditorWidget pPriv,
Boolean sensitivity);
/*** library-private functions in SearchDlg.c ***/
extern void _DtEditorSearch(
DtEditorWidget pPriv,
Boolean spell,
Boolean createonly );
#endif /* _DtEditorP_h */

View File

@@ -0,0 +1,124 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/*
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
* (c) Copyright 1993, 1994 International Business Machines Corp. *
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
* (c) Copyright 1993, 1994 Novell, Inc. *
*/
/****************************<+>*************************************
**
** File: EnvControlI.h
**
** RCS: $TOG: EnvControlI.h /main/6 1998/07/30 12:14:02 mgreess $
**
** Project: DT Runtime Library -- Private header
**
** Description: Defines structures, and parameters used
** for communication with the environment
**
** (c) Copyright 1992-94 by Hewlett-Packard Company
**
****************************<+>*************************************/
/*******************************************************************
The environment variables
*******************************************************************/
#define BIN_PATH_ENVIRON "PATH"
#define NLS_PATH_ENVIRON "NLSPATH"
#define SYSTEM_APPL_PATH_ENVIRON "XFILESEARCHPATH"
#define PM_PATH_ENVIRON "XMICONSEARCHPATH"
#define BM_PATH_ENVIRON "XMICONBMSEARCHPATH"
/*******************************************************************
The default DT path strings, architecture-dependent
*******************************************************************/
#define BIN_PATH_STRING CDE_INSTALLATION_TOP "/bin"
#define NLS_PATH_STRING CDE_INSTALLATION_TOP "/lib/nls/msg/%L/%N.cat:" \
CDE_INSTALLATION_TOP "/lib/nls/msg/C/%N.cat"
#if defined(sun)
#define X_BIN_PATH_STRING "/usr/openwin/bin"
#else
#define X_BIN_PATH_STRING "/usr/bin/X11"
#endif
/*
* Some notes on the behavior and use of the XFILESEARCHPATH component, as
* defined through the SYSTEM_APPL_PATH_STRING definition below:
*
* Its precedence in the lookup of X resources is fairly low--it can
* be overridden by XRM resources, by resources specified in
* the user's $HOME/.Xdefaults-<hostname> file, and by resources
* found using the $XUSERFILESEARCHPATH setting.
*
* The order of pathnames in the XFILESEARCHPATH is such that the first
* match satisfies the lookup, and the lookup stops there.
*
* We place the pathname components in our XFILESEARCHPATH such that
* the lookup goes, from first match attempt to last match attempt, as
* follows:
*
* - Custom resources: /etc/../$LANG
* - Custom resources: /etc/../C
* - Factory defaults: /opt/../$LANG --shipped with every localized system
* - Factory defaults: /opt/../C --shipped with every system
*
* These resources are used ONLY for the DT components themselves
* (not, for example, for MIT client resources).
*
* The CDE vendors retain the right to alter, remove, append to, and
* ignore any settings in the factory defaults locations. The vendors
* will not modify the settings in the "custom resources" locations.
*
*/
#define SYSTEM_APPL_PATH_STRING CDE_CONFIGURATION_TOP "/app-defaults/%L/%N:" \
CDE_CONFIGURATION_TOP "/app-defaults/C/%N:" \
CDE_INSTALLATION_TOP "/app-defaults/%L/%N:" \
CDE_INSTALLATION_TOP "/app-defaults/C/%N"
/**********************************************************************
* Data representation of the user's DT environment
**********************************************************************/
typedef struct environStruct {
char * pmPath;
char * binPath;
char * nlsPath;
char * sysApplPath;
char * bmPath;
} _environStruct;
/**********************************************************************
* Miscellaneous
**********************************************************************/
#define BV_BINPATH (1<<0)
#define BV_SYSAPPLPATH (1<<1)
#define BV_NLSPATH (1<<2)
#define BV_PMPATH (1<<3)
#define BV_BMPATH (1<<4)
#define MAX_ENV_STRING (2*BUFSIZ)
/**************************** eof **********************/

View File

@@ -0,0 +1,87 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/*
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
* (c) Copyright 1993, 1994 International Business Machines Corp. *
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
* (c) Copyright 1993, 1994 Novell, Inc. *
*/
/****************************<+>*************************************
**
** File: EnvControlP.h
**
** RCS: $TOG: EnvControlP.h /main/6 1998/07/30 12:13:45 mgreess $
** Project: DT Runtime Library
**
** Description: Defines structures, and parameters used
** for communication with the environment
**
** (c) Copyright 1990 by Hewlett-Packard Company
**
****************************<+>*************************************/
/******** Public Function Declarations ********/
#ifdef __cplusplus
extern "C" {
#endif
extern int _DtEnvControl(
int mode) ;
extern int _DtWsmSetBackdropSearchPath(
Screen *screen,
char *backdropDir,
Boolean useMultiColorIcons) ;
/******** End Public Function Declarations ********/
/**********************************************************************
* Command parameters to the function, which double as result codes.
* If the invocation is successful, the same is returned;
* else DT_ENV_NO_OP is returned.
DT_ENV_SET
Sets the DT environment.
DT_ENV_RESTORE_PRE_DT
Restores the pre-DT application environment
DT_ENV_RESTORE_POST_DT
Reinstalls the DT environment after a restoring pre-DT
environment
DT_ENV_NO_OP
Does nothing
DT_ENV_SET_BIN
Sets the DT environment PLUS sets the PATH= variable to
where the DT files live.
**********************************************************************/
#define DT_ENV_SET 0
#define DT_ENV_RESTORE_PRE_DT 1
#define DT_ENV_RESTORE_POST_DT 2
#define DT_ENV_NO_OP 3
#define DT_ENV_SET_BIN 4
#ifdef __cplusplus
}
#endif
/**************************** eof **********************/

63
cde/include/Dt/FileM.h Normal file
View File

@@ -0,0 +1,63 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: FileM.h /main/3 1995/10/26 15:21:35 rswiston $ */
/************************************<+>*************************************
****************************************************************************
**
** File: FileM.h
**
** Project: DT
**
** Description: Defines for the tool class and messages for the
** File Manager.
**
**
** (c) Copyright 1993, 1994 Hewlett-Packard Company
** (c) Copyright 1993, 1994 International Business Machines Corp.
** (c) Copyright 1993, 1994 Sun Microsystems, Inc.
** (c) Copyright 1993, 1994 Novell, Inc.
**
**
**
****************************************************************************
************************************<+>*************************************/
#ifndef _FileM_h
#define _FileM_h
#define FILE_MANAGER_TOOL_CLASS "FILEMGR"
#define FILE_MANAGER_CLASS_NAME "Dtfile"
#define FILE_MANAGER_RUN_SESSION_MSG "RUN_SESSION"
#define FILE_MANAGER_SHOW_HOME_MSG "SHOW_HOME_FOLDER"
#define FILE_MANAGER_SHOW_DIRECTORY_MSG "SHOW_FOLDER"
#define FILE_MANAGER_SHOW_TOOLS_MSG "SHOW_TOOLS"
#define SHOW_TRASH_MSG "SHOW_TRASH"
#define REMOVE_TRASH_MSG "REMOVE_TRASH"
#define EMPTY_TRASH_MSG "EMPTY_TRASH"
#endif /*_FileM_h*/
/* DON'T ADD ANYTHING AFTER THIS #endif */

169
cde/include/Dt/FileUtil.h Normal file
View File

@@ -0,0 +1,169 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/*
* File: FileUtil.h $XConsortium: FileUtil.h /main/4 1995/10/26 15:21:50 rswiston $
* Language: C
*
* (c) Copyright 1988, Hewlett-Packard Company, all rights reserved.
*
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
* (c) Copyright 1993, 1994 International Business Machines Corp. *
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
* (c) Copyright 1993, 1994 Novell, Inc. *
*/
#ifndef _FileUtil_h
#define _FileUtil_h
extern int _DtCreateDirs( char *path,
int mode) ;
/******************
*
* Function Name: _DtCreateDirs
*
* Description:
*
* This function is passed a directory path to create and the mode
* for the directory. It will create any of the parent directories
* on the path that do not already exist.
*
* This function may fail if any of the directories on the path already
* exist and are not writable. If some component of the path already
* exists and is not a directory, a failure will be returned.
*
* If some component of the path exists as a directory but does not have
* the specified mode, this will NOT cause a failure to be returned.
* This implies that if this function is called to create a writeable
* directory, it is possible for the function to return successfully
* but the directory may not actually be writable.
*
* Synopsis:
*
* status = _DtCreateDirs (path, mode);
*
* int status; Returns 0 on success and -1 on failure.
* char *path; The directory path to create.
* int mode; The file mode for setting any directories
* that are created.
*
******************/
extern int _DtIsOpenableDir( char *path) ;
/******************
*
* Function Name: _DtIsOpenableDir
*
* Description:
*
* This function takes a path as an argument and determines whether
* the path is a directory that can be opened. This function returns
* "1" if the path is an openable directory and "0" if it is not.
*
* The path can be in the Softbench "context" form of "host:/path/dir".
*
* Synopsis:
*
* status = _DtIsOpenableDir (cpath)
*
* int status; Returns 1 for openable directories,
* 0 otherwise.
* char *cpath; The directory name to test.
*
******************/
extern int
_DtIsOpenableDirContext(
char *path,
char **ret_path ) ;
/******************
*
* Function Name: _DtIsOpenableDirContext
*
* Description:
*
* This function takes a path as an argument and determines whether
* the path is a directory that can be opened. This function returns
* "1" if the path is an openable directory and "0" if it is not.
* In addition, if the calling function passes in another pointer,
* we will return the internal representation for the path.
*
* The path can be in the Softbench "context" form of "host:/path/dir".
*
* Synopsis:
*
* status = _DtIsOpenableDirContext (cpath, ret_ptr)
*
* int status; Returns 1 for openable directories,
* 0 otherwise.
* char *cpath; The directory name to test.
* char ** ret_ptr; Where to place internal format.
*
******************/
extern char * _DtReaddirLstat(
char *dir_name,
DIR *dirp,
struct stat *st_buf) ;
/******************
*
* Function Name: _DtReaddirLstat
*
* Description:
*
* This function reads the next entry out of a directory that has
* been opened with opendir and returns lstat information on it.
* For more information on reading a directory, see directory(3C).
* For more information on lstat information, see stat(2).
*
* This function returns a pointer to the full pathname of the directory
* entry. This memory is owned by this function and must not be
* freed. If the caller wants to keep the filename, it must make its
* own copy. When the end of the directory is encountered, NULL is
* returned.
*
* Synopsis:
*
* dir_entry = _DtReaddirLstat (dir_name, dirp, st_buf);
*
* char *dir_entry; The name of the current entry within the
* directory.
*
* char *dir_name; The full path name of the directory.
*
* DIR *dirp; A pointer to the directory [obtained from
* opendir(3C)].
*
* struct stat *st_buf; The lstat(2) information.
*
******************/
#endif /* _FileUtil_h */
/* DON'T ADD ANYTHING AFTER THIS #endif */

View File

@@ -0,0 +1,69 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/*
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
* (c) Copyright 1993, 1994 International Business Machines Corp. *
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
* (c) Copyright 1993, 1994 Novell, Inc. *
*/
/****************************<+>*************************************
**
** File: EnvControl.h
**
** RCS: $XConsortium: GetDispRes.h /main/4 1995/10/26 15:22:11 rswiston $
** Project: HP DT Runtime Library
**
** Description: Defines structures, and parameters used
** for communication with the environment
**
** (c) Copyright 1992 by Hewlett-Packard Company
**
****************************<+>*************************************/
/******** Function Declarations ********/
int _DtGetDisplayResolution(
Display *disp,
int screen) ;
/******** End Function Declarations ********/
/**********************************************************************
* Resolution threshold values (width of screen in pixels)
**********************************************************************/
#define _DT_HIGH_RES_MIN 1176
#define _DT_MED_RES_MIN 851
#define _DT_LOW_RES_MIN 512
/**********************************************************************
* Resolution types of a given screen
**********************************************************************/
#define NO_RES_DISPLAY 0
#define LOW_RES_DISPLAY 1
#define VGA_RES_DISPLAY 2
#define MED_RES_DISPLAY 3
#define HIGH_RES_DISPLAY 4
#define ALL_RES_DISPLAY 5
/**************************** eof **********************/

181
cde/include/Dt/HashP.h Normal file
View File

@@ -0,0 +1,181 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: HashP.h /main/4 1995/10/26 15:22:50 rswiston $ */
/*
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
* (c) Copyright 1993, 1994 International Business Machines Corp. *
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
* (c) Copyright 1993, 1994 Novell, Inc. *
*/
#ifdef REV_INFO
#ifndef lint
static char SCCSID[] = "OSF/Motif: @(#)_HashP.h 4.16 91/09/12";
#endif /* lint */
#endif /* REV_INFO */
/******************************************************************************
*******************************************************************************
*
* (c) Copyright 1989, 1990, 1991 OPEN SOFTWARE FOUNDATION, INC.
* (c) Copyright 1989, DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.
* (c) Copyright 1987, 1988, 1989, 1990, 1991 HEWLETT-PACKARD COMPANY
* ALL RIGHTS RESERVED
*
* THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED
* AND COPIED ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND
* WITH THE INCLUSION OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE OR
* ANY OTHER COPIES THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE
* AVAILABLE TO ANY OTHER PERSON. NO TITLE TO AND OWNERSHIP OF THE
* SOFTWARE IS HEREBY TRANSFERRED.
*
* THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT
* NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY OPEN SOFTWARE
* FOUNDATION, INC. OR ITS THIRD PARTY SUPPLIERS
*
* OPEN SOFTWARE FOUNDATION, INC. AND ITS THIRD PARTY SUPPLIERS,
* ASSUME NO RESPONSIBILITY FOR THE USE OR INABILITY TO USE ANY OF ITS
* SOFTWARE . OSF SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
* KIND, AND OSF EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES, INCLUDING
* BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE.
*
* Notice: Notwithstanding any other lease or license that may pertain to,
* or accompany the delivery of, this computer software, the rights of the
* Government regarding its use, reproduction and disclosure are as set
* forth in Section 52.227-19 of the FARS Computer Software-Restricted
* Rights clause.
*
* (c) Copyright 1989, 1990, 1991 Open Software Foundation, Inc. Unpublished - all
* rights reserved under the Copyright laws of the United States.
*
* RESTRICTED RIGHTS NOTICE: Use, duplication, or disclosure by the
* Government is subject to the restrictions as set forth in subparagraph
* (c)(1)(ii) of the Rights in Technical Data and Computer Software clause
* at DFARS 52.227-7013.
*
* Open Software Foundation, Inc.
* 11 Cambridge Center
* Cambridge, MA 02142
* (617)621-8700
*
* RESTRICTED RIGHTS LEGEND: This computer software is submitted with
* "restricted rights." Use, duplication or disclosure is subject to the
* restrictions as set forth in NASA FAR SUP 18-52.227-79 (April 1985)
* "Commercial Computer Software- Restricted Rights (April 1985)." Open
* Software Foundation, Inc., 11 Cambridge Center, Cambridge, MA 02142. If
* the contract contains the Clause at 18-52.227-74 "Rights in Data General"
* then the "Alternate III" clause applies.
*
* (c) Copyright 1989, 1990, 1991 Open Software Foundation, Inc.
* ALL RIGHTS RESERVED
*
*
* Open Software Foundation is a trademark of The Open Software Foundation, Inc.
* OSF is a trademark of Open Software Foundation, Inc.
* OSF/Motif is a trademark of Open Software Foundation, Inc.
* Motif is a trademark of Open Software Foundation, Inc.
* DEC is a registered trademark of Digital Equipment Corporation
* DIGITAL is a registered trademark of Digital Equipment Corporation
* X Window System is a trademark of the Massachusetts Institute of Technology
*
*******************************************************************************
******************************************************************************/
#ifndef __HashP_h
#define __HashP_h
#include <X11/Intrinsic.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* the structure is used as a common header part for different
* users of the hash functions in order to locate the key
*/
typedef XtPointer DtHashKey;
typedef DtHashKey (*DtGetHashKeyFunc)();
typedef Boolean (*DtHashEnumerateFunc)();
typedef void (*DtReleaseKeyProc)();
typedef struct _DtHashEntryPartRec {
unsigned int type:16;
unsigned int flags:16;
}DtHashEntryPartRec, *DtHashEntryPart;
typedef struct _DtHashEntryRec {
DtHashEntryPartRec hash;
}DtHashEntryRec, *DtHashEntry;
typedef struct _DtHashEntryTypePartRec {
unsigned int entrySize;
DtGetHashKeyFunc getKeyFunc;
XtPointer getKeyClientData;
DtReleaseKeyProc releaseKeyProc;
}DtHashEntryTypePartRec, *DtHashEntryTypePart;
typedef struct _DtHashEntryTypeRec {
DtHashEntryTypePartRec hash;
}DtHashEntryTypeRec, *DtHashEntryType;
typedef struct _DtHashTableRec *DtHashTable;
/******** Private Function Declarations for Hash.c ********/
extern void _DtRegisterHashEntry(
DtHashTable tab,
DtHashKey key,
DtHashEntry entry) ;
extern void _DtUnregisterHashEntry(
DtHashTable tab,
DtHashEntry entry) ;
extern DtHashEntry _DtEnumerateHashTable(
DtHashTable tab,
DtHashEnumerateFunc enumFunc,
XtPointer clientData) ;
extern DtHashEntry _DtKeyToHashEntry(
DtHashTable tab,
DtHashKey key) ;
extern DtHashTable _DtAllocHashTable(
DtHashEntryType *hashEntryTypes,
Cardinal numHashEntryTypes,
#if NeedWidePrototypes
int keyIsString) ;
#else
Boolean keyIsString) ;
#endif /* NeedWidePrototypes */
extern void _DtFreeHashTable(
DtHashTable hashTable) ;
/******** End Private Function Declarations ********/
#ifdef __cplusplus
} /* Close scope of 'extern "C"' declaration which encloses file. */
#endif
#endif /* HashP_h */
/* DON'T ADD ANYTHING AFTER THIS #endif */

266
cde/include/Dt/Help.h Normal file
View File

@@ -0,0 +1,266 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: Help.h /main/3 1995/10/26 12:23:24 rswiston $ */
/*
* (c) Copyright 1993, 1994 Hewlett-Packard Company
* (c) Copyright 1993, 1994 International Business Machines Corp.
* (c) Copyright 1993, 1994 Sun Microsystems, Inc.
* (c) Copyright 1993, 1994 Novell, Inc.
*/
#ifndef _Dt_Help_h
#define _Dt_Help_h
#include <X11/Intrinsic.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* Constants
*/
/* Common DtHelp Resources */
#ifndef DtNcloseCallback
#define DtNcloseCallback "closeCallback"
#endif
#ifndef DtNcolumns
#define DtNcolumns XmNcolumns
#endif
#ifndef DtNexecutionPolicy
#define DtNexecutionPolicy "executionPolicy"
#endif
#ifndef DtNhelpFile
#define DtNhelpFile "helpFile"
#endif
#ifndef DtNhelpOnHelpVolume
#define DtNhelpOnHelpVolume "helpOnHelpVolume"
#endif
#ifndef DtNhelpPrint
#define DtNhelpPrint "helpPrint"
#endif
#ifndef DtNhelpType
#define DtNhelpType "helpType"
#endif
#ifndef DtNhelpVolume
#define DtNhelpVolume "helpVolume"
#endif
#ifndef DtNhyperLinkCallback
#define DtNhyperLinkCallback "hyperLinkCallback"
#endif
#ifndef DtNlocationId
#define DtNlocationId "locationId"
#endif
#ifndef DtNmanPage
#define DtNmanPage "manPage"
#endif
#ifndef DtNminimizeButtons
#define DtNminimizeButtons XmNminimizeButtons
#endif
#ifndef DtNpaperSize
#define DtNpaperSize "paperSize"
#endif
#ifndef DtNprinter
#define DtNprinter "printer"
#endif
#ifndef DtNrows
#define DtNrows XmNrows
#endif
#ifndef DtNscrollBarPolicy
#define DtNscrollBarPolicy "scrollBarPolicy"
#endif
#ifndef DtNstringData
#define DtNstringData "stringData"
#endif
#ifndef DtCCallback
#define DtCCallback XmCCallback
#endif
#ifndef DtCCloseCallback
#define DtCCloseCallback "CloseCallback"
#endif
#ifndef DtCColumns
#define DtCColumns XmCColumns
#endif
#ifndef DtCExecutionPolicy
#define DtCExecutionPolicy "ExecutionPolicy"
#endif
#ifndef DtCHelpFile
#define DtCHelpFile "HelpFile"
#endif
#ifndef DtCHelpOnHelpVolume
#define DtCHelpOnHelpVolume "HelpOnHelpVolume"
#endif
#ifndef DtCHelpPrint
#define DtCHelpPrint "HelpPrint"
#endif
#ifndef DtCHelpType
#define DtCHelpType "HelpType"
#endif
#ifndef DtCHelpVolume
#define DtCHelpVolume "HelpVolume"
#endif
#ifndef DtCHyperLinkCallback
#define DtCHyperLinkCallback "HyperLinkCallback"
#endif
#ifndef DtCLocationId
#define DtCLocationId "LocationId"
#endif
#ifndef DtCManPage
#define DtCManPage "ManPage"
#endif
#ifndef DtCMinimizeButtons
#define DtCMinimizeButtons XmCMinimizeButtons
#endif
#ifndef DtCPaperSize
#define DtCPaperSize "PaperSize"
#endif
#ifndef DtCPrinter
#define DtCPrinter "Printer"
#endif
#ifndef DtCRows
#define DtCRows XmCRows
#endif
#ifndef DtCScrollBarPolicy
#define DtCScrollBarPolicy "ScrollBarPolicy"
#endif
#ifndef DtCStringData
#define DtCStringData "StringData"
#endif
/* Representation types */
#ifndef DtRDtExecutionPolicy
#define DtRDtExecutionPolicy "DtExecutionPolicy"
#endif
#ifndef DtRDtHelpType
#define DtRDtHelpType "DtHelpType"
#endif
#ifndef DtRDtPaperSize
#define DtRDtPaperSize "DtPaperSize"
#endif
#ifndef DtRDtScrollBarPolicy
#define DtRDtScrollBarPolicy "DtScrollBarPolicy"
#endif
/* DtHelpDialogCallbackStruct windowHint field */
#define DtHELP_POPUP_WINDOW 1
#define DtHELP_CURRENT_WINDOW 2
#define DtHELP_NEW_WINDOW 3
/* DtHelpDialogCallbackStruct hyperType field */
#define DtHELP_LINK_JUMP_NEW 1
#define DtHELP_LINK_TOPIC 1
#define DtHELP_LINK_MAN_PAGE 4
#define DtHELP_LINK_APP_DEFINE 5
#define DtHELP_LINK_TEXT_FILE 8
/* DtHelpDialogCallbackStruct reason field */
#define DtCR_HELP_LINK_ACTIVATE 1
#define DtCR_HELP_CLOSE 2
#define DtCR_HELP_HELP 3
/* Possible values for DtNscrollBarPolicy resource */
#define DtHELP_NO_SCROLLBARS 0
#define DtHELP_STATIC_SCROLLBARS 1
#define DtHELP_AS_NEEDED_SCROLLBARS 2
/* Possible values for DtNexecutionPolicy resource */
#define DtHELP_EXECUTE_NONE 0
#define DtHELP_EXECUTE_QUERY_ALL 1
#define DtHELP_EXECUTE_QUERY_UNALIASED 2
#define DtHELP_EXECUTE_ALL 3
/* Possible values for DtNhelpType resource */
#define DtHELP_TYPE_TOPIC 0
#define DtHELP_TYPE_STRING 1
#define DtHELP_TYPE_MAN_PAGE 2
#define DtHELP_TYPE_FILE 3
#define DtHELP_TYPE_DYNAMIC_STRING 4
/* Possible values for DtNpaperSize resource */
#define DtHELP_PAPERSIZE_LETTER 0
#define DtHELP_PAPERSIZE_LEGAL 1
#define DtHELP_PAPERSIZE_EXECUTIVE 2
#define DtHELP_PAPERSIZE_A4 3
#define DtHELP_PAPERSIZE_B5 4
/* DtHelpQuickGetChildGetChild() function */
#define DtHELP_QUICK_CLOSE_BUTTON 1
#define DtHELP_QUICK_PRINT_BUTTON 2
#define DtHELP_QUICK_HELP_BUTTON 3
#define DtHELP_QUICK_SEPARATOR 4
#define DtHELP_QUICK_MORE_BUTTON 5
#define DtHELP_QUICK_BACK_BUTTON 6
/* Return values for DtHelpReturnSelectedWidgetId() */
#define DtHELP_SELECT_ERROR -1
#define DtHELP_SELECT_VALID 0
#define DtHELP_SELECT_ABORT 1
#define DtHELP_SELECT_INVALID 2
/*
* Types
*/
typedef struct {
int reason;
XEvent *event;
char *locationId;
char *helpVolume;
char *specification;
int hyperType;
int windowHint;
} DtHelpDialogCallbackStruct;
/*
* Functions
*/
extern void DtHelpSetCatalogName(
char *catFile);
extern int DtHelpReturnSelectedWidgetId(
Widget parent,
Cursor cursor,
Widget *widget);
#ifdef __cplusplus
}
#endif
#endif /* _Dt_Help_h */

117
cde/include/Dt/HelpDialog.h Normal file
View File

@@ -0,0 +1,117 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: HelpDialog.h /main/3 1995/10/26 12:24:05 rswiston $ */
/*
* (c) Copyright 1993, 1994 Hewlett-Packard Company
* (c) Copyright 1993, 1994 International Business Machines Corp.
* (c) Copyright 1993, 1994 Sun Microsystems, Inc.
* (c) Copyright 1993, 1994 Novell, Inc.
*/
#ifndef _Dt_HelpDialog_h
#define _Dt_HelpDialog_h
#include <Dt/Help.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* Constants
*/
/* General Help Dialog-specific Resources */
#ifndef DtNmarginWidth
#define DtNmarginWidth XmNmarginWidth
#endif
#ifndef DtNmarginHeight
#define DtNmarginHeight XmNmarginHeight
#endif
#ifndef DtNshowNewWindowButton
#define DtNshowNewWindowButton "showNewWindowButton"
#endif
#ifndef DtNtopicTitle
#define DtNtopicTitle "topicTitle"
#endif
#ifndef DtNvisiblePathCount
#define DtNvisiblePathCount "visiblePathCount"
#endif
#ifndef DtCCallback
#define DtCCallback XmCCallback
#endif
#ifndef DtCMarginWidth
#define DtCMarginWidth XmCMarginWidth
#endif
#ifndef DtCMarginHeight
#define DtCMarginHeight XmCMarginHeight
#endif
#ifndef DtCShowNewWindowButton
#define DtCShowNewWindowButton "ShowNewWindowButton"
#endif
#ifndef DtCTopicTitle
#define DtCTopicTitle "TopicTitle"
#endif
#ifndef DtCVisiblePathCount
#define DtCVisiblePathCount "VisiblePathCount"
#endif
/*
* Types
*/
/* Widget class and instance */
typedef struct _DtHelpDialogWidgetClassRec * DtHelpDialogWidgetClass;
typedef struct _DtHelpDialogWidgetRec * DtHelpDialogWidget;
/*
* Data
*/
/* Widget class record */
externalref WidgetClass dtHelpDialogWidgetClass;
/*
* Functions
*/
extern Widget DtCreateHelpDialog(
Widget parent,
char *name,
ArgList arglist,
Cardinal argcount);
#ifdef __cplusplus
}
#endif
#endif /* _Dt_HelpDialog_h */

View File

@@ -0,0 +1,392 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: HelpDialogP.h /main/6 1996/04/13 11:55:10 ageorge $ */
/*************************************<+>*************************************
*****************************************************************************
**
** File: HelpDialogP.h
**
** Project: Cache Creek (Rivers) Project:
**
** Description: Privite Header file for HelpDialog.c
** -----------
**
** (c) Copyright 1987, 1988, 1989, 1990, 1991, 1992 Hewlett-Packard Company
**
** (c) Copyright 1993, 1994 Hewlett-Packard Company
** (c) Copyright 1993, 1994 International Business Machines Corp.
** (c) Copyright 1993, 1994 Sun Microsystems, Inc.
** (c) Copyright 1993, 1994 Novell, Inc.
**
*******************************************************************
*************************************<+>*************************************/
#ifndef _DtHelpDialogP_h
#define _DtHelpDialogP_h
#include <Xm/BulletinBP.h>
#include <Dt/HelpDialog.h>
#include "FileListUtilsI.h"
#include "GlobSearchP.h"
#define XmDIALOG_SUFFIX "_popup"
#define XmDIALOG_SUFFIX_SIZE 6
/* Defines for use in allocation geometry matrix. */
#define TB_MAX_WIDGETS_VERT 7
#define TB_MAX_NUM_WIDGETS 12
/****************************************************************
*
* Topic List Info Structure Definition (History & Jump Back Lists)
*
****************************************************************/
typedef struct _DtTopicListStruct {
char *locationId;
XmString topicTitleLbl;
char *helpVolume;
int topicType;
int pathLevel;
int scrollPosition;
struct _DtTopicListStruct *pNext;
struct _DtTopicListStruct *pPrevious;
} DtTopicListStruct;
/****************************************************************
*
* Volume List Info: History Dialog only.
*
****************************************************************/
typedef struct _DtHistoryListStruct {
XmString itemTitle;
int topicType;
int totalNodes;
struct _DtHistoryListStruct *pNext;
struct _DtTopicListStruct *pTopicHead;
struct _DtTopicListStruct *pTopicTale;
} DtHistoryListStruct;
/****************************************************************
*
* Help Callback return structure
*
****************************************************************/
typedef struct _DtHelpListStruct {
char * locationId;
Widget widget;
struct _DtHelpCommonHelpStuff * help;
struct _DtHelpListStruct * pNext;
struct _DtHelpListStruct * pPrevious;
} DtHelpListStruct;
/****************************************************************
*
* Kewword Search entry structure.
*
****************************************************************/
typedef struct {
char * keyWord;
Boolean matchesFindPattern;
} KeyEntry;
/* Class Part Structure Definition */
typedef struct
{
XtPointer extension; /* Pointer to extension record */
} DtHelpDialogWidgetClassPart;
/* Full class record declaration */
typedef struct _DtHelpDialogWidgetClassRec
{
CoreClassPart core_class;
CompositeClassPart composite_class;
ConstraintClassPart constraint_class;
XmManagerClassPart manager_class;
XmBulletinBoardClassPart bulletin_board_class;
DtHelpDialogWidgetClassPart selection_box_class;
} DtHelpDialogWidgetClassRec;
externalref DtHelpDialogWidgetClassRec dtHelpDialogWidgetClassRec;
typedef struct _DtHelpDisplayWidgetStuff
{
short textColumns; /* Columns Resource Value resource */
short textRows; /* Rows Resource Value resource */
char * locationId; /* Current Topic String resource */
char * helpVolume; /* Current Project File resource */
char * manPage; /* man page resource */
char * stringData; /* string data resource */
char * helpFile; /* help file resource */
unsigned char scrollBarPolicy; /* Scrollbar policy resource */
unsigned char executionPolicy; /* Link/script exec policy resource */
XtCallbackList hyperLinkCallback; /* Hypertext Callback resource */
_DtHelpVolumeHdl volumeHandle; /* handle of current volume */
unsigned char helpType; /* Current displayed file type resource */
char * topicTitleStr; /* title of topic */
int count; /* Nonexistent topic title count */
XmString topicTitleLbl; /* XmString title of topic */
Boolean firstTimePopupFlag; /* False, untel we map the widget */
} _DtHelpDisplayWidgetStuff;
typedef struct _DtHelpCommonHelpStuff
{
XtPointer pDisplayArea; /* Display widget handle */
/* for help on help */
char * helpOnHelpVolume; /* help on help volume resource */
DtHelpListStruct * pHelpListHead; /* Help List Pointer */
Widget onHelpDialog; /* help on help dialog */
char * sysVolumeSearchPath; /* system search path */
char * userVolumeSearchPath; /* user search path */
char * currentHelpFile; /* Current help file */
int topicOffset; /* Offset into help file */
char * topLevelId; /* Toplevel topic volume displayed */
int topLevelTopicOffset;
} _DtHelpCommonHelpStuff;
typedef struct _DtHelpGeneralHelpStuff
{
char * parentId; /* used for "Up" menu */
Boolean volumeFlag; /* set when to process new vol */
Widget definitionBox;
XtCallbackList closeCallback; /* Window Close Callback */
Dimension marginHeight;
Dimension marginWidth;
} _DtHelpGeneralHelpStuff;
typedef struct _DtHelpBrowserStuff
{
int visiblePathCount; /* Number of path lines shown */
XtPointer pTocArea; /* Toc area handle */
Widget volumeLabel;
Widget panedWindow;
Widget pathArea;
Boolean showTopLevelBtn;
Widget btnBoxBackBtn;
Widget btnBoxHistoryBtn;
Widget btnBoxIndexBtn;
Widget btnBoxTopLevelBtn;
} _DtHelpBrowserStuff;
typedef struct _DtHelpMenuStuff
{
Boolean showDupBtn;
/* Help Dialog Widgets */
Widget menuBar;
Widget topBtn;
Widget keyBtn;
Widget backBtn;
Widget historyBtn;
Widget printBtn;
Widget closeBtn;
Widget helpBtn;
Widget newWindowBtn;
Widget copyBtn;
Widget popupMenu;
Widget popupBackBtn;
Widget popupTopBtn;
} _DtHelpMenuStuff;
typedef struct _DtHelpHistoryStuff
{
/* Path Area Variables */
DtTopicListStruct * pPathListHead;
DtTopicListStruct * pPathListTale;
int totalPathNodes;
/* History Dialog Widgets & variables */
Widget volumeList; /* Scrolled volume list */
Widget topicList; /* Scrolled topic list */
Widget historyWidget; /* Top Level History Shell */
Widget topicsListLabel;
DtHistoryListStruct * pHistoryListHead; /* Head pointer to history */
} _DtHelpHistoryStuff;
typedef struct _DtHelpBacktrackStuff
{
/* Jump List variables */
DtTopicListStruct * pJumpListHead;
DtTopicListStruct * pJumpListTale;
int totalJumpNodes;
int scrollPosition;
} _DtHelpBacktrackStuff;
typedef struct _DtHelpGlobSearchStuff
{
/* search dialog resource (undocumented) */
char * hitPrefixFont; /* hit prefix mono-space font resource */
/* host application locale settings */
char * iconv3Codeset; /* iconv3-ok codeset of app */
_DtHelpCeIconvContext iconv3Context; /* from vol to app locale */
/* File Selection Dialog font list */
XmFontList volTitlesFontList; /*font list req'd by font titles*/
/* Search Dialog Widgets & variables */
Widget srchForm;
Widget actionBtn;
Widget curVolRadBtn;
Widget allVolRadBtn;
Widget selVolRadBtn;
Widget selectBtn;
Widget fullIndexRadBtn;
Widget containsRadBtn;
Widget wordField;
Widget statusLabel;
Widget resultList;
Widget gotoBtn;
Widget closeBtn;
Widget helpBtn;
Widget selectionDlg; /* selectionBox (child of dlg) */
char * curVolPath; /* cur vol shown in btn label */
char * rawWordStr; /* word as taken from srchWord */
char * normWordStr; /* normalized word str */
char * localeWordStr; /* after iconv() of NormWordStr */
wchar_t wordFieldFirstChar;
short wordFieldLen;
short statusLineUsage;
_DtHelpGlobSrchSources srchSources; /* current state of radio but */
_DtHelpFileEntry curSrchVol; /* vol currently being searched */
unsigned int hitsFontLoaded:1; /* is font loaded? */
unsigned int volScanDone:1; /* is the volume list complete? */
unsigned int fullIndex:1; /* state of search */
unsigned int readyToStart:1; /* state of search */
unsigned int hitsFound:1; /* state of search */
unsigned int searchInProgress:1; /* state of search */
unsigned int curVolRadBtnSens:1; /* state of curVol sens */
short volLeftCnt; /* updated during search */
_DtHelpFileList volListHead; /* info on search topics found */
XtWorkProcId workProcId; /* ID of search proc */
} _DtHelpGlobSearchStuff;
typedef struct _DtHelpPrintStuff
{
/* printing resources */
char * helpPrint; /* help print command resource */
unsigned char paperSize; /* paper size resource */
char * printer; /* printer destination resource */
char * printVolume; /* volume to print resource */
/* Print Dialog widgets & variables */
Widget printForm; /* Form inside top level print shell */
Widget subject; /* label for subject matter to print */
Widget printerField; /* text field for printer */
Widget copiesField; /* text field for copies */
Widget letterBtn; /* menu item for letter paper */
Widget legalBtn; /* menu item for legal paper */
Widget execBtn; /* menu item for executive paper */
Widget a4Btn; /* menu item for A4 paper */
Widget b5Btn; /* menu item for B5 paper */
Widget paperSizeOptMenu; /* menu item for A4 paper */
Widget topicsFrame; /* frame holding print topic selection */
Widget curTopicBtn; /* radio btn for cur topic */
Widget subTopicsBtn; /* radio btn for cur & sub topics */
Widget tocBtn; /* radio btn for table of contents */
Widget allTopicsBtn; /* radio btn for all topics */
Widget paperTopicsSeparator; /* hidden sep btwn paper size & topic sel */
Widget topicsBtnsSeparator; /* sep between topic sel & btns */
} _DtHelpPrintStuff;
/* fields for the GeneralHelp widget record */
typedef struct
{
_DtHelpDisplayWidgetStuff display;
_DtHelpCommonHelpStuff help;
_DtHelpGeneralHelpStuff ghelp;
_DtHelpBrowserStuff browser;
_DtHelpMenuStuff menu;
_DtHelpHistoryStuff history;
_DtHelpBacktrackStuff backtr;
_DtHelpGlobSearchStuff srch;
_DtHelpPrintStuff print;
} DtHelpDialogWidgetPart;
/****************************************************************
*
* Full instance record declaration
*
****************************************************************/
typedef struct _DtHelpDialogWidgetRec
{
CorePart core;
CompositePart composite;
ConstraintPart constraint;
XmManagerPart manager;
XmBulletinBoardPart bulletin_board;
DtHelpDialogWidgetPart help_dialog;
} DtHelpDialogWidgetRec;
/******** Private Function Declarations ********/
extern XmGeoMatrix _DtHelpDialogWidgetGeoMatrixCreate(
Widget wid,
Widget instigator,
XtWidgetGeometry *desired) ;
extern Boolean _DtHelpDialogWidgetNoGeoRequest(
XmGeoMatrix geoSpec) ;
/******** End Private Function Declarations ********/
#endif /* _XmTemplateBP_h */
/* DON'T ADD ANYTHING AFTER THIS #endif */

118
cde/include/Dt/HelpP.h Normal file
View File

@@ -0,0 +1,118 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: HelpP.h /main/3 1995/10/26 12:24:50 rswiston $ */
/************************************<+>*************************************
****************************************************************************
**
** File: HelpP.h
**
** Project: CacheCreeek (Rivers) Project.
**
**
** Description: Private header file for Dts.
**
**
** (c) Copyright 1987, 1988, 1989, 1990, 1991, 1992 Hewlett-Packard Company
**
** (c) Copyright 1993, 1994 Hewlett-Packard Company
** (c) Copyright 1993, 1994 International Business Machines Corp.
** (c) Copyright 1993, 1994 Sun Microsystems, Inc.
** (c) Copyright 1993, 1994 Novell, Inc.
**
**
**
****************************************************************************
************************************<+>*************************************/
#ifndef _DtHelpP_h
#define _DtHelpP_h
/* Privite Argument Resource Definitions for Help Widget */
#define DtNshowTopLevelButton "showTopLevelButton"
#ifndef XmNshowTopLevelButton
#define XmNshowTopLevelButton DtNshowTopLevelButton
#endif
#define DtCShowTopLevelButton "ShowTopLevelButton"
#ifndef XmCShowTopLevelButton
#define XmCShowTopLevelButton DtCShowTopLevelButton
#endif
#define DtNsrchHitPrefixFont "srchHitPrefixFont"
#ifndef XmNsrchHitPrefixFont
#define XmNsrchHitPrefixFont DtNsrchHitPrefixFont
#endif
#define DtCSrchHitPrefixFont "SrchHitPrefixFont"
#ifndef XmCSrchHitPrefixFont
#define XmCSrchHitPrefixFont DtCSrchHitPrefixFont
#endif
#ifndef CDE_CONFIGURATION_TOP
#define CDE_CONFIGURATION_TOP "/etc/dt"
#endif
#ifndef CDE_INSTALLATION_TOP
#define CDE_INSTALLATION_TOP "/usr/dt"
#endif
#define DtDEFAULT_SYSTEM_PATH \
CDE_CONFIGURATION_TOP "/appconfig/help/%L/%H:" \
CDE_CONFIGURATION_TOP "/appconfig/help/%L/%H.sdl:" \
CDE_CONFIGURATION_TOP "/appconfig/help/%L/%H.hv:" \
CDE_CONFIGURATION_TOP "/appconfig/help/C/%H:" \
CDE_CONFIGURATION_TOP "/appconfig/help/C/%H.sdl:" \
CDE_CONFIGURATION_TOP "/appconfig/help/C/%H.hv:" \
CDE_INSTALLATION_TOP "/appconfig/help/%L/%H:" \
CDE_INSTALLATION_TOP "/appconfig/help/%L/%H.sdl:" \
CDE_INSTALLATION_TOP "/appconfig/help/%L/%H.hv" \
CDE_INSTALLATION_TOP "/appconfig/help/C/%H:" \
CDE_INSTALLATION_TOP "/appconfig/help/C/%H.sdl:" \
CDE_INSTALLATION_TOP "/appconfig/help/C/%H.hv:"
#define DtDEFAULT_USER_PATH_FORMAT \
"%s/.dt/help/%s/%%H:" \
"%s/.dt/help/%s/%%H.sdl:" \
"%s/.dt/help/%s/%%H.hv:" \
"%s/.dt/help/%%H:" \
"%s/.dt/help/%%H.sdl:" \
"%s/.dt/help/%%H.hv"
/* this path expects a sprintf usage as follows:
sprintf(buf,DtDEFAULT_USER_PATH_FORMAT,
homedir, dtusersessionname,
homedir, dtusersessionname,
homedir, dtusersessionname,
homedir, homedir, homedir);
*/
/* #define DtVOLUMES_TYPE "volumes" */
#endif /* _DtHelpP_h */
/* DON'T ADD ANYTHING AFTER THIS #endif */

124
cde/include/Dt/HelpQuickD.h Normal file
View File

@@ -0,0 +1,124 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: HelpQuickD.h /main/3 1995/10/26 12:25:25 rswiston $ */
/*
* (c) Copyright 1993, 1994 Hewlett-Packard Company
* (c) Copyright 1993, 1994 International Business Machines Corp.
* (c) Copyright 1993, 1994 Sun Microsystems, Inc.
* (c) Copyright 1993, 1994 Novell, Inc.
*/
#ifndef _Dt_HelpQuickD_h
#define _Dt_HelpQuickD_h
#include <Dt/Help.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* Constants
*/
/* Quick help dialog-specific Resources */
#ifndef DtNbackLabelString
#define DtNbackLabelString "backLabelString"
#endif
#ifndef DtNhelpLabelString
#define DtNhelpLabelString XmNhelpLabelString
#endif
#ifndef DtNmoreLabelString
#define DtNmoreLabelString "moreLabelString"
#endif
#ifndef DtNcloseLabelString
#define DtNcloseLabelString "closeLabelString"
#endif
#ifndef DtNprintLabelString
#define DtNprintLabelString "printLabelString"
#endif
#ifndef DtCCallback
#define DtCCallback XmCCallback
#endif
#ifndef DtCBackLabelString
#define DtCBackLabelString "BackLabelString"
#endif
#ifndef DtCHelpLabelString
#define DtCHelpLabelString XmCHelpLabelString
#endif
#ifndef DtCMoreLabelString
#define DtCMoreLabelString "MoreLabelString"
#endif
#ifndef DtCCloseLabelString
#define DtCCloseLabelString "CloseLabelString"
#endif
#ifndef DtCPrintLabelString
#define DtCPrintLabelString "PrintLabelString"
#endif
/*
* Types
*/
/* Widget class and instance */
typedef struct _DtHelpQuickDialogWidgetClassRec * DtHelpQuickDialogWidgetClass;
typedef struct _DtHelpQuickDialogWidgetRec * DtHelpQuickDialogWidget;
/*
* Data
*/
/* Widget class record */
externalref WidgetClass dtHelpQuickDialogWidgetClass;
/*
* Functions
*/
/* tmp backwards compat */
#define DtCreateQuickHelpDialog DtCreateHelpQuickDialog
extern Widget DtCreateHelpQuickDialog(
Widget parent,
char *name,
ArgList arglist,
Cardinal argcount);
extern Widget DtHelpQuickDialogGetChild(
Widget widget,
unsigned char child);
#ifdef __cplusplus
}
#endif
#endif /* _Dt_HelpQuickD_h */

View File

@@ -0,0 +1,177 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: HelpQuickDP.h /main/6 1996/04/05 14:41:19 mgreess $ */
/*************************************<+>*************************************
*****************************************************************************
**
** File: HelpQuickDP.h
**
** Project: CDE 1.0 Common Desktop Environment
**
** Description: Privite Header file for HelpQuickD.c
** -----------
**
** (c) Copyright 1987, 1988, 1989, 1990, 1991, 1992 Hewlett-Packard Company
**
** (c) Copyright 1993, 1994 Hewlett-Packard Company
** (c) Copyright 1993, 1994 International Business Machines Corp.
** (c) Copyright 1993, 1994 Sun Microsystems, Inc.
** (c) Copyright 1993, 1994 Novell, Inc.
**
*******************************************************************
*************************************<+>*************************************/
#ifndef _DtHelpQuickDP_h
#define _DtHelpQuickDP_h
#include <Xm/BulletinBP.h>
#include <Dt/HelpQuickD.h>
#include "HelpQuickDI.h"
#include "HelpDialogP.h"
#define DtNO_JUMP_UPDATE 1
#define DtJUMP_UPDATE 2
#define XmDIALOG_SUFFIX "_popup"
#define XmDIALOG_SUFFIX_SIZE 6
/* Defines for use in allocation geometry matrix. */
#define TB_MAX_WIDGETS_VERT 7
#define TB_MAX_NUM_WIDGETS 12
/* Class Part Structure Definition */
typedef struct
{
XtPointer extension; /* Pointer to extension record */
} DtHelpQuickDialogWidgetClassPart;
/* Full class record declaration */
typedef struct _DtHelpQuickDialogWidgetClassRec
{
CoreClassPart core_class;
CompositeClassPart composite_class;
ConstraintClassPart constraint_class;
XmManagerClassPart manager_class;
XmBulletinBoardClassPart bulletin_board_class;
DtHelpQuickDialogWidgetClassPart selection_box_class;
} DtHelpQuickDialogWidgetClassRec;
externalref DtHelpQuickDialogWidgetClassRec dtHelpQuickDialogWidgetClassRec;
/* fields for the Quick Help widget record */
/* reuse the CommonHelpStuff structure from HelpDialogP.h */
/* reuse the BacktrackStuff structure from HelpDialogP.h */
/* reuse the PrintStuff structure from HelpDialogP.h */
typedef struct _DtHelpQuickHelpStuff
{
int pad;
Widget definitionBox;
Boolean minimize_buttons;
/* Help Dialog Widgets */
Widget displayAreaFrame;
Widget separator;
Widget closeButton; /* close button */
XmString closeLabelString;
XtCallbackList closeCallback;
Widget moreButton; /* Application button */
XmString moreLabelString;
Widget backButton; /* Backtrack button */
XmString backLabelString;
Widget printButton; /* print button */
XmString printLabelString;
Widget helpButton; /* help button */
XmString helpLabelString;
} _DtHelpQuickHelpStuff;
typedef struct
{
_DtHelpDisplayWidgetStuff display;
_DtHelpCommonHelpStuff help;
_DtHelpQuickHelpStuff qhelp;
_DtHelpBacktrackStuff backtr;
_DtHelpPrintStuff print;
} _DtHelpQuickDialogWidgetPart;
/****************************************************************
*
* Full instance record declaration
*
****************************************************************/
typedef struct _DtHelpQuickDialogWidgetRec
{
CorePart core;
CompositePart composite;
ConstraintPart constraint;
XmManagerPart manager;
XmBulletinBoardPart bulletin_board;
_DtHelpQuickDialogWidgetPart qhelp_dialog;
} DtHelpQuickDialogWidgetRec;
/******** Private Function Declarations ********/
extern XmGeoMatrix _DtHelpQuickDialogWidgetGeoMatrixCreate(
Widget wid,
Widget instigator,
XtWidgetGeometry *desired) ;
extern Boolean _DtHelpQuickDialogWidgetNoGeoRequest(
XmGeoMatrix geoSpec) ;
extern void _DtHelpQuickDialogGetCloseLabelString(
Widget wid,
int resource_offset,
XtArgVal *value );
extern void _DtHelpQuickDialogGetHelpLabelString(
Widget wid,
int resource_offset,
XtArgVal *value );
/******** End Private Function Declarations ********/
#endif /* _DtHelpDialogP_h */
/* DON'T ADD ANYTHING AFTER THIS #endif */

View File

@@ -0,0 +1,94 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: HourGlass.h /main/4 1995/10/26 15:23:08 rswiston $ */
/*
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
* (c) Copyright 1993, 1994 International Business Machines Corp. *
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
* (c) Copyright 1993, 1994 Novell, Inc. *
*/
/************************************<+>*************************************
****************************************************************************
**
** File: HourGlass.h
**
** Project: DT
**
** Description: Public include file for HourGlass Library.
**
**
** (c) Copyright 1987, 1988, 1989 by Hewlett-Packard Company
**
**
**
****************************************************************************
************************************<+>*************************************/
#ifndef _hourglass_h
#define _hourglass_h
/* _DtGetHourGlassCursor -
*
* Builds and returns the appropriate HourGlass cursor.
*/
extern Cursor _DtGetHourGlassCursor(
Display *dpy) ;
/* _DtTurnOnHourGlass -
*
* Gets and displays an hourglass cursor in the window of the widget
* which is passed in to the funciton.
*/
extern void _DtTurnOnHourGlass(
Widget w) ;
/* Widget widget;
*
* widget is the toplevel shell of the window you want
* the hourglass cursor to appear in.
*/
/* _DtTurnOffHourGlass -
*
* Removes the hourglass cursor from the window of the widget
* which is passed in to the funciton.
*/
extern void _DtTurnOffHourGlass(
Widget w) ;
/* Widget widget;
*
* widget is the toplevel shell of the window you want
* to remove hourglass cursor from.
*/
#endif /* _hourglass_h */
/* DON'T ADD ANYTHING AFTER THIS #endif */

140
cde/include/Dt/Icon.h Normal file
View File

@@ -0,0 +1,140 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: Icon.h /main/4 1995/10/26 09:32:37 rswiston $ */
/**---------------------------------------------------------------------
***
*** file: Icon.h
***
*** project: MotifPlus Widgets
***
*** description: Public include file for DtIcon gadget class.
***
***
*** (c) Copyright 1990 by Hewlett-Packard Company.
***
***
***-------------------------------------------------------------------*/
#ifndef _DtIcon_h
#define _DtIcon_h
#include <Xm/Xm.h>
#include <Dt/DtStrDefs.h>
#ifndef DtIsIcon
#define DtIsIcon(w) XtIsSubclass(w, dtIconGadgetClass)
#endif /* DtIsIcon */
typedef struct _DtIconClassRec * DtIconGadgetClass;
typedef struct _DtIconRec * DtIconGadget;
typedef struct _DtIconCacheObjRec * DtIconCacheObject;
extern Widget _DtCreateIcon(
Widget parent,
String name,
ArgList arglist,
Cardinal argcount) ;
extern Boolean _DtIconGetState(
Widget w) ;
extern void _DtIconSetState(
Widget w,
Boolean state,
Boolean notify) ;
extern Drawable _DtIconDraw(
Widget widget,
Drawable drawable,
Position x,
Position y,
Boolean fill) ;
extern Widget _DtDuplicateIcon(
Widget parent,
Widget widget,
XmString string,
String pixmap,
XtPointer user_data,
Boolean underline) ;
extern Boolean _DtIconSelectInTitle(
Widget widget,
Position pt_x,
Position pt_y) ;
extern XRectangle * _DtIconGetTextExtent(
Widget widget) ;
extern void _DtIconGetIconRects(
DtIconGadget g,
unsigned char *flags,
XRectangle *rect1,
XRectangle *rect2) ;
extern WidgetClass dtIconGadgetClass;
#define XmCR_SELECT XmCR_SINGLE_SELECT
#define XmCR_DROP 50
#define XmCR_POPUP 51
#define XmCR_HIGHLIGHT 52
#define XmCR_UNHIGHLIGHT 53
#define XmCR_SHADOW 54
typedef struct
{
int reason;
XEvent * event;
Boolean set;
} DtIconCallbackStruct;
#define XmPIXMAP_TOP 0
#define XmPIXMAP_BOTTOM 1
#define XmPIXMAP_LEFT 2
#define XmPIXMAP_RIGHT 3
#define XmPIXMAP_MIDDLE 4
#define XmSTRING_BOTTOM 0
#define XmSTRING_TOP 1
#define XmSTRING_RIGHT 2
#define XmSTRING_LEFT 3
#define XmICON_LABEL 0
#define XmICON_BUTTON 1
#define XmICON_TOGGLE 2
#define XmICON_DRAG 3
#define XmFILL_NONE 0
#define XmFILL_PARENT 1
#define XmFILL_SELF 2
#define XmFILL_TRANSPARENT 3
#define XmPIXMAP_RECT 0x01
#define XmLABEL_RECT 0x02
#define DtRECTANGLE 0
#define DtNON_RECTANGLE 1
#endif /* _XmIcon_h */
/* DON'T ADD ANYTHING AFTER THIS #endif */

140
cde/include/Dt/IconFile.h Normal file
View File

@@ -0,0 +1,140 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: IconFile.h /main/4 1995/10/26 15:23:17 rswiston $ */
/*
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
* (c) Copyright 1993, 1994 International Business Machines Corp. *
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
* (c) Copyright 1993, 1994 Novell, Inc. *
*/
#ifdef REV_INFO
#ifndef lint
static char SCCSID[] = "OSF/Motif: @(#)_IconFile.h 4.16 91/09/12";
#endif /* lint */
#endif /* REV_INFO */
/******************************************************************************
*******************************************************************************
*
* (c) Copyright 1989, 1990, 1991 OPEN SOFTWARE FOUNDATION, INC.
* (c) Copyright 1989, DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.
* (c) Copyright 1987, 1988, 1989, 1990, 1991 HEWLETT-PACKARD COMPANY
* ALL RIGHTS RESERVED
*
* THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED
* AND COPIED ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND
* WITH THE INCLUSION OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE OR
* ANY OTHER COPIES THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE
* AVAILABLE TO ANY OTHER PERSON. NO TITLE TO AND OWNERSHIP OF THE
* SOFTWARE IS HEREBY TRANSFERRED.
*
* THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT
* NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY OPEN SOFTWARE
* FOUNDATION, INC. OR ITS THIRD PARTY SUPPLIERS
*
* OPEN SOFTWARE FOUNDATION, INC. AND ITS THIRD PARTY SUPPLIERS,
* ASSUME NO RESPONSIBILITY FOR THE USE OR INABILITY TO USE ANY OF ITS
* SOFTWARE . OSF SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
* KIND, AND OSF EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES, INCLUDING
* BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE.
*
* Notice: Notwithstanding any other lease or license that may pertain to,
* or accompany the delivery of, this computer software, the rights of the
* Government regarding its use, reproduction and disclosure are as set
* forth in Section 52.227-19 of the FARS Computer Software-Restricted
* Rights clause.
*
* (c) Copyright 1989, 1990, 1991 Open Software Foundation, Inc. Unpublished - all
* rights reserved under the Copyright laws of the United States.
*
* RESTRICTED RIGHTS NOTICE: Use, duplication, or disclosure by the
* Government is subject to the restrictions as set forth in subparagraph
* (c)(1)(ii) of the Rights in Technical Data and Computer Software clause
* at DFARS 52.227-7013.
*
* Open Software Foundation, Inc.
* 11 Cambridge Center
* Cambridge, MA 02142
* (617)621-8700
*
* RESTRICTED RIGHTS LEGEND: This computer software is submitted with
* "restricted rights." Use, duplication or disclosure is subject to the
* restrictions as set forth in NASA FAR SUP 18-52.227-79 (April 1985)
* "Commercial Computer Software- Restricted Rights (April 1985)." Open
* Software Foundation, Inc., 11 Cambridge Center, Cambridge, MA 02142. If
* the contract contains the Clause at 18-52.227-74 "Rights in Data General"
* then the "Alternate III" clause applies.
*
* (c) Copyright 1989, 1990, 1991 Open Software Foundation, Inc.
* ALL RIGHTS RESERVED
*
*
* Open Software Foundation is a trademark of The Open Software Foundation, Inc.
* OSF is a trademark of Open Software Foundation, Inc.
* OSF/Motif is a trademark of Open Software Foundation, Inc.
* Motif is a trademark of Open Software Foundation, Inc.
* DEC is a registered trademark of Digital Equipment Corporation
* DIGITAL is a registered trademark of Digital Equipment Corporation
* X Window System is a trademark of the Massachusetts Institute of Technology
*
*******************************************************************************
******************************************************************************/
#ifndef __DtIconFile_h
#define __DtIconFile_h
#include <Xm/Xm.h>
#include <Xm/IconFile.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* values for icon magnitude
*/
#define DtUNSPECIFIED 0
#define DtLARGE 1
#define DtMEDIUM 2
#define DtSMALL 3
#define DtTINY 4
/******** Public Function Declarations for XmWrap.c ********/
extern String _DtGetIconFileName(
Screen *screen,
String imageInstanceName,
String imageClassName,
String hostPrefix,
unsigned int size) ;
/******** End Public Function Declarations ********/
#ifdef __cplusplus
} /* Close scope of 'extern "C"' declaration which encloses file. */
#endif
#endif /* __DtIconFile_h */
/* DON'T ADD ANYTHING AFTER THIS #endif */

350
cde/include/Dt/IconP.h Normal file
View File

@@ -0,0 +1,350 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: IconP.h /main/7 1996/03/29 11:33:23 drk $ */
/**---------------------------------------------------------------------
***
*** file: IconP.h
***
*** project: MotifPlus Widgets
***
*** description: Private include file for DtIcon gadget class.
***
***
*** (c) Copyright 1990 by Hewlett-Packard Company.
***
***
***-------------------------------------------------------------------*/
#ifndef _DtIconP_h
#define _DtIconP_h
#include <Xm/ExtObjectP.h>
#include <Xm/XmP.h>
#include <Xm/GadgetP.h>
#include <Dt/Icon.h>
/*-------------------------------------------------------------
** Cache Class Structure
*/
/* Cache Class Part
*/
typedef struct _DtIconCacheObjClassPart
{
int foo;
} DtIconCacheObjClassPart;
/* Cache Full Class Record
*/
typedef struct _DtIconCacheObjClassRec /* label cache class record */
{
ObjectClassPart object_class;
XmExtClassPart ext_class;
DtIconCacheObjClassPart icon_class_cache;
} DtIconCacheObjClassRec;
/* Cache Actual Class
*/
externalref DtIconCacheObjClassRec dtIconCacheObjClassRec;
/*-------------------------------------------------------------
** Cache Instance Structure
*/
/* Cache Instance Part
*/
typedef struct _DtIconCacheObjPart
{
Dimension margin_width;
Dimension margin_height;
Dimension string_height;
Dimension spacing;
Pixel foreground;
Pixel background;
Pixel arm_color;
Boolean fill_on_arm;
Boolean recompute_size;
Boolean draw_shadow;
unsigned char pixmap_position;
unsigned char string_position;
unsigned char alignment;
unsigned char behavior;
unsigned char fill_mode;
} DtIconCacheObjPart;
typedef struct _DtIconCacheObjRec
{
ObjectPart object;
XmExtPart ext;
DtIconCacheObjPart icon_cache;
} DtIconCacheObjRec;
typedef void (*GetPositionProc)(
DtIconGadget,
Position,
Position,
Dimension,
Dimension,
Position *,
Position *,
Position *,
Position *
);
typedef void (*GetSizeProc)(
DtIconGadget,
Dimension *,
Dimension *
);
typedef void (*DrawProc)(
DtIconGadget,
Drawable,
Position,
Position,
Dimension,
Dimension,
Dimension,
Dimension,
unsigned char,
unsigned char
);
typedef void (*CallCallbackProc)(
DtIconGadget,
XtCallbackList,
int,
XEvent *
);
typedef void (*UpdateGCsProc)(
DtIconGadget
);
/*-------------------------------------------------------------
** Class Structure
*/
/* Class Part
*/
typedef struct _DtIconClassPart
{
GetSizeProc get_size;
GetPositionProc get_positions;
DrawProc draw;
CallCallbackProc call_callback;
UpdateGCsProc update_gcs;
Boolean optimize_redraw;
XmCacheClassPartPtr cache_part;
caddr_t extension;
} DtIconClassPart;
/* Full Class Record
*/
typedef struct _DtIconClassRec
{
RectObjClassPart rect_class;
XmGadgetClassPart gadget_class;
DtIconClassPart icon_class;
} DtIconClassRec;
/* Actual Class
*/
externalref DtIconClassRec dtIconClassRec;
/*-------------------------------------------------------------
** Instance Structure
*/
/* Instance Part
*/
typedef struct _DtIconPart
{
Boolean set;
Boolean armed;
Boolean sync;
Boolean underline;
unsigned char shadow_type;
unsigned char border_type;
XtCallbackList callback;
XtIntervalId click_timer_id;
XButtonEvent * click_event;
String image_name;
Pixmap pixmap;
Pixmap mask;
Pixel pixmap_foreground;
Pixel pixmap_background;
Dimension max_pixmap_width;
Dimension max_pixmap_height;
XmFontList font_list;
XmString string;
Dimension string_width;
Dimension pixmap_width;
Dimension pixmap_height;
GC clip_gc;
GC normal_gc;
GC background_gc;
GC armed_gc;
GC armed_background_gc;
GC parent_background_gc;
Pixel saved_parent_background;
DtIconCacheObjPart *cache;
unsigned char operations;
XtCallbackList drop_callback;
} DtIconPart;
/* Full Instance Record
*/
typedef struct _DtIconRec
{
ObjectPart object;
RectObjPart rectangle;
XmGadgetPart gadget;
DtIconPart icon;
} DtIconRec;
/*-------------------------------------------------------------
** Class and Instance Macros
*/
/* DtIcon Class Macros
*/
#define DtInheritGetSize ((GetSizeProc) _XtInherit)
#define DtInheritGetPositions ((GetPositionProc) _XtInherit)
#define DtInheritDraw ((DrawProc) _XtInherit)
#define DtInheritCallCallback ((CallCallbackProc) _XtInherit)
#define DtInheritUpdateGCs ((UpdateGCsProc) _XtInherit)
/*** WARNING: These macros are not thread-safe! ***/
#define C_GetSize(wc) \
(((DtIconGadgetClass)(wc)) -> icon_class.get_size)
#define C_GetPositions(wc) \
(((DtIconGadgetClass)(wc)) -> icon_class.get_positions)
#define C_Draw(wc) \
(((DtIconGadgetClass)(wc)) -> icon_class.draw)
#define C_CallCallback(wc) \
(((DtIconGadgetClass)(wc)) -> icon_class.call_callback)
#define C_OptimizeRedraw(wc) \
(((DtIconGadgetClass)(wc)) -> icon_class.optimize_redraw)
#define C_UpdateGCs(wc) \
(((DtIconGadgetClass)(wc)) -> icon_class.update_gcs)
/* DtIcon Macros
*/
/*** WARNING: These macros are not thread-safe! ***/
#define G_GetSize(g,w,h) \
(((DtIconClassRec *)g -> object.widget_class) -> icon_class.get_size) \
(g,w,h)
#define G_GetPositions(g,w,h,h_t,s_t,p_x,p_y,s_x,s_y) \
(((DtIconClassRec *)g -> object.widget_class) -> icon_class.get_positions) \
(g,w,h,h_t,s_t,p_x,p_y,s_x,s_y)
#define G_Draw(g,d,x,y,w,h,h_t,s_t,s_type,fill) \
(((DtIconClassRec *)g -> object.widget_class) -> icon_class.draw) \
(g,d,x,y,w,h,h_t,s_t,s_type,fill)
#define G_CallCallback(g,cb,r,e) \
(((DtIconClassRec *)g -> object.widget_class) -> icon_class.call_callback) \
(g,cb,r,e)
#define G_UpdateGCs(g) \
(((DtIconClassRec *)g -> object.widget_class) -> icon_class.update_gcs) \
(g)
/* Cached Instance Field Macros
*/
#define G_CachePixmapPosition(co) (((DtIconCacheObject)(co)) -> \
icon_cache.pixmap_position)
#define G_FillOnArm(g) (((DtIconGadget)(g)) -> \
icon.cache -> fill_on_arm)
#define G_RecomputeSize(g) (((DtIconGadget)(g)) -> \
icon.cache -> recompute_size)
#define G_DrawShadow(g) (((DtIconGadget)(g)) -> \
icon.cache -> draw_shadow)
#define G_PixmapPosition(g) (((DtIconGadget)(g)) -> \
icon.cache -> pixmap_position)
#define G_StringPosition(g) (((DtIconGadget)(g)) -> \
icon.cache -> string_position)
#define G_Alignment(g) (((DtIconGadget)(g)) -> \
icon.cache -> alignment)
#define G_Behavior(g) (((DtIconGadget)(g)) -> \
icon.cache -> behavior)
#define G_FillMode(g) (((DtIconGadget)(g)) -> \
icon.cache -> fill_mode)
#define G_MarginWidth(g) (((DtIconGadget)(g)) -> \
icon.cache -> margin_width)
#define G_MarginHeight(g) (((DtIconGadget)(g)) -> \
icon.cache -> margin_height)
#define G_StringHeight(g) (((DtIconGadget)(g)) -> \
icon.cache -> string_height)
#define G_Spacing(g) (((DtIconGadget)(g)) -> \
icon.cache -> spacing)
#define G_Foreground(g) (((DtIconGadget)(g)) -> \
icon.cache -> foreground)
#define G_Background(g) (((DtIconGadget)(g)) -> \
icon.cache -> background)
#define G_ArmColor(g) (((DtIconGadget)(g)) -> \
icon.cache -> arm_color)
/* Non-Cached Instance Field Macros
*/
#define G_Armed(g) (g -> icon.armed)
#define G_Set(g) (g -> icon.set)
#define G_Sync(g) (g -> icon.sync)
#define G_Callback(g) (g -> icon.callback)
#define G_ClickTimerID(g) (g -> icon.click_timer_id)
#define G_ClickInterval(g) (g -> icon.click_interval)
#define G_ClickEvent(g) (g -> icon.click_event)
#define G_ShadowType(g) (g -> icon.shadow_type)
#define G_BorderType(g) (g -> icon.border_type)
#define G_Pixmap(g) (g -> icon.pixmap)
#define G_Mask(g) (g -> icon.mask)
#define G_PixmapForeground(g) (g -> icon.pixmap_foreground)
#define G_PixmapBackground(g) (g -> icon.pixmap_background)
#define G_MaxPixmapWidth(g) (g -> icon.max_pixmap_width)
#define G_MaxPixmapHeight(g) (g -> icon.max_pixmap_height)
#define G_String(g) (g -> icon.string)
#define G_FontList(g) (g -> icon.font_list)
#define G_ImageName(g) (g -> icon.image_name)
#define G_StringWidth(g) (g -> icon.string_width)
#define G_PixmapWidth(g) (g -> icon.pixmap_width)
#define G_PixmapHeight(g) (g -> icon.pixmap_height)
#define G_BackgroundGC(g) (g -> icon.background_gc)
#define G_ArmedGC(g) (g -> icon.armed_gc)
#define G_ArmedBackgroundGC(g) (g -> icon.armed_background_gc)
#define G_NormalGC(g) (g -> icon.normal_gc)
#define G_ClipGC(g) (g -> icon.clip_gc)
#define G_Underline(g) (g -> icon.underline)
#define G_ParentBackgroundGC(g) (g -> icon.parent_background_gc)
#define G_SavedParentBG(g) (g -> icon.saved_parent_background)
#define G_Operations(g) (g -> icon.operations)
#define G_DropCallback(g) (g -> icon.drop_callback)
#define Icon_Cache(w) (((DtIconGadget)(w))-> \
icon.cache)
#define Icon_ClassCachePart(w) \
(((DtIconGadgetClass)dtIconGadgetClass)->gadget_class.cache_part)
#endif /* _DtIconP_h */
/* DON'T ADD ANYTHING AFTER THIS #endif */

View File

@@ -0,0 +1,64 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: Indicator.h /main/4 1995/10/26 15:23:41 rswiston $ */
/*
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
* (c) Copyright 1993, 1994 International Business Machines Corp. *
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
* (c) Copyright 1993, 1994 Novell, Inc. *
*/
/*
********************************************************************************
*
* File: Indicator.h
* Description: Public header for Activity Indicator
*
* (c) Copyright 1988, Hewlett-Packard Company, all rights reserved.
*
********************************************************************************
*/
#ifndef _Indicator_h
#define _Indicator_h
extern void _DtSendActivityNotification( int ) ;
/* int duration; Maximum activation time for the indicator */
/*
* _DtSendActivityNotification() provides the application with the means for
* notifying the world that an activity has been started, and may take upto
* 'duration' seconds. For now, the workspace manager will enable the
* activity indicator for upto the indicated duration of time; the time is
* in units of seconds.
*/
extern void _DtSendActivityDoneNotification( void ) ;
/*
* _DtSendActivityDoneNotification() provides the application with the means for
* notifying the world that an activity which had earlier been started, is
* now complete.
*/
#endif /* _Indicator_h */
/* DON'T ADD STUFF AFTER THIS #endif */

View File

@@ -0,0 +1,59 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/*
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
* (c) Copyright 1993, 1994 International Business Machines Corp. *
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
* (c) Copyright 1993, 1994 Novell, Inc. *
*/
/*****************************<+>*************************************
*********************************************************************
**
** File: IndicatorM.h
**
** RCS: $XConsortium: IndicatorM.h /main/3 1995/10/26 15:23:53 rswiston $
** Project: DT
**
** Description: Defines indicator messages
**
** (c) Copyright 1990 by Hewlett-Packard Company
**
*********************************************************************
*****************************<+>*************************************/
#ifndef _IndicatorM_h
#define _IndicatorM_h
/*
* BMS Messaging definitions
*/
/* _DtMessage for turning on the activity indicator */
#define DtACTIVITY_NOTIFICATION "ACTIVITY_NOTIFICATION"
/* _DtMessage for turning off the activity indicator */
#define DtACTIVITY_DONE_NOTIFICATION "ACTIVITY_DONE_NOTIFICATION"
#endif /* _IndicatorM_h */
/* Do not add anything after this endif. */

59
cde/include/Dt/Info.h Normal file
View File

@@ -0,0 +1,59 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: Info.h /main/2 1996/03/26 15:05:44 barstow $
*
* (c) Copyright 1996 Digital Equipment Corporation.
* (c) Copyright 1996 Hewlett-Packard Company.
* (c) Copyright 1996 International Business Machines Corp.
* (c) Copyright 1996 Sun Microsystems, Inc.
* (c) Copyright 1996 Novell, Inc.
* (c) Copyright 1996 FUJITSU LIMITED.
* (c) Copyright 1996 Hitachi.
*
*/
#ifndef _dt_info_h_
#define _dt_info_h_
#ifdef __cplusplus
extern "C" {
#endif
typedef enum {
DtINFO_SHOW_OK,
DtINFO_SHOW_BAD_LOCATOR, /* the locator argument is NULL */
DtINFO_SHOW_TT_OPEN_FAIL, /* tt_open() failed */
DtINFO_SHOW_MSG_CREATE_FAIL, /* tt_message_create() failed */
DtINFO_SHOW_MSG_SEND_FAIL /* tt_message_send() failed */
} DtInfoShowStatus;
extern DtInfoShowStatus DtInfoShowTopic (
const char * info_lib, /* The InfoLib to browse */
const char * locator); /* The locator in Generalized Locator
Format */
#ifdef __cplusplus
}
#endif
#endif /* _dt_info_h_ */

View File

@@ -0,0 +1,112 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: LocaleXlate.h /main/4 1995/10/26 12:29:54 rswiston $ */
/************************************<+>*************************************
****************************************************************************
**
** File: LocaleXlate.h
**
** Project: DtLcx
**
** Description: locale translation services
**
** (c) Copyright 1993, 1994 Hewlett-Packard Company
** (c) Copyright 1993, 1994 International Business Machines Corp.
** (c) Copyright 1993, 1994 Sun Microsystems, Inc.
** (c) Copyright 1993, 1994 Unix System Labs, Inc., a subsidiary of Novell, Inc.
**
**
****************************************************************************
************************************<+>*************************************/
#ifndef _DtLCX_XLATE_LOCALE_I
#define _DtLCX_XLATE_LOCALE_I
#include "XlationSvc.h" /* FIX: move to <> */
#ifdef __cplusplus
extern "C" {
#endif
#if DOC
/*========================================================*/
$CONSTBEG$: _DtLCX_OPER_xxx
$1LINER$: Constants for specifying operations
$SUMMARY$:
The _DtLCX_OPER_xxx are constants that produce strings
used in the translation specifications when specifying
the operation of a translation.
The operation string name must be identical both in the
source code and in the translation table.
These constants should be used whenever referencing
operations as part of a translation.
/*================================================$SKIP$==*/
#endif
/* $DEF$, Operation constants */
#define DtLCX_OPER_STD "standard"
#define DtLCX_OPER_ICONV1 "iconv1"
#define DtLCX_OPER_ICONV3 "iconv3"
#define DtLCX_OPER_NLLANGINFO_CODESET "nl_langinfo(CODESET)"
#define DtLCX_OPER_SETLOCALE "setlocale"
#define DtLCX_OPER_MULTIBYTE "multibyte"
#define DtLCX_OPER_CCDF "ccdf"
#define DtLCX_OPER_XLFD "xlfd"
#define DtLCX_OPER_MIME "mime"
#define DtLCX_OPER_INTERCHANGE_CODESET "interchangeCodeset"
/*$END$*/
/* Functions */
#define _DtLcxCloseDb(io_db) _DtXlateCloseDb(io_db)
int _DtLcxOpenAllDbs(
_DtXlateDb * ret_db);
int _DtLcxXlateOpToStd(
const _DtXlateDb xlationDb,
const char * platform,
const int version,
const char * operation,
const char * opValue,
char * * ret_stdLocale,
char * * ret_stdLangTerr,
char * * ret_stdCodeset,
char * * ret_stdModifier);
int _DtLcxXlateStdToOp(
const _DtXlateDb xlationDb,
const char * platform,
const int version,
const char * operation,
const char * stdLocale,
const char * stdLangTerr,
const char * stdCodeset,
const char * stdModifier,
char * * ret_opValue);
#ifdef __cplusplus
}
#endif
#endif /*_DtLCX_XLATE_LOCALE_I*/
/********* do not put anything below this line ********/

145
cde/include/Dt/Lock.h Normal file
View File

@@ -0,0 +1,145 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/*
* File: Lock.h $XConsortium: Lock.h /main/4 1995/10/26 15:24:02 rswiston $
* Language: C
*
* (c) Copyright 1990, Hewlett-Packard Company, all rights reserved.
*
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
* (c) Copyright 1993, 1994 International Business Machines Corp. *
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
* (c) Copyright 1993, 1994 Novell, Inc. *
*/
#ifndef _Dt_lock_h
#define _Dt_lock_h
/*
GENERAL DESCRIPTION:
The DT lock facility provides simple exclusive locking. It
(as of 6/19/90) is based on the X11 selection-ownership
mechanism, though users of Dt locking do not need to be aware of
this.
X11 server grabs are judiciously used to guarantee atomicity of
operations. If a process which holds a lock dies (or closes its
X11 server connection for some other reason), the lock will be
automatically released.
Locks are identified by a string. There is no mechanism to
allocate unique lock strings to clients; users must take care to
choose a string that will not be easily duplicated by some other
client.
SAMPLE CODE:
#define MY_LOCK "MYAPP_MY_LOCK"
...
if (_DtGetLock (display, MY_LOCK)) {
<do whatever it is I want to do>
_DtReleaseLock (display, MY_LOCK);
}
else {
<do the alternative>
}
*/
extern int _DtGetLock (
Display *display,
char *lock_name);
/*
DESCRIPTION:
_DtGetLock attempts to get the specified lock. If nobody holds
the lock, _DtGetLock will obtain the lock and return 1. If
somebody else already holds the lock, the lock will not be
disturbed and _DtGetLock will return 0.
If the process which owns a lock dies (or closes its X11 server
connection), the lock will be automatically released. To
explicitly release a lock, use _DtReleaseLock.
SYNOPSIS:
success = _DtGetLock (display, lock);
int success; Returns 1 if the lock is obtained,
0 if not.
Display *display; The X11 server connection which will
hold the lock.
char *lock; The string which names the lock.
*/
extern void _DtReleaseLock (
Display *display,
char *lock_name);
/*
DESCRIPTION:
_DtReleaseLock releases a lock obtained by _DtGetLock.
WARNING!! It is perfectly legal for one process to release
a lock held by another process. By convention you should only
release locks previously obtained by your process from _DtGetLock
unless you are playing God and know what you are doing.
SYNOPSIS:
(void) _DtReleaseLock (display, lock);
Display *display; The X11 server connection which holds
the lock.
char *lock; The string which names the lock.
*/
extern int _DtTestLock (
Display *display,
char *lock_name);
/*
DESCRIPTION:
_DtTestLock returns a status indicating whether anybody holds the
specified lock.
SYNOPSIS:
status = _DtTestLock (display, lock);
int success; Returns 1 if anybody holds the lock,
0 otherwise.
Display *display; The X11 server connection.
char *lock; The string which names the lock.
*/
#endif /* _Dt_lock_h */
/* Do not add anything after this endif. */

199
cde/include/Dt/MacrosP.h Normal file
View File

@@ -0,0 +1,199 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: MacrosP.h /main/5 1996/03/27 20:16:40 drk $
*
* (c) Copyright 1996 Digital Equipment Corporation.
* (c) Copyright 1990,1996 Hewlett-Packard Company.
* (c) Copyright 1996 International Business Machines Corp.
* (c) Copyright 1996 Sun Microsystems, Inc.
* (c) Copyright 1996 Novell, Inc.
* (c) Copyright 1996 FUJITSU LIMITED.
* (c) Copyright 1996 Hitachi.
*/
/**---------------------------------------------------------------------
***
*** file: MacrosP.h
***
*** project: MotifPlus Widgets
***
*** description: Private include file with macros for MotifPlus
*** widgets and gadgets.
***
***-------------------------------------------------------------------*/
#ifndef _DtMacrosP_h
#define _DtMacrosP_h
#define XmUNSPECIFIED_STRING (XmString) 3
/*-------------------------------------------------------------
** Widget Class Macros
*/
/* Core Class Macros
*/
/*** WARNING: These macros are not thread-safe! ***/
#define C_WidgetClass(wc) (wc -> core_class.widget_class)
#define C_Superclass(wc) (wc -> core_class.superclass)
#define C_ClassName(wc) (wc -> core_class.class_name)
#define C_ClassInited(wc) (wc -> core_class.class_inited)
#define C_NumResources(wc) (wc -> core_class.num_resources)
/* Composite Class Macros
*/
#ifdef _XtCompositeP_h
#define C_ChangeManaged(wc) (wc -> composite_class.change_managed)
#endif /* _XtCompositeP_h */
/* Constraint Class Macros
*/
#ifdef _XtConstraintP_h
#define C_ConstraintResources(wc) (wc -> constraint_class.resources)
#define C_ConstraintNumResources(wc) (wc -> constraint_class.num_resources)
#endif /* _XtConstraintP_h */
/* XmGadget Class Macros
*/
#define XmInheritBorderHighlight ((XtWidgetProc) _XtInherit)
#define XmInheritBorderUnhighlight ((XtWidgetProc) _XtInherit)
#define XmInheritVisualChange ((XmVisualChangeProc) _XtInherit)
/*-------------------------------------------------------------
** Primitive Macros
*/
#define P_X(w) (w -> core.x)
#define P_Y(w) (w -> core.y)
#define P_Width(w) (w -> core.width)
#define P_Height(w) (w -> core.height)
#define P_BorderWidth(w) (w -> core.border_width)
#define P_XrmName(w) (w -> core.xrm_name)
#define P_PopupList(w) (w -> core.popup_list)
#define P_NumPopups(w) (w -> core.num_popups)
/*-------------------------------------------------------------
** Gadget Macros
*/
/* Object Macros
*/
#define G_XrmName(r) (r -> object.xrm_name)
#define G_Class(r) (r -> object.widget_class)
/* RectObject Macros
*/
#define G_X(r) (r -> rectangle.x)
#define G_Y(r) (r -> rectangle.y)
#define G_Width(r) (r -> rectangle.width)
#define G_Height(r) (r -> rectangle.height)
#define G_BorderWidth(r) (r -> rectangle.border_width)
/* XmGadget Macros
*/
#define G_HelpCB(g) (g -> gadget.help_callback)
#define G_EventMask(g) (g -> gadget.event_mask)
#define G_Highlighted(g) (g -> gadget.highlighted)
#define G_UnitType(g) (g -> gadget.unit_type)
/*-------------------------------------------------------------
** Manager Macros
*/
/* Core Macros
*/
#define M_X(w) (w -> core.x)
#define M_Y(w) (w -> core.y)
#define M_Width(w) (w -> core.width)
#define M_Height(w) (w -> core.height)
#define M_BorderWidth(w) (w -> core.border_width)
#define M_Background(w) (w -> core.background_pixel)
#define M_Sensitive(w) (w->core.sensitive && w->core.ancestor_sensitive)
#define M_Name(w) (w -> core.name)
#define M_Accelerators(w) (w -> core.accelerators)
#define M_TmTranslations(w) (w -> core.tm.translations)
#define M_PopupList(w) (w -> core.popup_list)
#define M_NumPopups(w) (w -> core.num_popups)
/* Composite and Constraint Macros
*/
#define M_Children(m) (m -> composite.children)
#define M_NumChildren(m) (m -> composite.num_children)
/* XmManager Macros
*/
#ifdef _XmManagerP_h
#define M_Foreground(m) (m -> manager.foreground)
#define M_HighlightThickness(m) (m -> manager.highlight_thickness)
#define M_ShadowThickness(m) (m -> manager.shadow_thickness)
#define M_TopShadowGC(m) (m -> manager.top_shadow_GC)
#define M_BottomShadowGC(m) (m -> manager.bottom_shadow_GC)
#define M_BackgroundGC(m) (m -> manager.background_GC)
#define M_SelectedGadget(m) (m -> manager.selected_gadget)
#define M_HelpCB(m) (m -> manager.help_callback)
#define M_UnitType(m) (m -> manager.unit_type)
#endif /* _XmManagerP_h */
/* XmDrawingArea Macros
*/
#ifdef _XmDrawingAreaP_h
#define M_MarginWidth(m) (m -> drawing_area.margin_width)
#define M_MarginHeight(m) (m -> drawing_area.margin_height)
#endif /* _XmDrawingAreaP_h */
/* XmBulletinBoard Macros
*/
#ifdef _XmBulletinBoardP_h
#define M_ButtonFontList(m) (m -> bulletin_board.button_font_list)
#define M_LabelFontList(m) (m -> bulletin_board.label_font_list)
#define M_TextFontList(m) (m -> bulletin_board.text_font_list)
#define M_MarginWidth(m) (m -> bulletin_board.margin_width)
#define M_MarginHeight(m) (m -> bulletin_board.margin_height)
#endif /* _XmBulletinBoardP_h */
#ifdef MAYBE
/* DtIconBox Macros
*/
#ifdef _DtIconBoxP_h
#define M_Timer(m) (m -> icon_box.timer)
#define M_ShellX(m) (m -> icon_box.shell_x)
#define M_ShellY(m) (m -> icon_box.shell_y)
#define M_DragShell(m) (m -> icon_box.drag_shell)
#define M_DragWidget(m) (m -> icon_box.drag_widget)
#define M_DragIcon(m) (m -> icon_box.drag_icon)
#define M_XCursor(m) (m -> icon_box.x_cursor)
#define M_CrossCursor(m) (m -> icon_box.cross_cursor)
#endif /* _DtIconBoxP_h */
#endif /* MAYBE */
#endif /* _DtMacrosP_h */
/* DON'T ADD ANYTHING AFTER THIS #endif */

104
cde/include/Dt/MenuButton.h Normal file
View File

@@ -0,0 +1,104 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: MenuButton.h /main/3 1995/10/26 09:33:10 rswiston $ */
/*
* (c) Copyright 1993, 1994 Hewlett-Packard Company
* (c) Copyright 1993, 1994 International Business Machines Corp.
* (c) Copyright 1993, 1994 Sun Microsystems, Inc.
* (c) Copyright 1993, 1994 Novell, Inc.
*/
#ifndef _Dt_MenuButton_h
#define _Dt_MenuButton_h
#include <Xm/Xm.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* Constants
*/
/* Resources */
#ifndef DtNcascadingCallback
#define DtNcascadingCallback XmNcascadingCallback
#endif
#ifndef DtNsubMenuId
#define DtNsubMenuId XmNsubMenuId
#endif
#ifndef DtNcascadePixmap
#define DtNcascadePixmap XmNcascadePixmap
#endif
#ifndef DtCCallback
#define DtCCallback XmCCallback
#endif
#ifndef DtCPixmap
#define DtCPixmap XmCPixmap
#endif
#ifndef DtCMenuWidget
#define DtCMenuWidget XmCMenuWidget
#endif
#ifndef DtCR_CASCADING
#define DtCR_CASCADING XmCR_CASCADING
#endif
/*
* Types
*/
/* Widget class and instance */
typedef struct _DtMenuButtonRec * DtMenuButtonWidget;
typedef struct _DtMenuButtonClassRec * DtMenuButtonWidgetClass;
/*
* Data
*/
/* Widget class record */
externalref WidgetClass dtMenuButtonWidgetClass;
/*
* Functions
*/
extern Widget DtCreateMenuButton(
Widget parent,
char *name,
ArgList arglist,
Cardinal argcount);
#ifdef __cplusplus
}
#endif
#endif /* _Dt_MenuButton_h */

View File

@@ -0,0 +1,123 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: MenuButtonP.h /main/3 1995/10/26 09:33:17 rswiston $ */
/*
* Copyright (C) 1986,1991 Sun Microsystems, Inc
* All rights reserved.
* Notice of copyright on this source code
* product does not indicate publication.
*
* RESTRICTED RIGHTS LEGEND: Use, duplication, or disclosure by
* the U.S. Government is subject to restrictions as set forth
* in subparagraph (c)(1)(ii) of the Rights in Technical Data
* and Computer Software Clause at DFARS 252.227-7013 (Oct. 1988)
* and FAR 52.227-19 (c) (June 1987).
*
* Sun Microsystems, Inc., 2550 Garcia Avenue,
* Mountain View, California 94043.
*
*/
#ifndef _DtMenuButtonP_h
#define _DtMenuButtonP_h
#include "MenuButton.h"
#include <Xm/LabelP.h>
#ifdef __cplusplus
extern "C" {
#endif
/****************************************************************
*
* Message Defines
*
****************************************************************/
#define MB_POST DTWIDGET_GETMESSAGE( \
MS_MenuButton, MENU_POST, _DtMsgMenuButton_0000)
#define MB_PARENT DTWIDGET_GETMESSAGE( \
MS_MenuButton, MENU_PARENT, _DtMsgMenuButton_0001)
#define MB_SUBMENU DTWIDGET_GETMESSAGE( \
MS_MenuButton, MENU_SUBMENU, _DtMsgMenuButton_0002)
/* The MenuButton instance record */
typedef struct
{ /* resources */
XtCallbackList cascading_callback; /* Cascading callback */
Widget submenu; /* the menu to pull down */
Pixmap menu_pixmap; /* pixmap for the menu */
/* internal fields */
Boolean armed; /* armed flag */
Boolean popped_up; /* submenu popped up flag*/
XRectangle menu_rect; /* location of menu*/
Time last_timestamp; /* last time submenu popped down */
Boolean private_submenu;
GC gc;
} DtMenuButtonPart;
/* Full instance record declaration */
typedef struct _DtMenuButtonRec
{
CorePart core;
XmPrimitivePart primitive;
XmLabelPart label;
DtMenuButtonPart menu_button;
} DtMenuButtonRec;
/* MenuButton class structure */
typedef struct {
XtPointer extension; /* Pointer to extension record */
} DtMenuButtonClassPart;
/* Full class record declaration for MenuButton class */
typedef struct _DtMenuButtonClassRec {
CoreClassPart core_class;
XmPrimitiveClassPart primitive_class;
XmLabelClassPart label_class;
DtMenuButtonClassPart menu_button_class;
} DtMenuButtonClassRec;
extern DtMenuButtonClassRec dtMenuButtonClassRec;
#ifdef __cplusplus
} /* Close scope of 'extern "C"' declaration which encloses file. */
#endif
#endif /* _DtMenuButtonP_h */
/* DON'T ADD STUFF AFTER THIS #endif */

114
cde/include/Dt/Message.h Normal file
View File

@@ -0,0 +1,114 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/*
* File: Message.h $XConsortium: Message.h /main/5 1996/03/01 16:36:42 drk $
* Language: C
*
* (c) Copyright 1990, Hewlett-Packard Company, all rights reserved.
*
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
* (c) Copyright 1993, 1994 International Business Machines Corp. *
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
* (c) Copyright 1993, 1994 Novell, Inc. *
*/
#ifndef _Dt_message_h
#define _Dt_message_h
#include <Dt/DataTypes.h>
#include <Dt/DtP.h>
#include <Dt/Service.h>
/* This header file is a modifed version of <Xv/Message.h> that
* provides compatibility between the BMS messaging and the new
* ICCCM messaging used in DT.
*
* The following symbols that were defined in <Xv/Message.h> are
* no longer available. Any code that depended on them will have
* to be rewritten:
*
* DtServerDeathFn
* DtCloseMsgServerConnect
* DtAddFailNotificationCallback
* DtStatusResponse
* DtUniqueRequestId
* DtSendFailNotification
* DtSendMsg
*/
/**********************************
*
* Message Format
*
**********************************/
/*
* DT messages have the following format:
*
* Request message: <request> [args ...]
* Reply message: <SUCCESS | FAILURE> [args ...]
* Notify message: <notification> [args ...]
*
* The following fields in BMS messages are no longer supported:
*
* DT_MSG_SENDER
* DT_MSG_REQUEST_ID
* DT_MSG_TOOL
* DT_MSG_HOST
* DT_MSG_DIR
* DT_MSG_FILE
*/
#define DT_MSG_TYPE 0
#define DT_MSG_COMMAND 0
#define DT_MSG_DATA_1 1
#define DT_MSG_DATA_2 2
#define DT_MSG_DATA_3 3
#define DT_MSG_DATA_4 4
#define DT_MSG_DATA_5 5
#define DT_MSG_DATA_6 6
#define DT_MSG_DATA_7 7
#define DT_MSG_DATA_8 8
#define DT_MSG_DATA_9 9
#define DT_MSG_DATA_10 10
#define DT_MSG_DATA_11 11
#define DT_MSG_DATA_12 12
#define DT_MSG_DATA_13 13
#define DT_MSG_DATA_14 14
#define DT_MSG_DATA_15 15
#define DT_MSG_DATA_16 16
#define DT_MSG_DATA_17 17
#define DT_MSG_DATA_18 18
#define DT_MSG_DATA_19 19
#define DT_MSG_DATA_20 20
#define DtDONT_CARE_FIELD "*"
/*
If a particular message does not require a value in one of the
fields, use DtDONT_CARE_FIELD for the value of the field.
*/
#endif /*_Dt_message_h*/
/* Do not add anything after this endif. */

60
cde/include/Dt/Mrm.h Normal file
View File

@@ -0,0 +1,60 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: Mrm.h /main/1 1996/04/05 14:41:44 mgreess $ */
/*
* Common Desktop Environment
*
* (c) Copyright 1996 Hewlett-Packard Company
* (c) Copyright 1993, 1994, 1995 Hewlett-Packard Company
* (c) Copyright 1993, 1994, 1995 International Business Machines Corp.
* (c) Copyright 1993, 1994, 1995 Sun Microsystems, Inc.
* (c) Copyright 1993, 1994, 1995 Novell, Inc.
* (c) Copyright 1995 Digital Equipment Corp.
* (c) Copyright 1995 Fujitsu Limited
* (c) Copyright 1995 Hitachi, Ltd.
*
*
* RESTRICTED RIGHTS LEGEND
*
* Use, duplication, or disclosure by the U.S. Government is subject to
* restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
* Technical Data and Computer Software clause in DFARS 252.227-7013. Rights
* for non-DOD U.S. Government Departments and Agencies are as set forth in
* FAR 52.227-19(c)(1,2).
*
* Hewlett-Packard Company, 3000 Hanover Street, Palo Alto, CA 94304 U.S.A.
* International Business Machines Corp., Route 100, Somers, NY 10589 U.S.A.
* Sun Microsystems, Inc., 2550 Garcia Avenue, Mountain View, CA 94043 U.S.A.
* Novell, Inc., 190 River Road, Summit, NJ 07901 U.S.A.
* Digital Equipment Corp., 111 Powdermill Road, Maynard, MA 01754, U.S.A.
* Fujitsu Limited, 1015, Kamikodanaka Nakahara-Ku, Kawasaki 211, Japan
* Hitachi, Ltd., 6, Kanda Surugadai 4-Chome, Chiyoda-ku, Tokyo 101, Japan
*/
#ifndef MRM_H
#define MRM_H
/* DtMrmInit.c */
extern void DtMrmInitialize(void);
#endif /* MRM_H */
/* DON'T ADD STUFF AFTER THIS #endif */

55
cde/include/Dt/Msg.h Normal file
View File

@@ -0,0 +1,55 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/*
* Msg.h -- Header file for DT messaging library
*
* $XConsortium: Msg.h /main/5 1996/03/01 16:36:15 drk $
*
* (C) Copyright 1993, Hewlett-Packard, all rights reserved.
*/
#ifndef _DT_MSG_H
#define _DT_MSG_H
#include <X11/Intrinsic.h>
#include <Dt/DataTypes.h>
/*
* _DtMessage handle definitions
*/
typedef struct _DtMsgHandle *DtMsgHandle;
/*
* Return values
*/
#define dtmsg_NO_LISTENERS (102)
#define dtmsg_SUCCESS (1)
#define dtmsg_FAIL (-1)
#define dtmsg_NO_SERVICE (-102)
#define dtmsg_WRONG_FORMAT (-103)
#define dtmsg_ANOTHER_PROVIDER (-104)
#define dtmsg_LOST_SERVICE (-105)
#define DtMsgContext Pointer
#endif /* not defined _DT_MSG_H */
/***** END OF FILE ****/

53
cde/include/Dt/MsgCatP.h Normal file
View File

@@ -0,0 +1,53 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/*
* (c) Copyright 1995 Digital Equipment Corporation.
* (c) Copyright 1995 Hewlett-Packard Company.
* (c) Copyright 1995 International Business Machines Corp.
* (c) Copyright 1995 Sun Microsystems, Inc.
* (c) Copyright 1995 Novell, Inc.
* (c) Copyright 1995 FUJITSU LIMITED.
* (c) Copyright 1995 Hitachi.
*
* MsgCat.h - Public interfaces for the Cached Message Catalog Service
*
* $TOG: MsgCatP.h /main/1 1998/04/22 14:19:24 mgreess $
*
*/
#ifndef _Dt_MsgCat_h
#define _Dt_MsgCat_h
#include <nl_types.h>
#ifdef __cplusplus
extern "C" {
#endif
extern char *_DtCatgetsCached(nl_catd catd, int set, int num, char *dflt);
#ifdef __cplusplus
}
#endif
#endif /* _Dt_MsgCat_h */

86
cde/include/Dt/MsgLog.h Normal file
View File

@@ -0,0 +1,86 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/*
* (c) Copyright 1995 Digital Equipment Corporation.
* (c) Copyright 1995 Hewlett-Packard Company.
* (c) Copyright 1995 International Business Machines Corp.
* (c) Copyright 1995 Sun Microsystems, Inc.
* (c) Copyright 1995 Novell, Inc.
* (c) Copyright 1995 FUJITSU LIMITED.
* (c) Copyright 1995 Hitachi.
*
* MsgLog.h - Public header file for the Message Logging Service
*
* $XConsortium: MsgLog.h /main/5 1995/07/14 13:22:57 drk $
*
*/
#ifndef _Dt_MsgLog_h
#define _Dt_MsgLog_h
#include <stdio.h> /* needed for FILE */
#ifdef __cplusplus
extern "C" {
#endif
# include <stdarg.h>
/*
* Type declarations
*/
typedef enum {
DtMsgLogInformation,
DtMsgLogStderr,
DtMsgLogDebug,
DtMsgLogWarning,
DtMsgLogError
} DtMsgLogType;
typedef void (*DtMsgLogHandler) (
const char * program_name,
DtMsgLogType msg_type,
const char * format,
va_list args );
/*
* Function declarations
*/
extern void DtMsgLogMessage (
const char * program_name,
DtMsgLogType msg_type,
const char * format,
... );
extern DtMsgLogHandler DtMsgLogSetHandler (
DtMsgLogHandler handler );
extern FILE * DtMsgLogOpenFile (
const char * type,
char ** filename_return); /* MODIFIED */
#ifdef __cplusplus
}
#endif
#endif /* _Dt_MsgLog_h */

65
cde/include/Dt/MsgLogI.h Normal file
View File

@@ -0,0 +1,65 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/*
* (c) Copyright 1995 Digital Equipment Corporation.
* (c) Copyright 1995 Hewlett-Packard Company.
* (c) Copyright 1995 International Business Machines Corp.
* (c) Copyright 1995 Sun Microsystems, Inc.
* (c) Copyright 1995 Novell, Inc.
* (c) Copyright 1995 FUJITSU LIMITED.
* (c) Copyright 1995 Hitachi.
*
* MsgLogI.h - Private header file for the Message Logging Service
*
* $XConsortium: MsgLogI.h /main/4 1995/07/14 13:23:02 drk $
*
*/
#ifndef _Dt_MsgLogI_h
#define _Dt_MsgLogI_h
# include <stdarg.h>
# define Va_start(a,b) va_start(a,b)
/*
* Account for the various macros on different systems which indicate that
* stdarg.h has been included. Code in this file only checks for
* _STDARG_INCLUDED. If a given system defines another macro that means the
* same thing -- then define _STDARG_INCLUDED here.
*
* System Macro Indicating stdarg.h has been included
* -------- ---------------------------------------------
* HPUX _STDARG_INCLUDED
* AIX _H_STDARG
* SOLARIS _STDARG_H
*/
#ifdef _H_STDARG
#define _STDARG_INCLUDED
#endif
#ifdef _STDARG_H
#define _STDARG_INCLUDED
#endif
#endif /* _Dt_MsgLogI_h */

182
cde/include/Dt/MsgP.h Normal file
View File

@@ -0,0 +1,182 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
#ifndef _DT_MSG_P_H
#define _DT_MSG_P_H
/*
* MsgP.h -- Private header file for DT messaging library
*
* $XConsortium: MsgP.h /main/3 1995/10/26 15:24:51 rswiston $
* $XConsortium: MsgP.h /main/3 1995/10/26 15:24:51 rswiston $
*
* (C) Copyright 1993, Hewlett-Packard, all rights reserved.
*/
#include <Dt/Msg.h>
/*
* Definitions
*/
/* max property size (bytes) */
#define DT_MSG_MAX_PROP_SIZE (32768)
/* atom names */
#define DT_MSG_XA_REQUEST "_DT_REQUEST"
#define DT_MSG_XA_NOTIFY "_DT_NOTIFY"
#define DT_MSG_XA_BROADCAST_REGISTRY "_DT_BROADCAST_REGISTRY"
/*
* _DtMessage handle
*/
typedef struct _DtMsgHandle {
char * pchName; /* handle "name" */
Atom atom; /* Selection/Broadcast atom */
Widget widget; /* Widget registering this handle */
char * pchPropName; /* property name */
Atom property; /* atomized property name */
/* other data */
struct _DtMsgServiceContext *
service_data; /* service data assoc w/ handle */
struct _DtMsgBroadcastData *
broadcast_data; /* broadcast data assoc w/ handle */
} DtMsgHandle;
/*
* _DtMessage handle accessor "functions"
*/
#define DtMsgH_Name(h) ((h)->pchName)
#define DtMsgH_Widget(h) ((h)->widget)
#define DtMsgH_Atom(h) ((h)->atom)
#define DtMsgH_SvcData(h) ((h)->service_data)
#define DtMsgH_BcData(h) ((h)->broadcast_data)
#define DtMsgH_PropertyName(h) ((h)->pchPropName)
#define DtMsgH_PropertyAtom(h) ((h)->property)
#define DtMsgH_Shandle(h) ((h)->service_data->handle)
#define DtMsgH_RequestProc(h) ((h)->service_data->request_proc)
#define DtMsgH_ReceiveCD(h) ((h)->service_data->receive_client_data)
#define DtMsgH_LoseProc(h) ((h)->service_data->lose_proc)
#define DtMsgH_LoseCD(h) ((h)->service_data->lose_client_data)
#define DtMsgH_RegistryAtom(h) ((h)->broadcast_data->aRegistry)
#define DtMsgH_SharedWindow(h) ((h)->broadcast_data->winShared)
#define DtMsgH_SharedWidget(h) ((h)->broadcast_data->wShared)
#define DtMsgH_Listener(h) ((h)->broadcast_data->wListener)
#define DtMsgH_BreceiveProc(h) ((h)->broadcast_data->Breceive_proc)
#define DtMsgH_BclientData(h) ((h)->broadcast_data->Bclient_data)
#define DtMsgH_Bprops(h) ((h)->broadcast_data->props)
#define DtMsgH_BnumProps(h) ((h)->broadcast_data->numProps)
#define DtMsgH_BsizeProps(h) ((h)->broadcast_data->sizeProps)
#define DtMsgH_Breceivers(h) ((h)->broadcast_data->pReceivers)
#define DtMsgH_BnumReceivers(h) ((h)->broadcast_data->numReceivers)
#define DtMsgH_BsizeReceivers(h) ((h)->broadcast_data->sizeReceivers)
#define DtMsgH_BSenderInit(h) ((h)->broadcast_data->bSenderInitialized)
/*
* Service context data
* (for client that offers a service)
*/
typedef struct _DtMsgServiceContext {
DtMsgHandle handle;
DtMsgReceiveProc request_proc;
DtMsgStatusProc lose_proc;
Pointer receive_client_data;
Pointer lose_client_data;
} DtMsgServiceContext;
/*
* Request context data
* (for client that makes a service request)
*/
typedef struct _DtMsgRequestContext {
DtMsgHandle handle;
DtMsgReceiveProc reply_proc;
Pointer client_data;
} DtMsgRequestContext;
/*
* Reply message context data
* (for client replying to a request)
*/
typedef struct _DtMsgReplyMessageContext {
DtMsgHandle handle;
Window window;
Atom target;
Atom property;
} DtMsgReplyMessageContext;
/*
* Broadcast sender data
*/
/* number of props to allocate per memory request */
#define DT_MSG_PROP_INC_AMT 10
typedef struct _DtMsgBroadcastPerReceiverData {
Widget widget; /* widget of receiver */
Atom * propsUnread; /* list of props */
int numPropsUnread; /* number of props */
int sizePropsUnread; /* amt of space allocated */
} DtMsgBroadcastPerReceiverData;
typedef struct _DtMsgBroadcastData {
Atom aRegistry; /* registry atom name */
Window winShared; /* shared window */
Widget wShared; /* shared widget */
Widget wListener; /* child of shared window */
DtMsgReceiveProc Breceive_proc; /* broadcast receive proc */
Pointer Bclient_data; /* broadcast client data */
Boolean bSenderInitialized; /* true if ready for send */
Atom * props; /* props to use for messages */
int numProps; /* number of message props */
int sizeProps; /* number of props allocated */
DtMsgBroadcastPerReceiverData * pReceivers; /* rcvr data */
int numReceivers; /* number of receivers */
int sizeReceivers; /* amt of rcvr space allocated */
} DtMsgBroadcastData;
/*
* Broadcast _DtMessage Registry definitions
*/
/* registry entry size, in words */
#define DT_MSG_REGISTRY_ENTRY_SIZE 2
/* offsets within each registry entry */
#define DT_MSG_REGISTRY_NAME_OFFSET 0
#define DT_MSG_REGISTRY_WINDOW_OFFSET 1
/* Macros to compute offset */
#define MSG_GROUP_NAME(R, i) \
(R[((i)*DT_MSG_REGISTRY_ENTRY_SIZE)+DT_MSG_REGISTRY_NAME_OFFSET])
#define MSG_GROUP_WINDOW(R, i) \
(R[((i)*DT_MSG_REGISTRY_ENTRY_SIZE)+DT_MSG_REGISTRY_WINDOW_OFFSET])
#endif /* not defined _DT_MSG_P_H */
/***** END OF FILE ****/

237
cde/include/Dt/Print.h Normal file
View File

@@ -0,0 +1,237 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: Print.h /main/13 1996/10/31 02:09:08 cde-hp $ */
/*
* DtPrint/Print.h
*/
/* (c) Copyright 1990, 1991, 1992, 1993, 1994 OPEN SOFTWARE FOUNDATION, INC.
* ALL RIGHTS RESERVED
* (c) Copyright 1989, 1996 DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.
* (c) Copyright 1987, 1988, 1989, 1990, 1991, 1992, 1995, 1996,
* HEWLETT-PACKARD COMPANY
* (c) Copyright 1996 International Business Machines Corp.
* (c) Copyright 1996 Sun Microsystems, Inc.
* (c) Copyright 1996 Novell, Inc.
* (c) Copyright 1996 FUJITSU LIMITED.
* (c) Copyright 1996 Hitachi.
*/
#ifndef _DtPrint_h
#define _DtPrint_h
#include <Xm/Xm.h>
#if 0 && defined(PRINTING_SUPPORTED)
#include <X11/extensions/Print.h>
#endif /* PRINTING_SUPPORTED */
#ifdef __cplusplus
extern "C" {
#endif
/*
* Class record constants
*/
externalref WidgetClass dtPrintSetupBoxWidgetClass;
typedef struct _DtPrintSetupBoxClassRec * DtPrintSetupBoxWidgetClass;
typedef struct _DtPrintSetupBoxRec * DtPrintSetupBoxWidget;
#ifndef DtIsPrintSetupBox
#define DtIsPrintSetupBox(w) (XtIsSubclass (w, dtPrintSetupBoxWidgetClass))
#endif
/*
* Resource Names
*/
#define DtNcancelCallback "cancelCallback"
#define DtNclosePrintDisplayCallback "closePrintDisplayCallback"
#define DtNcopies "copies"
#define DtNdescription "description"
#define DtNdestroyContextCallback "destroyContextCallback"
#define DtNfileName "fileName"
#ifndef DtNminimizeButtons
# define DtNminimizeButtons "minimizeButtons"
#endif
#define DtNoptionCount "optionCount"
#define DtNoptions "options"
#define DtNprintCallback "printCallback"
#define DtNprintDestination "printDestination"
#define DtNprinterInfoProc "printerInfoProc"
#define DtNprinterName "printerName"
#define DtNprintSetupMode "printSetupMode"
#define DtNselectFileProc "selectFileProc"
#define DtNselectPrinterProc "selectPrinterProc"
#define DtNsetupCallback "setupCallback"
#define DtNverifyPrinterProc "verifyPrinterProc"
#define DtNworkAreaLocation "workAreaLocation"
#define DtCCancelCallback "CancelCallback"
#define DtCClosePrintDisplayCallback "ClosePrintDisplayCallback"
#define DtCCopies "Copies"
#define DtCDescription "Description"
#define DtCDestroyContextCallback "DestroyContextCallback"
#define DtCFileName "FileName"
#ifndef DtCMinimizeButtons
# define DtCMinimizeButtons "MinimizeButtons"
#endif
#define DtCOptionCount "OptionCount"
#define DtCOptions "Options"
#define DtCPrintCallback "PrintCallback"
#define DtCPrintDestination "PrintDestination"
#define DtCPrinterInfoProc "PrinterInfoProc"
#define DtCPrinterName "PrinterName"
#define DtCPrintSetupMode "PrintSetupMode"
#define DtCSelectFileProc "SelectFileProc"
#define DtCSelectPrinterProc "SelectPrinterProc"
#define DtCSetupCallback "SetupCallback"
#define DtCVerifyPrinterProc "VerifyPrinterProc"
#define DtCWorkAreaLocation "WorkAreaLocation"
#define DtRPrintSetupProc "PrintSetupProc"
/*
* DtNsetupMode Resource Values
*/
enum {
DtPRINT_SETUP_PLAIN,
DtPRINT_SETUP_XP
};
/*
* DtNworkAreaLocation Resource Values
*/
enum {
DtWORK_AREA_NONE,
DtWORK_AREA_TOP,
DtWORK_AREA_TOP_AND_BOTTOM,
DtWORK_AREA_BOTTOM
};
/*
* DtNprintDestination Resource Values
*/
enum { DtPRINT_NO_DESTINATION, DtPRINT_TO_PRINTER, DtPRINT_TO_FILE };
/*
* DtNprinterNameMode Resource Values
*/
enum { DtSHORT_NAME, DtMEDIUM_NAME, DtLONG_NAME };
/*
* Mode values for DtPrintSetupBoxResetConnection()
*/
typedef enum {
DtPRINT_CLOSE_CONNECTION,
DtPRINT_RELEASE_CONNECTION
} DtPrintResetConnectionMode;
/*
* Callback Reasons
*/
enum {
DtPRINT_CR_NONE,
DtPRINT_CR_CANCEL,
DtPRINT_CR_CLOSE_PRINT_DISPLAY,
DtPRINT_CR_PRINT,
DtPRINT_CR_SETUP
};
/*
* DtPrint proecdure return values
*/
enum {
DtPRINT_SUCCESS,
DtPRINT_BAD_PARM,
DtPRINT_FAILURE,
DtPRINT_INVALID_DISPLAY,
DtPRINT_NOT_XP_DISPLAY,
DtPRINT_NO_CONNECTION,
DtPRINT_NO_DEFAULT,
DtPRINT_NO_DEFAULT_DISPLAY,
DtPRINT_NO_PRINTER,
DtPRINT_PRINTER_MISSING
};
enum {
DtPRINT_HINT_MESSAGES_OK,
DtPRINT_HINT_NO_MESSAGES
};
/*
* PrintSetupBox Callback Structure Definition
*/
typedef struct _DtPrintSetupData
{
String printer_name;
Display *print_display;
#ifdef PRINTING_SUPPORT
XPContext print_context;
#endif /* PRINTING_SUPPORTED */
XtEnum destination;
String dest_info;
XtEnum messages_hint;
} DtPrintSetupData;
typedef struct _DtPrintSetupCallbackStruct
{
int reason;
XEvent *event;
DtPrintSetupData *print_data;
} DtPrintSetupCallbackStruct;
/*
* PrintSetupBox Procedure Resource Type Definition
*/
typedef XtEnum (*DtPrintSetupProc)(Widget, DtPrintSetupData*);
/*
* Public Function Declarations
*/
extern Widget DtCreatePrintSetupBox(
Widget p,
String name,
ArgList args,
Cardinal n) ;
extern Widget DtCreatePrintSetupDialog(
Widget ds_p,
String name,
ArgList sb_args,
Cardinal sb_n) ;
extern DtPrintSetupData* DtPrintCopySetupData(
DtPrintSetupData* target,
const DtPrintSetupData* source);
extern XtEnum DtPrintFillSetupData(
Widget psub,
DtPrintSetupData* print_data);
extern void DtPrintFreeSetupData(
DtPrintSetupData* target);
extern XtEnum DtPrintResetConnection(
Widget psub,
DtPrintResetConnectionMode m);
#ifdef __cplusplus
} /* Close scope of 'extern "C"' declaration which encloses file. */
#endif
#endif /* _DtPrint_h */
/* DON'T ADD ANYTHING AFTER THIS #endif */

View File

@@ -0,0 +1,52 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: PrintDlgMgrP.h /main/3 1996/08/12 18:40:55 cde-hp $ */
/*
* DtPrint/PrintDlgMgrP.h
*/
/*
* (c) Copyright 1996 Digital Equipment Corporation.
* (c) Copyright 1996 Hewlett-Packard Company.
* (c) Copyright 1996 International Business Machines Corp.
* (c) Copyright 1996 Sun Microsystems, Inc.
* (c) Copyright 1996 Novell, Inc.
* (c) Copyright 1996 FUJITSU LIMITED.
* (c) Copyright 1996 Hitachi.
*/
#ifndef _PrintDlgMgrP_h
#define _PrintDlgMgrP_h
#include <Xm/Xm.h>
#ifdef __cplusplus
extern "C" {
#endif
extern Widget _DtCreatePDMJobSetup(Widget Parent);
#ifdef __cplusplus
} /* Close scope of 'extern "C"' declaration which encloses file. */
#endif
#endif /* _DtPrintDlgMgrP_h */
/* DON'T ADD ANYTHING AFTER THIS #endif */

72
cde/include/Dt/PrintI.h Normal file
View File

@@ -0,0 +1,72 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: PrintI.h /main/1 1996/10/31 11:19:07 drk $
*
* (c) Copyright 1996 Digital Equipment Corporation.
* (c) Copyright 1996 Hewlett-Packard Company.
* (c) Copyright 1996 International Business Machines Corp.
* (c) Copyright 1996 Sun Microsystems, Inc.
* (c) Copyright 1996 Novell, Inc.
* (c) Copyright 1996 FUJITSU LIMITED.
* (c) Copyright 1996 Hitachi.
*/
#ifndef _DtPrintI_h
#define _DtPrintI_h
#include <X11/Intrinsic.h>
#ifdef __cplusplus
extern "C" {
#endif
/******** Conditionally defined macros for thread safe DtPrint ******/
#ifdef XTHREADS
#define _DtPrintWidgetToAppContext(w) \
XtAppContext app = XtWidgetToApplicationContext(w)
#define _DtPrintDisplayToAppContext(d) \
XtAppContext app = XtDisplayToApplicationContext(d)
#define _DtPrintAppLock(app) XtAppLock(app)
#define _DtPrintAppUnlock(app) XtAppUnlock(app)
#define _DtPrintProcessLock() XtProcessLock()
#define _DtPrintProcessUnlock() XtProcessUnlock()
#else /* XTHREADS */
#define _DtPrintWidgetToAppContext(w)
#define _DtPrintDisplayToAppContext(d)
#define _DtPrintAppLock(app)
#define _DtPrintAppUnlock(app)
#define _DtPrintProcessLock()
#define _DtPrintProcessUnlock()
#endif /* XTHREADS */
#ifdef __cplusplus
} /* Close scope of 'extern "C"' declaration which encloses file. */
#endif
#endif /* _DtPrintI_h */
/* DON'T ADD ANYTHING AFTER THIS #endif */

203
cde/include/Dt/PrintMsgsP.h Normal file
View File

@@ -0,0 +1,203 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: PrintMsgsP.h /main/9 1996/08/19 17:12:12 cde-hp $ */
/*
* DtPrint/PrintMsgsP.h
*/
/*
* (c) Copyright 1996 Digital Equipment Corporation.
* (c) Copyright 1996 Hewlett-Packard Company.
* (c) Copyright 1996 International Business Machines Corp.
* (c) Copyright 1996 Sun Microsystems, Inc.
* (c) Copyright 1996 Novell, Inc.
* (c) Copyright 1996 FUJITSU LIMITED.
* (c) Copyright 1996 Hitachi.
*/
#ifndef _DtPrintMsgsP_h
#define _DtPrintMsgsP_h
#ifdef I18N_MSG
#include <nl_types.h>
#define DTPRINT_GETMESSAGE(set, number, string) \
_DtPrintGetMessage(set, number, string)
#else /* I18N_MSG */
#define DTPRINT_GETMESSAGE(set, number, string) string
#endif /* I18N_MSG */
/*** const causes the HP compiler to complain. Remove reference until ***
*** the build and integration people can figure out how to get this to ***
*** work. ***/
/* #define CONST const */
#define CONST
/*
* extern declarations for PrintSetupBox widget messages
*/
extern CONST char _DtPrMsgPrintSetupBox_0000[];
extern CONST char _DtPrMsgPrintSetupBox_0001[];
extern CONST char _DtPrMsgPrintSetupBox_0002[];
extern CONST char _DtPrMsgPrintSetupBox_0003[];
extern CONST char _DtPrMsgPrintSetupBox_0004[];
extern CONST char _DtPrMsgPrintSetupBox_0005[];
extern CONST char _DtPrMsgPrintSetupBox_0006[];
extern CONST char _DtPrMsgPrintSetupBox_0007[];
extern CONST char _DtPrMsgPrintSetupBox_0008[];
extern CONST char _DtPrMsgPrintSetupBox_0009[];
extern CONST char _DtPrMsgPrintSetupBox_0010[];
extern CONST char _DtPrMsgPrintSetupBox_0011[];
extern CONST char _DtPrMsgPrintSetupBox_0012[];
extern CONST char _DtPrMsgPrintSetupBox_0013[];
extern CONST char _DtPrMsgPrintSetupBox_0014[];
extern CONST char _DtPrMsgPrintSetupBox_0015[];
extern CONST char _DtPrMsgPrintSetupBox_0016[];
extern CONST char _DtPrMsgPrintSetupBox_0017[];
extern CONST char _DtPrMsgPrintSetupBox_0018[];
extern CONST char _DtPrMsgPrintSetupBox_0019[];
extern CONST char _DtPrMsgPrintSetupBox_0020[];
extern CONST char _DtPrMsgPrintSetupBox_0021[];
extern CONST char _DtPrMsgPrintSetupBox_0022[];
extern CONST char _DtPrMsgPrintSetupBox_0023[];
extern CONST char _DtPrMsgPrintSetupBox_0024[];
extern CONST char _DtPrMsgPrintSetupBox_0025[];
extern CONST char _DtPrMsgPrintSetupBox_0026[];
extern CONST char _DtPrMsgPrintSetupBox_0027[];
extern CONST char _DtPrMsgPrintSetupBox_0028[];
extern CONST char _DtPrMsgPrintSetupBox_0029[];
extern CONST char _DtPrMsgPrintSetupBox_0030[];
extern CONST char _DtPrMsgPrintSetupBox_0031[];
extern CONST char _DtPrMsgPrintSetupBox_0032[];
extern CONST char _DtPrMsgPrintSetupBox_0033[];
extern CONST char _DtPrMsgPrintSetupBox_0034[];
extern CONST char _DtPrMsgPrintSetupBox_0035[];
extern CONST char _DtPrMsgPrintSetupBox_0036[];
/*
* Message set for PrintSetupBox widget
*/
#define MS_PrintSetupBox 1
/* Message IDs for PrintSetupBox */
#define PSUB_WARN_WA_LOCATION 1
#define PSUB_SELECT_PRINTER 2
#define PSUB_PRINT_TO_FILE 3
#define PSUB_SELECT_FILE 4
#define PSUB_CANCEL 5
#define PSUB_COPIES 6
#define PSUB_HELP 7
#define PSUB_PRINT 8
#define PSUB_PRINTER_NAME 9
#define PSUB_SETUP 10
#define PSUB_DESCRIPTION 11
#define PSUB_WARN_COPY_COUNT 12
#define PSUB_WARN_SETUP_MODE 13
#define PSUB_WARN_SETUP_MODE_CHANGE 14
#define PSUB_PRINTER_INFO 15
#define PSUB_INVALID_PRINTER_TITLE 16
#define PSUB_INVALID_PRINTER_MESSAGE 17
#define PSUB_INVALID_DISPLAY_MESSAGE 18
#define PSUB_NOT_XP_DISPLAY_MESSAGE 19
#define PSUB_NO_DEFAULT_MESSAGE 20
#define PSUB_NO_DEFAULT_DISPLAY_MESSAGE 21
#define PSUB_PRINTER_MISSING_MESSAGE 22
#define PSUB_WARN_PRINT_DESTINATION 23
#define PSUB_WARN_CT_CONVERSION 24
#define PSUB_WARN_CONVERSION_ARGS 25
#define PSUB_PRLIST_ERROR_TITLE 26
#define PSUB_NO_PRINTERS_MESSAGE 27
#define PSUB_DESC_UNAVAILABLE 28
#define PSUB_SELECT_FILE_TITLE 29
#define PSUB_PRINTER_INFO_TITLE 30
#define PSUB_FORMAT_LABEL 31
#define PSUB_MODEL_LABEL 32
#define PSUB_PRINTER_LIST_LABEL 33
#define PSUB_MORE_PRINTERS_TITLE 34
#define PSUB_PRINT_TO_PRINTER 35
#define PSUB_FILE_NAME 36
#define PSUB_HELP_DLG_TITLE 37
/*
* extern declarations for _DtPrint frame widgets
*/
extern CONST char _DtPrMsgPrintOption_0000[];
extern CONST char _DtPrMsgPrintOption_0001[];
extern CONST char _DtPrMsgPrintOption_0002[];
extern CONST char _DtPrMsgPrintOption_0003[];
extern CONST char _DtPrMsgPrintOption_0004[];
extern CONST char _DtPrMsgPrintOption_0005[];
extern CONST char _DtPrMsgPrintOption_0006[];
extern CONST char _DtPrMsgPrintOption_0007[];
extern CONST char _DtPrMsgPrintOption_0008[];
extern CONST char _DtPrMsgPrintOption_0009[];
/*
* Message set for _DtPrint frame widgets
*/
#define MS_PrintOptionsSet 2
/*
* Message IDs for _DtPrint frame widgets
*/
#define DTPO_MARGINS 1
#define DTPO_TOP 2
#define DTPO_RIGHT 3
#define DTPO_BOTTOM 4
#define DTPO_LEFT 5
#define DTPO_HEADERS_N_FOOTERS 6
#define DTPO_TOP_LEFT 7
#define DTPO_TOP_RIGHT 8
#define DTPO_BOTTOM_LEFT 9
#define DTPO_BOTTOM_RIGHT 10
/*
* extern declarations for PrintDlgMgr module
*/
extern CONST char _DtPrMsgPrintDlgMgr_0000[];
extern CONST char _DtPrMsgPrintDlgMgr_0001[];
extern CONST char _DtPrMsgPrintDlgMgr_0002[];
/*
* Message set for PrintDlgMgr module
*/
#define MS_PrintDlgMgrSet 3
/*
* Message IDs for PrintDlgMgr module
*/
#define DTPDM_SEND_MAIL_LABEL 1
#define DTPDM_BANNER_LABEL 2
#define DTPDM_SPOOL_OPTS_LABEL 3
#ifdef I18N_MSG
extern char * _DtPrintGetMessage(
int set,
int n,
char * s);
#endif /* I18N_MSG */
#endif /* _DtPrintMsgsP_h */

View File

@@ -0,0 +1,199 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: PrintOptionsP.h /main/2 1996/03/12 09:28:04 drk $ */
#ifndef _DT_PRINT_OPTIONSP_H
#define _DT_PRINT_OPTIONSP_H
/*
*+SNOTICE
*
* $:$
*
* RESTRICTED CONFIDENTIAL INFORMATION:
*
* The information in this document is subject to special
* restrictions in a confidential disclosure agreement between
* HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
* document outside HP, IBM, Sun, USL, SCO, or Univel without
* Sun's specific written approval. This document and all copies
* and derivative works thereof must be returned or destroyed at
* Sun's request.
*
* Copyright 1994 Sun Microsystems, Inc. All rights reserved.
*
*+ENOTICE
*/
/*
Common Desktop Environment
(c) Copyright 1993, 1994, 1995 Hewlett-Packard Company
(c) Copyright 1993, 1994, 1995 International Business Machines Corp.
(c) Copyright 1993, 1994, 1995 Sun Microsystems, Inc.
(c) Copyright 1993, 1994, 1995 Novell, Inc.
(c) Copyright 1995 Digital Equipment Corp.
(c) Copyright 1995 Fujitsu Limited
(c) Copyright 1995 Hitachi, Ltd.
RESTRICTED RIGHTS LEGEND
Use, duplication, or disclosure by the U.S. Government is subject to
restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
Technical Data and Computer Software clause in DFARS 252.227-7013. Rights
for non-DOD U.S. Government Departments and Agencies are as set forth in
FAR 52.227-19(c)(1,2).
Hewlett-Packard Company, 3000 Hanover Street, Palo Alto, CA 94304 U.S.A.
International Business Machines Corp., Route 100, Somers, NY 10589 U.S.A.
Sun Microsystems, Inc., 2550 Garcia Avenue, Mountain View, CA 94043 U.S.A.
Novell, Inc., 190 River Road, Summit, NJ 07901 U.S.A.
Digital Equipment Corp., 111 Powdermill Road, Maynard, Massachusetts 01754, U.S.A.
Fujitsu Limited, 1015, Kamikodanaka Nakahara-Ku, Kawasaki 211, Japan
Hitachi, Ltd., 6, Kanda Surugadai 4-Chome, Chiyoda-ku, Tokyo 101, Japan
*/
#ifdef __cplusplus
extern "C" {
#endif
/*
* Message Catalog Lookup
*/
#define DTPO_MARGIN_FRAME_LABEL DTPRINT_GETMESSAGE( \
MS_PrintOptionsSet, DTPO_MARGINS, _DtPrMsgPrintOption_0000)
#define DTPO_MARGIN_FRAME_TOP_MARGIN_LABEL DTPRINT_GETMESSAGE( \
MS_PrintOptionsSet, DTPO_TOP, _DtPrMsgPrintOption_0001)
#define DTPO_MARGIN_FRAME_RIGHT_MARGIN_LABEL DTPRINT_GETMESSAGE( \
MS_PrintOptionsSet, DTPO_RIGHT, _DtPrMsgPrintOption_0002)
#define DTPO_MARGIN_FRAME_BOTTOM_MARGIN_LABEL DTPRINT_GETMESSAGE( \
MS_PrintOptionsSet, DTPO_BOTTOM, _DtPrMsgPrintOption_0003)
#define DTPO_MARGIN_FRAME_LEFT_MARGIN_LABEL DTPRINT_GETMESSAGE( \
MS_PrintOptionsSet, DTPO_LEFT, _DtPrMsgPrintOption_0004)
#define DTPO_HEADERFOOTER_FRAME_LABEL DTPRINT_GETMESSAGE( \
MS_PrintOptionsSet, DTPO_HEADERS_N_FOOTERS, _DtPrMsgPrintOption_0005)
#define DTPO_HEADERFOOTER_FRAME_TOP_LEFT_LABEL DTPRINT_GETMESSAGE( \
MS_PrintOptionsSet, DTPO_TOP_LEFT, _DtPrMsgPrintOption_0006)
#define DTPO_HEADERFOOTER_FRAME_TOP_RIGHT_LABEL DTPRINT_GETMESSAGE( \
MS_PrintOptionsSet, DTPO_TOP_RIGHT, _DtPrMsgPrintOption_0007)
#define DTPO_HEADERFOOTER_FRAME_BOTTOM_LEFT_LABEL DTPRINT_GETMESSAGE( \
MS_PrintOptionsSet, DTPO_BOTTOM_LEFT, _DtPrMsgPrintOption_0008)
#define DTPO_HEADERFOOTER_FRAME_BOTTOM_RIGHT_LABEL DTPRINT_GETMESSAGE( \
MS_PrintOptionsSet, DTPO_BOTTOM_RIGHT, _DtPrMsgPrintOption_0009)
/*
* Header/Footer Frame API
*/
typedef enum {
DTPRINT_OPTION_HEADER_LEFT,
DTPRINT_OPTION_HEADER_RIGHT,
DTPRINT_OPTION_FOOTER_LEFT,
DTPRINT_OPTION_FOOTER_RIGHT
} _DtPrintHdrFtrEnum;
extern Widget _DtPrintCreateHdrFtrFrame(
Widget parent,
int nspecs,
char **spec_strings,
void **spec_data
);
extern Widget _DtPrintHdrFtrFrameEnumToWidget(
Widget frame,
_DtPrintHdrFtrEnum which
);
extern void _DtPrintHdrFtrFrameMenuWidgets(
Widget frame,
Widget *menu,
int *nmenu_buttons,
Widget **menu_buttons
);
extern void *_DtPrintGetHdrFtrData(
Widget widget
);
extern int _DtPrintGetHdrFtrIndex(
Widget widget
);
extern char *_DtPrintGetHdrFtrString(
Widget widget
);
extern void _DtPrintSetHdrFtrByData(
Widget widget,
void *data
);
extern void _DtPrintSetHdrFtrByIndex(
Widget widget,
int index
);
extern void _DtPrintSetHdrFtrByString(
Widget widget,
char *string
);
/*
* Margin Frame API
*/
typedef enum {
DTPRINT_OPTION_MARGIN_TOP,
DTPRINT_OPTION_MARGIN_RIGHT,
DTPRINT_OPTION_MARGIN_BOTTOM,
DTPRINT_OPTION_MARGIN_LEFT
} _DtPrintMarginEnum;
extern Widget _DtPrintCreateMarginFrame(
Widget parent
);
extern Widget _DtPrintMarginFrameEnumToWidget(
Widget frame,
_DtPrintMarginEnum which
);
extern char* _DtPrintGetMarginSpec(
Widget margin
);
extern void _DtPrintSetMarginSpec(
Widget margin,
char *spec
);
#ifdef __cplusplus
} /* Close scope of 'extern "C"' declaration which encloses file. */
#endif
#endif /* _DT_PRINT_OPTIONSP_H */
/* DON'T ADD ANYTHING AFTER THIS #endif */

View File

@@ -0,0 +1,536 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: PrintSetupBP.h /main/16 1996/11/01 15:00:02 cde-hp $ */
/*
* DtPrint/PrintSetupBP.h
*/
/* (c) Copyright 1990, 1991, 1992, 1993, 1994 OPEN SOFTWARE FOUNDATION, INC.
* ALL RIGHTS RESERVED
* (c) Copyright 1989, 1996 DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.
* (c) Copyright 1987, 1988, 1989, 1990, 1991, 1992, 1995, 1996,
* HEWLETT-PACKARD COMPANY
* (c) Copyright 1996 International Business Machines Corp.
* (c) Copyright 1996 Sun Microsystems, Inc.
* (c) Copyright 1996 Novell, Inc.
* (c) Copyright 1996 FUJITSU LIMITED.
* (c) Copyright 1996 Hitachi.
*/
#ifndef _DtPrintSetupBP_h
#define _DtPrintSetupBP_h
#include <Xm/BulletinBP.h>
#include <Dt/Print.h>
#include <Dt/PrintMsgsP.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* ------------------------------------------------------------------------
* Constant Definitions
*
*/
/*
* Message Catalog Lookup
*/
#define WARN_WORK_AREA_LOCATION DTPRINT_GETMESSAGE( \
MS_PrintSetupBox, PSUB_WARN_WA_LOCATION, _DtPrMsgPrintSetupBox_0000)
#define SELECT_PRINTER_LABEL DTPRINT_GETMESSAGE( \
MS_PrintSetupBox, PSUB_SELECT_PRINTER, _DtPrMsgPrintSetupBox_0001)
#define PRINT_TO_FILE_LABEL DTPRINT_GETMESSAGE( \
MS_PrintSetupBox, PSUB_PRINT_TO_FILE, _DtPrMsgPrintSetupBox_0002)
#define SELECT_FILE_LABEL DTPRINT_GETMESSAGE( \
MS_PrintSetupBox, PSUB_SELECT_FILE, _DtPrMsgPrintSetupBox_0003)
#define CANCEL_LABEL DTPRINT_GETMESSAGE( \
MS_PrintSetupBox, PSUB_CANCEL, _DtPrMsgPrintSetupBox_0004)
#define COPIES_LABEL DTPRINT_GETMESSAGE( \
MS_PrintSetupBox, PSUB_COPIES, _DtPrMsgPrintSetupBox_0005)
#define HELP_LABEL DTPRINT_GETMESSAGE( \
MS_PrintSetupBox, PSUB_HELP, _DtPrMsgPrintSetupBox_0006)
#define PRINT_LABEL DTPRINT_GETMESSAGE( \
MS_PrintSetupBox, PSUB_PRINT, _DtPrMsgPrintSetupBox_0007)
#define PRINTER_NAME_LABEL DTPRINT_GETMESSAGE( \
MS_PrintSetupBox, PSUB_PRINTER_NAME, _DtPrMsgPrintSetupBox_0008)
#define SETUP_LABEL DTPRINT_GETMESSAGE( \
MS_PrintSetupBox, PSUB_SETUP, _DtPrMsgPrintSetupBox_0009)
#define DESCRIPTION_LABEL DTPRINT_GETMESSAGE( \
MS_PrintSetupBox, PSUB_DESCRIPTION, _DtPrMsgPrintSetupBox_0010)
#define WARN_COPY_COUNT DTPRINT_GETMESSAGE( \
MS_PrintSetupBox, PSUB_WARN_COPY_COUNT, _DtPrMsgPrintSetupBox_0011)
#define WARN_SETUP_MODE DTPRINT_GETMESSAGE( \
MS_PrintSetupBox, PSUB_WARN_SETUP_MODE, _DtPrMsgPrintSetupBox_0012)
#define WARN_SETUP_MODE_CHANGE DTPRINT_GETMESSAGE( \
MS_PrintSetupBox, PSUB_WARN_SETUP_MODE_CHANGE, _DtPrMsgPrintSetupBox_0013)
#define PRINTER_INFO_LABEL DTPRINT_GETMESSAGE( \
MS_PrintSetupBox, PSUB_PRINTER_INFO, _DtPrMsgPrintSetupBox_0014)
#define INVALID_PRINTER_TITLE DTPRINT_GETMESSAGE( \
MS_PrintSetupBox, PSUB_INVALID_PRINTER_TITLE, _DtPrMsgPrintSetupBox_0015)
#define INVALID_PRINTER_MESSAGE DTPRINT_GETMESSAGE( \
MS_PrintSetupBox, PSUB_INVALID_PRINTER_MESSAGE, _DtPrMsgPrintSetupBox_0016)
#define INVALID_DISPLAY_MESSAGE DTPRINT_GETMESSAGE( \
MS_PrintSetupBox, PSUB_INVALID_DISPLAY_MESSAGE, _DtPrMsgPrintSetupBox_0017)
#define NOT_XP_DISPLAY_MESSAGE DTPRINT_GETMESSAGE( \
MS_PrintSetupBox, PSUB_NOT_XP_DISPLAY_MESSAGE, _DtPrMsgPrintSetupBox_0018)
#define NO_DEFAULT_MESSAGE DTPRINT_GETMESSAGE( \
MS_PrintSetupBox, PSUB_NO_DEFAULT_MESSAGE, _DtPrMsgPrintSetupBox_0019)
#define NO_DEFAULT_DISPLAY_MESSAGE DTPRINT_GETMESSAGE(MS_PrintSetupBox, \
PSUB_NO_DEFAULT_DISPLAY_MESSAGE, _DtPrMsgPrintSetupBox_0020)
#define PRINTER_MISSING_MESSAGE DTPRINT_GETMESSAGE(MS_PrintSetupBox, \
PSUB_PRINTER_MISSING_MESSAGE, _DtPrMsgPrintSetupBox_0021)
#define WARN_PRINT_DESTINATION DTPRINT_GETMESSAGE( \
MS_PrintSetupBox, PSUB_WARN_PRINT_DESTINATION, _DtPrMsgPrintSetupBox_0022)
#define WARN_CT_CONVERSION DTPRINT_GETMESSAGE( \
MS_PrintSetupBox, PSUB_WARN_CT_CONVERSION, _DtPrMsgPrintSetupBox_0023)
#define WARN_CONVERSION_ARGS DTPRINT_GETMESSAGE( \
MS_PrintSetupBox, PSUB_WARN_CONVERSION_ARGS, _DtPrMsgPrintSetupBox_0024)
#define PRLIST_ERROR_TITLE DTPRINT_GETMESSAGE( \
MS_PrintSetupBox, PSUB_PRLIST_ERROR_TITLE, _DtPrMsgPrintSetupBox_0025)
#define NO_PRINTERS_MESSAGE DTPRINT_GETMESSAGE( \
MS_PrintSetupBox, PSUB_NO_PRINTERS_MESSAGE, _DtPrMsgPrintSetupBox_0026)
#define DESC_UNAVAILABLE DTPRINT_GETMESSAGE( \
MS_PrintSetupBox, PSUB_DESC_UNAVAILABLE, _DtPrMsgPrintSetupBox_0027)
#define SELECT_FILE_TITLE DTPRINT_GETMESSAGE( \
MS_PrintSetupBox, PSUB_SELECT_FILE_TITLE, _DtPrMsgPrintSetupBox_0028)
#define PRINTER_INFO_TITLE DTPRINT_GETMESSAGE( \
MS_PrintSetupBox, PSUB_PRINTER_INFO_TITLE, _DtPrMsgPrintSetupBox_0029)
#define FORMAT_LABEL DTPRINT_GETMESSAGE( \
MS_PrintSetupBox, PSUB_FORMAT_LABEL, _DtPrMsgPrintSetupBox_0030)
#define MODEL_LABEL DTPRINT_GETMESSAGE( \
MS_PrintSetupBox, PSUB_MODEL_LABEL, _DtPrMsgPrintSetupBox_0031)
#define PRINTER_LIST_LABEL DTPRINT_GETMESSAGE( \
MS_PrintSetupBox, PSUB_PRINTER_LIST_LABEL, _DtPrMsgPrintSetupBox_0032)
#define MORE_PRINTERS_TITLE DTPRINT_GETMESSAGE( \
MS_PrintSetupBox, PSUB_MORE_PRINTERS_TITLE, _DtPrMsgPrintSetupBox_0033)
#define PRINT_TO_PRINTER_LABEL DTPRINT_GETMESSAGE( \
MS_PrintSetupBox, PSUB_PRINT_TO_PRINTER, _DtPrMsgPrintSetupBox_0034)
#define FILE_NAME_LABEL DTPRINT_GETMESSAGE( \
MS_PrintSetupBox, PSUB_FILE_NAME, _DtPrMsgPrintSetupBox_0035)
#define HELP_DLG_TITLE DTPRINT_GETMESSAGE( \
MS_PrintSetupBox, PSUB_HELP_DLG_TITLE, _DtPrMsgPrintSetupBox_0036)
#
/*
* Constants for Use in Allocation Geometry Matrix.
*/
#define DtPSUB_MAX_WIDGETS_VERT 12
/*
* ------------------------------------------------------------------------
* Type Definitions
*
*/
/*
* data private to default resource procedures
*/
typedef struct
{
String printer_name_ct;
String printer_name;
String description;
} DtPrintSelectPrinterRec, *DtPrintSelectPrinterList;
typedef struct _DtPrintDefaultProcData
{
/*
* common data
*/
Widget error_message_box;
XtEnum messages_hint;
Widget help_dialog;
/*
* select file proc
*/
Widget file_selection_box;
/*
* select printer proc
*/
Widget printer_selection_box;
Widget printer_list_box;
String* xp_server_list;
int xp_server_count;
DtPrintSelectPrinterList* printer_lists;
int* printer_counts;
int selected_printer;
Display* select_printer_info_display;
#if 0 && defined(PRINTING_SUPPORTED)
XPContext select_printer_info_context;
#endif /* PRINTING_SUPPORT */
/*
* printer info proc
*/
Widget printer_info_box;
} DtPrintDefaultProcData;
/*
* verify state
*/
typedef enum {
DtPRINT_VERIFIED,
DtPRINT_IN_VERIFY,
DtPRINT_NOT_VERIFIED
} DtPrintVerifyState;
/*
* Constraint part record for PrintSetupBox widget
*/
typedef struct _DtPrintSetupBoxConstraintPart
{
char unused;
} DtPrintSetupBoxConstraintPart, * DtPrintSetupBoxConstraint;
/*
* New fields for the PrintSetupBox widget class record
*/
typedef struct
{
XtCallbackProc list_callback ;
XtPointer extension; /* Pointer to extension record */
} DtPrintSetupBoxClassPart;
/*
* Full class record declaration
*/
typedef struct _DtPrintSetupBoxClassRec
{
CoreClassPart core_class;
CompositeClassPart composite_class;
ConstraintClassPart constraint_class;
XmManagerClassPart manager_class;
XmBulletinBoardClassPart bulletin_board_class;
DtPrintSetupBoxClassPart print_setup_box_class;
} DtPrintSetupBoxClassRec;
externalref DtPrintSetupBoxClassRec dtPrintSetupBoxClassRec;
/*
* New fields for the PrintSetupBox widget record
*/
typedef struct
{
/*
* synthetic resources
*/
String file_name;
String printer_name;
XmString description_string;
int copies;
/*
* flag resources
*/
Boolean minimize_buttons;
XtEnum print_destination;
XtEnum print_setup_mode;
XtEnum work_area_location;
/*
* procedure resources
*/
DtPrintSetupProc printer_info_proc;
DtPrintSetupProc select_file_proc;
DtPrintSetupProc select_printer_proc;
DtPrintSetupProc verify_printer_proc;
/*
* callback resources
*/
XtCallbackList cancel_callback;
XtCallbackList close_display_callback;
XtCallbackList print_callback;
XtCallbackList setup_callback;
/*
* other resources
*/
XrmOptionDescList options;
Cardinal option_count;
/*
* Xp standard resources
*/
XtEnum xp_printer_name_mode;
/*
* internal flags
*/
Boolean adding_sel_widgets;
DtPrintVerifyState verify_printer_state;
Boolean copy_count_supported;
/*
* internal data
*/
String modal_printer_spec;
Display* print_display;
#if 0 && defined(PRINTING_SUPPORTED)
XPContext print_context;
#endif /* PRINTING_SUPPORTED */
XtIntervalId timeout_id;
/*
* descendents
*/
Widget bottom_separator;
Widget bottom_work_area;
Widget button_separator;
Widget copies_control;
Widget copies_spin_box;
Widget description;
Widget description_label;
Widget destination_radio_box;
Widget file_name_label;
Widget file_name_text;
Widget help_button;
Widget print_button;
Widget printer_info_button;
Widget printer_name_label;
Widget printer_name_text;
Widget printer_name_combo;
Widget select_file_button;
Widget select_printer_button;
Widget setup_button;
Widget top_separator;
Widget top_work_area;
/*
* data private to the default resource procedures
*/
DtPrintDefaultProcData default_proc_data;
} DtPrintSetupBoxPart;
/*
* Full instance record declaration
*/
typedef struct _DtPrintSetupBoxRec
{
CorePart core;
CompositePart composite;
ConstraintPart constraint;
XmManagerPart manager;
XmBulletinBoardPart bulletin_board;
DtPrintSetupBoxPart print_setup_box;
} DtPrintSetupBoxRec;
/*
* ------------------------------------------------------------------------
* Macro Definitions
*
*/
/*
* Instance Record Access
*/
#define PSUB_AddingSelWidgets(w) \
(((DtPrintSetupBoxWidget) w)->print_setup_box.adding_sel_widgets)
#define PSUB_AutoUnmanage(w) \
(((DtPrintSetupBoxWidget) (w))->bulletin_board.auto_unmanage)
#define PSUB_BottomSeparator(w) \
(((DtPrintSetupBoxWidget) (w))->print_setup_box.bottom_separator)
#define PSUB_BottomWorkArea(w) \
(((DtPrintSetupBoxWidget) (w))->print_setup_box.bottom_work_area)
#define PSUB_ButtonSeparator(w) \
(((DtPrintSetupBoxWidget) (w))->print_setup_box.button_separator)
#define PSUB_ButtonFontList(w) \
(((DtPrintSetupBoxWidget) (w))->bulletin_board.button_font_list)
#define PSUB_CancelButton(w) \
(((DtPrintSetupBoxWidget) (w))->bulletin_board.cancel_button)
#define PSUB_CancelCallback(w) \
(((DtPrintSetupBoxWidget) (w))->print_setup_box.cancel_callback)
#define PSUB_CloseDisplayCallback(w) \
(((DtPrintSetupBoxWidget) (w))->print_setup_box.close_display_callback)
#if 0 && defined(PRINTING_SUPPORTED)
#define PSUB_Context(w) \
(((DtPrintSetupBoxWidget) (w))->print_setup_box.print_context)
#endif /* PRINTING_SUPPORTED */
#define PSUB_Copies(w) \
(((DtPrintSetupBoxWidget) (w))->print_setup_box.copies)
#define PSUB_CopiesControl(w) \
(((DtPrintSetupBoxWidget) (w))->print_setup_box.copies_control)
#define PSUB_CopiesSpinBox(w) \
(((DtPrintSetupBoxWidget) (w))->print_setup_box.copies_spin_box)
#define PSUB_CopyCountSupported(w) \
(((DtPrintSetupBoxWidget) (w))->print_setup_box.copy_count_supported)
#define PSUB_DefaultButton(w) \
(((DtPrintSetupBoxWidget) (w))->bulletin_board.default_button)
#define PSUB_DefaultProcData(w) \
(((DtPrintSetupBoxWidget) (w))->print_setup_box.default_proc_data)
#define PSUB_Description(w) \
(((DtPrintSetupBoxWidget) (w))->print_setup_box.description)
#define PSUB_DescriptionLabel(w) \
(((DtPrintSetupBoxWidget) (w))->print_setup_box.description_label)
#define PSUB_DescriptionString(w) \
(((DtPrintSetupBoxWidget) (w))->print_setup_box.description_string)
#define PSUB_DestinationRadioBox(w) \
(((DtPrintSetupBoxWidget) (w))->print_setup_box.destination_radio_box)
#define PSUB_Display(w) \
(((DtPrintSetupBoxWidget) (w))->print_setup_box.print_display)
#define PSUB_FileName(w) \
(((DtPrintSetupBoxWidget) (w))->print_setup_box.file_name)
#define PSUB_FileNameLabel(w) \
(((DtPrintSetupBoxWidget) (w))->print_setup_box.file_name_label)
#define PSUB_FileNameText(w) \
(((DtPrintSetupBoxWidget) (w))->print_setup_box.file_name_text)
#define PSUB_HelpButton(w) \
(((DtPrintSetupBoxWidget) (w))->print_setup_box.help_button)
#define PSUB_LabelFontList(w) \
(((DtPrintSetupBoxWidget) (w))->bulletin_board.label_font_list)
#define PSUB_MarginHeight(w) \
(((DtPrintSetupBoxWidget) (w))->bulletin_board.margin_height)
#define PSUB_MarginWidth(w) \
(((DtPrintSetupBoxWidget) (w))->bulletin_board.margin_width)
#define PSUB_MinimizeButtons(w) \
(((DtPrintSetupBoxWidget) w)->print_setup_box.minimize_buttons)
#define PSUB_ModalPrinterSpec(w) \
(((DtPrintSetupBoxWidget) w)->print_setup_box.modal_printer_spec)
#define PSUB_MustMatch(w) \
(((DtPrintSetupBoxWidget) w)->print_setup_box.must_match)
#define PSUB_OptionCount(w) \
(((DtPrintSetupBoxWidget) (w))->print_setup_box.option_count)
#define PSUB_Options(w) \
(((DtPrintSetupBoxWidget) (w))->print_setup_box.options)
#define PSUB_PrintButton(w) \
(((DtPrintSetupBoxWidget) (w))->print_setup_box.print_button)
#define PSUB_PrintCallback(w) \
(((DtPrintSetupBoxWidget) (w))->print_setup_box.print_callback)
#define PSUB_PrintDestination(w) \
(((DtPrintSetupBoxWidget) (w))->print_setup_box.print_destination)
#define PSUB_PrinterInfoButton(w) \
(((DtPrintSetupBoxWidget) (w))->print_setup_box.printer_info_button)
#define PSUB_PrinterInfoProc(w) \
(((DtPrintSetupBoxWidget) (w))->print_setup_box.printer_info_proc)
#define PSUB_PrinterName(w) \
(((DtPrintSetupBoxWidget) (w))->print_setup_box.printer_name)
#define PSUB_PrinterNameText(w) \
(((DtPrintSetupBoxWidget) (w))->print_setup_box.printer_name_text)
#define PSUB_PrinterNameCombo(w) \
(((DtPrintSetupBoxWidget) (w))->print_setup_box.printer_name_combo)
#define PSUB_PrinterNameLabel(w) \
(((DtPrintSetupBoxWidget) (w))->print_setup_box.printer_name_label)
#define PSUB_PrintSetupMode(w) \
(((DtPrintSetupBoxWidget) (w))->print_setup_box.print_setup_mode)
#define PSUB_SelectFileButton(w) \
(((DtPrintSetupBoxWidget) (w))->print_setup_box.select_file_button)
#define PSUB_SelectFileProc(w) \
(((DtPrintSetupBoxWidget) (w))->print_setup_box.select_file_proc)
#define PSUB_SelectPrinterButton(w) \
(((DtPrintSetupBoxWidget) (w))->print_setup_box.select_printer_button)
#define PSUB_SelectPrinterProc(w) \
(((DtPrintSetupBoxWidget) (w))->print_setup_box.select_printer_proc)
#define PSUB_SetupButton(w) \
(((DtPrintSetupBoxWidget) (w))->print_setup_box.setup_button)
#define PSUB_SetupCallback(w) \
(((DtPrintSetupBoxWidget) (w))->print_setup_box.setup_callback)
#define PSUB_Shell(w) \
(((DtPrintSetupBoxWidget) (w))->bulletin_board.shell)
#define PSUB_StringDirection(w) \
(((DtPrintSetupBoxWidget)(w))->manager.string_direction)
#define PSUB_Text(w) \
(((DtPrintSetupBoxWidget) (w))->print_setup_box.text)
#define PSUB_TextColumns(w) \
(((DtPrintSetupBoxWidget) w)->print_setup_box.text_columns)
#define PSUB_TextFontList(w) \
(((DtPrintSetupBoxWidget) (w))->bulletin_board.text_font_list)
#define PSUB_TimeoutId(w) \
(((DtPrintSetupBoxWidget) (w))->print_setup_box.timeout_id)
#define PSUB_TopSeparator(w) \
(((DtPrintSetupBoxWidget) (w))->print_setup_box.top_separator)
#define PSUB_TopWorkArea(w) \
(((DtPrintSetupBoxWidget) (w))->print_setup_box.top_work_area)
#define PSUB_VerifyPrinterProc(w) \
(((DtPrintSetupBoxWidget) (w))->print_setup_box.verify_printer_proc)
#define PSUB_VerifyPrinterState(w) \
(((DtPrintSetupBoxWidget) (w))->print_setup_box.verify_printer_state)
#define PSUB_WorkAreaLocation(w) \
(((DtPrintSetupBoxWidget) (w))->print_setup_box.work_area_location)
#define PSUB_XpPrinterNameMode(w) \
(((DtPrintSetupBoxWidget) (w))->print_setup_box.xp_printer_name_mode)
/*
* ------------------------------------------------------------------------
* Private Function Declarations
*
*/
/*
* Child Widget Creation Functions
*/
extern void _DtPrintSetupBoxCreateButtonSeparator(
DtPrintSetupBoxWidget psub);
extern void _DtPrintSetupBoxCreateBottomSeparator(
DtPrintSetupBoxWidget psub);
extern void _DtPrintSetupBoxCreateCancelButton(
DtPrintSetupBoxWidget psub);
extern void _DtPrintSetupBoxCreateCopiesControl(
DtPrintSetupBoxWidget psub);
extern void _DtPrintSetupBoxCreateDescription(
DtPrintSetupBoxWidget psub);
extern void _DtPrintSetupBoxCreateDescriptionLabel(
DtPrintSetupBoxWidget psub);
extern void _DtPrintSetupBoxCreateDestinationRadioBox(
DtPrintSetupBoxWidget psub);
extern void _DtPrintSetupBoxCreateFileNameLabel(
DtPrintSetupBoxWidget psub);
extern void _DtPrintSetupBoxCreateFileNameText(
DtPrintSetupBoxWidget psub);
extern void _DtPrintSetupBoxCreateHelpButton(
DtPrintSetupBoxWidget psub);
extern void _DtPrintSetupBoxCreatePrintButton(
DtPrintSetupBoxWidget psub);
extern void _DtPrintSetupBoxCreatePrinterInfoButton(
DtPrintSetupBoxWidget psub);
extern void _DtPrintSetupBoxCreatePrinterNameLabel(
DtPrintSetupBoxWidget psub);
extern void _DtPrintSetupBoxCreatePrinterNameCombo(
DtPrintSetupBoxWidget psub);
extern void _DtPrintSetupBoxCreateSelectFileButton(
DtPrintSetupBoxWidget psub);
extern void _DtPrintSetupBoxCreateSelectPrinterButton(
DtPrintSetupBoxWidget psub);
extern void _DtPrintSetupBoxCreateSetupButton(
DtPrintSetupBoxWidget psub);
extern void _DtPrintSetupBoxCreateTopSeparator(
DtPrintSetupBoxWidget psub);
/*
* Synthetic resource internal->external conversion functions
*/
extern void _DtPrintSetupBoxGetCopies(
Widget wid,
int resource_offset,
XtArgVal *value);
extern void _DtPrintSetupBoxGetDescription(
Widget wid,
int resource_offset,
XtArgVal *value);
extern void _DtPrintSetupBoxGetFileName(
Widget wid,
int resource_offset,
XtArgVal *value);
extern void _DtPrintSetupBoxGetPrinterName(
Widget wid,
int resource_offset,
XtArgVal *value);
/*
* Geometry Management
*/
extern XmGeoMatrix _DtPrintSetupBoxGeoMatrixCreate(
Widget wid,
Widget instigator,
XtWidgetGeometry *desired);
extern Boolean _DtPrintSetupBoxNoGeoRequest(
XmGeoMatrix geoSpec);
#ifdef __cplusplus
} /* Close scope of 'extern "C"' declaration which encloses file. */
#endif
#endif /* _DtPrintSetupBP_h */
/* DON'T ADD ANYTHING AFTER THIS #endif */

View File

@@ -0,0 +1,75 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: PsubDefProcI.h /main/10 1996/11/01 15:00:46 cde-hp $ */
/*
* DtPrint/PsubDefProcI.h
*/
/*
* (c) Copyright 1996 Digital Equipment Corporation.
* (c) Copyright 1996 Hewlett-Packard Company.
* (c) Copyright 1996 International Business Machines Corp.
* (c) Copyright 1996 Sun Microsystems, Inc.
* (c) Copyright 1996 Novell, Inc.
* (c) Copyright 1996 FUJITSU LIMITED.
* (c) Copyright 1996 Hitachi.
*/
#ifndef _DtPsubDefProcI_h
#define _DtPsubDefProcI_h
#include <Dt/Print.h>
#include <Dt/PrintMsgsP.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* ------------------------------------------------------------------------
* Private Function Declarations
*
*/
extern void _DtPrintDefProcInitialize(Widget w);
extern void _DtPrintDefProcManageErrorBox(DtPrintDefaultProcData* dpd);
/*
* Procedure Resource Defaults
*/
extern XtEnum _DtPrintSetupBoxXPrinterInfoProc(
Widget w,
DtPrintSetupData* print_data);
extern XtEnum _DtPrintSetupBoxSelectFileProc(
Widget w,
DtPrintSetupData* print_data);
extern XtEnum _DtPrintSetupBoxSelectXPrinterProc(
Widget w,
DtPrintSetupData* print_data);
extern XtEnum _DtPrintSetupBoxVerifyXPrinterProc(
Widget w,
DtPrintSetupData* print_data);
#ifdef __cplusplus
} /* Close scope of 'extern "C"' declaration which encloses file. */
#endif
#endif /* _DtPsubDefProcI_h */
/* DON'T ADD ANYTHING AFTER THIS #endif */

102
cde/include/Dt/PsubUtilI.h Normal file
View File

@@ -0,0 +1,102 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: PsubUtilI.h /main/3 1996/08/12 18:41:41 cde-hp $ */
/*
* DtPrint/PsubUtilI.h
*/
/*
* (c) Copyright 1996 Digital Equipment Corporation.
* (c) Copyright 1996 Hewlett-Packard Company.
* (c) Copyright 1996 International Business Machines Corp.
* (c) Copyright 1996 Sun Microsystems, Inc.
* (c) Copyright 1996 Novell, Inc.
* (c) Copyright 1996 FUJITSU LIMITED.
* (c) Copyright 1996 Hitachi.
*/
#ifndef _DtPsubUtilI_h
#define _DtPsubUtilI_h
#include <Dt/Print.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* ------------------------------------------------------------------------
* Type Definitions
*
*/
typedef enum {
DtPRINT_DEC_NET,
DtPRINT_TCP_IPC,
DtPRINT_NET_UNSPECIFIED
} DtPrintSpecNet;
/*
* ------------------------------------------------------------------------
* Private Function Declarations
*
*/
String _DtPrintCreateXPrinterSpecifier(
String printer_name,
String host_name,
DtPrintSpecNet spec_net,
int display_num,
int screen_num);
void _DtPrintFreeStringList(
String* string_list);
String _DtPrintGetDefaultXPrinterName(
Widget w);
String* _DtPrintGetXpPrinterList(
Widget w);
String* _DtPrintGetXpServerList(
Widget w);
void _DtPrintParseXDisplaySpecifier(
const String display_spec,
String* host_name,
DtPrintSpecNet* spec_net,
int* display_num,
int* screen_num);
void _DtPrintParseXPrinterSpecifier(
const String specifier,
String* printer_name,
String* display_spec);
XtEnum _DtPrintVerifyXPrinter(
Widget w,
String printer_spec,
String* new_printer_spec,
Display** new_display
#if 0 && defined(PRINTING_SUPPORTED)
,XPContext* new_context
#endif /* PRINTING_SUPPORTED */
);
#ifdef __cplusplus
} /* Close scope of 'extern "C"' declaration which encloses file. */
#endif
#endif /* _DtPsubUtilI_h */
/* DON'T ADD ANYTHING AFTER THIS #endif */

78
cde/include/Dt/Qualify.h Normal file
View File

@@ -0,0 +1,78 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/*****************************************************************************
*
* File: Qualify.h
* RCS: $XConsortium: Qualify.h /main/3 1995/10/26 15:10:03 rswiston $
* Description: Public header file for the Qualify routine
* Project: DT Runtime Library
* Language: C
* Package: N/A
*
* (c) Copyright 1993 by Hewlett-Packard Company
*
*****************************************************************************/
/*********************************************************************
* _DtQualifyWithFirst
*
* takes: an unqualified filename like foo.txt, and
* a colon-separated list of pathnames, such as
* /etc/dt:/usr/dt/config
*
* returns: a fully qualified filename. Space for the filename
* has been allocated off the heap using malloc. It is
* the responsibility of the calling function to dispose
* of the space using free.
*
* example: ...
* char * filename;
* ...
* filename = _DtQualifyWithFirst("configFile",
* "/foo/first/location:/foo/second/choice");
* < use filename >
* free(filename);
*
**********************************************************************/
#ifndef _Dt_Qualify_h
#define _Dt_Qualify_h
# ifdef __cplusplus
extern "C" {
# endif
extern char * _DtQualifyWithFirst
(
char *, /* file to locate */
char * /* list of colon-separated paths in which to look */
);
# ifdef __cplusplus
}
# endif
#endif /* _Dt_Qualify_h */
/* DON'T ADD ANYTHING AFTER THIS #endif */

52
cde/include/Dt/Saver.h Normal file
View File

@@ -0,0 +1,52 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: Saver.h /main/3 1995/10/26 15:10:29 rswiston $ */
/*
* (c) Copyright 1993, 1994 Hewlett-Packard Company
* (c) Copyright 1993, 1994 International Business Machines Corp.
* (c) Copyright 1993, 1994 Sun Microsystems, Inc.
* (c) Copyright 1993, 1994 Novell, Inc.
*/
#ifndef _dtsaver_h
#define _dtsaver_h
#ifdef __cplusplus
extern "C" {
#endif
/*
* Functions
*/
extern Boolean DtSaverGetWindows(
Display *display,
Window **window,
int *count);
#ifdef __cplusplus
} /* Close scope of 'extern "C"' declaration which encloses file. */
#endif
#endif /*_dtsaver_h*/
/* DON'T ADD ANYTHING AFTER THIS #endif */

112
cde/include/Dt/SaverP.h Normal file
View File

@@ -0,0 +1,112 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: SaverP.h /main/4 1995/10/26 15:10:42 rswiston $ */
/* *
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
* (c) Copyright 1993, 1994 International Business Machines Corp. *
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
* (c) Copyright 1993, 1994 Novell, Inc. *
*/
/************************************<+>*************************************
****************************************************************************
**
** File: Saver.h
**
** Description
** -----------
** Variables and declarations needed for
** managing external screen savers
**
****************************************************************************
************************************<+>*************************************/
#ifndef _dtsaverp_h
#define _dtsaverp_h
/*************************************<->*************************************
*
* _DtSaverStart()
*
*
* Description:
* -----------
* Store provided array of windows on root window property
* _DT_SAVER_WINDOWS and launch specified screen saver. Screen savers
* will attempt to use these windows as drawables.
*
* Inputs:
* ------
* display - display structure
* drawArea - array of widgets to be drawn upon by screen saver
* count - number of elements in drawArea array
* saverAction - screen saver action to invoke
* wAction - action UI widget
*
* Outputs:
* -------
*
* Return:
* -------
* state - pointer to opaque state structure
*
* Comments:
* --------
* This function uses _DtActionInvoke() to launch an action. As a result,
* the caller is responsible for loading and maintaining the action database
* using the DtDbLoad() function and procedures. The caller
* must call _DtSaverStop() to terminate screen saver
*
*************************************<->***********************************/
extern void * _DtSaverStart(Display *, Widget *, int, char *, Widget);
/*************************************<->*************************************
*
* _DtSaverStop()
*
*
* Description:
* -----------
* Stop an external screen saver started with DtStartSaver(). Deletes
* _DT_SAVER_WINDOWS property from root window.
*
* Inputs:
* ------
* display - display structure
* state - state returned from _DtSaverStart()
*
* Outputs:
* -------
*
* Return:
* -------
*
* Comments:
* --------
*
*************************************<->***********************************/
extern void _DtSaverStop(Display *, void *);
#endif /*_dtsaverp_h*/
/* DON'T ADD ANYTHING AFTER THIS #endif */

285
cde/include/Dt/Search.h Normal file
View File

@@ -0,0 +1,285 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $TOG: Search.h /main/12 1998/04/03 17:10:35 mgreess $
*
* (c) Copyright 1996 Digital Equipment Corporation.
* (c) Copyright 1996 Hewlett-Packard Company.
* (c) Copyright 1996 International Business Machines Corp.
* (c) Copyright 1996 Sun Microsystems, Inc.
* (c) Copyright 1996 Novell, Inc.
* (c) Copyright 1996 FUJITSU LIMITED.
* (c) Copyright 1996 Hitachi.
*/
/*
* COMPONENT_NAME: austext
*
* FUNCTIONS: none
*
* ORIGINS: 27
*
*
* (C) COPYRIGHT International Business Machines Corp. 1994,1995
* All Rights Reserved
* Licensed Materials - Property of IBM
* US Government Users Restricted Rights - Use, duplication or
* disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
*/
#ifndef _Search_h
#define _Search_h
/********************** Search.h ***********************
* $TOG: Search.h /main/12 1998/04/03 17:10:35 mgreess $
* Jan 1994.
* Public header file for DtSearch/AusText API.
* Formerly named ausapi.h. Externals renamed
* from ausapi_... or aa_... to DtSearch conventions.
* Documentation in dtsearch.doc.
*
*/
#ifndef _XOPEN_SOURCE
#define _XOPEN_SOURCE 1
#endif
#include <time.h>
#include <stdio.h>
#include <string.h>
#if defined(__linux__)
# define __SVR4_I386_ABI_L1__
#endif
#include <limits.h>
#if defined(__linux__)
# undef __SVR4_I386_ABI_L1__
# ifndef WORD_BIT
# define WORD_BIT 32
# endif
# ifndef LONG_BIT
# define LONG_BIT 32
# endif
#endif
#define DtSrVERSION "0.6"
#define DtSrMAXHITS 20
#define DtSrMAX_KTNAME 13
#define DtSrMAX_DB_KEYSIZE 32
#define DtSrMAXWIDTH_HWORD 134
#define DtSrMAX_STEMCOUNT 8
/****************************************/
/* */
/* RETURN CODES */
/* */
/****************************************/
#define DtSrOK 0 /* normal, successful response */
#define DtSrPASSWD 1 /* failed communications authentication */
#define DtSrNOTAVAIL 2 /* no hits on search, no such rec, etc */
#define DtSrFAIL 3 /* misc unsuccessful engine returns */
#define DtSrREINIT 4 /* engine reinitialized, request canceled */
#define DtSrERROR 5 /* fatal caller (client) program error */
#define DtSrABORT 6 /* fatal engine failure, caller must abort */
#define DtSrCOMM 7 /* fatal communications failure */
/* In order to share databases among heterogenous machines,
* certain integer types must be defined that are invariably
* 2 and 4 bytes on all architectures.
* Note WORD_BIT == 32 does not guarantee short == 16.
*/
#if (WORD_BIT == 16)
typedef int DtSrINT16;
typedef unsigned int DtSrUINT16;
#elif (WORD_BIT == 32)
typedef short DtSrINT16;
typedef unsigned short DtSrUINT16;
#else
#error Unable to typedef DtSrINT16 and DtSrUINT16
#endif
#if (WORD_BIT == 32)
typedef int DtSrINT32;
typedef unsigned int DtSrUINT32;
#elif (LONG_BIT == 32)
typedef long DtSrINT32;
typedef unsigned long DtSrUINT32;
#else
#error Unable to typedef DtSrINT32 and DtSrUINT32
#endif
#ifndef DB_ADDR
typedef DtSrINT32 DB_ADDR; /* vista.h: must be 4 bytes */
#endif
#ifndef TRUE
#define TRUE 1
#endif
#ifndef FALSE
#define FALSE 0
#endif
typedef DtSrUINT32 DtSrObjdate;
/****************************************/
/* */
/* DtSrKeytype */
/* */
/****************************************/
typedef struct {
char is_selected; /* TRUE: user has selected this keytype */
char ktchar; /* first char of opera record key */
char name [DtSrMAX_KTNAME+1]; /* label string used in UI */
} DtSrKeytype;
/****************************************/
/* */
/* DtSrResult */
/* */
/****************************************/
/* DtSrResult ormerly DITTO. DtSrObj types formerly ORT_. */
typedef struct _DtSrResult {
struct _DtSrResult *link; /* ptr to next list node */
DtSrUINT32 flags; /* (reserved) */
DtSrINT32 objflags; /* flags from object record */
#define DtSrFlDELETE (1<<0) /* (reserved) */
#define DtSrFlOLDNOTES (1<<1) /* (reserved) */
#define DtSrFlNOTAVAIL (1<<2) /* object not retrievable from engine */
DtSrUINT32 objuflags; /* user flags from database rec */
DtSrINT32 objsize; /* in uncompressed bytes */
DtSrObjdate objdate; /* zero means object 'undated' */
DtSrINT16 objtype; /* from database record */
#define DtSrObjUNKNOWN 0 /* object type unknown or not applicable */
#define DtSrObjTEXT 1 /* generic, unformatted flat text */
#define DtSrObjBINARY 2 /* generic binary object */
#define DtSrObjSGML 3 /* generic SGML formatted document */
#define DtSrObjHTML 4 /* HTML formatted document */
#define DtSrObjPOSTSCR 6 /* Postscript document */
#define DtSrObjINTERLF 7 /* Interleaf document */
#define DtSrObjDTINFO 8 /* DtInfo document */
DtSrINT16 objcost; /* (reserved) */
int dbn; /* dbnamesv index */
DB_ADDR dba; /* data base addr within database */
DtSrINT16 language; /* language of the database */
#define DtSrLaENG 0 /* English, ASCII char set (default) */
#define DtSrLaENG2 1 /* English, ISO Latin-1 char set */
#define DtSrLaESP 2 /* Spanish, ISO Latin-1 char set */
#define DtSrLaFRA 3 /* French, ISO Latin-1 char set */
#define DtSrLaITA 4 /* Italian, ISO Latin-1 char set */
#define DtSrLaDEU 5 /* German, ISO Latin-1 char set */
#define DtSrLaJPN 6 /* Japanese, EUC, auto kanji compounds */
#define DtSrLaJPN2 7 /* Japanese, EUC, listed kanji compounds */
#define DtSrLaLAST 7 /* Last supported DtSrLa constant */
char reckey [DtSrMAX_DB_KEYSIZE]; /* object's db key */
int proximity; /* 'distance' of object from query */
char *abstractp; /* object's abstract from db*/
} DtSrResult;
/****************************************/
/* */
/* DtSrHitword */
/* */
/****************************************/
typedef struct {
long offset; /* word location in cleartext */
long length; /* length of word */
} DtSrHitword;
/************************************************/
/* */
/* Functions */
/* */
/************************************************/
extern void DtSearchAddMessage (char *msg);
extern int DtSearchHasMessages (void);
extern char *DtSearchGetMessages (void);
extern void DtSearchFreeMessages (void);
extern int DtSearchGetMaxResults (void);
extern void DtSearchSetMaxResults (int new_max_results);
extern char *DtSearchFormatObjdate (DtSrObjdate objdate);
extern void DtSearchExit (int return_code);
extern void DtSearchAddUserExit (void (*user_exit)(int));
extern void DtSearchRemoveUserExit (void);
extern int DtSearchSortResults (DtSrResult **list, int sort_type);
#define DtSrSORT_PROX 1 /* sort on proximity */
#define DtSrSORT_DATE 2 /* sort on objdate */
extern int DtSearchMergeResults (DtSrResult **targ, DtSrResult **src);
extern int DtSearchFreeResults (DtSrResult **list);
extern DtSrObjdate
DtSearchValidDateString (char *date_string);
extern int DtSearchInit (
char *argv0,
char *userid,
long switches,
char *config_file,
FILE *err_file,
char ***dbnames,
int *dbcount);
/* Bit values valid for switches argument: */
#define DtSrInNOLOCALE 0x0001L /* do not exec setlocale() */
#define DtSrInSIGNAL 0x0002L /* register abort signal handlers */
#define DtSrInUSEROCF 0x0004L /* (reserved) */
#define DtSrInENAB_NOHUP 0x0008L /* enab nohup for backgnd progms */
#define DtSrInIDEBUG 0x0010L /* set initialization debugging */
#define DtSrInSDEBUG 0x0020L /* set search debugging */
#define DtSrInRDEBUG 0x0040L /* set retrieval debugging */
#define DtSrInCDEBUG 0x0080L /* set communications debugging */
#define DtSrInANY_DEBUG \
(DtSrInIDEBUG | DtSrInSDEBUG | DtSrInRDEBUG | DtSrInCDEBUG)
#define DtSrInRDWR 0x0100L /* open db files for read and write */
extern int DtSearchReinit (
char ***dbnames,
int *dbcount);
extern int DtSearchGetKeytypes (
char *dbname,
int *ktcount,
DtSrKeytype **keytypes);
extern int DtSearchQuery (
void *qry,
char *dbname,
int search_type,
char *date1,
char *date2,
DtSrResult **results,
long *resultscount,
char *stems,
int *stemcount);
extern int DtSearchRetrieve (
char *dbname,
DB_ADDR dba,
char **cleartext,
long *clearlen,
int *fzkeyi);
extern int DtSearchHighlight (
char *dbname,
char *cleartext,
DtSrHitword **hitwptr,
long *hitwcount,
int search_type,
char *stems,
int stemcount);
/********************** Search.h ***********************/
#endif /* _Search_h */

639
cde/include/Dt/SearchE.h Normal file
View File

@@ -0,0 +1,639 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/*
* COMPONENT_NAME: austext
*
* FUNCTIONS: none
*
* ORIGINS: 27
*
*
* (C) COPYRIGHT International Business Machines Corp. 1991,1995
* All Rights Reserved
* Licensed Materials - Property of IBM
* US Government Users Restricted Rights - Use, duplication or
* disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
*/
#ifndef _SearchE_h
#define _SearchE_h
/***************************** SearchE.h ******************************
* $XConsortium: SearchE.h /main/5 1996/08/12 13:16:47 cde-ibm $
* August 1991.
* Header file for online DtSearch Engine (OE.C etc).
* SearchE.h was formerly called oe.h (Opera Engine).
* The old OE engine is pretty much invisible now, having
* been surrounded by the ausapi/DtSearch interface.
*
* The main data structure for passing and receiving arguments
* between the callers and the engine is USRBLK which is
* the only argument in the Opera_Engine() call.
* The actual input and output arguments in the USRBLK for each
* function are described below with the function description.
*
* All OE_functions pass a return code
* to the caller. OE_OK = successful completion,
* anything else may be partial completion/success or failure.
* Return code mnemonics are also defined below.
*
* $Log$
* Revision 2.7 1996/03/20 19:11:21 miker
* Changed prototype of hilite_cleartext().
*
* Revision 2.6 1996/03/13 22:34:53 miker
* Changed char to UCHAR several places.
*
* Revision 2.5 1996/03/05 19:17:50 miker
* oe_unblob no longer converts to uppercase.
*
* Revision 2.4 1996/03/05 15:54:06 miker
* Minor changes to support yacc-based boolean search.
*
* Revision 2.3 1996/02/01 16:14:38 miker
* Obsoleted requests OE_DITTO2KWIC, OE_VALIDATE_PWD, OE_CHANGE_PWD,
* OE_FINDSTR_REC, OE_FINDSTR_HITL, OE_ASSIST, OE_KILL.
* Restored OE_PING as the official "null" function.
* Added USRDBG_HILITE and USRDBG_PARSE.
* Replaced STRKIND, OE_kind_of_stems, and oe_stems_to_hitwords
* with hilite_cleartext. Deleted oe_ditto2kwic, oe_findstr_hitl.
* Deleted usrblk.kwiclen.
*
* Revision 2.2 1995/10/25 22:35:45 miker
* Added prolog.
*
* Revision 2.1 1995/09/22 22:39:39 miker
* Freeze DtSearch 0.1, AusText 2.1.8
*
* Revision 1.1 1995/08/31 20:42:33 miker
* Initial revision
*
* The DtSearch return codes wrap around the OE return codes.
*/
#include "SearchP.h"
#define AUDIT_FORMAT "UID=%-8s TIME=%s ELAP=%-3ld DB=%-8s HITS=%-5ld "
#define AUDIT_WHOWHEN "UID=%-8s TIME=%s"
#define DISCARD_FORMAT "%s\t\"%s\"\t%s\t%s\n"
#define HARDCOPY_SCRIPT "opprt.bat"
#define MAX_HITWCOUNT 200 /* max number hitwords that can be hilited */
#define WORDS_HITLIMIT 300000L
/*-------------------- Request Codes ------------------------
* All Engine requests, in addition to input below, require valid
* usrblk.userid
* usrblk.request.
* All Engine requests, in addition to output below,
* may return ausapi_msglist.
* There is no zero request code.
* See list of return codes for the ones that are marked 'common retncodes'.
*/
#define OE_INITIALIZE 1
/* does lotsa stuff--see the function.
* input:
* .query = AUSAPI_VERSION of UI code
* .dblist = data from user config file
* .dblk = data from user config file
* output:
* .dblist = modified after load of site config file
* .dblk = modified after load of site config file
* .retncode = OE_OK, OE_NOTAVAIL, OE_ABORT
*/
#define OE_TEXT2FZKEY 2
/* converts problem description text to fzkey.
* input:
* .query = problem description text
* .dblk = desired database and db parameters
* output:
* .fzkey = inference from query text analysis
* .retncode = common retncodes + OE_BAD_QUERY
*/
#define OE_SRCH_FZKEY 3
/* Converts fzkey to hitlist of dba's.
* Not available for databases without semantic dictionaries.
* input:
* .fzkey = database search vector
* .dblk = desired database and db parameters
* output:
* .workproc = function to be called until !OE_SEARCHING
* .dittolist = hitlist sorted by proximity
* .dittocount = # of nodes on dittolist
* .retncode = common retncodes + OE_SEARCHING, OE_NOTAVAIL,
* OE_USER_STOP, OE_SYSTEM_STOP, OE_BAD_QUERY
*/
#define OE_SRCH_STEMS 4
/* converts string of wordstems and booleans to
* hitlist of dba's and stems array.
* input:
* .query = text string of wordstems and booleans
* .dblk = desired database and db parameters
* output:
* .fzkey = (value undefined)
* .workproc = function to be called until !OE_SEARCHING
* .dittolist = hitlist
* .dittocount = # of nodes on dittolist
* .stems = array of stems for hiliting in text of hits
* .stemcount = size of 'stems' array
* .retncode = common retncodes + OE_BAD_QUERY, OE_SEARCHING,
* OE_NOTAVAIL, OE_USER_STOP
*/
#define OE_SRCH_WORDS 5
/* converts string of exact words and booleans to
* hitlist of dba's and stems array.
* input:
* .query = text string of exact words and booleans
* .dblk = desired database and db parameters
* output:
* .fzkey = (value undefined)
* .workproc = function to be called until !OE_SEARCHING
* .dittolist = hitlist
* .dittocount = # of nodes on dittolist
* .stems = array of words for hiliting in text of hits
* .stemcount = size of 'stems' array
* .retncode = common retncodes + OE_BAD_QUERY, OE_SEARCHING,
* OE_NOTAVAIL, OE_USER_STOP
*/
#define OE_STOP_SRCH 6
/* sets global switch to cancel search work procedure.
* workproc actually cancels itself after reading switch.
* input: .request = OE_STOP_SEARCH
* output: .retncode = 'common retncodes' only
*/
#define OE_APPEND_NOTES 7
/* appends user's notes to record at current dba.
* input:
* .query = freeform text of append
* .dba = address of record to append
* .dblk = desired database and db parameters
* output:
* .retncode = common retncodes + OE_TIMEOUT, OE_DISABLED
*/
#define OE_GETREC 8
/* retrieves record, cleartext, and notes for specified dba.
* Clears hitwords array, does not use or change stems array.
* input:
* .dba = address of record to retrieve
* .dblk = desired database and db parameters
* output:
* .objrec = austext record itself, as is from vista
* .cleartext = NULL or uncompressed text string
* .clearlen = 0 or size of cleartext
* .hitwords = array pointer cleared to NULL
* .hitwcount = size of hitwords array set to 0
* .notes = NULL, or list of notes records, as is
* .retncode = common retncodes + OE_NOTAVAIL
*/
#define OE_GETREC_STEMS 9
/* retrieves record, cleartext, notes, and hitwords
* array for specified dba and stems (from OE_SRCH_STEMS).
* If no text in repository, equivalent to OE_GETREC.
* input:
* .dba = address of record to retrieve
* .stems = array of word stems to hilite
* .stemcount = size of stems array
* .dblk = desired database and db parameters
* output:
* .objrec = austext record itself, as is from vista
* .cleartext = NULL or uncompressed text string
* .clearlen = 0 or size of cleartext
* .hitwords = NULL or array of words in cleartext to hilite
* .hitwcount = 0 or size of hitwords array
* .notes = NULL, or list of notes records, as is
* .retncode = common retncodes + OE_NOTAVAIL
*/
#define OE_GETREC_WORDS 10
/* retrieves record, cleartext, notes, and hitwords
* array for specified dba and stems array (from OE_SRCH_WORDS).
* If no text in repository, equivalent to OE_GETREC.
* input:
* .dba = address of record to retrieve
* .stems = array of exact words to hilite
* .stemcount = size of stems array
* .dblk = desired database and db parameters
* output:
* .objrec = austext record itself, as is from vista
* .cleartext = NULL or uncompressed text string
* .clearlen = 0 or size of cleartext
* .hitwords = NULL or array of words in cleartext to hilite
* .hitwcount = 0 or size of hitwords array
* .notes = NULL, or list of notes records, as is
* .retncode = common retncodes + OE_NOTAVAIL
*/
#define OE_NEXT_DBA 11
/* advances dba to next valid b-tree address. Wraps if necessary.
* input:
* .dba = current address of record
* .dblk = desired database and db parameters
* output:
* .dba = address of next record in b-tree
* .retncode = common retncodes + OE_WRAPPED
*/
#define OE_PREV_DBA 12
/* retreats dba to previous valid b-tree address.
* Wraps if necessary.
* input:
* .dba = current address of record
* .dblk = desired database and db parameters
* output:
* .dba = address of previous record in b-tree
* .retncode = common retncodes + OE_WRAPPED
*/
#define OE_RECKEY2DBA 13
/* converts an austext record key into a dba. Wraps if not found.
* input:
* .query = desired record key
* .dblk = desired database and db parameters
* output:
* .dba = address of record found,
* or next avail address if not found
* .retncode = common retncodes + OE_WRAPPED
*/
#define OE_MARK_DELETION 14
/* writes record id to an external file for
* possible later deletion by external program.
* input:
* .query = record key to be marked for deletion
* .dblk = database where record is located
* output:
* .retncode = common retncodes + OE_NOTAVAIL, OE_DISABLED
*/
#define OE_GETREC_DIC 15
/* THIS FUNCTION IS NO LONGER SUPPORTED.
* IF RECEIVED BY ENGINE, IT IS TREATED EXACTLY AS OE_GETREC.
* Retrieves record, cleartext, notes, and hitwords
* array for specified dba. Hitwords are not derived from the
* stems array; they are all the cleartext words that are in
* the dictionary. (Compare to OE_GETREC_WORDS and OE_GETREC_STEMS).
* If no text in repository, equivalent to OE_GETREC.
* input:
* .dba = address of record to retrieve
* .dblk = desired database and db parameters
* output:
* .objrec = austext record itself, as is from vista
* .cleartext = NULL or uncompressed text string
* .clearlen = 0 or size of cleartext
* .hitwords = NULL or array of words in cleartext to hilite
* .hitwcount = 0 or size of hitwords array
* .notes = NULL, or list of notes records, as is
* .retncode = common retncodes + OE_NOTAVAIL
*/
#define OE_DITTO2KWIC 16
#define OE_VALIDATE_PWD 17
#define OE_CHANGE_PWD 18
/* (These functions are obsolete) */
#define OE_DELETE_RECID 19
/* Deletes header record, all text, user notes,
* and word/stems references for specified record.
* Currently can only be called from offline program
* when all online austext users have been logged off.
* THIS FUNCTION IS <<<VERY>>> SLOW (about 15 min on large dbase)!
* input:
* .query = desired record key
* .dblk = desired database and db parameters
* output:
* .dba = address of record deleted
* THIS ADDRESS IS NO LONGER VALID!
* .dbatab = (undefined)
* .dbacount = 1
* .retncode = common retncodes + OE_NOTAVAIL
*/
#define OE_DELETE_BATCH 20
/* Deletes header records, all text, user notes,
* and word/stems references for all records in a
* datbase address table. Currently can only be called
* from offline program when all online austext users
* have been logged off. This function is the preferred
* deletion method because it is faster than deleting
* single records at a time. Addresses not found are ignored.
* input:
* .dblk = desired database and db parameters
* .dbatab = table of valid addresses to be deleted
* .dbacount = number of addresses on the table
* output:
* .retncode = common retncodes only
*/
#define OE_ASSIST 21
#define OE_FINDSTR_REC 22
#define OE_FINDSTR_HITL 23
/* (These functions are obsolete) */
#define OE_SRCH_STATISTICAL 24
/* Converts string of natural language text to
* hitlist of dba's and stems array. Uses stems only,
* no booleans, all words are ORed together. Hitlist sorted
* based on statistics of included word stems.
* input:
* .query = natural language text string
* .dblk = desired database and db parameters
* output:
* .stems = array of stems for hiliting in text of hits
* .stemcount = size of 'stems' array (up to max allowed)
* .workproc = function to be called until !OE_SEARCHING
* .dittolist = hitlist
* .dittocount = # of nodes on dittolist
* .retncode = common retncodes + OE_BAD_QUERY, OE_SEARCHING,
* OE_NOTAVAIL, OE_USER_STOP
*/
#define OE_HILITE_STEMS 25
/* Creates a hitwords array for hiliting using the text
* in cleartext (however it may have been obtained),
* and the stems array from the last search.
* input:
* .cleartext = text to be hilited
* .clearlen = size of cleartext
* .stems = array of words or stems to hilite
* .stemcount = size of stems array
* .search_type = 'W', 'P' or 'S', indicating type of
* search that generated stems array.
* output:
* .hitwords = array of words in cleartext to hilite
* .hitwcount = size of hitwords array
* .retncode = common retncodes + OE_NOTAVAIL, OE_BAD_QUERY
*/
#define OE_GET_EXPIRE 26
/* Returns in 'dba' field the expiration date of OE as a timestamp.
* Zero means no expiration date. Overlays previous value in dba.
* input: .request = OE_GET_EXPIRE
* output: .dba = unix timestamp of expiration date or 0
* .retncode = common retncodes only
*/
#define OE_KILL 9997
#define OE_PING 9998
#define OE_SHUTDOWN 9999
/* (These functions are obsolete) */
/*-------------------- Return Codes ------------------------
* The return codes marked 'common retncodes' are OE_OK, OE_NOOP, OE_REINIT,
* and OE_ABORT, and can be returned by almost all functions.
* OE_BAD_QUERY will be returned for any unknown function request.
* There is no zero return code.
*/
#define OE_OK 1 /* normal successful completion */
#define OE_REINIT 2 /* request canceled: OE reinitialized
* databases so UI's dba's may be bad */
#define OE_SEARCHING 3 /* keep calling workproc */
#define OE_BAD_DBLK 4
#define OE_BAD_REQUEST 5 /* invalid request field */
#define OE_BAD_QUERY 6 /* invalid query or other input fld */
#define OE_NOTAVAIL 7 /* no record, hits, function disabled */
#define OE_TIMEOUT 8
#define OE_WRAPPED 9 /* got next item instead of reqstd item */
#define OE_SYSTEM_STOP 10 /* error: search canceled by OE */
#define OE_BAD_PASSWD 11 /* invalid password */
#define OE_BAD_HITLIST 12 /* invalid hitlist */
#define OE_DISABLED 13 /* requested function disabled at this site */
#define OE_USER_STOP 14 /* search canceled by user */
#define OE_BAD_COMM 15 /* request canceled by comm layer */
#define OE_NOOP 888 /* No Operation, nothing done */
#define OE_ABORT 999 /* fatal OE error, OE permanently disabled */
/****************************************/
/* */
/* OEFTAB */
/* */
/****************************************/
/* Table used in load_ocf() oe_uninitialize() to allow overriding default
* locations of various files. Complete discussion in .ocf documentation.
*/
typedef struct
{
char *id; /* keyword identifier */
char **OEFptr; /* addr of variable to change */
char previously_specified; /* bool ensures only one spec */
} OEFTAB;
/****************************************/
/* */
/* USRBLK */
/* */
/****************************************/
typedef struct
{
char userid [10]; /* 1 - 8 alphanumeric char */
int search_type; /* single char = curr search type.
* 'T' = Semantic Text search
* 'W' = Exact Words search
* 'S' = Stems search
* 'Z' = Fzkey search
* 'N' = Navigator string (unpacked fzk) srch
* 'P' = Statistical (Probabilistic) search
*/
long flags; /* bit switches... */
#define USR_BIT_1 0x0001L /* (reserved) */
#define USR_NO_ITERATE 0x0002L /* override iterations in workprocs */
#define USR_STOPSRCH 0x0004L /* the "stop" button, cancels workproc */
#define USR_MAXMIN 0x0008L /* symdif() algorithm = fuzzy max min */
#define USR_OBJDATES 0x0010L /* restrict hitlists to objdate ranges */
#define USR_KWIC_ABSTR 0x0020L /* retn KeyWord In Context for abstract */
#define USR_NO_INFOMSGS 0x0040L /* do not retn information-only msgs to UI */
#define USR_MAXHITS_MSG 0x0080L /* show # hits each keytype if sum > maxhits */
#define USR_SORT_WHITL 0x0100L /* sort word/stem hitlists by semantics */
long debug; /* Nonproduction bit switches */
#define USRDBG_RARE 0x0001L /* 1 Misc initialzatn trace msgs */
#define USRDBG_SRCHCMPL 0x0002L /* 2 trace ui search_completed functions */
#define USRDBG_RETRVL 0x0004L /* 4 trace record retrieval funcs */
#define USRDBG_ITERATE 0x0008L /* 8 forces iteration on all iterable cmds */
#define USRDBG_UTIL 0x0010L /* 16 trace misc utility functions */
#define USRDBG_MEDPRMPT 0x0020L /* 32 Prints prompt of medley sockets cmds */
#define USRDBG_HITLIST 0x0040L /* 64 print hitlists after searches */
#define USRDBG_SYMP 0x0080L /* 128 trace symptom search funcs */
#define USRDBG_DELETE 0x0100L /* 256 trace record deletion functions */
#define USRDBG_RPC 0x0200L /* 512 trace RPC communications funcs */
#define USRDBG_VERBOSE 0x0400L /* 1024 verbose debugging: iterative details */
#define USRDBG_HILITE 0x0800L /* 2048 trace hiliting functions */
#define USRDBG_PARSE 0x1000L /* 4096 trace linguistic parse/stem funcs */
#define USRDBG_BOOL 0x2000L /* 8192 trace boolean parse funcs */
int request;
int retncode;
char *query; /* input data for text searches */
DtSrObjdate objdate1; /* only retn hit objects >= (after) date1 */
DtSrObjdate objdate2; /* only retn hit objects <= (before) date2 */
DB_ADDR dba; /* for direct dba reads */
DB_ADDR *dbatab; /* array of dba's for batch deletes */
int dbacount; /* # of dba's in dbatab */
void (*workproc) (void);
/* (1) If single tasking (iterative), OE places ptr to work
procedure. (2) If multitasking (no iterations), UI places
ptr of func to call when OE's spawned subtask is done. */
DBLK *dblist; /* linked list of all databases */
DBLK *dblk; /* users curr database selection */
DtSrResult *dittolist; /* hitlist retnd from various searches */
long dittocount; /* # of items on hitlist */
int stemcount; /* # of wordstems in 'stems' array */
char stems [DtSrMAX_STEMCOUNT] [DtSrMAXWIDTH_HWORD];
/* for hiliting words in text records */
struct or_objrec objrec; /* austext record buffer */
char *abstrbuf; /* buf to hold abstracts */
int abstrbufsz; /* maximum abstract size all databases */
char *cleartext; /* decompressed austext record text */
long clearlen; /* size of cleartext in bytes */
LLIST *notes; /* uncompressed, right out of vista */
DtSrHitword *hitwords; /* array of hit words inside cleartext */
long hitwcount; /* number of elements in hitwords array */
} USRBLK;
/****************************************/
/* */
/* SAVEUSR */
/* */
/****************************************/
/* The following data is saved between calls of the workprocs.
* In a future msg passing protocol where there may be multiple UIs
* per OE, this data would be maintained in a list of structures,
* one for each currently active search (UI only passes user id name
* in iterative calls, OE searches list to match curr status).
* But for now, this will have to do.
*/
typedef struct
{
time_t start_time;
int iterations;
int vistano;
DtSrResult *dittolist;
long dittocount;
int stemcount;
char stems [DtSrMAX_STEMCOUNT] [DtSrMAXWIDTH_HWORD];
char ktchars [MAX_KTCOUNT + 2];
char *lastqry;
long ktsum [MAX_KTCOUNT + 1];
} SAVEUSR;
/*--------------- GLOBALS in oe.c, loadocf.c -------------------*/
extern char **ausapi_dbnamesv;
extern int ausapi_dbnamesc;
extern USRBLK usrblk;
extern char *global_memory_ptr;
extern OEFTAB oef_table[];
extern SAVEUSR saveusr; /* (only one for now) */
extern int shm_id;
extern int OE_bmhtab_strlen [DtSrMAX_STEMCOUNT];
extern size_t OE_bmhtables [DtSrMAX_STEMCOUNT] [MAX_BMHTAB];
extern int OE_dbn;
extern int OE_enable_markdel;
extern int OE_enable_usernotes;
extern time_t *OE_expiration;
extern int OE_fastdecode;
extern char *OE_fileio;
extern long OE_flags;
#define OE_AUDIT 1L /* enables audit file logging */
#define OE_INITOK (1L<<1) /* ensures first reqst was INITIALIZE */
#define OE_PERMERR (1L<<2) /* disables engine on fatal errors */
#define OE_NO_ITERATE (1L<<3) /* override iterations in workprocs */
extern char *OE_inittab_dir; /* local dir of server daemon */
extern long OE_objsize;
extern char *OE_prodname;
extern int OE_search_type;
extern char *OE_server_dir; /* local dir of server daemon */
extern char *OE_sitecnfg_fname;
extern time_t OE_sitecnfg_mtime;
extern int OE_uppercase_keys;
extern long OE_words_hitlimit;
/* Global pointers to formerly hardcoded path/file names.
* The comment names the #define constant under which the
* filename is/was specified in either fuzzy.h or oe.h.
*/
extern char *OEF_audit; /* FNAME_AUDIT */
extern char *OEF_discard; /* FNAME_DISCARD_DATA */
extern char *OEF_news; /* FNAME_SITENEWS */
extern char *OEF_notesnot; /* FNAME_NOTES_BAC */
extern char *OEF_notessem; /* FNAME_NOTES_SEM */
extern char *OEF_readme; /* FNAME_README */
/*---------------- FUNCTION PROTOTYPES ----------------------*/
extern char *calloe_getrec (char *dbname, DB_ADDR dba,
LLIST **global_msglist);
extern long calloe_hilite (char *cleartext, DtSrHitword *hitwords,
LLIST **global_msglist);
extern DtSrResult
*calloe_search (char *qry, char *dbname,
int search_type, LLIST **global_msglist);
extern int call_output_script (char *shellcmd, char *text);
extern void clear_hitwords (void);
extern void clear_usrblk_record (void);
extern void dummy_workproc (void);
extern char *ensure_end_slash (char *charbuf);
extern void fasthuf (UCHAR *input_bitstring, UCHAR *output_charbuf,
int outbuf_size, time_t encode_id);
extern char *get_hitlist_text (int maxlen);
extern long hilite_cleartext (int parse_type, char *stems, int stemcount);
extern int load_ocf (void);
extern char *nowstring (time_t *now);
extern void oe_initialize (void);
extern int oe_unblob (LLIST *bloblist);
extern void oe_write_audit_rec (long numhits);
extern void Opera_Engine (void);
extern void print_dittolist (DtSrResult *dittolist, char *label);
extern void print_stems (int stemcount, void *stems, char *locstr);
extern void print_usrblk_record (char *label);
extern void release_shm_mem (void);
extern char *retncode_str (int num);
extern void symptom_search (void);
extern int ve_append_notes (void);
extern void ve_browse_dba (int direction);
extern LLIST *ve_getblobs (DtSrINT32 dba, int vistano);
extern int ve_getrec_dba (LLIST **bloblist);
extern int ve_initialize (void);
extern void ve_ditto (void);
extern DtSrINT32 ve_reckey2dba (void);
extern void ve_statistical (void);
extern void ve_stem_search (void);
extern void ve_word_search (void);
extern void ve_shutdown (void);
/***************************** SearchE.h ******************************/
#endif /* _SearchE_h */

887
cde/include/Dt/SearchP.h Normal file
View File

@@ -0,0 +1,887 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/*
* COMPONENT_NAME: austext
*
* FUNCTIONS:
*
* ORIGINS: 27
*
*
* (C) COPYRIGHT International Business Machines Corp. 1990,1995
* All Rights Reserved
* Licensed Materials - Property of IBM
* US Government Users Restricted Rights - Use, duplication or
* disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
*/
#ifndef _SearchP_h
#define _SearchP_h
/************************ SearchP.h ********************************
* $XConsortium: SearchP.h /main/9 1996/10/12 16:10:00 cde-ibm $
* June 1990.
* Private header file for DtSearch/AusText used by
* both build tools and search engine.
* Derived from original IBM fuzzy.h.
*
* Hierarchies of DtSearch/AusText Search*.h #includes:
* Search.h is Dt/Aus public header, defines _XOPEN_SOURCE.
* SearchP.h is private Dt/Aus, includes Search.h.
* semantic.h is private Aus only, defines _ALL_SOURCE,
* includes SearchP.h.
* (Should be specified in place of SearchP.h).
* SearchE.h is private engine header Dt/Aus. Invokes either
* SearchP.h or semantic.h depending on whether DTSEARCH defined.
* Only one of the above should be specified. They should always
* be first include to get the _SOURCE defines right.
* DTSEARCH should be defined on compiler cmd line.
*
* $Log$
* Revision 2.11 1996/04/10 19:44:43 miker
* AusText 2.1.13, DtSearch 0.5. Documentation cleanup.
*
* Revision 2.10 1996/03/13 22:35:14 miker
* Added UCHAR definition. Changed char to UCHAR several places.
*
* Revision 2.9 1996/03/05 16:48:56 miker
* Add COMMENT_CHARS from lang.c.
*
* Revision 2.8 1996/03/05 15:58:57 miker
* Replace vewords with yacc-based boolean search.
*
* Revision 2.7 1996/02/01 16:26:06 miker
* AUSAPI_VERSION 2.1.11, DtSearch 0.3:
* Changed parsers to use character reading cofunctions.
*
* Revision 2.6 1995/12/27 15:51:36 miker
* Version 2.1.10: First GA release of AusBuild.
*
* Revision 2.5 1995/12/07 23:24:38 miker
* Version 2.1.9e: Freezing AusBuild version with
* everything except multiple source files dialog box.
*
* Revision 2.4 1995/10/25 22:29:29 miker
* Added prolog.
*
* Revision 2.3 1995/10/19 19:07:42 miker
* Changed AUSAPI_VERSION to 2.1.9 (but not yet released).
*
* Revision 2.2 1995/10/03 21:36:13 miker
* Added 'const' to strdup prototype for greater portability.
*
* Revision 2.1 1995/09/22 22:39:41 miker
* Freeze DtSearch 0.1, AusText 2.1.8
*
* Revision 1.3 1995/09/19 21:38:59 miker
* Removed debugging #defines.
*/
#include "Search.h" /* the "public" header file */
#include <nl_types.h> /* for nl_catd below and all cat...() funcs */
#include <sys/types.h>
#include <netinet/in.h>
#define AUSAPI_VERSION "2.1.13"
/* Format: "v.r.m", where v,r,m are integer substrings
* meaning version, revision, and mod respectively.
* Complete new version austomatically sets revision=1, mod=0.
* New revision within a version just sets mod=0.
* When mod=0, full string may be abbreviated to "v.r".
* Full string will contain no whitespace.
* AUSAPI_VERSION is compared to current versions of database
* schemas and client/server protocols by ausapi_init().
* By convention, AusText programs display AUSAPI_VERSION
* at the top of the main gui window and in usage statements.
*/
#define SCHEMA_VERSION "2.0"
/* Identifies when schema last changed.
* Same format as AUSAPI_VERSION, except only "v.r" substring used.
* To ensure compatibility, database programs must have v.r integers
* within the range between SCHEMA_VERSION and AUSAPI_VERSION.
* The 3rd integer, the 'mod' number, never matters.
*/
#define PROTOCOL_VERSION "2.1"
/* Identifies when protocol between ui and engine/ausapi
* last changed. Typical changes would be changes to major
* structures like usrblk, dblk, and socblk, or changes to
* the arguments for either ausapi or Opera_Engine calls.
* Only meaningful for client/server systems.
* Same format as AUSAPI_VERSION, except only "v.r" substring used.
* To ensure compatibility, clients must have v.r integers
* within the range between PROTOCOL_VERSION and AUSAPI_VERSION
* of the engine. The 3rd integer, the 'mod' number, never matters.
*/
/*------------- #define Compiler and related #defines ------------------
* #define TURBO_COMPILER...
* #define PS2AIX_COMPILER...
* #define AIX370_COMPILER...
* #define HP_COMPILER...
* #define _AIX...
* ... define one of the above at top of Search.h to provide
* structures and functions that are compiler dependent.
* Since the compiler definition must precede all other headers,
* the #include for Search.h must be the first statement of all source
* files.
*
* UCHAR corrects for compilers whose default char is signed.
*/
#define UCHAR unsigned char
#ifdef TURBO_COMPILER
#define LINT_ARGS /* establishes strong prototyping in vista */
#define ANSI /* allow multiple databases in vista */
#else
#define SINGLE_USER /* eliminate vista lockmgr */
#define UNIX /* used in vista.h and elsewhere */
#endif
#ifdef HP_COMPILER
#define _INCLUDE_HPUX_SOURCE
#define _INCLUDE_POSIX_SOURCE
#define _INCLUDE_XOPEN_SOURCE
#endif
/*----------------------- AUSTEXT.H ---------------------
* DBMS record/key structure and constant declarations.
* These represent the database schema formerly in austext.h
* and derived from austext.sch.
*/
typedef struct or_dbrec {
DtSrUINT32 or_dbflags;
DtSrUINT32 or_dbuflags;
DtSrINT32 or_reccount;
DtSrINT32 or_maxdba;
DtSrINT32 or_availd99;
DtSrINT32 or_unavaild99;
DtSrINT32 or_hufid;
DtSrINT32 or_dbsecmask;
char or_version[8];
char or_dbfill[50];
DtSrINT16 or_dbotype;
DtSrINT16 or_compflags;
DtSrINT16 or_dbaccess;
DtSrINT16 or_minwordsz;
DtSrINT16 or_maxwordsz;
DtSrINT16 or_recslots;
DtSrINT16 or_fzkeysz;
DtSrINT16 or_abstrsz;
DtSrINT16 or_language;
} DBREC;
struct or_dbmiscrec {
DtSrINT16 or_dbmisctype;
char or_dbmisc[1][106];
};
struct or_objrec {
DtSrUINT32 or_objflags;
DtSrUINT32 or_objuflags;
DtSrINT32 or_objsize;
DtSrINT32 or_objdate;
DtSrINT32 or_objsecmask;
char or_objkey[32];
char or_objfill[34];
DtSrINT16 or_objaccess;
DtSrINT16 or_objtype;
DtSrINT16 or_objcost;
DtSrINT16 or_objhdroffset;
DtSrINT16 or_objeureka;
};
struct or_miscrec {
DtSrINT16 or_misctype;
char or_misc[1][105];
};
struct or_blobrec {
DtSrINT16 or_bloblen;
char or_blob[234][1];
};
struct or_swordrec {
char or_swordkey[16];
DtSrINT32 or_swoffset;
DtSrINT32 or_swfree;
DtSrINT32 or_swaddrs;
};
struct or_lwordrec {
char or_lwordkey[40];
DtSrINT32 or_lwoffset;
DtSrINT32 or_lwfree;
DtSrINT32 or_lwaddrs;
};
struct or_hwordrec {
char or_hwordkey[134];
DtSrINT32 or_hwoffset;
DtSrINT32 or_hwfree;
DtSrINT32 or_hwaddrs;
};
/* File Id Constants */
#define OR_D00 0
#define OR_D01 1
#define OR_D21 2
#define OR_D22 3
#define OR_D23 4
#define OR_K00 5
#define OR_K01 6
#define OR_K21 7
#define OR_K22 8
#define OR_K23 9
/* Record Name Constants */
#define OR_DBREC 10000
#define OR_DBMISCREC 10001
#define OR_OBJREC 10002
#define OR_MISCREC 10003
#define OR_BLOBREC 10004
#define OR_SWORDREC 10005
#define OR_LWORDREC 10006
#define OR_HWORDREC 10007
/* Field Name Constants */
#define OR_DBFLAGS 0L
#define OR_DBUFLAGS 1L
#define OR_RECCOUNT 2L
#define OR_MAXDBA 3L
#define OR_AVAILD99 4L
#define OR_UNAVAILD99 5L
#define OR_HUFID 6L
#define OR_DBSECMASK 7L
#define OR_VERSION 8L
#define OR_DBFILL 9L
#define OR_DBOTYPE 10L
#define OR_COMPFLAGS 11L
#define OR_DBACCESS 12L
#define OR_MINWORDSZ 13L
#define OR_MAXWORDSZ 14L
#define OR_RECSLOTS 15L
#define OR_FZKEYSZ 16L
#define OR_ABSTRSZ 17L
#define OR_LANGUAGE 18L
#define OR_DBMISCTYPE 1000L
#define OR_DBMISC 1001L
#define OR_OBJFLAGS 2000L
#define OR_OBJUFLAGS 2001L
#define OR_OBJSIZE 2002L
#define OR_OBJDATE 2003L
#define OR_OBJSECMASK 2004L
#define OR_OBJKEY 2005L
#define OR_OBJFILL 2006L
#define OR_OBJACCESS 2007L
#define OR_OBJTYPE 2008L
#define OR_OBJCOST 2009L
#define OR_OBJHDROFFSET 2010L
#define OR_OBJEUREKA 2011L
#define OR_MISCTYPE 3000L
#define OR_MISC 3001L
#define OR_BLOBLEN 4000L
#define OR_BLOB 4001L
#define OR_SWORDKEY 5000L
#define OR_SWOFFSET 5001L
#define OR_SWFREE 5002L
#define OR_SWADDRS 5003L
#define OR_LWORDKEY 6000L
#define OR_LWOFFSET 6001L
#define OR_LWFREE 6002L
#define OR_LWADDRS 6003L
#define OR_HWORDKEY 7000L
#define OR_HWOFFSET 7001L
#define OR_HWFREE 7002L
#define OR_HWADDRS 7003L
/* Set Name Constants */
#define OR_DB_MISCS 20000
#define OR_OBJ_BLOBS 20001
#define OR_OBJ_MISCS 20002
/*----------------------- end AUSTEXT.H ---------------------*/
/*------------- DMACROS.H -------------------
* The following were formerly in dmacros.h.
* They provide macro enhancements to the
* DBMS function prototypes in vista.h.
* Each DBMS function is coded in a macro which includes
* a location string (usually module name + line number).
* The location string is printed whenever there is
* a user or system failure.
* Warning: These should not be coded naked within 'if-else' statements
* because the 'if' in the macros will interfere with the outside else.
*/
#define CMSTAT(s,a,b) if(d_cmstat(a,b) < S_OKAY) vista_abort(s)
#define CMTYPE(s,a,b,c) if(d_cmtype(a,b,c) < S_OKAY) vista_abort(s)
#define CONNECT(s,a,b) if(d_connect(a,b) < S_OKAY) vista_abort(s)
#define COSTAT(s,a,b) if(d_costat(a,b) < S_OKAY) vista_abort(s)
#define COTYPE(s,a,b,c) if(d_cotype(a,b,c) < S_OKAY) vista_abort(s)
#define CRGET(s,a,b) if(d_crget(a,b) < S_OKAY) vista_abort(s)
#define CRREAD(s,a,b,c) if(d_crread(a,b,c) < S_OKAY) vista_abort(s)
#define CRSET(s,a,b) if(d_crset(a,b) < S_OKAY) vista_abort(s)
#define CRSTAT(s,a) if(d_crstat(a) < S_OKAY) vista_abort(s)
#define CRTYPE(s,a,b) if(d_crtype(a,b) < S_OKAY) vista_abort(s)
#define CRWRITE(s,a,b,c) if(d_crwrite(a,b,c) < S_OKAY) vista_abort(s)
#define CSMGET(s,a,b,c) if(d_csmget(a,b,c) < S_OKAY) vista_abort(s)
#define CSMREAD(s,a,b,c,d) if(d_csmread(a,b,c,d) < S_OKAY) vista_abort(s)
#define CSMSET(s,a,b,c) if(d_csmset(a,b,c) < S_OKAY) vista_abort(s)
#define CSMWRITE(s,a,b,c,d) if(d_csmwrite(a,b,c,d) < S_OKAY) vista_abort(s)
#define CSOGET(s,a,b,c) if(d_csoget(a,b,c) < S_OKAY) vista_abort(s)
#define CSOREAD(s,a,b,c,d) if(d_csoread(a,b,c,d) < S_OKAY) vista_abort(s)
#define CSOSET(s,a,b,c) if(d_csoset(a,b,c) < S_OKAY) vista_abort(s)
#define CSOWRITE(s,a,b,c,d) if(d_csowrite(a,b,c,d) < S_OKAY) vista_abort(s)
#define CSSTAT(s,a,b) if(d_csstat(a,b) < S_OKAY) vista_abort(s)
#define CTBPATH(s,a) if(d_ctbpath(a) < S_OKAY) vista_abort(s)
#define CTSCM(s,a,b,c) if(d_ctscm(a,b,c) < S_OKAY) vista_abort(s)
#define CTSCO(s,a,b,c) if(d_ctsco(a,b,c) < S_OKAY) vista_abort(s)
#define CTSCR(s,a,b) if(d_ctscr(a,b) < S_OKAY) vista_abort(s)
#define DBDPATH(s,a) if(d_dbdpath(a) < S_OKAY) vista_abort(s)
#define DBFPATH(s,a) if(d_dbfpath(a) < S_OKAY) vista_abort(s)
#define DBLOG(s,a) if(d_dblog(a) < S_OKAY) vista_abort(s)
#define DBTAF(s,a) if(d_dbtaf(a) < S_OKAY) vista_abort(s)
#define DBUSERID(s,a) if(d_dbuserid(a) < S_OKAY) vista_abort(s)
#define DECODE_DBA(s,a,b,c) if(d_decode_dba(a,b,c) < S_OKAY) vista_abort(s)
#define DELETE(s,a) if(d_delete(a) < S_OKAY) vista_abort(s)
#define DESTROY(s,a) if(d_desoy(a) < S_OKAY) vista_abort(s)
#define DISCON(s,a,b) if(d_discon(a,b) < S_OKAY) vista_abort(s)
#define DISDEL(s,a) if(d_disdel(a) < S_OKAY) vista_abort(s)
#define ENCODE_DBA(s,a,b,c) if(d_encode_dba(a,b,c) < S_OKAY) vista_abort(s)
#define FILLNEW(s,a,b,c) if(d_fillnew(a,b,c) < S_OKAY) vista_abort(s)
#define FINDCO(s,a,b) if(d_findco(a,b) < S_OKAY) vista_abort(s)
#define FINDFM(s,a,b) if(d_findfm(a,b) < S_OKAY) vista_abort(s)
#define FINDLM(s,a,b) if(d_findlm(a,b) < S_OKAY) vista_abort(s)
#define FINDNM(s,a,b) if(d_findnm(a,b) < S_OKAY) vista_abort(s)
#define FINDPM(s,a,b) if(d_findpm(a,b) < S_OKAY) vista_abort(s)
#define FREEALL(s) if(d_freeall() < S_OKAY) vista_abort(s)
#define GTSCM(s,a,b,c) if(d_gtscm(a,b,c) < S_OKAY) vista_abort(s)
#define GTSCO(s,a,b,c) if(d_gtsco(a,b,c) < S_OKAY) vista_abort(s)
#define GTSCR(s,a,b) if(d_gtscr(a,b) < S_OKAY) vista_abort(s)
#define GTSCS(s,a,b,c) if(d_gtscs(a,b,c) < S_OKAY) vista_abort(s)
#define INITFILE(s,a,b) if(d_initfile(a,b) < S_OKAY) vista_abort(s)
#define INITIALIZE(s,a) if(d_initialize(a) < S_OKAY) vista_abort(s)
#define ISMEMBER(s,a,b) if(d_ismember(a,b) < S_OKAY) vista_abort(s)
#define ISOWNER(s,a,b) if(d_isowner(a,b) < S_OKAY) vista_abort(s)
#define KEYDEL(s,a,b) if(d_keydel(a,b) < S_OKAY) vista_abort(s)
#define KEYEXIST(s,a,b) if(d_keyexist(a,b) < S_OKAY) vista_abort(s)
#define KEYFIND(s,a,b,c) if(d_keyfind(a,b,c) < S_OKAY) vista_abort(s)
#define KEYFREE(s,a,b) if(d_keyfree(a,b) < S_OKAY) vista_abort(s)
#define KEYFRST(s,a,b) if(d_keyfrst(a,b) < S_OKAY) vista_abort(s)
#define KEYLAST(s,a,b) if(d_keylast(a,b) < S_OKAY) vista_abort(s)
#define KEYLOCK(s,a,b,c) if(d_keylock(a,b,c) < S_OKAY) vista_abort(s)
#define KEYLSTAT(s,a,b,c) if(d_keylstat(a,b,c) < S_OKAY) vista_abort(s)
#define KEYNEXT(s,a,b) if(d_keynext(a,b) < S_OKAY) vista_abort(s)
#define KEYPREV(s,a,b) if(d_keyprev(a,b) < S_OKAY) vista_abort(s)
#define KEYREAD(s,a) if(d_keyread(a) < S_OKAY) vista_abort(s)
#define KEYSTORE(s,a,b) if(d_keystore(a,b) < S_OKAY) vista_abort(s)
#define LOCK(s,a,b,c) if(d_lock(a,b,c) < S_OKAY) vista_abort(s)
#define MAKENEW(s,a,b) if(d_makenew(a,b) < S_OKAY) vista_abort(s)
#define MAPCHAR(s,a,b,c,d) if(d_mapchar(a,b,c,d) < S_OKAY) vista_abort(s)
#define MEMBERS(s,a,b,c) if(d_members(a,b,c) < S_OKAY) vista_abort(s)
#define OFF_OPT(s,a) if(d_off_opt(a) < S_OKAY) vista_abort(s)
#define ON_OPT(s,a) if(d_on_opt(a) < S_OKAY) vista_abort(s)
#define OPEN(s,a,b) if(d_open(a,b) < S_OKAY) vista_abort(s)
#define RDCURR(s,a,b) if(d_rdcurr(a,b) < S_OKAY) vista_abort(s)
#define RECFREE(s,a,b) if(d_recfree(a,b) < S_OKAY) vista_abort(s)
#define RECFRST(s,a,b) if(d_recfrst(a,b) < S_OKAY) vista_abort(s)
#define RECLAST(s,a,b) if(d_reclast(a,b) < S_OKAY) vista_abort(s)
#define RECLOCK(s,a,b,c) if(d_reclock(a,b,c) < S_OKAY) vista_abort(s)
#define RECLSTAT(s,a,b,c) if(d_reclstat(a,b,c) < S_OKAY) vista_abort(s)
#define RECNEXT(s,a) if(d_recnext(a) < S_OKAY) vista_abort(s)
#define RECOVER(s,a) if(d_recover(a) < S_OKAY) vista_abort(s)
#define RECPREV(s,a) if(d_recprev(a) < S_OKAY) vista_abort(s)
#define RECREAD(s,a,b) if(d_recread(a,b) < S_OKAY) vista_abort(s)
#define RECSET(s,a,b) if(d_recset(a,b) < S_OKAY) vista_abort(s)
#define RECSTAT(s,a,b,c) if(d_recstat(a,b,c) < S_OKAY) vista_abort(s)
#define RECWRITE(s,a,b) if(d_recwrite(a,b) < S_OKAY) vista_abort(s)
#define RENFILE(s,a,b,c) if(d_renfile(a,b,c) < S_OKAY) vista_abort(s)
#define RLBCLR(s,a) if(d_rlbclr(a) < S_OKAY) vista_abort(s)
#define RLBSET(s,a) if(d_rlbset(a) < S_OKAY) vista_abort(s)
#define RLBTST(s,a) if(d_rlbtst(a) < S_OKAY) vista_abort(s)
#define SETDB(s,a) if(d_setdb(a) < S_OKAY) vista_abort(s)
#define SETFILES(s,a) if(d_setfiles(a) < S_OKAY) vista_abort(s)
#define SETFREE(s,a,b) if(d_setfree(a,b) < S_OKAY) vista_abort(s)
#define SETLOCK(s,a,b,c) if(d_setlock(a,b,c) < S_OKAY) vista_abort(s)
#define SETLSTAT(s,a,b,c) if(d_setlstat(a,b,c) < S_OKAY) vista_abort(s)
#define SETMM(s,a,b,c) if(d_setmm(a,b,c) < S_OKAY) vista_abort(s)
#define SETMO(s,a,b,c) if(d_setmo(a,b,c) < S_OKAY) vista_abort(s)
#define SETMR(s,a,b) if(d_setmr(a,b) < S_OKAY) vista_abort(s)
#define SETOM(s,a,b,c) if(d_setom(a,b,c) < S_OKAY) vista_abort(s)
#define SETOO(s,a,b,c) if(d_setoo(a,b,c) < S_OKAY) vista_abort(s)
#define SETOR(s,a,b) if(d_setor(a,b) < S_OKAY) vista_abort(s)
#define SETPAGES(s,a,b) if(d_setpages(a,b) < S_OKAY) vista_abort(s)
#define SETRM(s,a,b) if(d_setrm(a,b) < S_OKAY) vista_abort(s)
#define SETRO(s,a,b) if(d_setro(a,b) < S_OKAY) vista_abort(s)
#define STSCM(s,a,b,c) if(d_stscm(a,b,c) < S_OKAY) vista_abort(s)
#define STSCO(s,a,b,c) if(d_stsco(a,b,c) < S_OKAY) vista_abort(s)
#define STSCR(s,a,b) if(d_stscr(a,b) < S_OKAY) vista_abort(s)
#define STSCS(s,a,b,c) if(d_stscs(a,b,c) < S_OKAY) vista_abort(s)
#define TIMEOUT(s,a) if(d_timeout(a) < S_OKAY) vista_abort(s)
#define TRABORT(s) if(d_trabort() < S_OKAY) vista_abort(s)
#define TRBEGIN(s,a) if(d_trbegin(a) < S_OKAY) vista_abort(s)
#define TREND(s) if(d_trend() < S_OKAY) vista_abort(s)
#define UTSCM(s,a,b,c) if(d_utscm(a,b,c) < S_OKAY) vista_abort(s)
#define UTSCO(s,a,b,c) if(d_utsco(a,b,c) < S_OKAY) vista_abort(s)
#define UTSCR(s,a,b) if(d_utscr(a,b) < S_OKAY) vista_abort(s)
#define UTSCS(s,a,b,c) if(d_utscs(a,b,c) < S_OKAY) vista_abort(s)
#define WRCURR(s,a) if(d_wrcurr(a) < S_OKAY) vista_abort(s)
/*------------- end DMACROS.H -------------------*/
/*------------- COMPILER DEPENDENT CONSTANTS -------------------*/
#ifdef TURBO_COMPILER
#define FNAME_NULL "nul"
#define LOCAL_SLASH 92 /* ascii back slash char (\) */
#endif
#ifdef UNIX
#define FNAME_NULL "/dev/null"
#define LOCAL_SLASH 47 /* ascii forward slash char (/) */
#endif
/*------------ COMPILER INDEPENDENT CONSTANTS -------------------*/
#define CACHE_SIZE 64 /* used in vista d_setpages() function */
#define COMMENT_CHARS "#*$!\n" /* identify comment lines in AusText files */
#define CTRL_Z 26
#define DIT_FINDSTR 1L /* DITTO.flags: retained aft FINDSTR srch */
#define DIT_STOP 2L /* DITTO.flags: node where user pushed stop */
#define END_RETAIN_PAGE 11 /* VT = marks end of RETAIN page */
/***#define END_RETAIN_REC '\f'****/
#define EXT_CHARTYPE ".chr" /* user definable wildcards (from LOADCHR) */
#define EXT_CANDI ".can" /* candidate dictionary words format */
#define EXT_CONFIG ".ocf" /* standard opera configuration file */
#define EXT_DTBS ".d99" /* inverted index file for dbase addrs */
#define EXT_FZKEY ".fzk" /* output of all opera text anal pgms */
#define EXT_HANDEL ".han" /* standard handel profile file format */
#define EXT_HUFFCODE ".huf" /* huffman encode tree (from HUFFCODE) */
#define EXT_HDECODE ".c" /* huffman decode tree (from HUFFCODE) */
#define EXT_INCLIST ".inc" /* "include" list file name extension */
#define EXT_LIST ".lst" /* standard wordlist format: 1 word/line */
#define EXT_SCHEMA ".sch" /* vista database schema format */
#define EXT_STOPLIST ".stp" /* standard stop list format */
#define EXT_SURVEY ".sur" /* standard survey file format */
#define EXT_TEMP ".tmp" /* any kind of temporary file */
#define EXT_TEXT ".txt" /* freeform ascii text format */
#define EXT_USRNOTES ".not" /* user notes flatfile format */
#define ETXDELIM "\f\n" /* default end-of-text (ETX) delim str */
#define FNAME_AUDIT "opaudit.lst"
#define FNAME_AUSCAT "austools.cat" /* Austools msgs catalog */
#define FNAME_AUSTEXT_TUTORIAL "austext.tut"
#define FNAME_CONFIRM_LIST "todscrd.lst" /* Shankar/Tomita files */
#define FNAME_DISCARD_DATA "shdscrd.lst" /* OEF_discard */
#define FNAME_DTSRCAT "dtsearch" /* DtSearch msgs catalog */
#define FNAME_HUFFCODE_TAB "ophuf.huf" /* huffman encode table */
#define FNAME_MUIRES "mui.res" /* motif class resources file */
#define FNAME_NOTES_BAC "usrnotes.not"
#define FNAME_NOTES_SEM "usrnotes.sem"
#define FNAME_ORIGSTOP "orig.stp"
#define FNAME_README "readme.txt"
#define FNAME_SITECONFIG "dtsearch.ocf"
#define FNAME_SITENEWS "sitenews.txt"
#define MINWIDTH_TOKEN 2 /* default smallest word/stem allowed */
#define MAX_BMHTAB 256 /* max alphabet size in bmstrstr tables */
#define MAX_ETXDELIM 100 /* max size of ETX delim string */
#define MAX_KTCOUNT 64 /* max number of keytypes */
#define MAXWIDTH_LWORD 40 /* = sizeof(or_lwordrec.or_lwordkey) */
#define MAXWIDTH_SWORD 16 /* = sizeof(or_swordrec.or_swordkey) */
#define NULLDATESTR "0/0/0~0:0"
#define NUM_HOLES 256 /* array size for defragmentation */
#define OBJDATESTR "%02d/%02d/%02d~%02d:%02d"
#define PRODNAME "DtSearch"
#define PWDMASKSZ 20
#define SCREEN_WIDTH 80 /* max len text line in online OPERA pgms */
#define STEM_CH 15 /* Ctrl-O stemmed word prefix character */
/*--------------- BYTE SWAP DECLARATIONS ------------
* The default database record format is the data ordering
* for big endian machines (most significant byte first),
* also known as "network" order. For non big_endian platforms,
* all compiles should include the BYTE_SWAP define.
* SWABDIR is direction of io to indicate correct byte swap function.
* HTON is host to network, internal memory to external database file.
* NTOH is network to host, file to memory.
* Actual host_to_network functions defined in <netinit/in.h>
* which is not yet standardized.
*/
typedef enum {HTON=1, NTOH} SWABDIR;
extern void swab_dbrec (struct or_dbrec *rec, SWABDIR direction);
extern void swab_objrec (struct or_objrec *rec, SWABDIR direction);
#ifdef BYTE_SWAP /* ie (BYTE_ORDER != BIG_ENDIAN) */
#define HTONL(x) x = htonl(x)
#define HTONS(x) x = htons(x)
#define NTOHL(x) x = ntohl(x)
#define NTOHS(x) x = ntohs(x)
#else /* !BYTE_SWAP, ie (BYTE_ORDER == BIG_ENDIAN) */
#define HTONL(x)
#define HTONS(x)
#define NTOHL(x)
#define NTOHS(x)
#endif /* BYTE_SWAP */
/*--------------- TESKEY PARSE CHARACTER TYPES ------------
* Used in langmap.c for linguistic parsing modules.
* Low order byte reserved for uppercase image of character
* as locale independent replacement for toupper() and strupr().
*/
#define CONCORDABLE 0x4000 /* alpha, numeric: inside word */
#define OPT_CONCORD 0x2000 /* "./-": maybe inside word, maybe outside */
#define NON_CONCORD 0x1000 /* space, punctuation, etc: outside word */
#define VOWEL 0x0800 /* concordable subtype: aeiou */
#define CONSONANT 0x0400 /* concordable subtype: all alpha - vowels */
#define NUMERAL 0x0200 /* concordable subtype: 0-9 */
#define WHITESPACE 0x0100 /* locale indep replacement for isspace() */
/*--------------- SCHEMA CONSTANTS ----------------
* Associated with fields in database schema (austext.h)
* and in DITTO structures.
* Values 20000 - 29999 reserved for custom user applic in all cardinal ints.
* ORA_ retrieval access location cardinal integers in or_access.
* ORC_ compression id bit switches in or_compflags.
* ORD_ bit switches in or_dbflags.
* (ORO_ bit switches in or_objflags
* renamed to DtSrFlxxx and moved to Search.h)
* ORM_ type cardinal integers in or_misctype.
* (ORT_ object type (or_objtype, or_dbotype, DITTO)
* renamed to DtSrObj... and moved to Search.h)
* (ORL_ language id cardinal integers in or_language
* renamed to DtSrLa... and moved to Search.h)
*/
#define ORA_VARIES 0 /* object accessibility unspec at curr lvl */
#define ORA_NOTAVAIL 1 /* obj not directly accessible from engine */
#define ORA_BLOB 2 /* obj stored in blob recs */
#define ORA_REFBLOB 3 /* svr ref (filename of object) in blob */
#define ORA_REFKEY 4 /* svr ref in or_objkey */
#define ORA_REFHUGEKEY 5 /* svr ref in 'huge' key (misc) rec */
#define ORA_REFABSTR 6 /* svr ref in abstract (misc rec) */
#define ORA_CREFBLOB 13 /* clt ref (filename of object) in blob */
#define ORA_CREFKEY 14 /* clt ref in or_objkey */
#define ORA_CREFABSTR 16 /* clt ref in abstract (misc rec) */
#define ORC_COMPBLOB (1<<0) /* blobs are compressed */
#define ORC_COMPABSTR (1<<1) /* abstracts are compressed */
#define ORD_XWORDS (1L<<0) /* inverted index includes exact words */
#define ORD_XSTEMS (1L<<1) /* inverted index includes word stems */
#define ORD_USEHUGEKEYS (1L<<4) /* all direct user access via huge keys */
#define ORD_NOMARKDEL (1L<<8) /* permanently disables mark-for-deletion */
#define ORD_NONOTES (1L<<9) /* permanently disables user notes */
#define ORD_WIDECHAR (1L<<10) /* text is multibyte or wide chars */
#define ORO_DELETE (1L<<0) /* obj is marked for deletion */
#define ORO_OLDNOTES (1L<<1) /* obj has old style usernotes in misc rec */
#define ORM_FZKABS 1 /* fzkey[fzkeysz] + abstract[abstrsz] */
#define ORM_HUGEKEY 2 /* optional 'huge' key */
#define ORM_OLDNOTES 3 /* old style user notes */
#define ORM_KEYTYPE 4 /* database keytype rec (KEYTYPE struct) */
/*------------------------- MACROS ---------------------------*/
/* (Use offsetof() in stddef.h to replace my old OFFSET macro) */
#define NULLORSTR(str) ((str)?str:catgets(dtsearch_catd,1,1,"<null>"))
#define NUMARRAY(arr) ((sizeof(arr) / sizeof(arr[0])))
/****************************************/
/* */
/* LLIST */
/* */
/****************************************/
typedef struct llist_tag {
struct llist_tag *link;
void *data;
} LLIST;
/****************************************/
/* */
/* FREE_SPACE_STR */
/* */
/****************************************/
/* 'holes' structure used for dynamic defragmentation */
typedef struct holes_str {
DtSrINT32 hole_size;
DtSrINT32 offset;
} FREE_SPACE_STR;
/****************************************/
/* */
/* FILE_HEADER */
/* */
/****************************************/
/* 'holes' structure used for dynamic defragmentation */
typedef struct fl_head {
DtSrINT32 hole_count [2];
FREE_SPACE_STR hole_array [2] [NUM_HOLES];
} FILE_HEADER;
/****************************************/
/* */
/* CMPLL, sort_llist, compare_llist */
/* */
/****************************************/
/* Generic LLIST structure typically used for 'lines' of text,
* as in ausapi.msglist and usrblk.msgs, and binary blobs.
* See structure typedef below for blob list structure.
* LLISTs can be sorted by calling sort_llist().
* The compare function is stored in global pointer 'compare_llist'
* prior to calling the sort function.
*/
typedef int (*CMPLL) (LLIST *left, LLIST *right);
/****************************************/
/* */
/* READCFP */
/* */
/****************************************/
/* Pointer to a function that takes a void
* pointer and returns a C char (1 octet).
* Used by linguistic parsers as a character reading cofunction.
* When parser is reading from a file stream as in dtsrindex,
* usual cofunction is readchar_ftext(). When parser is reading
* from a text string as in queries, the usual cofunction
* is readchar_string() which just accesses next char in string.
*/
typedef UCHAR (*READCFP) (void *);
/********************************************************/
/* */
/* WORDTREE */
/* */
/********************************************************/
/* A generic structure for creating binary trees of words
* from stoplists, include-lists, etc.
*/
typedef struct _bintree_tag {
struct _bintree_tag *rlink; /* ptr to right node */
struct _bintree_tag *llink; /* ptr to left node */
int len; /* length of word */
void *word;
} WORDTREE;
/************************************************/
/* */
/* PARG */
/* */
/************************************************/
/* Single argument for first parser call for a text block */
typedef struct {
void *dblk; /* dblk is (DBLK *) */
FILE *ftext; /* Text file being parsed in dtsrindex */
void *string; /* Query or other string being parsed */
void *etxdelim; /* End of text (ETX) delimiter string */
long *offsetp; /* where parser stores word offset */
long flags;
#define PA_INDEXING 0x0001 /* parse for indexing purposes (dtsrindex) */
#define PA_HILITING 0x0002 /* parse for hiliting purposes */
#define PA_MSGS 0x0004 /* explain parse failures with msgs */
void *extra; /* reserved for generic use by parsers */
} PARG;
/********************************************************/
/* */
/* DBLK */
/* */
/********************************************************/
/* One element of a linked list of universal information
* about all databases accessible,
* to an online search engine instance, chained off of
* the global OE_dblist. It is also used individually
* by offline build tools to store database data.
* It contains pointers to linguistic processors and data structures,
* data derived from the site configuration file,
* data derived and used by the DBMS,
* and some fields reflecting recommended initial user choices.
* Changes here should also be reflected in initblks.c,
* austext.sch, initausd.c, and in oeinit.c.
*/
typedef struct dblk_tag
{
struct dblk_tag *link; /* ptr to next dblk in list */
char name [11]; /* 1 - 8 char dictionary name */
char is_selected; /* bool: initial gui selection status */
char *label; /* database description/label string for UI */
long flags;
char *path; /* where to find all database files */
FILE *syofile; /* symptom offset (ranges) d97 file */
FILE *syifile; /* symptom index d98 file */
void *ranges; /* contents of syofile read into ram */
FILE *iifile; /* inverted words index d99 file */
time_t iimtime; /* last time d99 was modified */
int vistano; /* vista database number */
int ktcount; /* number of nodes in keytypes array */
DtSrKeytype *keytypes; /* record types in this database */
DBREC dbrec; /* copy of database's dbrec record */
void *zblk; /* used only for semantic processing */
/*----- Huffman Compression -----*/
time_t hufid; /* tree identification atom */
int hufroot; /* index to inverted tree root (array bottom) */
int *huftree; /* beginning of huffman tree array */
/*----- Language Fields -----*/
char *fname_stp; /* name of stoplist file */
char *fname_inc; /* name of include-list file */
char *fname_sfx; /* name of suffixes file */
int *charmap; /* parse/stem table for char set */
WORDTREE *stoplist; /* root of stoplist tree */
WORDTREE *inclist; /* root of include-list tree */
char *(*lstrupr) (char *string, struct dblk_tag *dblk);
char *(*parser) (PARG *parg);
void *parse_extra; /* eg additional word trees */
char *(*stemmer) (char *wordin, struct dblk_tag *dblk);
long stem_flags; /* stemmer options */
void *stem_extra; /* eg suffix tables */
void *lang_extra; /* additional language dependent data */
long lang_flags; /* language dependent switches */
#define LF_DUP_STP 0x0001 /* duplicate stop list */
#define LF_DUP_INC 0x0002 /* duplicate include list */
#define LF_DUP_SFX 0x0004 /* duplicate suffixes list */
/*----- User Search Parameters -----*/
int maxhits; /* max # hits to be returned from searches */
void *resuser; /* reserved for private use by users */
} DBLK;
/*------------------------- GLOBALS -------------------------*/
/* DtSearchExit (austext_exit) and DtSearchExitUser (austext_exit_user)
* are in ausexit.c too but are "public" in DtSearch (defined in Search.h).
*/
extern char *aa_argv0; /* globals.c */
extern int aa_maxhits; /* aajoint.c */
extern FILE *aa_stderr; /* globals.c */
extern int ascii_charmap[]; /* langmap.c */
extern LLIST *ausapi_msglist; /* globals.c */
extern void (*austext_exit_first) (int); /* ausexit.c */
extern void (*austext_exit_dbms) (int); /* ausexit.c */
extern void (*austext_exit_comm) (int); /* ausexit.c */
extern void (*austext_exit_endwin) (int); /* ausexit.c */
extern void (*austext_exit_mem) (int); /* ausexit.c */
extern void (*austext_exit_last) (int); /* ausexit.c */
extern void (*austext_exit_user) (int); /* ausexit.c */
extern nl_catd austools_catd; /* globals.c */
extern CMPLL compare_llist;
extern nl_catd dtsearch_catd; /* globals.c */
extern unsigned long
duprec_hashsize; /* isduprec.c */
extern int latin_charmap[]; /* langmap.c */
/*------------------------ FUNCTION PROTOTYPES ------------------------*/
extern void add_free_space(FREE_SPACE_STR *del_rec, FILE_HEADER *flh);
extern void append_ext (char *buffer, int buflen,
char *fname, char *fext);
extern int austext_dopen (
char *dbname,
char *dbpath,
char *d2xpath,
int cache_size,
DBREC *bufptr);
extern void *austext_malloc (size_t size, char *location, void *ignored);
extern char *bmhcore (
UCHAR *text,
size_t txtlen,
UCHAR *pattern,
size_t patlen,
size_t *bmhtable);
extern void bmhtable_build (
UCHAR *pattern,
size_t patlen,
size_t *bmhtable);
extern char *bmstrstr (
UCHAR *text,
size_t txtlen,
UCHAR *pattern,
size_t patlen);
extern int clean_wrap (char *string, int linelen);
extern LLIST *cutnode_llist (LLIST *node, LLIST **llistp);
extern void (*dberr_exit)(int exitcode); /* defaults to exit() */
extern void delete_whitespace (char *linebuf);
extern void discard_to_ETX (PARG *parg);
extern int endstroke (int c);
extern void put_new_word(struct or_hwordrec *recbuf, int vistano);
extern FREE_SPACE_STR
*find_free_space (DtSrINT32 req_size, FILE_HEADER *flh);
extern void free_llist (LLIST **llhead);
extern int fread_d99_header (FILE_HEADER *flh, FILE *fp);
extern int fwrite_d99_header (FILE_HEADER *flh, FILE *fp);
extern char *get_email_addr (void);
extern char *getnews (char *fname, int use_copyr);
extern void hc_decode (UCHAR *input_bitstring, UCHAR *output_charbuf,
int outbuf_size, time_t encode_id);
extern int hc_encode (struct or_blobrec *targ, UCHAR *src,
int srclen, int force_flush);
extern void init_header (FILE *fp, FILE_HEADER *flh);
extern int is_compatible_version (char *callers_vers, char *local_vers);
extern int is_concordable (char *word, int *charmap);
extern int is_duprec (char *recid);
extern int is_objdatestr (char *string, DtSrObjdate *objdptr);
extern int is_objdatetm (struct tm *objdatetm);
extern void join_llists (LLIST **mainlist, LLIST **sublist);
extern char *jpn_parser (PARG *parg);
extern int load_custom_language (DBLK *dblk, DBLK *dblist);
extern int load_jpn_language (DBLK *dblk, DBLK *dblist);
extern int load_language (DBLK *dblk, DBLK *dblist);
extern int load_wordtree (
WORDTREE **treetop,
DBLK *dblk,
char *fname,
int do_teskey_test);
extern char *null_stemmer (char *word, DBLK *dblk);
extern char *null_lstrupr (char *string, DBLK *dblk);
extern char *objdate2fzkstr (DtSrObjdate objdate);
extern struct tm
*objdate2tm (DtSrObjdate objdate);
extern int objdate_in_range (DtSrObjdate recdate,
DtSrObjdate date1, DtSrObjdate date2);
extern int offline_kbhit (void);
extern int open_dblk (DBLK **dblist, int numpages, int debugging);
extern LLIST *pop_llist (LLIST **llistp);
extern void print_dbrec (char *dbname, struct or_dbrec *dbrec);
extern int quit_escape(void);
extern UCHAR readchar_ftext (PARG *parg);
extern UCHAR readchar_string (UCHAR *string);
extern char *remove_spaces (char *string);
extern void replace_ext (char *buffer, int buflen,
char *fname, char *fext);
extern LLIST *sort_llist (LLIST *list_header);
extern char *teskey_parser (PARG *parg);
extern DtSrObjdate
tm2objdate (struct tm *tmptr);
#if !defined(__linux__)
#ifndef _ALL_SOURCE
extern char *strdup (const char *s);
#endif
#endif
extern void toggle_insert (void);
extern void unload_custom_language (DBLK *dblk);
extern void unload_language (DBLK *dblk);
extern void vista_abort (char *location);
extern char *vista_msg (char *location);
/************************ SearchP.h ********************************/
#endif /* _SearchP_h */

152
cde/include/Dt/Service.h Normal file
View File

@@ -0,0 +1,152 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/*
* File: Service.h $XConsortium: Service.h /main/3 1995/10/26 15:27:03 rswiston $
* Language: C
*
* (C) Copyright 1993, Hewlett-Packard, all rights reserved.
*
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
* (c) Copyright 1993, 1994 International Business Machines Corp. *
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
* (c) Copyright 1993, 1994 Novell, Inc. *
*/
#ifndef _Dt_Service_h
#define _Dt_Service_h
/************* DATA TYPES *****************************************/
/* Many of the data types are standard DT types. */
#include <Dt/DataTypes.h>
/* Built on ICCC-based messaging library */
#include <Dt/Msg.h>
/* Specific messaging data types */
typedef struct _DtSvcHandle * DtSvcHandle;
typedef DtMsgContext DtSvcMsgContext;
/************* MESSAGE DEFINITIONS *********************************/
#define DT_SVC_MSG_SUCCESS "SUCCESS"
#define DT_SVC_MSG_FAIL "FAIL"
#define DT_SVC_MSG_REQUEST "REQUEST"
#define DT_SVC_MSG_NOTIFY "NOTIFY"
/************* CALLBACK PROTOTYPES ******************************
*/
typedef void (*DtSvcReceiveProc) ();
/*
DtSvcHandle service,
DtSvcMsgContext reply_context,
Pointer client_data,
String * message_fields,
int num_fields);
*/
/*
* service A handle for the service.
*
* reply_context Opaque context information for the request that
* was received. This data is needed when
* generating a reply to a request.
*
* client_data A pointer to the data that was specified when
* the callback was registered.
*
* message_fields A pointer to an array of strings that is the
* contents of the request. (See note 2.)
*
* num_fields The number of fields in the message_fields
* array.
*/
typedef void (*DtSvcMessageProc) ();
/*
DtSvcHandle service,
Pointer client_data,
String * message_fields,
int num_fields);
*/
/*
* service A handle for the service.
*
* client_data A pointer to the data that was specified when
* the callback was registered.
*
* message_fields A pointer to an array of strings that is the
* contents of the message. (See note 2.)
*
* num_fields The number of fields in the message_fields
* array.
*/
typedef void (*DtSvcStatusProc) ();
/*
DtSvcHandle service,
int status,
Pointer client_data);
*/
/*
* service Handle to the service whose status is being
* reported.
*
* status The status of the service being started.
*
* client_data Pointer to the data that was registered when
* the callback was registered.
*/
/************* CONSTANTS ******************************************
*/
/* The following are types of reply messages.
*/
#define DT_SVC_SUCCESS 1 /* The request succeeded. */
#define DT_SVC_FAIL -1 /* The service failed to carry
* out the request.
*/
#define DT_SVC_DELIVERY_FAIL -2 /* The request could not be
* delivered to the service for
* some reason. For example,
* the service may not be running
* and cannot be invoked.
*/
/* The following are types of status.
*/
#define DT_SVC_START 1 /* The service was started. */
#define DT_SVC_NO_START -1 /* The service failed to start.
*/
#define DT_SVC_LOST -2 /* The service was lost. Another
provider took over ownership
for this service. */
#endif /*_Dt_Service_h*/
/* Do not add anything after this endif. */

59
cde/include/Dt/Session.h Normal file
View File

@@ -0,0 +1,59 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: Session.h /main/3 1995/10/26 15:10:56 rswiston $ */
/*
* (c) Copyright 1993, 1994 Hewlett-Packard Company
* (c) Copyright 1993, 1994 International Business Machines Corp.
* (c) Copyright 1993, 1994 Sun Microsystems, Inc.
* (c) Copyright 1993, 1994 Novell, Inc.
*/
#ifndef _Dt_Session_h
#define _Dt_Session_h
#include <X11/Intrinsic.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* Functions
*/
extern Boolean DtSessionSavePath(
Widget widget,
char **save_path,
char **save_file);
extern Boolean DtSessionRestorePath(
Widget widget,
char **restore_path,
char *restore_file);
#ifdef __cplusplus
}
#endif
#endif /* _Dt_Session_h */

250
cde/include/Dt/SessionM.h Normal file
View File

@@ -0,0 +1,250 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $TOG: SessionM.h /main/8 1998/07/30 12:10:49 mgreess $ */
/*
* (c) Copyright 1996 Digital Equipment Corporation.
* (c) Copyright 1993, 1994, 1996 Hewlett-Packard Company
* (c) Copyright 1993, 1994, 1996 International Business Machines Corp.
* (c) Copyright 1993, 1994, 1996 Sun Microsystems, Inc.
* (c) Copyright 1993, 1994, 1996 Novell, Inc.
* (c) Copyright 1996 FUJITSU LIMITED.
* (c) Copyright 1996 Hitachi.
*/
/*************************************<+>*************************************
*****************************************************************************
**
** File: SessionM.h
**
** Description:
** -----------
** Contains all variables needed for SM messaging. All messages serviced,
** and the tool class name for the session manager
**
**
**
*******************************************************************
** (c) Copyright Hewlett-Packard Company, 1990. All rights are
** reserved. Copying or other reproduction of this program
** except for archival purposes is prohibited without prior
** written consent of Hewlett-Packard Company.
********************************************************************
**
**
*****************************************************************************
*************************************<+>*************************************/
#ifndef _SessionM_h
#define _SessionM_h
/*
* Include files
*/
/* If <X11/Intrinsic.h> is included along with this file, <X11/Intrinsic.h>
MUST be included first due to "typedef Boolean ..." problems. The following
conditional #define is also part of the solution to this problem. */
#include <X11/X.h>
#include <X11/Intrinsic.h>
/*
* Tool class for the session manager
*/
#define DtSM_TOOL_CLASS "SESSIONMGR"
/*
* SM_STARTUP_CHANGE an SM_STATE parameters
*/
#define DtSM_VERBOSE_MODE 1
#define DtSM_QUIET_MODE 2
#define DtSM_ASK_STATE 0
#define DtSM_HOME_STATE 3
#define DtSM_CURRENT_STATE 4
/*
* Atoms for session manager/style manager communication
*/
#define _XA_DT_SM_STM_PROTOCOL "_DT_SM_STM_PROTOCOL"
#define _XA_DT_SM_SAVE_TO_HOME "_DT_SM_SAVE_TO_HOME"
#define _XA_DT_SM_STATE_CHANGE "_DT_SM_STATE_CHANGE"
#define _XA_DT_SM_RESTORE_DEFAULT "_DT_SM_RESTORE_DEFAULT"
#define _XA_DT_SM_PREFERENCES "_DT_SM_PREFERENCES"
/*
* Atoms for lock changes
*/
#define _XA_DT_SM_LOCK_CHANGE "_DT_SM_LOCK_CHANGE"
#define CoverScreenMask (1L<<0)
#define LockOnTimeoutMask (1L<<1)
/*
* Parameters to be sent into session manager
*/
/*
* Atoms for communicating configuration changes and state
*/
/*
* Defines needed for getting/setting the sm window property on the root
*/
#define PROP_DT_SM_WINDOW_INFO_ELEMENTS 2
#define _XA_DT_SM_WINDOW_INFO "_DT_SM_WINDOW_INFO"
/*
* Defines needed for getting the session manager state off it's window
*/
#define PROP_DT_SM_STATE_INFO_ELEMENTS 13
#define _XA_DT_SM_STATE_INFO "_DT_SM_STATE_INFO"
/*
* Defines needed for the screen saver list property.
*/
#define _XA_DT_SM_SAVER_INFO "_DT_SM_SAVER_INFO"
/*
* Defines needed for the screen saver property
*/
#define PROP_DT_SM_SCREEN_INFO_ELEMENTS 5
#define _XA_DT_SM_SCREEN_INFO "_DT_SM_SCREEN_INFO"
/*
* Defines needed for the audio property
*/
#define PROP_DT_SM_AUDIO_INFO_ELEMENTS 4
#define _XA_DT_SM_AUDIO_INFO "_DT_SM_AUDIO_INFO"
/*
* Defines needed for the keyboard property
*/
#define PROP_DT_SM_KEYBOARD_INFO_ELEMENTS 3
#define _XA_DT_SM_KEYBOARD_INFO "_DT_SM_KEYBOARD_INFO"
/*
* Define needed for the font info property
*/
#define _XA_DT_SM_FONT_INFO "_DT_SM_FONT_INFO"
/*
* Define needed for the font info property
*/
#define _XA_DT_SM_POINTER_INFO "_DT_SM_POINTER_INFO"
/*
* Define needed for the preeditType info property
*/
#define _XA_DT_SM_PREEDIT_INFO "_DT_SM_PREEDIT_INFO"
/* bit definitions for SmStateInfo.flags */
#define SM_STATE_NONE 0
#define SM_STATE_START (1L << 0)
#define SM_STATE_CONFIRM (1L << 1)
#define SM_STATE_COMPAT (1L << 2)
#define SM_STATE_SEND (1L << 3)
#define SM_STATE_COVER (1L << 4) /* Obsolete */
#define SM_STATE_LOTOUT (1L << 5) /* Obsolete */
#define SM_STATE_LOTOUTSTAT (1L << 6)
#define SM_STATE_CYCLETIMEOUT (1L << 7)
#define SM_STATE_LOCKTIMEOUT (1L << 8)
#define SM_STATE_SAVERTIMEOUT (1L << 9)
#define SM_STATE_RANDOM (1L << 10)
#define SM_STATE_DISP_SESSION (1L << 11)
#define SM_STATE_ALL (SM_STATE_START | SM_STATE_CONFIRM |\
SM_STATE_COMPAT | SM_STATE_SEND |\
SM_STATE_COVER | SM_STATE_LOTOUT |\
SM_STATE_LOTOUTSTAT | SM_STATE_CYCLETIMEOUT |\
SM_STATE_LOCKTIMEOUT | SM_STATE_SAVERTIMEOUT |\
SM_STATE_RANDOM | SM_STATE_DISP_SESSION)
/*
* typedef statements for structures to be returned
*/
typedef struct
{
int flags;
int smStartState;
int smConfirmMode;
Boolean smCompatMode;
Boolean smSendSettings;
Boolean smCoverScreen; /* Obsolete */
Boolean smLockOnTimeout; /* Obsolete */
Boolean smLockOnTimeoutStatus;
int smCycleTimeout;
int smLockTimeout;
int smSaverTimeout;
Boolean smRandom;
Boolean smDisplaySpecific; /* If True, the currently running
session is for a specific display */
} SmStateInfo;
typedef struct
{
char *saverList;
} SmSaverInfo;
typedef struct
{
int flags;
int smTimeout;
int smInterval;
int smPreferBlank;
int smAllowExp;
} SmScreenInfo;
typedef struct
{
int flags;
int smBellPercent;
unsigned int smBellPitch;
unsigned int smBellDuration;
} SmAudioInfo;
typedef struct
{
int flags;
int smKeyClickPercent;
int smGlobalAutoRepeat;
} SmKeyboardInfo;
/*
* Function definitions
*/
extern Status _DtGetSmWindow(Display *, Window, Window *) ;
extern Status _DtGetSmState(Display *, Window, SmStateInfo *);
extern Status _DtSetSmState(Display *, Window, SmStateInfo *);
extern Status _DtGetSmSaver(Display *, Window, SmSaverInfo *);
extern void _DtSetSmSaver(Display *, Window, SmSaverInfo *);
extern Status _DtGetSmScreen(Display *, Window, Atom, SmScreenInfo *);
extern Status _DtGetSmAudio(Display *, Window, Atom, SmAudioInfo *);
extern Status _DtGetSmKeyboard(Display *, Window, Atom, SmKeyboardInfo *);
extern Status _DtGetSmFont(Display *, Window, Atom, char **);
extern Status _DtGetSmPointer(Display *, Window, Atom, char **);
extern Status _DtGetSmPreedit(Display *, Window, Atom, char **);
#endif /* _SessionM_h */

130
cde/include/Dt/SessionP.h Normal file
View File

@@ -0,0 +1,130 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $TOG: SessionP.h /main/5 1998/07/30 12:11:06 mgreess $ */
/* *
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
* (c) Copyright 1993, 1994 International Business Machines Corp. *
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
* (c) Copyright 1993, 1994 Novell, Inc. *
*/
/*************************************<+>*************************************
*****************************************************************************
**
** File: SessionP.h
**
** Description: Private header for Session Management routines
** -----------
**
*******************************************************************
** (c) Copyright Hewlett-Packard Company, 1990. All rights are
** reserved. Copying or other reproduction of this program
** except for archival purposes is prohibited without prior
** written consent of Hewlett-Packard Company.
********************************************************************
**
**
**
*****************************************************************************
*************************************<+>*************************************/
#ifndef _SessionP_h
#define _SessionP_h
/*
* include statements
*/
/*
* define statements
*/
/*
* typedef statements
*/
/*
* Definition for the _DT_SM_WINDOW_INFO property.
*/
typedef struct
{
unsigned long flags;
unsigned long smWindow;
} PropDtSmWindowInfo;
/*
* Definition for the _DT_SM_STATE_INFO property
*/
typedef struct
{
unsigned long flags;
unsigned long smStartState;
unsigned long smConfirmMode;
unsigned long smCompatMode;
unsigned long smSendSettings;
unsigned long smCoverScreen;
unsigned long smLockOnTimeout;
unsigned long smLockOnTimeoutStatus;
unsigned long smCycleTimeout;
unsigned long smLockTimeout;
unsigned long smSaverTimeout;
unsigned long smRandom;
unsigned long smDisplaySpecific;
} PropDtSmStateInfo;
/*
* Definition for the _DT_SM_SCREEN_INFO property
*/
typedef struct
{
unsigned long flags;
unsigned long smTimeout;
unsigned long smInterval;
unsigned long smPreferBlank;
unsigned long smAllowExp;
} PropDtSmScreenInfo;
/*
* Definition for the _DT_SM_AUDIO_INFO property
*/
typedef struct
{
unsigned long flags;
unsigned long smBellPercent;
unsigned long smBellPitch;
unsigned long smBellDuration;
} PropDtSmAudioInfo;
/*
* Definition for the _DT_SM_KEYBOARD_INFO property
*/
typedef struct
{
unsigned long flags;
unsigned long smKeyClickPercent;
unsigned long smGlobalAutoRepeat;
} PropDtSmKeyboardInfo;
#endif /* _SessionP_h */
/* Do not add anything after this endif. */

363
cde/include/Dt/Setlocale.h Normal file
View File

@@ -0,0 +1,363 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: Setlocale.h /main/3 1995/10/26 15:27:34 rswiston $ */
/*
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
* (c) Copyright 1993, 1994 International Business Machines Corp. *
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
* (c) Copyright 1993, 1994 Novell, Inc. *
*/
/* Hp DT's version of an 8.0 include file; needed for Fnmatch */
#ifndef DtSETLOCALE_INCLUDED /* allow multiple inclusions */
#define DtSETLOCALE_INCLUDED
#ifdef _NAMESPACE_CLEAN
#define _1kanji __1kanji
#define _2kanji __2kanji
#define _downshift __downshift
#define _upshift __upshift
#endif /* _NAMESPACE_CLEAN */
#include <locale.h>
#include <limits.h>
#include <nl_types.h>
#include <langinfo.h>
#include <Dt/Collate.h>
#ifndef _NL_ORDER
#define _NL_ORDER
typedef int nl_order;
#endif
#ifndef _NL_MODE
#define _NL_MODE
typedef int nl_mode;
#endif
#ifndef _NL_OUTDGT
#define _NL_OUTDGT
typedef int nl_outdgt;
#endif
#ifndef MAXLNAMELEN
#define MAXLNAMELEN 14
#endif
#endif
struct _era_data { /* defines an Emperor/Era time period */
short start_year; /* starting date of era */
unsigned short start_month;
unsigned short start_day;
short end_year; /* ending date of era */
unsigned short end_month;
unsigned short end_day;
short origin_year; /* time axis origin for era (one of start_year or end_year) */
short offset; /* offset from 0 for 1st year of era */
short signflag; /* adjusts sign of (year - origin_year) value */
unsigned short reserved;
unsigned char *name; /* name of era */
unsigned char *format; /* instead of nl_langinfo(ERA_FMT) */
};
extern int __nl_langid[]; /* langid of currently loaded language */
extern unsigned char *__ctype; /* pointer to ctype table */
extern unsigned char *_1kanji; /* pointer to 1st of 2 kanji table */
extern unsigned char *_2kanji; /* pointer to 2nd of 2 kanji table */
extern unsigned char *_upshift; /* pointer to up shift table */
extern unsigned char *_downshift; /* pointer to down shift table */
#ifdef EUC
extern unsigned char *__e_cset; /* pointer to expanded char set table */
extern unsigned char *__ein_csize; /* pointer to expanded in_csize table */
extern unsigned char *__eout_csize; /* pointer to expanded out_csize table*/
#endif /* EUC */
extern struct _era_data *_nl_era[]; /* array of era info str pointer */
extern int _nl_radix; /* radix character */
extern int _sh_low; /* lowest char in shift table domain */
extern int _sh_high; /* highest char in shift table domain */
extern int __nl_char_size; /* size of characters */
#ifdef EUC
extern int __nl_code_scheme;/* flag for char code scheme */
extern int __cs_SBYTE; /* flag for 1 byte char code scheme */
extern int __cs_HP15; /* flag for HP15 char code scheme */
extern int __cs_EUC; /* flag for EUC char code scheme */
extern unsigned char __in_csize[]; /* input char size */
extern unsigned char __out_csize[]; /* output char size */
extern unsigned int __euc_template[]; /* euc process code template */
#endif /* EUC */
extern nl_direct _nl_direct; /* direction flag */
extern int _nl_context; /* directionality context flag */
extern nl_order _nl_order; /* order flag */
extern nl_mode _nl_mode; /* mode flag; Latin or non-Latin */
extern nl_outdgt _nl_outdigit; /* digit output : ascii or alt digit */
extern int _nl_space_alt; /* value of alternative space */
extern unsigned char *_nl_dgt_alt; /* buffer for alt digit string */
extern unsigned char *_nl_punct_alt; /* buffer for alt punctuation string */
extern unsigned char *_nl_pascii; /* buffer for ascii punctuation string */
extern unsigned char *_nl_dascii; /* buffer for ascii digits string */
extern int _nl_map21; /* non-zero if 2-to-1 mappings */
extern int _nl_onlyseq; /* true if only 1-to-1 char w no pri */
extern int _nl_collate_on; /* true if collation table loaded */
extern int _nl_mb_collate; /* true if collation is multibyte */
extern unsigned char *_seqtab; /* dictionary sequence number table */
extern unsigned char *_pritab; /* 1to2/2to1 flag + priority table */
extern struct col_21tab *_tab21; /* 2-to-1 mapping table */
extern struct col_12tab *_tab12; /* 1-to-2 mapping table */
extern unsigned char *__errptr; /* pointer to an area _errlocale() can use as a buffer */
extern struct lconv *_lconv;
extern unsigned char *__category_name[];
extern unsigned char **__nl_info; /* pointers to locale langinfo strings */
extern unsigned char *__C_langinfo[];/* default langinfo strings for the C locale */
#define _NL_MAX_MSG ERA_FMT /* last nl_langinfo item */
/***************************************************************************
The remainder of this file includes structures for the language files.
The files are built by buildlang(1M).
The structure of the files is as follows :
----------------------------------
| Table Header (A) |
----------------------------------
| Category/Modifier Structures(B)|
==================================
| LC_ALL Table Header (C) |
- - - - - - - - -
| LC_ALL Data |
----------------------------------
| LC_COLLATE Table Header (D) |
- - - - - - - - -
| LC_COLLATE Data |
----------------------------------
| LC_CTYPE Table Header (E) |
- - - - - - - - -
| LC_CTYPE Data |
----------------------------------
| LC_MONETARY Table Header (F)
- - - - - - - - -
| LC_MONETARY Data |
----------------------------------
| LC_NUMERIC Table Header (G) |
- - - - - - - - -
| LC_NUMERIC Data |
----------------------------------
| LC_TIME Table Header (H) |
- - - - - - - - -
| LC_TIME Data |
----------------------------------
*****************************************************************************/
/* Category Id's */
/* Table Header (A) */
struct table_header {
unsigned int size; /* size of table header and category
structure. (A) + (B) */
unsigned short nl_langid; /* _nl_langid */
unsigned char lang[3*MAXLNAMELEN+2+1]; /* language name */
unsigned short cat_no; /* number of categories defined */
unsigned short mod_no; /* number of modifiers defined */
unsigned short rev_flag; /* true if HP defined */
unsigned char rev_str[36]; /* Revision String */
unsigned short codeset; /* 0 if 1 byte, 1 if 2 byte */
unsigned int reserved1;
unsigned int reserved2;
unsigned int reserved3;
};
/* Category/Modifier Structure (B)
Catinfotype structure describes a category/modifier table
There is one structure for each category and modifier defined.
These entries follow the table header */
struct catinfotype
{
int size; /* size of category table */
int address; /* address of category table -
offset from the beginning of
the category tables () */
short catid; /* category id */
unsigned char mod_name[MAXLNAMELEN+1]; /* name of modifier */
short mod_addr; /* address of category table
for modifier - offset from
beginning of file */
};
/* Below are the category headers for each of the defined categories
All addresses are offset from the beginning of the category information */
/* LC_ALL Table (C) */
struct all_header {
unsigned short yes_addr; /* msg_index[YESSTR] */
unsigned short no_addr; /* msg_index[NOSTR] */
unsigned short direct_addr; /* msg_index[DIRECTION] */
/* _nl_direct */
unsigned short context_addr; /* _nl_context */
};
/* LC_COLLATE Tables (D) */
struct col_header {
unsigned int seqtab_addr; /* _seqtab */
unsigned int pritab_addr; /* _pritab */
unsigned short nl_map21; /* not an address */
unsigned short nl_onlyseq; /* not an address */
unsigned int tab21_addr;
unsigned int tab12_addr;
};
/* LC_CTYPE Tables (E) */
struct ctype_header {
unsigned int _sh_high; /* _sh_high */
int _sh_low; /* _sh_low */
unsigned int _ctype_addr; /* __ctype */
unsigned int kanji1_addr; /* _1kanji */
unsigned int kanji2_addr; /* _2kanji */
unsigned int upshift_addr; /* _upshift */
unsigned int downshift_addr; /* _downshift */
unsigned short byte_char_addr; /* msg_index[BYTES_CHAR] */
unsigned short alt_punct_addr; /* msg_index[ALT_PUNCT] */
/* _nl_punct_alt[] */
/* _nl_space_alt */
#ifdef EUC
unsigned int io_csize_addr; /* __io_csize[] */
unsigned int e_cset_addr; /* __e_cset */
unsigned int ein_csize_addr; /* __ein_csize */
unsigned int eout_csize_addr; /* __eout_csize */
#endif /* EUC */
};
/* LC_MONETARY Tables (F) */
struct monetary_header {
unsigned short int_frac_digits; /* _lconv->short_frac_digits */
unsigned short frac_digits; /* _lconv->frac_digits */
unsigned short p_cs_precedes; /* _lconv->p_cs_precedes */
unsigned short p_sep_by_space; /* _lconv->p_sep_by_space */
unsigned short n_cs_precedes; /* _lconv->n_cs_precedes */
unsigned short n_sep_by_space; /* _lconv->n_sep_by_space */
unsigned short p_sign_posn; /* _lconv->p_sign_posn */
unsigned short n_sign_posn; /* _lconv->n_sign_posn */
unsigned short curr_symbol_lconv; /* _lconv->currency_symbol */
unsigned short curr_symbol_li; /* msg_index[CRNCYSTR] */
unsigned short mon_decimal_point; /* _lconv->mon_decimal_point */
unsigned short int_curr_symbol; /* _lconv->short_curr_symbol */
unsigned short mon_thousands_sep; /* _lconv->mon_thousands_sep */
unsigned short mon_grouping; /* _lconv->mon_grouping */
unsigned short positive_sign; /* _lconv->positive_sign */
unsigned short negative_sign; /* _lconv->negative_sign */
};
/* LC_NUMERIC Tables (G) */
struct numeric_header {
unsigned short grouping; /* _lconv->grouping */
unsigned short decimal_point; /* _lconv->decimal_point */
/* msg_index[RADIXCHAR] */
/* _nl_radix */
unsigned short thousands_sep; /* _lconv->thousands_sep */
/* msg_index[THOUSEP] */
unsigned short alt_digit_addr; /* msg_index[ALT_DIGIT] */
};
/* LC_TIME Tables (H) */
struct time_header {
unsigned short d_t_fmt; /* msg_index[D_T_FMT] */
unsigned short d_fmt; /* msg_index[D_FMT] */
unsigned short t_fmt; /* msg_index[T_FMT] */
unsigned short day_1; /* msg_index[DAY_1] */
unsigned short day_2; /* msg_index[DAY_2] */
unsigned short day_3; /* msg_index[DAY_3] */
unsigned short day_4; /* msg_index[DAY_4] */
unsigned short day_5; /* msg_index[DAY_5] */
unsigned short day_6; /* msg_index[DAY_6] */
unsigned short day_7; /* msg_index[DAY_7] */
unsigned short abday_1; /* msg_index[ABDAY_1] */
unsigned short abday_2; /* msg_index[ABDAY_2] */
unsigned short abday_3; /* msg_index[ABDAY_3] */
unsigned short abday_4; /* msg_index[ABDAY_4] */
unsigned short abday_5; /* msg_index[ABDAY_5] */
unsigned short abday_6; /* msg_index[ABDAY_6] */
unsigned short abday_7; /* msg_index[ABDAY_7] */
unsigned short mon_1; /* msg_index[MON_1] */
unsigned short mon_2; /* msg_index[MON_2] */
unsigned short mon_3; /* msg_index[MON_3] */
unsigned short mon_4; /* msg_index[MON_4] */
unsigned short mon_5; /* msg_index[MON_5] */
unsigned short mon_6; /* msg_index[MON_6] */
unsigned short mon_7; /* msg_index[MON_7] */
unsigned short mon_8; /* msg_index[MON_8] */
unsigned short mon_9; /* msg_index[MON_9] */
unsigned short mon_10; /* msg_index[MON_10] */
unsigned short mon_11; /* msg_index[MON_11] */
unsigned short mon_12; /* msg_index[MON_12] */
unsigned short abmon_1; /* msg_index[ABMON_1] */
unsigned short abmon_2; /* msg_index[ABMON_2] */
unsigned short abmon_3; /* msg_index[ABMON_3] */
unsigned short abmon_4; /* msg_index[ABMON_4] */
unsigned short abmon_5; /* msg_index[ABMON_5] */
unsigned short abmon_6; /* msg_index[ABMON_6] */
unsigned short abmon_7; /* msg_index[ABMON_7] */
unsigned short abmon_8; /* msg_index[ABMON_8] */
unsigned short abmon_9; /* msg_index[ABMON_9] */
unsigned short abmon_10; /* msg_index[ABMON_10] */
unsigned short abmon_11; /* msg_index[ABMON_11] */
unsigned short abmon_12; /* msg_index[ABMON_12] */
unsigned short am_str; /* msg_index[AM_STR] */
unsigned short pm_str; /* msg_index[PM_STR] */
unsigned short year_unit; /* msg_index[YEAR_UNIT] */
unsigned short mon_unit; /* msg_index[MON_UNIT] */
unsigned short day_unit; /* msg_index[DAY_UNIT] */
unsigned short hour_unit; /* msg_index[HOUR_UNIT] */
unsigned short min_unit; /* msg_index[MIN_UNIT] */
unsigned short sec_unit; /* msg_index[SEC_UNIT] */
unsigned short era_fmt; /* msg_index[ERA_FMT] */
unsigned short era_count; /* number of era entries */
unsigned short era_names; /* address of era name and format strings */
unsigned short era_addr; /* address of era data structure entries */
unsigned short reserved; /* address of era data structure entries */
};
#endif /* DtSETLOCALE_INCLUDED */

View File

@@ -0,0 +1,102 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: SharedProcs.h /main/4 1995/10/26 15:28:07 rswiston $ */
/*
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
* (c) Copyright 1993, 1994 International Business Machines Corp. *
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
* (c) Copyright 1993, 1994 Novell, Inc. *
*/
/************************************<+>*************************************
****************************************************************************
**
** File: SharedProcs.h
**
** Project: SUI
**
** Description: Public include file for some shared functions.
**
**
** (c) Copyright 1987, 1988, 1989 by Hewlett-Packard Company
**
**
**
****************************************************************************
************************************<+>*************************************/
#ifndef _SharedProcs_h
#define _SharedProcs_h
/******** Public Function Declarations ********/
extern String _DtStripSpaces(
String string) ;
extern void _DtMessage(
Widget w,
char *title,
char *message_text,
XtPointer helpIdStr,
void (*helpCallback)()) ;
extern Widget _DtMessageDialog(
Widget w,
char *title,
char *message_text,
XtPointer helpIdStr,
Boolean cancel_btn,
void (*cancel_callback)(),
void (*ok_callback)(),
void (*close_callback)(),
void (*help_callback)(),
Boolean deleteOnClose,
int dialogType) ;
extern void _DtMessageOK(
Widget w,
XtPointer client_data,
XtPointer call_data) ;
extern void _DtMessageClose(
Widget w,
XtPointer client_data,
XEvent *event) ;
/******** End Public Function Declarations ********/
/* _DtMessage Dialog build defines */
#define ERROR_DIALOG 1
#define WARNING_DIALOG 2
#define QUESTION_DIALOG 3
/* Flag which can be used to prevent error dialogs from being posted */
extern Boolean messageDisplayEnabled;
/* Flag controlling whether dialogs are auto-positioned */
extern Boolean disableDialogAutoPlacement;
/* Generic overlay for all dialog 'Rec' structures */
typedef struct
{
Widget shell;
} GenericRecord;
#endif /* _SharedProcs_h */
/* DON'T ADD ANYTHING AFTER THIS #endif */

View File

@@ -0,0 +1,73 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: SmCreateDirs.h /main/4 1995/10/26 15:28:38 rswiston $ */
/* *
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
* (c) Copyright 1993, 1994 International Business Machines Corp. *
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
* (c) Copyright 1993, 1994 Novell, Inc. *
*/
/*************************************<+>*************************************
*****************************************************************************
**
** File: SmCreateDirs.h
**
** Description: Header file for SmCreateDirs.c
** -----------
**
*******************************************************************
** (c) Copyright Hewlett-Packard Company, 1990. All rights are
** reserved. Copying or other reproduction of this program
** except for archival purposes is prohibited without prior
** written consent of Hewlett-Packard Company.
********************************************************************
**
**
**
*****************************************************************************
*************************************<+>*************************************/
#ifndef _SmCreateDirs_h
#define _SmCreateDirs_h
/*
* include statements
*/
/*
* define statements
*/
/*
* typedef statements
*/
/*
* Function definitions
*/
extern char * _DtCreateDtDirs(Display *display) ;
#endif /* _SmCreateDirs_h */
/* Do not add anything after this endif. */

51
cde/include/Dt/Spc.h Normal file
View File

@@ -0,0 +1,51 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/*
* File: Spc.h $XConsortium: Spc.h /main/3 1995/10/26 15:28:51 rswiston $
* Language: C
*
* (c) Copyright 1988, Hewlett-Packard Company, all rights reserved.
*
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
* (c) Copyright 1993, 1994 International Business Machines Corp. *
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
* (c) Copyright 1993, 1994 Novell, Inc. *
*/
#ifndef _Dt_SPC_h
#define _Dt_SPC_h
#include <bms/spc.h>
/*
* For definitions of any of the following, look in <bms/spc.h>.
*/
#define DtSPCOpen XeSPCOpen
#define DtSPCClose XeSPCClose
#define DtSPCSpawn XeSPCSpawn
#define DtSPCAddInput XeSPCAddInput
#define DtSPCRegisterTerminator XeSPCRegisterTerminator
#define DtSPCErrorNumber XeSPCErrorNumber
#endif /* #ifdef _Dt_SPC_h */

566
cde/include/Dt/SpinBox.h Normal file
View File

@@ -0,0 +1,566 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: SpinBox.h /main/4 1995/10/26 09:34:23 rswiston $ */
/*
* (c) Copyright 1993, 1994 Hewlett-Packard Company
* (c) Copyright 1993, 1994 International Business Machines Corp.
* (c) Copyright 1993, 1994 Novell, Inc.
* (c) Copyright 1993, 1994 Sun Microsystems, Inc.
*/
/***********************************************************
Copyright 1993 Interleaf, Inc.
Permission to use, copy, modify, and distribute this software
and its documentation for any purpose without fee is granted,
provided that the above copyright notice appear in all copies
and that both copyright notice and this permission notice appear
in supporting documentation, and that the name of Interleaf not
be used in advertising or publicly pertaining to distribution of
the software without specific written prior permission.
Interleaf makes no representation about the suitability of this
software for any purpose. It is provided "AS IS" without any
express or implied warranty.
******************************************************************/
#ifndef _Dt_SpinBox_h
#define _Dt_SpinBox_h
#include <Xm/Xm.h>
#if defined(DT_USE_XM_SSPINBOX)
#include <Xm/SSpinB.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
/*
* Constants
*/
/* Resources */
#ifndef DtNarrowLayout
# if defined(DT_USE_XM_SSPINBOX)
# define DtNarrowLayout XmNarrowLayout
# else
# define DtNarrowLayout "arrowLayout"
# endif
#endif
#ifndef DtNarrowSensitivity
# if defined(DT_USE_XM_SSPINBOX)
# define DtNarrowSensitivity XmNarrowSensitivity
# else
# define DtNarrowSensitivity "arrowSensitivity"
# endif
#endif
#ifndef DtNarrowSize
# if defined(DT_USE_XM_SSPINBOX)
# define DtNarrowSize XmNarrowSize
# else
# define DtNarrowSize "arrowSize"
# endif
#endif
#ifndef DtNspinBoxChildType
# if defined(DT_USE_XM_SSPINBOX)
# define DtNspinBoxChildType XmNspinBoxChildType
# else
# define DtNspinBoxChildType "spinBoxChildType"
# endif
#endif
#ifndef DtNposition
# if defined(DT_USE_XM_SSPINBOX)
# define DtNposition XmNposition
# else
# define DtNposition "position"
# endif
#endif
#ifndef DtNtextField
# if defined(DT_USE_XM_SSPINBOX)
# define DtNtextField XmNtextField
# else
# define DtNtextField "textField"
# endif
#endif
#ifndef DtNwrap
# if defined(DT_USE_XM_SSPINBOX)
# define DtNwrap "wrap"
# else
# define DtNwrap "wrap"
# endif
#endif
#ifndef DtNincrementValue
# if defined(DT_USE_XM_SSPINBOX)
# define DtNincrementValue XmNincrementValue
# else
# define DtNincrementValue "incrementValue"
# endif
#endif
#ifndef DtNmaximumValue
# if defined(DT_USE_XM_SSPINBOX)
# define DtNmaximumValue XmNmaximumValue
# else
# define DtNmaximumValue "maximumValue"
# endif
#endif
#ifndef DtNminimumValue
# if defined(DT_USE_XM_SSPINBOX)
# define DtNminimumValue XmNminimumValue
# else
# define DtNminimumValue "minimumValue"
# endif
#endif
#ifndef DtNnumValues
# if defined(DT_USE_XM_SSPINBOX)
# define DtNnumValues XmNnumValues
# else
# define DtNnumValues "numValues"
# endif
#endif
#ifndef DtNvalues
# if defined(DT_USE_XM_SSPINBOX)
# define DtNvalues XmNvalues
# else
# define DtNvalues "values"
# endif
#endif
#ifndef DtNactivateCallback
#define DtNactivateCallback XmNactivateCallback
#endif
#ifndef DtNalignment
#define DtNalignment XmNalignment
#endif
#ifndef DtNcolumns
#define DtNcolumns XmNcolumns
#endif
#ifndef DtNdecimalPoints
#define DtNdecimalPoints XmNdecimalPoints
#endif
#ifndef DtNeditable
#define DtNeditable XmNeditable
#endif
#ifndef DtNfocusCallback
#define DtNfocusCallback XmNfocusCallback
#endif
#ifndef DtNinitialDelay
#define DtNinitialDelay XmNinitialDelay
#endif
#ifndef DtNlosingFocusCallback
#define DtNlosingFocusCallback XmNlosingFocusCallback
#endif
#ifndef DtNmarginHeight
#define DtNmarginHeight XmNmarginHeight
#endif
#ifndef DtNmarginWidth
#define DtNmarginWidth XmNmarginWidth
#endif
#ifndef DtNmaxLength
#define DtNmaxLength XmNmaxLength
#endif
#ifndef DtNmodifyVerifyCallback
#define DtNmodifyVerifyCallback XmNmodifyVerifyCallback
#endif
#ifndef DtNrecomputeSize
#define DtNrecomputeSize XmNrecomputeSize
#endif
#ifndef DtNrepeatDelay
#define DtNrepeatDelay XmNrepeatDelay
#endif
#ifndef DtNvalueChangedCallback
#define DtNvalueChangedCallback XmNvalueChangedCallback
#endif
#ifndef DtCArrowLayout
# if defined(DT_USE_XM_SSPINBOX)
# define DtCArrowLayout XmCArrowLayout
# else
# define DtCArrowLayout "ArrowLayout"
# endif
#endif
#ifndef DtCArrowSensitivity
# if defined(DT_USE_XM_SSPINBOX)
# define DtCArrowSensitivity XmCArrowSensitivity
# else
# define DtCArrowSensitivity "ArrowSensitivity"
# endif
#endif
#ifndef DtCArrowSize
# if defined(DT_USE_XM_SSPINBOX)
# define DtCArrowSize XmCArrowSize
# else
# define DtCArrowSize "ArrowSize"
# endif
#endif
#ifndef DtCSpinBoxChildType
# if defined(DT_USE_XM_SSPINBOX)
# define DtCSpinBoxChildType XmCSpinBoxChildType
# else
# define DtCSpinBoxChildType "SpinBoxChildType"
# endif
#endif
#ifndef DtCPosition
# if defined(DT_USE_XM_SSPINBOX)
# define DtCPosition XmCPosition
# else
# define DtCPosition "Position"
# endif
#endif
#ifndef DtCTextField
# if defined(DT_USE_XM_SSPINBOX)
# define DtCTextField XmCTextField
# else
# define DtCTextField "TextField"
# endif
#endif
#ifndef DtCWrap
# define DtCWrap "Wrap"
#endif
#ifndef DtCIncrementValue
# if defined(DT_USE_XM_SSPINBOX)
# define DtCIncrementValue XmCIncrementValue
# else
# define DtCIncrementValue "incrementValue"
# endif
#endif
#ifndef DtCMaximumValue
# if defined(DT_USE_XM_SSPINBOX)
# define DtCMaximumValue XmCMaximumValue
# else
# define DtCMaximumValue "maximumValue"
# endif
#endif
#ifndef DtCMinimumValue
# if defined(DT_USE_XM_SSPINBOX)
# define DtCMinimumValue XmCMinimumValue
# else
# define DtCMinimumValue "minimumValue"
# endif
#endif
#ifndef DtCNumValues
# if defined(DT_USE_XM_SSPINBOX)
# define DtCNumValues XmCNumValues
# else
# define DtCNumValues "numValues"
# endif
#endif
#ifndef DtCValues
# if defined(DT_USE_XM_SSPINBOX)
# define DtCValues XmCValues
# else
# define DtCValues "values"
# endif
#endif
#ifndef DtCAlignment
#define DtCAlignment XmCAlignment
#endif
#ifndef DtCCallback
#define DtCCallback XmCCallback
#endif
#ifndef DtCColumns
#define DtCColumns XmCColumns
#endif
#ifndef DtCDecimalPoints
#define DtCDecimalPoints XmCDecimalPoints
#endif
#ifndef DtCEditable
#define DtCEditable XmCEditable
#endif
#ifndef DtCInitialDelay
#define DtCInitialDelay XmCInitialDelay
#endif
#ifndef DtCItems
#define DtCItems XmCItems
#endif
#ifndef DtCMarginHeight
#define DtCMarginHeight XmCMarginHeight
#endif
#ifndef DtCMarginWidth
#define DtCMarginWidth XmCMarginWidth
#endif
#ifndef DtCMaxLength
#define DtCMaxLength XmCMaxLength
#endif
#ifndef DtCPosition
#define DtCPosition XmCPosition
#endif
#ifndef DtCRecomputeSize
#define DtCRecomputeSize XmCRecomputeSize
#endif
#ifndef DtCRepeatDelay
#define DtCRepeatDelay XmCRepeatDelay
#endif
/* Representation types */
#ifndef DtRIncrementValue
# if defined(DT_USE_XM_SSPINBOX)
# define DtRIncrementValue XmRint
# else
# define DtRIncrementValue "IncrementValue"
# endif
#endif
#ifndef DtRMaximumValue
# if defined(DT_USE_XM_SSPINBOX)
# define DtRMaximumValue XmRint
# else
# define DtRMaximumValue "MaximumValue"
# endif
#endif
#ifndef DtRMinimumValue
# if defined(DT_USE_XM_SSPINBOX)
# define DtRMinimumValue XmRint
# else
# define DtRMinimumValue "MinimumValue"
# endif
#endif
#ifndef DtRNumValues
# if defined(DT_USE_XM_SSPINBOX)
# define DtRNumValues XmRint
# else
# define DtRNumValues "NumValues"
# endif
#endif
#ifndef DtRValues
# if defined(DT_USE_XM_SSPINBOX)
# define DtRValues XmRXmStringTable
# else
# define DtRValues "Values"
# endif
#endif
#ifndef DtRArrowSensitivity
# if defined(DT_USE_XM_SSPINBOX)
# define DtRArrowSensitivity XmRArrowSensitivity
# else
# define DtRArrowSensitivity "ArrowSensitivity"
# endif
#endif
#ifndef DtRArrowLayout
# if defined(DT_USE_XM_SSPINBOX)
# define DtRArrowLayout XmRArrowLayout
# else
# define DtRArrowLayout "ArrowLayout"
# endif
#endif
#ifndef DtRSpinBoxChildType
# if defined(DT_USE_XM_SSPINBOX)
# define DtRSpinBoxChildType XmRSpinBoxChildType
# else
# define DtRSpinBoxChildType "SpinBoxChildType"
# endif
#endif
/* DtNarrowLayout values */
#ifndef DtARROWS_FLAT_BEGINNING
# if defined(DT_USE_XM_SSPINBOX)
# define DtARROWS_FLAT_BEGINNING XmARROWS_FLAT_BEGINNING
# else
# define DtARROWS_FLAT_BEGINNING 4
# endif
#endif
#ifndef DtARROWS_FLAT_END
# if defined(DT_USE_XM_SSPINBOX)
# define DtARROWS_FLAT_END XmARROWS_FLAT_END
# else
# define DtARROWS_FLAT_END 3
# endif
#endif
#ifndef DtARROWS_SPLIT
# if defined(DT_USE_XM_SSPINBOX)
# define DtARROWS_SPLIT XmARROWS_SPLIT
# else
# define DtARROWS_SPLIT 2
# endif
#endif
#ifndef DtARROWS_BEGINNING
# if defined(DT_USE_XM_SSPINBOX)
# define DtARROWS_BEGINNING XmARROWS_BEGINNING
# else
# define DtARROWS_BEGINNING 1
# endif
#endif
#ifndef DtARROWS_END
# if defined(DT_USE_XM_SSPINBOX)
# define DtARROWS_END XmARROWS_END
# else
# define DtARROWS_END 0
# endif
#endif
/* DtNarrowSensitivity values */
#ifndef DtARROWS_SENSITIVE
# if defined(DT_USE_XM_SSPINBOX)
# define DtARROWS_SENSITIVE XmARROWS_SENSITIVE
# else
# define DtARROWS_SENSITIVE 3
# endif
#endif
#ifndef DtARROWS_DECREMENT_SENSITIVE
# if defined(DT_USE_XM_SSPINBOX)
# define DtARROWS_DECREMENT_SENSITIVE XmARROWS_DECREMENT_SENSITIVE
# else
# define DtARROWS_DECREMENT_SENSITIVE 2
# endif
#endif
#ifndef DtARROWS_INCREMENT_SENSITIVE
# if defined(DT_USE_XM_SSPINBOX)
# define DtARROWS_INCREMENT_SENSITIVE XmARROWS_INCREMENT_SENSITIVE
# else
# define DtARROWS_INCREMENT_SENSITIVE 1
# endif
#endif
#ifndef DtARROWS_INSENSITIVE
# if defined(DT_USE_XM_SSPINBOX)
# define DtARROWS_INSENSITIVE XmARROWS_INSENSITIVE
# else
# define DtARROWS_INSENSITIVE 0
# endif
#endif
/* DtNspinBoxChildType values */
#ifndef DtNUMERIC
# if defined(DT_USE_XM_SSPINBOX)
# define DtNUMERIC XmNUMERIC
# else
# define DtNUMERIC 3
# endif
#endif
#ifndef DtSTRING
# define DtSTRING XmSTRING
#endif
/* DtNalignment values */
#ifndef DtALIGNMENT_BEGINNING
#define DtALIGNMENT_BEGINNING XmALIGNMENT_BEGINNING
#endif
#ifndef DtALIGNMENT_CENTER
#define DtALIGNMENT_CENTER XmALIGNMENT_CENTER
#endif
#ifndef DtALIGNMENT_END
#define DtALIGNMENT_END XmALIGNMENT_END
#endif
/* Callback reasons */
#ifndef DtCR_OK
# define DtCR_OK XmCR_OK
#endif
#ifndef DtCR_SPIN_NEXT
# if defined(DT_USE_XM_SSPINBOX)
# define DtCR_SPIN_NEXT XmCR_SPIN_NEXT
# else
# define DtCR_SPIN_NEXT 62
# endif
#endif
#ifndef DtCR_SPIN_PRIOR
# if defined(DT_USE_XM_SSPINBOX)
# define DtCR_SPIN_PRIOR XmCR_SPIN_PRIOR
# else
# define DtCR_SPIN_PRIOR 63
# endif
#endif
/*
* Types
*/
#if defined(DT_USE_XM_SSPINBOX)
# define DtSpinBoxCallbackStruct XmSpinBoxCallbackStruct
#else
typedef struct {
int reason;
XEvent *event;
Widget widget;
Boolean doit;
int position;
XmString value;
Boolean crossed_boundary;
} DtSpinBoxCallbackStruct;
#endif
/* Widget class and instance */
#if defined(DT_USE_XM_SSPINBOX)
# define _DtSpinBoxClassRec _XmSimpleSpinBoxClassRec
# define _DtSpinBoxRec _XmSimpleSpinBoxRec
# define DtSpinBoxWidgetClass XmSimpleSpinBoxWidgetClass
# define DtSpinBoxWidget XmSimpleSpinBoxWidget
#else
typedef struct _DtSpinBoxClassRec *DtSpinBoxWidgetClass;
typedef struct _DtSpinBoxRec *DtSpinBoxWidget;
#endif
/*
* Data
*/
/* Widget class record */
#if defined(DT_USE_XM_SSPINBOX)
# define dtSpinBoxWidgetClass xmSimpleSpinBoxWidgetClass
#else
externalref WidgetClass dtSpinBoxWidgetClass;
#endif
/*
* Functions
*/
#if defined(DT_USE_XM_SSPINBOX)
# define DtCreateSpinBox XmCreateSimpleSpinBox
# define DtSpinBoxAddItem XmSimpleSpinBoxAddItem
# define DtSpinBoxDeletePos XmSimpleSpinBoxDeletePos
# define DtSpinBoxSetItem XmSimpleSpinBoxSetItem
#else
extern Widget DtCreateSpinBox(
Widget parent,
char *name,
ArgList arglist,
Cardinal argcount);
extern void DtSpinBoxAddItem(
Widget widget,
XmString item,
int pos);
extern void DtSpinBoxDeletePos(
Widget widget,
int pos);
extern void DtSpinBoxSetItem(
Widget widget,
XmString item);
#endif
#ifdef __cplusplus
}
#endif
#endif /* _Dt_SpinBox_h */

223
cde/include/Dt/SpinBoxP.h Normal file
View File

@@ -0,0 +1,223 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: SpinBoxP.h /main/4 1996/03/26 19:54:14 drk $ */
/*
* SpinBoxP.h, Interleaf, 16aug93 2:37pm Version 1.1.
*/
/***********************************************************
Copyright 1993 Interleaf, Inc.
Permission to use, copy, modify, and distribute this software
and its documentation for any purpose without fee is granted,
provided that the above copyright notice appear in all copies
and that both copyright notice and this permission notice appear
in supporting documentation, and that the name of Interleaf not
be used in advertising or publicly pertaining to distribution of
the software without specific written prior permission.
Interleaf makes no representation about the suitability of this
software for any purpose. It is provided "AS IS" without any
express or implied warranty.
******************************************************************/
/*
* (C) Copyright 1991,1992, 1993
* Interleaf, Inc.
* 9 Hillside Avenue, Waltham, MA 02154
*
* SpinBoxP.h:
*
* Private header file for DtSpinBoxWidget.
*/
#ifndef _SpinBoxP_h
#define _SpinBoxP_h
#include <Xm/Label.h>
#include <Xm/TextFP.h>
#include <Xm/ArrowB.h>
#include <Xm/ManagerP.h>
#include "SpinBox.h"
#ifdef __cplusplus
extern "C" {
#endif
/*
* External definitions of syn_resources for our list widget.
*/
#define SYN_RESOURCE_AA (Widget w, int resource_offset, XtArgVal *value)
extern void _DtSpinBoxGetArrowSize SYN_RESOURCE_AA;
#define ARROW_MULT .45
#define ARROW_MIN 13
#define MAX_FLOAT_DECIMALS 6
#define NUMERIC_LENGTH 128
#define MARGIN 2
#define LABEL_PADDING 2
#define LABEL_SHADOW 2
#define TEXT_FIELD_SHADOW 1
#define TEXT_CONTEXT_MARGIN 4
/****************************************************************
*
* Message Defines
*
****************************************************************/
#define SB_ARROW_SENSITIVE DTWIDGET_GETMESSAGE( \
MS_SpinBox, SPIN_ARROW_SENSITIVE, _DtMsgSpinBox_0000)
#define SB_ALIGNMENT DTWIDGET_GETMESSAGE( \
MS_SpinBox, SPIN_ALIGNMENT, _DtMsgSpinBox_0001)
#define SB_INIT_DELAY DTWIDGET_GETMESSAGE( \
MS_SpinBox, SPIN_INIT_DELAY, _DtMsgSpinBox_0002)
#define SB_MARGIN_HEIGHT DTWIDGET_GETMESSAGE( \
MS_SpinBox, SPIN_MARGIN_HEIGHT, _DtMsgSpinBox_0003)
#define SB_MARGIN_WIDTH DTWIDGET_GETMESSAGE( \
MS_SpinBox, SPIN_MARGIN_WIDTH, _DtMsgSpinBox_0004)
#define SB_ARROW_LAYOUT DTWIDGET_GETMESSAGE( \
MS_SpinBox, SPIN_ARROW_LAYOUT, _DtMsgSpinBox_0005)
#define SB_REPEAT_DELAY DTWIDGET_GETMESSAGE( \
MS_SpinBox, SPIN_REPEAT_DELAY, _DtMsgSpinBox_0006)
#define SB_ITEM_COUNT DTWIDGET_GETMESSAGE( \
MS_SpinBox, SPIN_ITEM_COUNT, _DtMsgSpinBox_0007)
#define SB_POSITION_STRING DTWIDGET_GETMESSAGE( \
MS_SpinBox, SPIN_POSITION_STRING, _DtMsgSpinBox_0008)
#define SB_POSITION_NUMERIC DTWIDGET_GETMESSAGE( \
MS_SpinBox, SPIN_POSITION_NUMERIC, _DtMsgSpinBox_0009)
#define SB_DECIMAL_POINTS DTWIDGET_GETMESSAGE( \
MS_SpinBox, SPIN_DECIMAL_POINTS, _DtMsgSpinBox_0010)
#define SB_MIN_MAX DTWIDGET_GETMESSAGE( \
MS_SpinBox, SPIN_MIN_MAX, _DtMsgSpinBox_0011)
#define SB_TEXT DTWIDGET_GETMESSAGE( \
MS_SpinBox, SPIN_TEXT, _DtMsgSpinBox_0012)
#define SB_SET_ITEM DTWIDGET_GETMESSAGE( \
MS_SpinBox, SPIN_SET_ITEM, _DtMsgSpinBox_0013)
#define SB_LABEL DTWIDGET_GETMESSAGE( \
MS_SpinBox, SPIN_LABEL, _DtMsgSpinBox_0014)
/*
* Class Records
*/
typedef struct {
Boolean junk;
} DtSpinBoxClassPart;
typedef struct _DtSpinBoxClassRec {
CoreClassPart core_class;
CompositeClassPart composite_class;
ConstraintClassPart constraint_class;
XmManagerClassPart manager_class;
DtSpinBoxClassPart spin_box_class;
} DtSpinBoxClassRec;
extern DtSpinBoxClassRec dtSpinBoxClassRec;
/*
* Instance Record.
*/
typedef struct _DtSpinBoxPart {
/* Private data */
Widget label;
Widget up_arrow;
Widget down_arrow;
unsigned char which_arrow;
Boolean init_cb;
Boolean grabbed;
int base;
float min, max;
float increment, current;
char float_format[10];
Dimension old_width;
Dimension old_height;
Dimension label_max_length;
Dimension label_max_height;
/* Resource-related data */
unsigned char arrow_sensitivity;
short decimal_points;
int numeric_increment;
int maximum;
int minimum;
int item_count;
int position;
unsigned char child_type;
XmStringTable items;
XtCallbackList activate_callback;
unsigned char alignment;
unsigned char arrow_layout;
Dimension arrow_size;
short text_columns;
Boolean editable;
XtCallbackList focus_callback;
unsigned int initial_delay;
XtCallbackList losing_focus_callback;
Dimension margin_height;
Dimension margin_width;
int text_max_length;
XtCallbackList modify_verify_callback;
Boolean recompute_size;
unsigned int repeat_delay;
Widget text;
XtCallbackList value_changed_callback;
Boolean wrap;
/* Spin timer. */
XtIntervalId timer;
/* String list related resources */
/* Numeric related resources */
/* TextField resources */
} DtSpinBoxPart;
/* Full instance record declaration */
typedef struct _DtSpinBoxRec {
CorePart core;
CompositePart composite;
ConstraintPart constraint;
XmManagerPart manager;
DtSpinBoxPart spin_box;
} DtSpinBoxRec;
#ifdef __cplusplus
} /* Close scope of 'extern "C"' declaration which encloses file. */
#endif
#endif /* _SpinBoxP_h */

46
cde/include/Dt/SvcTT.h Normal file
View File

@@ -0,0 +1,46 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: SvcTT.h /main/3 1995/10/26 15:30:33 rswiston $ */
/*%% */
/*%% RESTRICTED CONFIDENTIAL INFORMATION: */
/*%% */
/*%% The information in this document is subject to special */
/*%% restrictions in a confidential disclosure agreement between */
/*%% HP, IBM, Sun, USL, SCO and Univel. Do not distribute this */
/*%% document outside HP, IBM, Sun, USL, SCO, or Univel without */
/*%% Sun's specific written approval. This document and all copies */
/*%% and derivative works thereof must be returned or destroyed at */
/*%% Sun's request. */
/*%% */
/*%% Copyright 1994 Sun Microsystems, Inc. All rights reserved. */
/*%% */
#ifndef _DT_SVCTT_H
#define _DT_SVCTT_H
#include <Tt/tttk.h>
extern Tt_status _DtSvcInitToolTalk(
Widget widget
);
#endif

645
cde/include/Dt/Term.h Normal file
View File

@@ -0,0 +1,645 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: Term.h /main/1 1996/04/21 19:15:14 drk $ */
/*
* (c) Copyright 1993, 1994 Hewlett-Packard Company
* (c) Copyright 1993, 1994 International Business Machines Corp.
* (c) Copyright 1993, 1994 Sun Microsystems, Inc.
* (c) Copyright 1993, 1994 Novell, Inc.
*/
#ifndef _Dt_TermPrim_h
#define _Dt_TermPrim_h
#include <sys/wait.h>
#include <Xm/Xm.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* Constants
*/
/* Resources */
#ifndef DtNbackgroundIsSelect
#define DtNbackgroundIsSelect "backgroundIsSelect"
#endif
#ifndef DtNblinkRate
#define DtNblinkRate "blinkRate"
#endif
#ifndef DtNcharCursorStyle
#define DtNcharCursorStyle "charCursorStyle"
#endif
#ifndef DtNconsoleMode
#define DtNconsoleMode "consoleMode"
#endif
#ifndef DtNcsWidth
#define DtNcsWidth "csWidth"
#endif
#ifndef DtNemulationId
#define DtNemulationId "emulationId"
#endif
#ifndef DtNinputVerifyCallback
#define DtNinputVerifyCallback "inputVerifyCallback"
#endif
#ifndef DtNjumpScroll
#define DtNjumpScroll "jumpScroll"
#endif
#ifndef DtNkshMode
#define DtNkshMode "kshMode"
#endif
#ifndef DtNlogFile
#define DtNlogFile "logFile"
#endif
#ifndef DtNlogInhibit
#define DtNlogInhibit "logInhibit"
#endif
#ifndef DtNlogging
#define DtNlogging "logging"
#endif
#ifndef DtNloginShell
#define DtNloginShell "loginShell"
#endif
#ifndef DtNmapOnOutput
#define DtNmapOnOutput "mapOnOutput"
#endif
#ifndef DtNmapOnOutputDelay
#define DtNmapOnOutputDelay "mapOnOutputDelay"
#endif
#ifndef DtNmarginBell
#define DtNmarginBell "marginBell"
#endif
#ifndef DtNnMarginBell
#define DtNnMarginBell "nMarginBell"
#endif
#ifndef DtNoutputLogCallback
#define DtNoutputLogCallback "outputLogCallback"
#endif
#ifndef DtNpointerBlank
#define DtNpointerBlank "pointerBlank"
#endif
#ifndef DtNpointerBlankDelay
#define DtNpointerBlankDelay "pointerBlankDelay"
#endif
#ifndef DtNpointerColor
#define DtNpointerColor "pointerColor"
#endif
#ifndef DtNpointerColorBackground
#define DtNpointerColorBackground "pointerColorBackground"
#endif
#ifndef DtNpointerShape
#define DtNpointerShape "pointerShape"
#endif
#ifndef DtNreverseVideo
#define DtNreverseVideo "reverseVideo"
#endif
#ifndef DtNsaveLines
#define DtNsaveLines "saveLines"
#endif
#ifndef DtNsizeList
#define DtNsizeList "sizeList"
#endif
#ifndef DtNstatusChangeCallback
#define DtNstatusChangeCallback "statusChangeCallback"
#endif
#ifndef DtNstickyNextCursor
#define DtNstickyNextCursor "stickyNextCursor"
#endif
#ifndef DtNstickyPrevCursor
#define DtNstickyPrevCursor "stickyPrevCursor"
#endif
#ifndef DtNsubprocessLoginShell
#define DtNsubprocessLoginShell "subprocessLoginShell"
#endif
#ifndef DtNsubprocessPid
#define DtNsubprocessPid "subprocessPid"
#endif
#ifndef DtNsubprocessExec
#define DtNsubprocessExec "subprocessExec"
#endif
#ifndef DtNsubprocessTerminationCatch
#define DtNsubprocessTerminationCatch "subprocessTerminationCatch"
#endif
#ifndef DtNsubprocessCmd
#define DtNsubprocessCmd "subprocessCmd"
#endif
#ifndef DtNsubprocessArgv
#define DtNsubprocessArgv "subprocessArgv"
#endif
#ifndef DtNsubprocessTerminationCallback
#define DtNsubprocessTerminationCallback "subprocessTerminationCallback"
#endif
#ifndef DtNtermEmulationMode
#define DtNtermEmulationMode "termEmulationMode"
#endif
#ifndef DtNtermDevice
#define DtNtermDevice "termDevice"
#endif
#ifndef DtNtermDeviceAllocate
#define DtNtermDeviceAllocate "termDeviceAllocate"
#endif
#ifndef DtNtermId
#define DtNtermId "termId"
#endif
#ifndef DtNtermName
#define DtNtermName "termName"
#endif
#ifndef DtNtermSlaveName
#define DtNtermSlaveName "termSlaveName"
#endif
#ifndef DtNttyModes
#define DtNttyModes "ttyModes"
#endif
#ifndef DtNuseFontSets
#define DtNuseFontSets "useFontSets"
#endif
#ifndef DtNuseLineDraw
#define DtNuseLineDraw "useLineDraw"
#endif
#ifndef DtNuserFont
#define DtNuserFont "userFont"
#endif
#ifndef DtNuserBoldFont
#define DtNuserBoldFont "userBoldFont"
#endif
#ifndef DtNvisualBell
#define DtNvisualBell "visualBell"
#endif
#ifndef DtNallowSendEvents
#define DtNallowSendEvents "allowSendEvents"
#endif
#ifndef DtNbaseHeight
#define DtNbaseHeight XmNbaseHeight
#endif
#ifndef DtNbaseWidth
#define DtNbaseWidth XmNbaseWidth
#endif
#ifndef DtNcolumns
#define DtNcolumns XmNcolumns
#endif
#ifndef DtNheightInc
#define DtNheightInc XmNheightInc
#endif
#ifndef DtNmarginHeight
#define DtNmarginHeight XmNmarginHeight
#endif
#ifndef DtNmarginWidth
#define DtNmarginWidth XmNmarginWidth
#endif
#ifndef DtNrows
#define DtNrows XmNrows
#endif
#ifndef DtNshadowType
#define DtNshadowType XmNshadowType
#endif
#ifndef DtNverticalScrollBar
#define DtNverticalScrollBar XmNverticalScrollBar
#endif
#ifndef DtNwidthInc
#define DtNwidthInc XmNwidthInc
#endif
#ifndef DtCBackground
#define DtCBackground XmCBackground
#endif
#ifndef DtCBackgroundIsSelect
#define DtCBackgroundIsSelect "BackgroundIsSelect"
#endif
#ifndef DtCBlinkRate
#define DtCBlinkRate "BlinkRate"
#endif
#ifndef DtCCallback
#define DtCCallback XmCCallback
#endif
#ifndef DtCCursor
#define DtCCursor XmCCursor
#endif
#ifndef DtCConsoleMode
#define DtCConsoleMode "ConsoleMode"
#endif
#ifndef DtCCsWidth
#define DtCCsWidth "CsWidth"
#endif
#ifndef DtCCharCursorStyle
#define DtCCharCursorStyle "CharCursorStyle"
#endif
#ifndef DtCEmulationId
#define DtCEmulationId "EmulationId"
#endif
#ifndef DtCForeground
#define DtCForeground XmCForeground
#endif
#ifndef DtCJumpScroll
#define DtCJumpScroll "JumpScroll"
#endif
#ifndef DtCKshMode
#define DtCKshMode "KshMode"
#endif
#ifndef DtCLogFile
#define DtCLogFile "LogFile"
#endif
#ifndef DtCLogInhibit
#define DtCLogInhibit "LogInhibit"
#endif
#ifndef DtCLogging
#define DtCLogging "Logging"
#endif
#ifndef DtCLoginShell
#define DtCLoginShell "LoginShell"
#endif
#ifndef DtCMapOnOutput
#define DtCMapOnOutput "MapOnOutput"
#endif
#ifndef DtCMapOnOutputDelay
#define DtCMapOnOutputDelay "MapOnOutputDelay"
#endif
#ifndef DtCMarginBell
#define DtCMarginBell "MarginBell"
#endif
#ifndef DtCNMarginBell
#define DtCNMarginBell "NMarginBell"
#endif
#ifndef DtCPointerBlank
#define DtCPointerBlank "PointerBlank"
#endif
#ifndef DtCPointerBlankDelay
#define DtCPointerBlankDelay "PointerBlankDelay"
#endif
#ifndef DtCPointerColor
#define DtCPointerColor "PointerColor"
#endif
#ifndef DtCPointerColorBackground
#define DtCPointerColorBackground "PointerColorBackground"
#endif
#ifndef DtCPointerShape
#define DtCPointerShape "PointerShape"
#endif
#ifndef DtCReverseVideo
#define DtCReverseVideo "ReverseVideo"
#endif
#ifndef DtCSaveLines
#define DtCSaveLines "SaveLines"
#endif
#ifndef DtCSizeList
#define DtCSizeList "SizeList"
#endif
#ifndef DtCStickyCursor
#define DtCStickyCursor "StickyCursor"
#endif
#ifndef DtCSubprocessLoginShell
#define DtCSubprocessLoginShell "SubprocessLoginShell"
#endif
#ifndef DtCSubprocessPid
#define DtCSubprocessPid "SubprocessPid"
#endif
#ifndef DtCSubprocessExec
#define DtCSubprocessExec "SubprocessExec"
#endif
#ifndef DtCSubprocessTerminationCatch
#define DtCSubprocessTerminationCatch "SubprocessTerminationCatch"
#endif
#ifndef DtCSubprocessCmd
#define DtCSubprocessCmd "SubprocessCmd"
#endif
#ifndef DtCSubprocessArgv
#define DtCSubprocessArgv "SubprocessArgv"
#endif
#ifndef DtCTermEmulationMode
#define DtCTermEmulationMode "TermEmulationMode"
#endif
#ifndef DtCTermDevice
#define DtCTermDevice "TermDevice"
#endif
#ifndef DtCTermDeviceAllocate
#define DtCTermDeviceAllocate "TermDeviceAllocate"
#endif
#ifndef DtCTermId
#define DtCTermId "TermId"
#endif
#ifndef DtCTermName
#define DtCTermName "TermName"
#endif
#ifndef DtCTermSlaveName
#define DtCTermSlaveName "TermSlaveName"
#endif
#ifndef DtCTtyModes
#define DtCTtyModes "TtyModes"
#endif
#ifndef DtCUseFontSets
#define DtCUseFontSets "UseFontSets"
#endif
#ifndef DtCUseLineDraw
#define DtCUseLineDraw "UseLineDraw"
#endif
#ifndef DtCUserFont
#define DtCUserFont "UserFont"
#endif
#ifndef DtCUserBoldFont
#define DtCUserBoldFont "UserBoldFont"
#endif
#ifndef DtCVisualBell
#define DtCVisualBell "VisualBell"
#endif
#ifndef DtCAllowSendEvents
#define DtCAllowSendEvents "AllowSendEvents"
#endif
#ifndef DtCBaseHeight
#define DtCBaseHeight XmCBaseHeight
#endif
#ifndef DtCBaseWidth
#define DtCBaseWidth XmCBaseWidth
#endif
#ifndef DtCColumns
#define DtCColumns XmCColumns
#endif
#ifndef DtCHeightInc
#define DtCHeightInc XmCHeightInc
#endif
#ifndef DtCMarginHeight
#define DtCMarginHeight XmCMarginHeight
#endif
#ifndef DtCMarginWidth
#define DtCMarginWidth XmCMarginWidth
#endif
#ifndef DtCRows
#define DtCRows XmCRows
#endif
#ifndef DtCShadowType
#define DtCShadowType XmCShadowType
#endif
#ifndef DtCVerticalScrollBar
#define DtCVerticalScrollBar XmCVerticalScrollBar
#endif
#ifndef DtCWidthInc
#define DtCWidthInc XmCWidthInc
#endif
/* Representation types */
#define DtRDtTermCharCursorStyle "DtTermCharCursorStyle"
#define DtRDtTermEmulationMode "DtTermEmulationMode"
#define DtRDtTermTerminalSize "DtTermTerminalSize"
#define DtRDtTermTerminalSizeList "DtTermTerminalSizeList"
/* DtNshadowType values */
#ifndef DtSHADOW_IN
#define DtSHADOW_IN XmSHADOW_IN
#endif
#ifndef DtSHADOW_OUT
#define DtSHADOW_OUT XmSHADOW_OUT
#endif
#ifndef DtSHADOW_ETCHED_IN
#define DtSHADOW_ETCHED_IN XmSHADOW_ETCHED_IN
#endif
#ifndef DtSHADOW_ETCHED_OUT
#define DtSHADOW_ETCHED_OUT XmSHADOW_ETCHED_OUT
#endif
#define DtTERM_CHAR_CURSOR_BOX 0
#define DtTERM_CHAR_CURSOR_BAR 1
#define DtTERM_CHAR_CURSOR_INVISIBLE 2
#define DtTermEMULATIONHP 0
#define DtTermEMULATIONANSI 1
/* Callback reasons */
#define DtCR_TERM_SUBPROCESS_TERMINATION 1
#define DtCR_TERM_STATUS_CHANGE 2
#define DtCR_TERM_INPUT_VERIFY 7
#define DtCR_TERM_OUTPUT_LOG 8
/*
* Types
*/
/* insert char mode */
typedef enum {
DtTERM_INSERT_CHAR_OFF = 0,
DtTERM_INSERT_CHAR_ON,
DtTERM_INSERT_CHAR_ON_WRAP
} DtTermInsertCharMode;
typedef struct {
int reason;
XEvent *event;
int cursorX;
int cursorY;
Boolean capsLock;
Boolean stop;
DtTermInsertCharMode insertCharMode;
Boolean locked;
} DtTermStatusChangeCallbackStruct;
typedef struct {
int reason;
XEvent *event;
pid_t pid;
int status;
} DtTermSubprocessTerminationCallbackStruct;
typedef struct {
int reason;
XEvent *event;
Boolean doit;
unsigned char *text;
int length;
} DtTermInputVerifyCallbackStruct;
typedef struct {
int reason;
XEvent *event;
unsigned char *text;
int length;
} DtTermOutputLogCallbackStruct;
typedef struct _DtTermTerminalSize {
short rows;
short columns;
} DtTermTerminalSize;
typedef struct _DtTermTerminalSizeList {
int numSizes;
DtTermTerminalSize *sizes;
} DtTermTerminalSizeList;
/* Widget class and instance */
typedef struct _DtTermPrimitiveClassRec *DtTermPrimitiveWidgetClass;
typedef struct _DtTermPrimitiveRec *DtTermPrimitiveWidget;
/*
* Data
*/
/* Widget class record */
externalref WidgetClass dtTermPrimitiveWidgetClass;
/*
* Functions
*/
extern Widget DtCreateTermPrimitive(
Widget parent,
char *name,
ArgList arglist,
Cardinal argcount);
extern void DtTermInitialize(void);
extern void DtTermDisplaySend(
Widget widget,
unsigned char *buffer,
int length);
extern void DtTermSubprocSend(
Widget widget,
unsigned char *buffer,
int length);
extern void DtTermSubprocReap(
pid_t pid,
int *stat_loc);
#ifdef __cplusplus
}
#endif
#endif /* _Dt_TermPrim_h */
#ifndef _Dt_Term_h
#define _Dt_Term_h
#include <Dt/TermPrim.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* Constants
*/
/* Resources */
#ifndef DtNfunctionKeyExecuteProc
#define DtNfunctionKeyExecuteProc "functionKeyExecuteProc"
#endif
#ifndef DtNfunctionKeyUpdateProc
#define DtNfunctionKeyUpdateProc "functionKeyUpdateProc"
#endif
#ifndef DtNautoWrap
#define DtNautoWrap "autoWrap"
#endif
#ifndef DtNreverseWrap
#define DtNreverseWrap "reverseWrap"
#endif
#ifndef DtNsunFunctionKeys
#define DtNsunFunctionKeys "sunFunctionKeys"
#endif
#ifndef DtNc132
#define DtNc132 "c132"
#endif
#ifndef DtNappCursorDefault
#define DtNappCursorDefault "appCursorDefault"
#endif
#ifndef DtNappKeypadDefault
#define DtNappKeypadDefault "appKeypadDefault"
#endif
#ifndef DtCFunctionKeyExecuteProc
#define DtCFunctionKeyExecuteProc "FunctionKeyExecuteProc"
#endif
#ifndef DtCFunctionKeyUpdateProc
#define DtCFunctionKeyUpdateProc "FunctionKeyUpdateProc"
#endif
#ifndef DtCFunctionKeyLast
#define DtCFunctionKeyLast "FunctionKeyLast"
#endif
#ifndef DtCAutoWrap
#define DtCAutoWrap "AutoWrap"
#endif
#ifndef DtCReverseWrap
#define DtCReverseWrap "ReverseWrap"
#endif
#ifndef DtCSunFunctionKeys
#define DtCSunFunctionKeys "SunFunctionKeys"
#endif
#ifndef DtCC132
#define DtCC132 "C132"
#endif
#ifndef DtCAppCursorDefault
#define DtCAppCursorDefault "AppCursorDefault"
#endif
#ifndef DtCAppKeypadDefault
#define DtCAppKeypadDefault "AppKeypadDefault"
#endif
/*
* Types
*/
/* Widget class and instance */
typedef struct _DtTermClassRec *DtTermWidgetClass;
typedef struct _DtTermRec *DtTermWidget;
/*
* Data
*/
/* Widget class record */
externalref WidgetClass dtTermWidgetClass;
/*
* Functions
*/
extern Widget DtCreateTerm(
Widget parent,
char *name,
ArgList arglist,
Cardinal argcount);
#ifdef __cplusplus
}
#endif
#endif /* _Dt_Term_h */

92
cde/include/Dt/TermP.h Normal file
View File

@@ -0,0 +1,92 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/*
* $XConsortium: TermP.h /main/1 1996/04/21 19:16:07 drk $";
*/
/* *
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
* (c) Copyright 1993, 1994 International Business Machines Corp. *
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
* (c) Copyright 1993, 1994 Novell, Inc. *
*/
#ifndef _Dt_TermP_h
#define _Dt_TermP_h
#include "TermPrimP.h"
#include "Term.h"
#include "TermData.h"
#include "TermFunctionKey.h"
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/* Vt class structure... */
typedef struct _DtTermClassPart
{
int foo;
} DtTermClassPart;
/* full clas record declaration for Vt class... */
typedef struct _DtTermClassRec {
CoreClassPart core_class;
XmPrimitiveClassPart primitive_class;
DtTermPrimitiveClassPart term_primitive_class;
DtTermClassPart term_class;
} DtTermClassRec;
externalref DtTermClassRec dtTermClassRec;
/* vt instance record... */
typedef struct _DtTermPart
{
DtTermData td; /* non-widget terminal data */
Boolean autoWrap;
Boolean reverseWrap;
Boolean sunFunctionKeys;
Boolean c132;
Boolean appKeypadMode;
Boolean appCursorMode;
} DtTermPart;
/* full instance record declaration... */
typedef struct _DtTermRec {
CorePart core;
XmPrimitivePart primitive;
DtTermPrimitivePart term;
DtTermPart vt;
} DtTermRec;
/* private function declarations... */
/* end private function declarations... */
#ifdef __cplusplus
} /* close scope of 'extern "C"'... */
#endif /* __cplusplus */
#endif /* _Dt_TermP_h */
/* DON'T ADD ANYTHING AFTER THIS #endif... */

Some files were not shown because too many files have changed in this diff Show More