ReactOS  0.4.15-dev-2504-g2b52f3b
widltypes.h File Reference
#include <stdarg.h>
#include <assert.h>
#include "guiddef.h"
#include "ndrtypes.h"
#include "wine/list.h"
Include dependency graph for widltypes.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _loc_info_t
 
struct  str_list_entry_t
 
struct  _attr_t
 
struct  _expr_t
 
struct  struct_details
 
struct  enumeration_details
 
struct  func_details
 
struct  iface_details
 
struct  module_details
 
struct  array_details
 
struct  coclass_details
 
struct  basic_details
 
struct  pointer_details
 
struct  bitfield_details
 
struct  namespace
 
struct  _type_t
 
struct  _var_t
 
struct  _declarator_t
 
struct  _ifref_t
 
struct  _typelib_entry_t
 
struct  _importinfo_t
 
struct  _importlib_t
 
struct  _typelib_t
 
struct  _user_type_t
 
struct  _type_list_t
 
struct  _statement_t
 
struct  _warning_t
 

Macros

#define UUID_DEFINED
 
#define TRUE   1
 
#define FALSE   0
 
#define TYPE_BASIC_MAX   TYPE_BASIC_HANDLE
 
#define TYPE_BASIC_INT_MIN   TYPE_BASIC_INT8
 
#define TYPE_BASIC_INT_MAX   TYPE_BASIC_HYPER
 
#define HASHMAX   64
 
#define tsENUM   1
 
#define tsSTRUCT   2
 
#define tsUNION   3
 
#define STATEMENTS_FOR_EACH_FUNC(stmt, stmts)
 

Typedefs

typedef GUID UUID
 
typedef struct _loc_info_t loc_info_t
 
typedef struct _attr_t attr_t
 
typedef struct _expr_t expr_t
 
typedef struct _type_t type_t
 
typedef struct _var_t var_t
 
typedef struct _declarator_t declarator_t
 
typedef struct _ifref_t ifref_t
 
typedef struct _typelib_entry_t typelib_entry_t
 
typedef struct _importlib_t importlib_t
 
typedef struct _importinfo_t importinfo_t
 
typedef struct _typelib_t typelib_t
 
typedef struct _user_type_t user_type_t
 
typedef struct _user_type_t context_handle_t
 
typedef struct _user_type_t generic_handle_t
 
typedef struct _type_list_t type_list_t
 
typedef struct _statement_t statement_t
 
typedef struct _warning_t warning_t
 
typedef struct list attr_list_t
 
typedef struct list str_list_t
 
typedef struct list expr_list_t
 
typedef struct list var_list_t
 
typedef struct list declarator_list_t
 
typedef struct list ifref_list_t
 
typedef struct list user_type_list_t
 
typedef struct list context_handle_list_t
 
typedef struct list generic_handle_list_t
 
typedef struct list statement_list_t
 
typedef struct list warning_list_t
 

Enumerations

