aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/drivers/dri/common/xmlconfig.h
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/drivers/dri/common/xmlconfig.h')
-rw-r--r--mesalib/src/mesa/drivers/dri/common/xmlconfig.h29
1 files changed, 18 insertions, 11 deletions
diff --git a/mesalib/src/mesa/drivers/dri/common/xmlconfig.h b/mesalib/src/mesa/drivers/dri/common/xmlconfig.h
index d0ad42c19..386ddf19d 100644
--- a/mesalib/src/mesa/drivers/dri/common/xmlconfig.h
+++ b/mesalib/src/mesa/drivers/dri/common/xmlconfig.h
@@ -30,16 +30,21 @@
#ifndef __XMLCONFIG_H
#define __XMLCONFIG_H
+#include <stdbool.h>
+
+#define STRING_CONF_MAXLEN 25
+
/** \brief Option data types */
typedef enum driOptionType {
- DRI_BOOL, DRI_ENUM, DRI_INT, DRI_FLOAT
+ DRI_BOOL, DRI_ENUM, DRI_INT, DRI_FLOAT, DRI_STRING
} driOptionType;
/** \brief Option value */
typedef union driOptionValue {
- GLboolean _bool; /**< \brief Boolean */
- GLint _int; /**< \brief Integer or Enum */
- GLfloat _float; /**< \brief Floating-point */
+ bool _bool; /**< \brief Boolean */
+ int _int; /**< \brief Integer or Enum */
+ float _float; /**< \brief Floating-point */
+ char *_string; /**< \brief String */
} driOptionValue;
/** \brief Single range of valid values
@@ -55,7 +60,7 @@ typedef struct driOptionInfo {
char *name; /**< \brief Name */
driOptionType type; /**< \brief Type */
driOptionRange *ranges; /**< \brief Array of ranges */
- GLuint nRanges; /**< \brief Number of ranges */
+ uint nRanges; /**< \brief Number of ranges */
} driOptionInfo;
/** \brief Option cache
@@ -73,7 +78,7 @@ typedef struct driOptionCache {
* \li Default values in screen
* \li Actual values in contexts
*/
- GLuint tableSize;
+ uint tableSize;
/**< \brief Size of the arrays
*
* In the current implementation it's not actually a size but log2(size).
@@ -98,7 +103,7 @@ void driParseOptionInfo (driOptionCache *info,
* To be called in <driver>CreateContext. screenNum and driverName select
* device sections. */
void driParseConfigFiles (driOptionCache *cache, const driOptionCache *info,
- GLint screenNum, const char *driverName);
+ int screenNum, const char *driverName);
/** \brief Destroy option info
*
* To be called in <driver>DestroyScreen */
@@ -109,14 +114,16 @@ void driDestroyOptionInfo (driOptionCache *info);
void driDestroyOptionCache (driOptionCache *cache);
/** \brief Check if there exists a certain option */
-GLboolean driCheckOption (const driOptionCache *cache, const char *name,
+bool driCheckOption (const driOptionCache *cache, const char *name,
driOptionType type);
/** \brief Query a boolean option value */
-GLboolean driQueryOptionb (const driOptionCache *cache, const char *name);
+bool driQueryOptionb (const driOptionCache *cache, const char *name);
/** \brief Query an integer option value */
-GLint driQueryOptioni (const driOptionCache *cache, const char *name);
+int driQueryOptioni (const driOptionCache *cache, const char *name);
/** \brief Query a floating-point option value */
-GLfloat driQueryOptionf (const driOptionCache *cache, const char *name);
+float driQueryOptionf (const driOptionCache *cache, const char *name);
+/** \brief Query a string option value */
+char *driQueryOptionstr (const driOptionCache *cache, const char *name);
#endif