2002-07-16 05:20:45 +02:00
|
|
|
/*
|
|
|
|
* IDL Compiler
|
|
|
|
*
|
|
|
|
* Copyright 2002 Ove Kaaven
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it 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 this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __WIDL_WIDLTYPES_H
|
|
|
|
#define __WIDL_WIDLTYPES_H
|
|
|
|
|
2003-09-06 01:08:26 +02:00
|
|
|
#include <stdarg.h>
|
2002-12-15 02:13:18 +01:00
|
|
|
#include "guiddef.h"
|
2002-07-16 05:20:45 +02:00
|
|
|
#include "wine/rpcfc.h"
|
|
|
|
|
2002-12-15 02:13:18 +01:00
|
|
|
#ifndef UUID_DEFINED
|
|
|
|
#define UUID_DEFINED
|
|
|
|
typedef GUID UUID;
|
|
|
|
#endif
|
|
|
|
|
2004-04-22 05:40:01 +02:00
|
|
|
#define TRUE 1
|
|
|
|
#define FALSE 0
|
|
|
|
|
|
|
|
#define LOWORD(l) ((unsigned short)(l))
|
|
|
|
#define HIWORD(l) ((unsigned short)((unsigned long)(l) >> 16))
|
|
|
|
#define MAKELONG(low,high) ((unsigned long)(((unsigned short)(low)) | (((unsigned long)((unsigned short)(high))) << 16)))
|
|
|
|
|
2002-07-16 05:20:45 +02:00
|
|
|
typedef struct _attr_t attr_t;
|
2002-11-12 03:12:35 +01:00
|
|
|
typedef struct _expr_t expr_t;
|
2002-07-16 05:20:45 +02:00
|
|
|
typedef struct _type_t type_t;
|
|
|
|
typedef struct _typeref_t typeref_t;
|
|
|
|
typedef struct _var_t var_t;
|
|
|
|
typedef struct _func_t func_t;
|
2004-01-07 05:21:27 +01:00
|
|
|
typedef struct _ifref_t ifref_t;
|
|
|
|
typedef struct _class_t class_t;
|
2002-07-16 05:20:45 +02:00
|
|
|
|
|
|
|
#define DECL_LINK(type) \
|
|
|
|
type *l_next; \
|
|
|
|
type *l_prev;
|
|
|
|
|
|
|
|
#define LINK(x,y) do { x->l_next = y; if (y) y->l_prev = x; } while (0)
|
|
|
|
|
|
|
|
#define INIT_LINK(x) do { x->l_next = NULL; x->l_prev = NULL; } while (0)
|
|
|
|
#define NEXT_LINK(x) ((x)->l_next)
|
|
|
|
#define PREV_LINK(x) ((x)->l_prev)
|
|
|
|
|
2002-08-13 05:30:58 +02:00
|
|
|
enum attr_type
|
|
|
|
{
|
|
|
|
ATTR_ASYNC,
|
|
|
|
ATTR_CALLAS,
|
2002-12-03 20:12:07 +01:00
|
|
|
ATTR_CASE,
|
|
|
|
ATTR_CONTEXTHANDLE,
|
2002-08-13 05:30:58 +02:00
|
|
|
ATTR_DEFAULT,
|
2004-01-07 05:21:27 +01:00
|
|
|
ATTR_DLLNAME,
|
|
|
|
ATTR_DUAL,
|
2004-04-27 01:29:59 +02:00
|
|
|
ATTR_ENDPOINT,
|
2004-01-07 05:21:27 +01:00
|
|
|
ATTR_ENTRY_STRING,
|
|
|
|
ATTR_ENTRY_ORDINAL,
|
2004-04-20 01:08:22 +02:00
|
|
|
ATTR_HANDLE,
|
2004-01-07 05:21:27 +01:00
|
|
|
ATTR_HELPSTRING,
|
|
|
|
ATTR_ID,
|
2002-12-03 20:12:07 +01:00
|
|
|
ATTR_IDEMPOTENT,
|
2002-08-13 05:30:58 +02:00
|
|
|
ATTR_IIDIS,
|
|
|
|
ATTR_IN,
|
2004-02-12 00:57:58 +01:00
|
|
|
ATTR_INPUTSYNC,
|
2002-12-03 20:12:07 +01:00
|
|
|
ATTR_LENGTHIS,
|
2002-08-13 05:30:58 +02:00
|
|
|
ATTR_LOCAL,
|
|
|
|
ATTR_OBJECT,
|
2004-01-07 05:21:27 +01:00
|
|
|
ATTR_ODL,
|
2002-08-13 05:30:58 +02:00
|
|
|
ATTR_OLEAUTOMATION,
|
|
|
|
ATTR_OUT,
|
|
|
|
ATTR_POINTERDEFAULT,
|
|
|
|
ATTR_POINTERTYPE,
|
2004-10-05 04:14:54 +02:00
|
|
|
ATTR_PROPGET,
|
|
|
|
ATTR_PROPPUT,
|
2004-01-07 05:21:27 +01:00
|
|
|
ATTR_PUBLIC,
|
|
|
|
ATTR_READONLY,
|
|
|
|
ATTR_RETVAL,
|
2002-12-03 20:12:07 +01:00
|
|
|
ATTR_SIZEIS,
|
2004-01-07 05:21:27 +01:00
|
|
|
ATTR_SOURCE,
|
2002-08-13 05:30:58 +02:00
|
|
|
ATTR_STRING,
|
2002-12-03 20:12:07 +01:00
|
|
|
ATTR_SWITCHIS,
|
|
|
|
ATTR_SWITCHTYPE,
|
2004-04-27 01:29:59 +02:00
|
|
|
ATTR_TRANSMITAS,
|
2002-11-12 03:12:35 +01:00
|
|
|
ATTR_UUID,
|
2002-08-13 05:30:58 +02:00
|
|
|
ATTR_V1ENUM,
|
2002-12-03 20:12:07 +01:00
|
|
|
ATTR_VERSION,
|
2002-08-13 05:30:58 +02:00
|
|
|
ATTR_WIREMARSHAL,
|
|
|
|
};
|
|
|
|
|
2002-11-12 03:12:35 +01:00
|
|
|
enum expr_type
|
|
|
|
{
|
|
|
|
EXPR_VOID,
|
|
|
|
EXPR_NUM,
|
2002-11-30 02:49:46 +01:00
|
|
|
EXPR_HEXNUM,
|
2002-11-12 03:12:35 +01:00
|
|
|
EXPR_IDENTIFIER,
|
|
|
|
EXPR_NEG,
|
2002-12-03 20:12:07 +01:00
|
|
|
EXPR_NOT,
|
2002-11-12 03:12:35 +01:00
|
|
|
EXPR_PPTR,
|
|
|
|
EXPR_CAST,
|
2002-11-30 02:49:46 +01:00
|
|
|
EXPR_SIZEOF,
|
2002-11-12 03:12:35 +01:00
|
|
|
EXPR_SHL,
|
|
|
|
EXPR_SHR,
|
|
|
|
EXPR_MUL,
|
|
|
|
EXPR_DIV,
|
|
|
|
EXPR_ADD,
|
|
|
|
EXPR_SUB,
|
|
|
|
EXPR_AND,
|
|
|
|
EXPR_OR,
|
2004-04-20 01:08:22 +02:00
|
|
|
EXPR_COND,
|
2002-11-12 03:12:35 +01:00
|
|
|
};
|
|
|
|
|
2002-07-16 05:20:45 +02:00
|
|
|
struct _attr_t {
|
2002-08-13 05:30:58 +02:00
|
|
|
enum attr_type type;
|
2002-07-16 05:20:45 +02:00
|
|
|
union {
|
2004-04-22 05:40:01 +02:00
|
|
|
unsigned long ival;
|
2002-07-16 05:20:45 +02:00
|
|
|
void *pval;
|
|
|
|
} u;
|
|
|
|
/* parser-internal */
|
|
|
|
DECL_LINK(attr_t)
|
|
|
|
};
|
|
|
|
|
2002-11-12 03:12:35 +01:00
|
|
|
struct _expr_t {
|
|
|
|
enum expr_type type;
|
|
|
|
expr_t *ref;
|
|
|
|
union {
|
|
|
|
long lval;
|
|
|
|
char *sval;
|
|
|
|
expr_t *ext;
|
2002-11-30 02:49:46 +01:00
|
|
|
typeref_t *tref;
|
2002-11-12 03:12:35 +01:00
|
|
|
} u;
|
2004-04-20 01:08:22 +02:00
|
|
|
expr_t *ext2;
|
2002-11-30 02:49:46 +01:00
|
|
|
int is_const;
|
|
|
|
long cval;
|
2002-11-12 03:12:35 +01:00
|
|
|
/* parser-internal */
|
|
|
|
DECL_LINK(expr_t)
|
|
|
|
};
|
|
|
|
|
2002-07-16 05:20:45 +02:00
|
|
|
struct _type_t {
|
|
|
|
char *name;
|
2004-04-22 05:40:01 +02:00
|
|
|
unsigned char type;
|
2002-07-16 05:20:45 +02:00
|
|
|
struct _type_t *ref;
|
|
|
|
char *rname;
|
|
|
|
attr_t *attrs;
|
|
|
|
func_t *funcs;
|
|
|
|
var_t *fields;
|
2002-11-12 03:12:35 +01:00
|
|
|
int ignore, is_const, sign;
|
2002-07-16 05:20:45 +02:00
|
|
|
int defined, written;
|
|
|
|
|
|
|
|
/* parser-internal */
|
|
|
|
DECL_LINK(type_t)
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _typeref_t {
|
|
|
|
char *name;
|
|
|
|
type_t *ref;
|
|
|
|
int uniq;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _var_t {
|
|
|
|
char *name;
|
|
|
|
int ptr_level;
|
2002-11-12 03:12:35 +01:00
|
|
|
expr_t *array;
|
2002-07-16 05:20:45 +02:00
|
|
|
type_t *type;
|
2003-09-03 22:16:24 +02:00
|
|
|
var_t *args; /* for function pointers */
|
2002-07-16 05:20:45 +02:00
|
|
|
char *tname;
|
|
|
|
attr_t *attrs;
|
2002-11-30 02:49:46 +01:00
|
|
|
expr_t *eval;
|
2002-11-12 03:12:35 +01:00
|
|
|
long lval;
|
2002-07-16 05:20:45 +02:00
|
|
|
|
|
|
|
/* parser-internal */
|
|
|
|
DECL_LINK(var_t)
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _func_t {
|
|
|
|
var_t *def;
|
|
|
|
var_t *args;
|
|
|
|
int ignore, idx;
|
|
|
|
|
|
|
|
/* parser-internal */
|
|
|
|
DECL_LINK(func_t)
|
|
|
|
};
|
|
|
|
|
2004-01-07 05:21:27 +01:00
|
|
|
struct _ifref_t {
|
|
|
|
type_t *iface;
|
|
|
|
attr_t *attrs;
|
|
|
|
|
|
|
|
/* parser-internal */
|
|
|
|
DECL_LINK(ifref_t)
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _class_t {
|
|
|
|
char *name;
|
|
|
|
attr_t *attrs;
|
|
|
|
ifref_t *ifaces;
|
|
|
|
|
|
|
|
/* parser-internal */
|
|
|
|
DECL_LINK(class_t)
|
|
|
|
};
|
|
|
|
|
2002-07-16 05:20:45 +02:00
|
|
|
#endif
|