enum  attr_type {
  ATTR_AGGREGATABLE, ATTR_ALLOCATE, ATTR_ANNOTATION, ATTR_APPOBJECT,
  ATTR_ASYNC, ATTR_ASYNCUUID, ATTR_AUTO_HANDLE, ATTR_BINDABLE,
  ATTR_BROADCAST, ATTR_CALLAS, ATTR_CALLCONV, ATTR_CASE,
  ATTR_CODE, ATTR_COMMSTATUS, ATTR_CONST, ATTR_CONTEXTHANDLE,
  ATTR_CONTROL, ATTR_DECODE, ATTR_DEFAULT, ATTR_DEFAULTBIND,
  ATTR_DEFAULTCOLLELEM, ATTR_DEFAULTVALUE, ATTR_DEFAULTVTABLE, ATTR_DISABLECONSISTENCYCHECK,
  ATTR_DISPINTERFACE, ATTR_DISPLAYBIND, ATTR_DLLNAME, ATTR_DUAL,
  ATTR_ENABLEALLOCATE, ATTR_ENCODE, ATTR_ENDPOINT, ATTR_ENTRY,
  ATTR_EXPLICIT_HANDLE, ATTR_FAULTSTATUS, ATTR_FORCEALLOCATE, ATTR_HANDLE,
  ATTR_HELPCONTEXT, ATTR_HELPFILE, ATTR_HELPSTRING, ATTR_HELPSTRINGCONTEXT,
  ATTR_HELPSTRINGDLL, ATTR_HIDDEN, ATTR_ID, ATTR_IDEMPOTENT,
  ATTR_IGNORE, ATTR_IIDIS, ATTR_IMMEDIATEBIND, ATTR_IMPLICIT_HANDLE,
  ATTR_IN, ATTR_INLINE, ATTR_INPUTSYNC, ATTR_LENGTHIS,
  ATTR_LIBLCID, ATTR_LICENSED, ATTR_LOCAL, ATTR_MAYBE,
  ATTR_MESSAGE, ATTR_NOCODE, ATTR_NONBROWSABLE, ATTR_NONCREATABLE,
  ATTR_NONEXTENSIBLE, ATTR_NOTIFY, ATTR_NOTIFYFLAG, ATTR_OBJECT,
  ATTR_ODL, ATTR_OLEAUTOMATION, ATTR_OPTIMIZE, ATTR_OPTIONAL,
  ATTR_OUT, ATTR_PARAMLCID, ATTR_PARTIALIGNORE, ATTR_POINTERDEFAULT,
  ATTR_POINTERTYPE, ATTR_PROGID, ATTR_PROPGET, ATTR_PROPPUT,
  ATTR_PROPPUTREF, ATTR_PROXY, ATTR_PUBLIC, ATTR_RANGE,
  ATTR_READONLY, ATTR_REPRESENTAS, ATTR_REQUESTEDIT, ATTR_RESTRICTED,
  ATTR_RETVAL, ATTR_SIZEIS, ATTR_SOURCE, ATTR_STRICTCONTEXTHANDLE,
  ATTR_STRING, ATTR_SWITCHIS, ATTR_SWITCHTYPE, ATTR_THREADING,
  ATTR_TRANSMITAS, ATTR_UIDEFAULT, ATTR_USERMARSHAL, ATTR_USESGETLASTERROR,
  ATTR_UUID, ATTR_V1ENUM, ATTR_VARARG, ATTR_VERSION,
  ATTR_VIPROGID, ATTR_WIREMARSHAL
}
 
enum  expr_type {
  EXPR_COMPLEX = 1, EXPR_UNARY = 2, EXPR_PROPVAL = 3, EXPR_SVAL = 4,
  EXPR_IVAL = 5, EXPR_BVAL = 6, EXPR_VOID, EXPR_NUM,
  EXPR_HEXNUM, EXPR_DOUBLE, EXPR_IDENTIFIER, EXPR_NEG,
  EXPR_NOT, EXPR_PPTR, EXPR_CAST, EXPR_SIZEOF,
  EXPR_SHL, EXPR_SHR, EXPR_MUL, EXPR_DIV,
  EXPR_ADD, EXPR_SUB, EXPR_AND, EXPR_OR,
  EXPR_COND, EXPR_TRUEFALSE, EXPR_ADDRESSOF, EXPR_MEMBER,
  EXPR_ARRAY, EXPR_MOD, EXPR_LOGOR, EXPR_LOGAND,
  EXPR_XOR, EXPR_EQUALITY, EXPR_INEQUALITY, EXPR_GTR,
  EXPR_LESS, EXPR_GTREQL, EXPR_LESSEQL, EXPR_LOGNOT,
  EXPR_POS, EXPR_STRLIT, EXPR_WSTRLIT, EXPR_CHARCONST
}
 
enum  type_kind {
  TKIND_PRIMITIVE = -1, TKIND_ENUM, TKIND_RECORD, TKIND_MODULE,
  TKIND_INTERFACE, TKIND_DISPATCH, TKIND_COCLASS, TKIND_ALIAS,
  TKIND_UNION, TKIND_MAX
}
 
enum  storage_class { STG_NONE, STG_STATIC, STG_EXTERN, STG_REGISTER }
 
enum  statement_type {
  STMT_LIBRARY, STMT_DECLARATION, STMT_TYPE, STMT_TYPEREF,
  STMT_MODULE, STMT_TYPEDEF, STMT_IMPORT, STMT_IMPORTLIB,
  STMT_PRAGMA, STMT_CPPQUOTE
}
 
enum  threading_type {
  THREADING_APARTMENT = 1, THREADING_NEUTRAL, THREADING_SINGLE, THREADING_FREE,
  THREADING_BOTH
}
 
