824N/A/*
943N/A * Copyright (c) 1993, 1995, Oracle and/or its affiliates. All rights reserved.
824N/A *
824N/A * Permission is hereby granted, free of charge, to any person obtaining a
919N/A * copy of this software and associated documentation files (the "Software"),
919N/A * to deal in the Software without restriction, including without limitation
919N/A * the rights to use, copy, modify, merge, publish, distribute, sublicense,
919N/A * and/or sell copies of the Software, and to permit persons to whom the
919N/A * Software is furnished to do so, subject to the following conditions:
919N/A *
919N/A * The above copyright notice and this permission notice (including the next
919N/A * paragraph) shall be included in all copies or substantial portions of the
919N/A * Software.
919N/A *
919N/A * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
919N/A * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
919N/A * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
919N/A * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
919N/A * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
919N/A * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
919N/A * DEALINGS IN THE SOFTWARE.
824N/A */
824N/A
824N/A
824N/A/*
824N/A * This file defines the private and public interfaces to the OWconfig API.
824N/A */
824N/A
824N/A#ifndef _X_CONFIG_H_
824N/A#define _X_CONFIG_H_
824N/A
824N/A#include <stdio.h>
824N/A#include <sys/types.h>
824N/A#include <X11/X.h>
824N/A
824N/A#define OWCFG_OK (Success)
824N/A#define OWCFG_OPEN1FAIL (Success+1)
824N/A#define OWCFG_OPEN2FAIL (Success+2)
824N/A#define OWCFG_OPENBOTHFAIL (Success+3)
824N/A#define OWCFG_FSTAT1FAIL (Success+4)
824N/A#define OWCFG_FSTAT2FAIL (Success+5)
824N/A#define OWCFG_LOCK1FAIL (Success+6)
824N/A#define OWCFG_LOCK2FAIL (Success+7)
824N/A#define OWCFG_SYNTAX1 (Success+8)
824N/A#define OWCFG_SYNTAX2 (Success+9)
824N/A#define OWCFG_PKGNAME (Success+10)
824N/A#define OWCFG_CLASSNAME (Success+11)
824N/A#define OWCFG_INSTANCENAME (Success+12)
824N/A#define OWCFG_ALLOC (Success+13)
824N/A#define OWCFG_ARGS (Success+14)
824N/A#define OWCFG_OPENTMPFAIL (Success+15)
824N/A#define OWCFG_OPENWFAIL (Success+16)
824N/A#define OWCFG_LOCKWFAIL (Success+17)
824N/A#define OWCFG_RENAMEFAIL (Success+18)
824N/A
824N/A
824N/Atypedef struct {
824N/A char *attribute;
824N/A char *value;
824N/A} OWconfigAttribute, *OWconfigAttributePtr;
824N/A
824N/A
824N/A
824N/A
824N/A
824N/A#if defined(__cplusplus) || defined(c_plusplus)
824N/Aextern "C" {
824N/A#endif /* __cplusplus */
824N/A
824N/A
824N/A
824N/A
824N/A/*
824N/A * The functions:
824N/A * OWconfigGetClassNames
824N/A * OWconfigFreeClassNames
824N/A * OWconfigGetAttribute
824N/A * OWconfigFreeAttribute
824N/A * OWconfigGetInstance
824N/A * OWconfigFreeInstance
824N/A *
824N/A * are provided for the use of those wishing to develop DDX drivers
824N/A * for the Xsun server. Please refer to the OpenWindows Server
824N/A * Device Developer's Guide for more information.
824N/A */
824N/A
824N/A#if defined(__STDC__)
824N/A
824N/Aextern char **
824N/AOWconfigGetClassNames(char * /*class*/);
824N/A
824N/Aextern void
824N/AOWconfigFreeClassNames(char ** /*list*/);
824N/A
824N/Aextern char *
824N/AOWconfigGetAttribute(char * /*class*/, char * /*name*/, char * /*attribute*/);
824N/A
824N/Aextern void
824N/AOWconfigFreeAttribute(char * /*attribute*/);
824N/A
824N/Aextern OWconfigAttributePtr
824N/AOWconfigGetInstance(char * /*class*/, char * /*name*/, int * /*numberInattr*/);
824N/A
824N/Aextern void
824N/AOWconfigFreeInstance(OWconfigAttributePtr /*attr*/, int /*numberInAttr*/);
824N/A
824N/A
824N/A#else /* ! __STDC__ */
824N/A
824N/Aextern char **
824N/AOWconfigGetClassNames(/*char *class*/);
824N/A
824N/Aextern void
824N/AOWconfigFreeClassNames(/*char **list*/);
824N/A
824N/Aextern char *
824N/AOWconfigGetAttribute(/*char *class, char *name, char *attribute*/);
824N/A
824N/Aextern void
824N/AOWconfigFreeAttribute(/*char *attribute*/);
824N/A
824N/Aextern OWconfigAttributePtr
824N/AOWconfigGetInstance(/*char *class, char *name, int *numberInattr*/);
824N/A
824N/Aextern void
824N/AOWconfigFreeInstance(/*OWconfigAttributePtr attr, int numberInAttr*/);
824N/A
824N/A#endif /* __STDC__ */
824N/A
824N/A
824N/A
824N/A
824N/A
824N/A/*
824N/A * The functions:
824N/A * OWconfigInit
824N/A * OWconfigValidate
824N/A * OWconfigSetInstance
824N/A * OWconfigRemoveInstance
824N/A * OWconfigSetAttribute
824N/A * OWconfigSetPackage
824N/A * OWconfigRemovePackage
824N/A * OWconfigClose
824N/A *
824N/A * are categorized as "Sun Private". They should not be used by
824N/A * developers outside of Sun Microsystems Inc., or its subsidiaries.
824N/A */
824N/A
824N/A#define OWFLAG_RETAIN 1
824N/A
824N/A#if defined(__STDC__)
824N/A
824N/Aextern int
824N/AOWconfigInit(char * /*readfile1*/, char * /*readfile2*/, int /*flags*/,
824N/A void *(* /*allocmem*/)(unsigned), void (* /*freemem*/)(void *));
824N/A
824N/Aextern int
824N/AOWconfigValidate(void);
824N/A
824N/Aextern int
824N/AOWconfigSetInstance(char * /*class*/, char * /*name*/,
824N/A OWconfigAttributePtr /*attr*/,
824N/A int /*numberInattr*/);
824N/A
824N/Aextern int
824N/AOWconfigRemoveInstance(char * /*class*/, char * /*name*/);
824N/A
824N/Aextern int
824N/AOWconfigSetAttribute(char * /*class*/, char * /*name*/, char * /*attribute*/,
824N/A char * /*value*/);
824N/A
824N/Aextern void
824N/AOWconfigSetPackage(char * /*package*/);
824N/A
824N/Aextern int
824N/AOWconfigRemovePackage(char * /*package*/);
824N/A
824N/Aextern int
824N/AOWconfigClose(char */*writeFile*/);
824N/A
824N/A
824N/A#else /* ! __STDC__ */
824N/A
824N/A
824N/Aextern int
824N/AOWconfigInit(/*char *readfile1, char *readfile2, int flags,
824N/A void *(*allocmem)(), void (*freemem)()*/);
824N/A
824N/Aextern int
824N/AOWconfigValidate(/*void*/);
824N/A
824N/Aextern int
824N/AOWconfigSetInstance(/*char *class, char *name,
824N/A OWconfigAttributePtr attr,
824N/A int numberInattr*/);
824N/A
824N/Aextern int
824N/AOWconfigRemoveInstance(/*char *class, char *name*/);
824N/A
824N/Aextern int
824N/AOWconfigSetAttribute(/*char *class, char *name, char *attribute,
824N/A char *value*/);
824N/A
824N/Aextern void
824N/AOWconfigSetPackage(/*char *package*/);
824N/A
824N/Aextern int
824N/AOWconfigRemovePackage(/*char *package*/);
824N/A
824N/Aextern int
824N/AOWconfigClose(/*char *writeFile*/);
824N/A
824N/A
824N/A#endif /* __STDC__ */
824N/A
824N/A
824N/A
824N/A
824N/A#if defined(__cplusplus) || defined(c_plusplus)
824N/A}
824N/A#endif /* __cplusplus */
824N/A
824N/A#endif /* _X_CONFIG_H_ */