blob: 8f061ef2dbf431c80847e405a5668f91c2524699 [file] [log] [blame]
Alexandre Julliarda845b881998-06-01 10:44:35 +00001/*
2 * Create dynamic new structures of various types
3 *
4 * Copyright 1998 Bertho A. Stultiens
5 *
Alexandre Julliard0799c1a2002-03-09 23:29:33 +00006 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Alexandre Julliarda845b881998-06-01 10:44:35 +000019 */
20
21#ifndef __WRC_NEWSTRUC_H
22#define __WRC_NEWSTRUC_H
23
Alexandre Julliarda845b881998-06-01 10:44:35 +000024#include "wrctypes.h"
Alexandre Julliarda845b881998-06-01 10:44:35 +000025
26#define __NEW_STRUCT_FUNC(p) \
27 p##_t *new_##p(void)\
28 {\
29 return (p##_t *)xmalloc(sizeof(p##_t));\
30 }
31
32#define __NEW_STRUCT_PROTO(p) p##_t *new_##p(void)
33
34__NEW_STRUCT_PROTO(dialog);
35__NEW_STRUCT_PROTO(dialogex);
36__NEW_STRUCT_PROTO(name_id);
37__NEW_STRUCT_PROTO(menu);
38__NEW_STRUCT_PROTO(menuex);
39__NEW_STRUCT_PROTO(menu_item);
40__NEW_STRUCT_PROTO(menuex_item);
41__NEW_STRUCT_PROTO(control);
42__NEW_STRUCT_PROTO(icon);
43__NEW_STRUCT_PROTO(cursor);
44__NEW_STRUCT_PROTO(versioninfo);
45__NEW_STRUCT_PROTO(ver_value);
46__NEW_STRUCT_PROTO(ver_block);
47__NEW_STRUCT_PROTO(stt_entry);
48__NEW_STRUCT_PROTO(accelerator);
49__NEW_STRUCT_PROTO(event);
50__NEW_STRUCT_PROTO(raw_data);
51__NEW_STRUCT_PROTO(lvc);
52__NEW_STRUCT_PROTO(res_count);
53__NEW_STRUCT_PROTO(string);
Alexandre Julliard638f1691999-01-17 16:32:32 +000054__NEW_STRUCT_PROTO(toolbar_item);
Bertho Stultiens997e0d72000-05-23 01:18:38 +000055__NEW_STRUCT_PROTO(ani_any);
Alexandre Julliarda845b881998-06-01 10:44:35 +000056
57resource_t *new_resource(enum res_e t, void *res, int memopt, language_t *lan);
58version_t *new_version(DWORD v);
59characts_t *new_characts(DWORD c);
60language_t *new_language(int id, int sub);
61language_t *dup_language(language_t *l);
62version_t *dup_version(version_t *v);
63characts_t *dup_characts(characts_t *c);
Alexandre Julliard52788d12005-06-30 20:58:52 +000064html_t *new_html(raw_data_t *rd, int *memopt);
Alexandre Julliarda845b881998-06-01 10:44:35 +000065rcdata_t *new_rcdata(raw_data_t *rd, int *memopt);
66font_id_t *new_font_id(int size, string_t *face, int weight, int italic);
67user_t *new_user(name_id_t *type, raw_data_t *rd, int *memopt);
68font_t *new_font(raw_data_t *rd, int *memopt);
Bertho Stultiens997e0d72000-05-23 01:18:38 +000069fontdir_t *new_fontdir(raw_data_t *rd, int *memopt);
Alexandre Julliarda845b881998-06-01 10:44:35 +000070icon_group_t *new_icon_group(raw_data_t *rd, int *memopt);
71cursor_group_t *new_cursor_group(raw_data_t *rd, int *memopt);
Bertho Stultiens997e0d72000-05-23 01:18:38 +000072ani_curico_t *new_ani_curico(enum res_e type, raw_data_t *rd, int *memopt);
Alexandre Julliarda845b881998-06-01 10:44:35 +000073bitmap_t *new_bitmap(raw_data_t *rd, int *memopt);
74ver_words_t *new_ver_words(int i);
75ver_words_t *add_ver_words(ver_words_t *w, int i);
Bertho Stultiensc107f712000-06-08 00:38:47 +000076messagetable_t *new_messagetable(raw_data_t *rd, int *memopt);
Bertho Stultiens62451da1999-07-20 14:54:54 +000077dlginit_t *new_dlginit(raw_data_t *rd, int *memopt);
Joerg Mayerabe635c2000-11-11 00:38:37 +000078void copy_raw_data(raw_data_t *dst, raw_data_t *src, unsigned int offs, int len);
Alexandre Julliarda845b881998-06-01 10:44:35 +000079int *new_int(int i);
80stringtable_t *new_stringtable(lvc_t *lvc);
Alexandre Julliard638f1691999-01-17 16:32:32 +000081toolbar_t *new_toolbar(int button_width, int button_Height, toolbar_item_t *items, int nitems);
Juergen Schmied1ce88e91999-11-07 21:08:57 +000082style_pair_t *new_style_pair(style_t *style, style_t *exstyle);
83style_t *new_style(DWORD or_mask, DWORD and_mask);
Alexandre Julliarda845b881998-06-01 10:44:35 +000084
85#endif