enum  type_basic_type {
  TYPE_BASIC_INT8 = 1, TYPE_BASIC_INT16, TYPE_BASIC_INT32, TYPE_BASIC_INT64,
  TYPE_BASIC_INT, TYPE_BASIC_INT3264, TYPE_BASIC_LONG, TYPE_BASIC_CHAR,
  TYPE_BASIC_HYPER, TYPE_BASIC_BYTE, TYPE_BASIC_WCHAR, TYPE_BASIC_FLOAT,
  TYPE_BASIC_DOUBLE, TYPE_BASIC_ERROR_STATUS_T, TYPE_BASIC_HANDLE
}
 
enum  type_type {
  TYPE_VOID, TYPE_BASIC, TYPE_ENUM, TYPE_STRUCT,
  TYPE_ENCAPSULATED_UNION, TYPE_UNION, TYPE_ALIAS, TYPE_MODULE,
  TYPE_COCLASS, TYPE_FUNCTION, TYPE_INTERFACE, TYPE_POINTER,
  TYPE_ARRAY, TYPE_BITFIELD
}
 
enum  syskind_t { SYS_WIN16, SYS_WIN32, SYS_MAC, SYS_WIN64 }
 

Functions

void check_for_additional_prototype_types (const var_list_t *list)
 
void init_types (void)
 
type_talloc_type (void)
 
void set_all_tfswrite (int val)
 
void clear_all_offsets (void)
 
var_tfind_const (const char *name, int f)
 
type_tfind_type (const char *name, struct namespace *namespace, int t)
 
type_tmake_type (enum type_type type)
 
type_tget_type (enum type_type type, char *name, struct namespace *namespace, int t)
 
type_treg_type (type_t *type, const char *name, struct namespace *namespace, int t)
 
void add_incomplete (type_t *t)
 
var_tmake_var (char *name)
 
var_list_tappend_var (var_list_t *list, var_t *var)
 
void init_loc_info (loc_info_t *)
 
charformat_namespace (struct namespace *namespace, const char *prefix, const char *separator, const char *suffix)
 
static var_list_ttype_get_function_args (const type_t *func_type)
 
static enum type_type type_get_type_detect_alias (const type_t *type)
 
static int statements_has_func (const statement_list_t *stmts)
 
static int is_global_namespace (const struct namespace *namespace)
 

Variables

user_type_list_t user_type_list
 
context_handle_list_t context_handle_list
 
generic_handle_list_t generic_handle_list
 

Macro Definition Documentation

◆ FALSE

#define FALSE   0

Definition at line 36 of file widltypes.h.

◆ HASHMAX

#define HASHMAX   64

Definition at line 390 of file widltypes.h.

◆ STATEMENTS_FOR_EACH_FUNC

#define STATEMENTS_FOR_EACH_FUNC (   stmt,
  stmts 
)
Value:
if (stmts) LIST_FOR_EACH_ENTRY( stmt, stmts, statement_t, entry ) \
if (stmt->type == STMT_DECLARATION && stmt->u.var->stgclass == STG_NONE && \
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
static enum type_type type_get_type_detect_alias(const type_t *type)
Definition: widltypes.h:590
uint32_t entry
Definition: isohybrid.c:63

Definition at line 597 of file widltypes.h.

◆ TRUE

#define TRUE   1

Definition at line 35 of file widltypes.h.

◆ tsENUM

#define tsENUM   1

Definition at line 567 of file widltypes.h.

◆ tsSTRUCT

#define tsSTRUCT   2

Definition at line 568 of file widltypes.h.

◆ tsUNION

#define tsUNION   3

Definition at line 569 of file widltypes.h.

◆ TYPE_BASIC_INT_MAX

#define TYPE_BASIC_INT_MAX   TYPE_BASIC_HYPER

Definition at line 282 of file widltypes.h.

◆ TYPE_BASIC_INT_MIN

#define TYPE_BASIC_INT_MIN   TYPE_BASIC_INT8

Definition at line 281 of file widltypes.h.

◆ TYPE_BASIC_MAX

#define TYPE_BASIC_MAX   TYPE_BASIC_HANDLE

Definition at line 280 of file widltypes.h.

◆ UUID_DEFINED

#define UUID_DEFINED

Definition at line 31 of file widltypes.h.

Typedef Documentation

◆ attr_list_t

Definition at line 56 of file widltypes.h.

◆ attr_t

Definition at line 39 of file widltypes.h.

◆ context_handle_list_t

Definition at line 63 of file widltypes.h.

◆ context_handle_t

Definition at line 50 of file widltypes.h.

◆ declarator_list_t

Definition at line 60 of file widltypes.h.

◆ declarator_t

Definition at line 43 of file widltypes.h.

◆ expr_list_t

Definition at line 58 of file widltypes.h.

◆ expr_t

Definition at line 40 of file widltypes.h.

◆ generic_handle_list_t

Definition at line 64 of file widltypes.h.

◆ generic_handle_t

Definition at line 51 of file widltypes.h.

◆ ifref_list_t

Definition at line 61 of file widltypes.h.

◆ ifref_t

Definition at line 44 of file widltypes.h.

◆ importinfo_t

Definition at line 47 of file widltypes.h.

◆ importlib_t

Definition at line 46 of file widltypes.h.

◆ loc_info_t

Definition at line 38 of file widltypes.h.

◆ statement_list_t

Definition at line 65 of file widltypes.h.

◆ statement_t

Definition at line 53 of file widltypes.h.

◆ str_list_t

Definition at line 57 of file widltypes.h.

◆ type_list_t

Definition at line 52 of file widltypes.h.

◆ type_t

Definition at line 41 of file widltypes.h.

◆ typelib_entry_t

Definition at line 45 of file widltypes.h.

◆ typelib_t

Definition at line 48 of file widltypes.h.

◆ user_type_list_t

Definition at line 62 of file widltypes.h.

◆ user_type_t

Definition at line 49 of file widltypes.h.

◆ UUID

typedef GUID UUID

Definition at line 32 of file widltypes.h.

◆ var_list_t

Definition at line 59 of file widltypes.h.

◆ var_t

typedef struct _var_t var_t

Definition at line 42 of file widltypes.h.

◆ warning_list_t

Definition at line 66 of file widltypes.h.

◆ warning_t

Definition at line 54 of file widltypes.h.

Enumeration Type Documentation

◆ attr_type

Enumerator
ATTR_AGGREGATABLE 
ATTR_ALLOCATE 
ATTR_ANNOTATION 
ATTR_APPOBJECT 
ATTR_ASYNC 
ATTR_ASYNCUUID 
ATTR_AUTO_HANDLE 
ATTR_BINDABLE 
ATTR_BROADCAST 
ATTR_CALLAS 
ATTR_CALLCONV 
ATTR_CASE 
ATTR_CODE 
ATTR_COMMSTATUS 
ATTR_CONST 
ATTR_CONTEXTHANDLE 
ATTR_CONTROL 
ATTR_DECODE 
ATTR_DEFAULT 
ATTR_DEFAULTBIND 
ATTR_DEFAULTCOLLELEM 
ATTR_DEFAULTVALUE 
ATTR_DEFAULTVTABLE 
ATTR_DISABLECONSISTENCYCHECK 
ATTR_DISPINTERFACE 
ATTR_DISPLAYBIND 
ATTR_DLLNAME 
ATTR_DUAL 
ATTR_ENABLEALLOCATE 
ATTR_ENCODE 
ATTR_ENDPOINT 
ATTR_ENTRY 
ATTR_EXPLICIT_HANDLE 
ATTR_FAULTSTATUS 
ATTR_FORCEALLOCATE 
ATTR_HANDLE 
ATTR_HELPCONTEXT 
ATTR_HELPFILE 
ATTR_HELPSTRING 
ATTR_HELPSTRINGCONTEXT 
ATTR_HELPSTRINGDLL 
ATTR_HIDDEN 
ATTR_ID 
ATTR_IDEMPOTENT 
ATTR_IGNORE 
ATTR_IIDIS 
ATTR_IMMEDIATEBIND 
ATTR_IMPLICIT_HANDLE 
ATTR_IN 
ATTR_INLINE 
ATTR_INPUTSYNC 
ATTR_LENGTHIS 
ATTR_LIBLCID 
ATTR_LICENSED 
ATTR_LOCAL 
ATTR_MAYBE 
ATTR_MESSAGE 
ATTR_NOCODE 
ATTR_NONBROWSABLE 
ATTR_NONCREATABLE 
ATTR_NONEXTENSIBLE 
ATTR_NOTIFY 
ATTR_NOTIFYFLAG 
ATTR_OBJECT 
ATTR_ODL 
ATTR_OLEAUTOMATION 
ATTR_OPTIMIZE 
ATTR_OPTIONAL 
ATTR_OUT 
ATTR_PARAMLCID 
ATTR_PARTIALIGNORE 
ATTR_POINTERDEFAULT 
ATTR_POINTERTYPE 
ATTR_PROGID 
ATTR_PROPGET 
ATTR_PROPPUT 
ATTR_PROPPUTREF 
ATTR_PROXY 
ATTR_PUBLIC 
ATTR_RANGE 
ATTR_READONLY 
ATTR_REPRESENTAS 
ATTR_REQUESTEDIT 
ATTR_RESTRICTED 
ATTR_RETVAL 
ATTR_SIZEIS 
ATTR_SOURCE 
ATTR_STRICTCONTEXTHANDLE 
ATTR_STRING 
ATTR_SWITCHIS 
ATTR_SWITCHTYPE 
ATTR_THREADING 
ATTR_TRANSMITAS 
ATTR_UIDEFAULT 
ATTR_USERMARSHAL 
ATTR_USESGETLASTERROR 
ATTR_UUID 
ATTR_V1ENUM 
ATTR_VARARG 
ATTR_VERSION 
ATTR_VIPROGID 
ATTR_WIREMARSHAL 

Definition at line 68 of file widltypes.h.

69 {
74  ATTR_ASYNC,
80  ATTR_CALLCONV, /* calling convention pseudo-attribute */
81  ATTR_CASE,
82  ATTR_CODE,
84  ATTR_CONST, /* const pseudo-attribute */
97  ATTR_DUAL,
101  ATTR_ENTRY,
105  ATTR_HANDLE,
111  ATTR_HIDDEN,
112  ATTR_ID,
114  ATTR_IGNORE,
115  ATTR_IIDIS,
118  ATTR_IN,
119  ATTR_INLINE,
122  ATTR_LIBLCID,
124  ATTR_LOCAL,
125  ATTR_MAYBE,
126  ATTR_MESSAGE,
127  ATTR_NOCODE,
131  ATTR_NOTIFY,
133  ATTR_OBJECT,
134  ATTR_ODL,
138  ATTR_OUT,
143  ATTR_PROGID,
144  ATTR_PROPGET,
145  ATTR_PROPPUT,
147  ATTR_PROXY,
148  ATTR_PUBLIC,
149  ATTR_RANGE,
154  ATTR_RETVAL,
155  ATTR_SIZEIS,
156  ATTR_SOURCE,
158  ATTR_STRING,
166  ATTR_UUID,
167  ATTR_V1ENUM,
168  ATTR_VARARG,
169  ATTR_VERSION,
172 };

◆ expr_type

Enumerator
EXPR_COMPLEX 
EXPR_UNARY 
EXPR_PROPVAL 
EXPR_SVAL 
EXPR_IVAL 
EXPR_BVAL 
EXPR_VOID 
EXPR_NUM 
EXPR_HEXNUM 
EXPR_DOUBLE 
EXPR_IDENTIFIER 
EXPR_NEG 
EXPR_NOT 
EXPR_PPTR 
EXPR_CAST 
EXPR_SIZEOF 
EXPR_SHL 
EXPR_SHR 
EXPR_MUL 
EXPR_DIV 
EXPR_ADD 
EXPR_SUB 
EXPR_AND 
EXPR_OR 
EXPR_COND 
EXPR_TRUEFALSE 
EXPR_ADDRESSOF 
EXPR_MEMBER 
EXPR_ARRAY 
EXPR_MOD 
EXPR_LOGOR 
EXPR_LOGAND 
EXPR_XOR 
EXPR_EQUALITY 
EXPR_INEQUALITY 
EXPR_GTR 
EXPR_LESS 
EXPR_GTREQL 
EXPR_LESSEQL 
EXPR_LOGNOT 
EXPR_POS 
EXPR_STRLIT 
EXPR_WSTRLIT 
EXPR_CHARCONST 

Definition at line 174 of file widltypes.h.

175 {
176  EXPR_VOID,
177  EXPR_NUM,
178  EXPR_HEXNUM,
179  EXPR_DOUBLE,
181  EXPR_NEG,
182  EXPR_NOT,
183  EXPR_PPTR,
184  EXPR_CAST,
185  EXPR_SIZEOF,
186  EXPR_SHL,
187  EXPR_SHR,
188  EXPR_MUL,
189  EXPR_DIV,
190  EXPR_ADD,
191  EXPR_SUB,
192  EXPR_AND,
193  EXPR_OR,
194  EXPR_COND,
197  EXPR_MEMBER,
198  EXPR_ARRAY,
199  EXPR_MOD,
200  EXPR_LOGOR,
201  EXPR_LOGAND,
202  EXPR_XOR,
205  EXPR_GTR,
206  EXPR_LESS,
207  EXPR_GTREQL,
208  EXPR_LESSEQL,
209  EXPR_LOGNOT,
210  EXPR_POS,
211  EXPR_STRLIT,
212  EXPR_WSTRLIT,
214 };

◆ statement_type

Enumerator
STMT_LIBRARY 
STMT_DECLARATION 
STMT_TYPE 
STMT_TYPEREF 
STMT_MODULE 
STMT_TYPEDEF 
STMT_IMPORT 
STMT_IMPORTLIB 
STMT_PRAGMA 
STMT_CPPQUOTE 

Definition at line 238 of file widltypes.h.

◆ storage_class

Enumerator
STG_NONE 
STG_STATIC 
STG_EXTERN 
STG_REGISTER 

Definition at line 230 of file widltypes.h.

231 {
232  STG_NONE,
233  STG_STATIC,
234  STG_EXTERN,
235  STG_REGISTER,
236 };

◆ syskind_t

Enumerator
SYS_WIN16 
SYS_WIN32 
SYS_MAC 
SYS_WIN64 

Definition at line 550 of file widltypes.h.

550  {
551  SYS_WIN16,
552  SYS_WIN32,
553  SYS_MAC,
554  SYS_WIN64
555 } syskind_t;
syskind_t
Definition: widltypes.h:550

◆ threading_type

Enumerator
THREADING_APARTMENT 
THREADING_NEUTRAL 
THREADING_SINGLE 
THREADING_FREE 
THREADING_BOTH 

Definition at line 252 of file widltypes.h.

◆ type_basic_type

Enumerator
TYPE_BASIC_INT8 
TYPE_BASIC_INT16 
TYPE_BASIC_INT32 
TYPE_BASIC_INT64 
TYPE_BASIC_INT 
TYPE_BASIC_INT3264 
TYPE_BASIC_LONG 
TYPE_BASIC_CHAR 
TYPE_BASIC_HYPER 
TYPE_BASIC_BYTE 
TYPE_BASIC_WCHAR 
TYPE_BASIC_FLOAT 
TYPE_BASIC_DOUBLE 
TYPE_BASIC_ERROR_STATUS_T 
TYPE_BASIC_HANDLE 

Definition at line 261 of file widltypes.h.

◆ type_kind

Enumerator
TKIND_PRIMITIVE 
TKIND_ENUM 
TKIND_RECORD 
TKIND_MODULE 
TKIND_INTERFACE 
TKIND_DISPATCH 
TKIND_COCLASS 
TKIND_ALIAS 
TKIND_UNION 
TKIND_MAX 

Definition at line 216 of file widltypes.h.

◆ type_type

Enumerator
TYPE_VOID 
TYPE_BASIC 
TYPE_ENUM 
TYPE_STRUCT 
TYPE_ENCAPSULATED_UNION 
TYPE_UNION 
TYPE_ALIAS 
TYPE_MODULE 
TYPE_COCLASS 
TYPE_FUNCTION 
TYPE_INTERFACE 
TYPE_POINTER 
TYPE_ARRAY 
TYPE_BITFIELD 

Definition at line 400 of file widltypes.h.

Function Documentation

◆ add_incomplete()

void add_incomplete ( type_t t)

◆ alloc_type()

type_t* alloc_type ( void  )

Referenced by duptype(), and make_type().

◆ append_var()

var_list_t* append_var ( var_list_t list,
var_t var 
)

◆ check_for_additional_prototype_types()

void check_for_additional_prototype_types ( const var_list_t list)

Definition at line 640 of file header.c.

641 {
642  const var_t *v;
643 
644  if (!list) return;
645  LIST_FOR_EACH_ENTRY( v, list, const var_t, entry )
646  {
647  type_t *type = v->type;
648  if (!type) continue;
649  for (;;) {
650  const char *name = type->name;
651  if (type->user_types_registered) break;
652  type->user_types_registered = 1;
653  if (is_attr(type->attrs, ATTR_CONTEXTHANDLE)) {
655  {
656  context_handle_t *ch = xmalloc(sizeof(*ch));
657  ch->name = xstrdup(name);
659  }
660  /* don't carry on parsing fields within this type */
661  break;
662  }
663  if ((type_get_type(type) != TYPE_BASIC ||
665  is_attr(type->attrs, ATTR_HANDLE)) {
667  {
668  generic_handle_t *gh = xmalloc(sizeof(*gh));
669  gh->name = xstrdup(name);
671  }
672  /* don't carry on parsing fields within this type */
673  break;
674  }
675  if (is_attr(type->attrs, ATTR_WIREMARSHAL)) {
677  {
678  user_type_t *ut = xmalloc(sizeof *ut);
679  ut->name = xstrdup(name);
681  }
682  /* don't carry on parsing fields within this type as we are already
683  * using a wire marshaled type */
684  break;
685  }
686  else if (type_is_complete(type))
687  {
688  var_list_t *vars;
690  {
691  case TYPE_ENUM:
692  vars = type_enum_get_values(type);
693  break;
694  case TYPE_STRUCT:
696  break;
697  case TYPE_UNION:
698  vars = type_union_get_cases(type);
699  break;
700  default:
701  vars = NULL;
702  break;
703  }
705  }
706 
707  if (type_is_alias(type))
709  else if (is_ptr(type))
711  else if (is_array(type))
713  else
714  break;
715  }
716  }
717 }
static var_list_t * type_struct_get_fields(const type_t *type)
Definition: typetree.h:87
generic_handle_list_t generic_handle_list
Definition: header.c:44
static type_t * type_array_get_element(const type_t *type)
Definition: typetree.h:253
static var_list_t * type_union_get_cases(const type_t *type)
Definition: typetree.h:134
static enum type_basic_type type_basic_get_type(const type_t *type)
Definition: typetree.h:73
static int context_handle_registered(const char *name)
Definition: header.c:580
static type_t * type_pointer_get_ref(const type_t *type)
Definition: typetree.h:292
__WINE_SERVER_LIST_INLINE void list_add_tail(struct list *list, struct list *elem)
Definition: list.h:102
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
void * xmalloc(int size)
Definition: uimain.c:747
static int is_ptr(const type_t *t)
Definition: header.h:59
static int type_is_alias(const type_t *type)
Definition: typetree.h:274
static int is_array(const type_t *t)
Definition: header.h:64
static var_list_t * type_enum_get_values(const type_t *type)
Definition: typetree.h:113
static int type_is_complete(const type_t *type)
Definition: typetree.h:191
static enum type_type type_get_type(const type_t *type)
Definition: typetree.h:68
static int generic_handle_registered(const char *name)
Definition: header.c:589
static enum type_type type_get_type_detect_alias(const type_t *type)
Definition: widltypes.h:590
user_type_list_t user_type_list
Definition: header.c:42
uint32_t entry
Definition: isohybrid.c:63
Definition: _list.h:228
void check_for_additional_prototype_types(const var_list_t *list)
Definition: header.c:640
const GLdouble * v
Definition: gl.h:2040
const char * name
Definition: widltypes.h:523
struct list entry
Definition: widltypes.h:522
#define NULL
Definition: types.h:112
static type_t * type_alias_get_aliasee(const type_t *type)
Definition: typetree.h:279
Definition: name.c:38
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
int is_attr(const attr_list_t *list, enum attr_type t)
Definition: header.c:99
char * xstrdup(const char *s)
Definition: uimain.c:768
static int user_type_registered(const char *name)
Definition: header.c:571
WCHAR * name
Definition: name.c:42

Referenced by check_for_additional_prototype_types().

◆ clear_all_offsets()

void clear_all_offsets ( void  )

Referenced by write_formatstringsdecl().

◆ find_const()

var_t* find_const ( const char name,
int  f 
)

Referenced by find_identifier(), and make_exprs().

◆ find_type()

◆ format_namespace()

char* format_namespace ( struct namespace namespace,
const char prefix,
const char separator,
const char suffix 
)

Definition at line 110 of file typetree.c.

111 {
112  unsigned len = strlen(prefix) + strlen(suffix);
113  unsigned sep_len = strlen(separator);
114  struct namespace *iter;
115  char *ret, *ptr;
116 
117  if(use_abi_namespace && !is_global_namespace(namespace))
118  len += 3 /* strlen("ABI") */ + sep_len;
119 
120  for(iter = namespace; !is_global_namespace(iter); iter = iter->parent)
121  len += strlen(iter->name) + sep_len;
122 
123  ret = xmalloc(len+1);
124  strcpy(ret, prefix);
125  ptr = append_namespace(ret + strlen(ret), namespace, separator);
126  strcpy(ptr, suffix);
127 
128  return ret;
129 }
static int is_global_namespace(const struct namespace *namespace)
Definition: widltypes.h:614
static const WCHAR separator[]
Definition: asmname.c:65
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
void * xmalloc(int size)
Definition: uimain.c:747
static PVOID ptr
Definition: dispmode.c:27
int ret
GLenum GLsizei len
Definition: glext.h:6722
int use_abi_namespace
Definition: widl.c:130
const char * name
Definition: widltypes.h:393
char * strcpy(char *DstString, const char *SrcString)
Definition: utclib.c:388
static char * append_namespace(char *ptr, struct namespace *namespace, const char *separator)
Definition: typetree.c:94
struct namespace * parent
Definition: widltypes.h:394

Referenced by write_uuid_decl().

◆ get_type()

type_t* get_type ( enum type_type  type,
char name,
struct namespace namespace,
int  t 
)

◆ init_loc_info()

void init_loc_info ( loc_info_t )

Referenced by make_type(), and type_new_alias().

◆ init_types()

void init_types ( void  )

Referenced by main().

◆ is_global_namespace()

static int is_global_namespace ( const struct namespace namespace)
inlinestatic

Definition at line 614 of file widltypes.h.

615 {
616  return !namespace->name;
617 }

Referenced by append_namespace(), format_namespace(), write_com_interface_end(), write_namespace_end(), write_namespace_start(), write_type_definition(), and write_type_left().

◆ make_type()

type_t* make_type ( enum type_type  type)

Definition at line 44 of file typetree.c.

45 {
46  type_t *t = alloc_type();
47  t->name = NULL;
48  t->namespace = NULL;
49  t->type_type = type;
50  t->attrs = NULL;
51  t->c_name = NULL;
52  t->orig = NULL;
53  memset(&t->details, 0, sizeof(t->details));
54  t->typestring_offset = 0;
55  t->ptrdesc = 0;
56  t->ignore = (parse_only != 0);
57  t->defined = FALSE;
58  t->written = FALSE;
59  t->user_types_registered = FALSE;
60  t->tfswrite = FALSE;
61  t->checked = FALSE;
62  t->is_alias = FALSE;
63  t->typelib_idx = -1;
64  init_loc_info(&t->loc_info);
65  return t;
66 }
GLdouble GLdouble t
Definition: gl.h:2047
type_t * alloc_type(void)
#define FALSE
Definition: types.h:117
void init_loc_info(loc_info_t *)
#define NULL
Definition: types.h:112
#define parse_only
Definition: parser.h:44
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
#define memset(x, y, z)
Definition: compat.h:39

Referenced by type_new_array(), type_new_basic(), type_new_bitfield(), type_new_enum(), type_new_function(), type_new_nonencapsulated_union(), type_new_pointer(), type_new_struct(), and type_new_void().

◆ make_var()

var_t* make_var ( char name)

◆ reg_type()

◆ set_all_tfswrite()

void set_all_tfswrite ( int  val)

◆ statements_has_func()

static int statements_has_func ( const statement_list_t stmts)
inlinestatic

Definition at line 602 of file widltypes.h.

603 {
604  const statement_t *stmt;
605  int has_func = 0;
606  STATEMENTS_FOR_EACH_FUNC(stmt, stmts)
607  {
608  has_func = 1;
609  break;
610  }
611  return has_func;
612 }
#define STATEMENTS_FOR_EACH_FUNC(stmt, stmts)
Definition: widltypes.h:597

Referenced by write_server_stmts().

◆ type_get_function_args()

◆ type_get_type_detect_alias()

static enum type_type type_get_type_detect_alias ( const type_t type)
inlinestatic

Definition at line 590 of file widltypes.h.

591 {
592  if (type->is_alias)
593  return TYPE_ALIAS;
594  return type->type_type;
595 }
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545

Referenced by check_for_additional_prototype_types(), get_explicit_generic_handle_type(), process_tfs_iface(), type_get_type(), type_is_complete(), type_is_equal(), write_client_ifaces(), write_fields(), write_function_stubs(), write_type_left(), and write_type_v().

Variable Documentation

◆ context_handle_list

◆ generic_handle_list

◆ user_type_list