-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.h
executable file
·176 lines (140 loc) · 4.54 KB
/
main.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
/*
->====================================<-
->= SvTX - © Copyright 2022 OnyxSoft =<-
->====================================<-
->= Version : 1.0 =<-
->= File : main.c =<-
->= Author : Stefan Blixth =<-
->= Compiled : 2022-06-16 =<-
->====================================<-
*/
#ifndef __MAIN_H__
#define __MAIN_H__
/* Standard... */
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
/* System... */
#include <clib/alib_protos.h>
#include <dos/dos.h>
#include <exec/libraries.h>
#include <utility/tagitem.h>
#include <libraries/iffparse.h>
#include <proto/intuition.h>
#include <proto/muimaster.h>
#include <proto/exec.h>
#include <proto/graphics.h>
#include <proto/utility.h>
#include <proto/icon.h>
#include <proto/cybergraphics.h>
#include <cybergraphx/cybergraphics.h>
#include <libraries/mui.h>
#include <proto/multimedia.h>
#include <datatypes/datatypesclass.h>
#include <datatypes/pictureclass.h>
#include <proto/datatypes.h>
#include "LinkedList.h"
#include "rendermcc.h"
#include "base64.h"
#include "urlparser.h"
/*=----------------------------- Patches and Macros()-------------------------*
* Patching some incompatible functions and adds some useful macros *
*----------------------------------------------------------------------------*/
/* Compiler specific stuff */
#ifdef __MORPHOS__
#define REG(x)
#ifndef DISPATCHER
#define DISPATCHER(Name) \
static ULONG Name##_Dispatcher(void); \
struct EmulLibEntry GATE ##Name##_Dispatcher = { TRAP_LIB, 0, (void (*)(void)) Name##_Dispatcher }; \
static ULONG Name##_Dispatcher(void) { struct IClass *cl=(struct IClass*)REG_A0; Msg msg=(Msg)REG_A1; Object *obj=(Object*)REG_A2;
#define DISPATCHER_REF(Name) &GATE##Name##_Dispatcher
#define DISPATCHER_END }
#endif
#else
#define REG(x) register __ ## x
#define DISPATCHER(Name) ULONG ASM SAVEDS Name##Dispatcher(REG(a0) struct IClass *cl,REG(a2),REG(a1) Msg msg)
#define DISPATCHER_REF(Name) Name##Dispatcher
#define DISPATCHER_END
#endif
/*=*/
#define VYEARS "2022"
#define AUTHOR "Stefan Blixth"
#define EMAIL "stefan@onyxsoft.se"
#define URL "www.onyxsoft.se"
#define COMPANY "OnyxSoft"
#define COPYRIGHT "© " VYEARS " " AUTHOR ", " COMPANY
#define VERSION "1"
#define REVISION "0"
#ifndef __AMIGADATE__
#define __AMIGADATE__ "16.06.22"
#endif
#define DATE __AMIGADATE__
#define NAME "SvTX"
#define VERS "SvTX "VERSION"."REVISION
#define BASE "SVTX"
#if defined (__MORPHOS__)
#define VERSSHORT VERSION"."REVISION" [MorphOS, PowerPC]"
#elif defined (__AROS__)
#define VERSSHORT VERSION"."REVISION" [AROS, x86]"
#elif defined (__amigaos4__)
#define VERSSHORT VERSION"."REVISION" [AmigaOS, PowerPC]"
#else
#define VERSSHORT VERSION"."REVISION" [AmigaOS, 68k]"
#endif
#define VSTRING VERS" ("DATE") © "VYEARS " " AUTHOR ", " COMPANY
#define VERSTAG "$VER:" VSTRING
#define VERSTAG_MUI "$VER: "VERS " ("DATE")"
#define VERSTAG_SCREEN VERS " ("DATE") "
#define ABOUT "SvTX is little Teletext-viewer for the Swedish SVT Text-service.\n\nAuthor : "AUTHOR " ("EMAIL")\nVersion : "VERSSHORT"\n\n\33c"URL"\n\n\33c©Copyright "VYEARS " " COMPANY
static const char version[] = VERSTAG;
#ifndef MAKE_ID
#define MAKE_ID(a,b,c,d) ((ULONG) (a)<<24 | (ULONG) (b)<<16 | (ULONG) (c)<<8 | (ULONG) (d))
#endif
/* Global variables... */
static Object *app = NULL; // MUI-Application object
static Object *win = NULL; // MUI-Window object
static Object *gau_info = NULL; // Info-Gauge
static Object *render_obj = NULL; // Render object
static Object *cyc_index = NULL; // Cycle-gadget
static Object *but_prev = NULL; // Button
static Object *but_next = NULL; // Button
static Object *str_page = NULL; // String
static Object *grp_status = NULL; // Group object
// Enumerated Objects...
enum
{
ID_MENU_ABOUT = 1,
ID_MENU_ICONIFY,
ID_MENU_QUIT,
ID_MENU_SNAPSHOT,
ID_MENU_UNSNAPSHOT,
ID_MENU_PREFERENCES,
ID_MENU_MUISETTINGS,
ID_STR_PAGE,
ID_BUT_PREV,
ID_BUT_NEXT,
ID_CYC_INDEX,
};
static char *cycle_index[] =
{
"\33bInnehåll...",
"\33l100 - Nyheter",
"\33l200 - Ekonomi",
"\33l300 - Sport",
"\33l330 - Resultatbörsen",
"\33l377 - Målservice",
"\33l400 - Väder",
"\33l500 - Blandat",
"\33l600 - På TV",
"\33l700 - Innehåll",
"\33l800 - UR",
NULL,
};
LinkedList llData;
extern struct MapData *iMap;
// Prototypes...
void OpenPageLink(WORD);
void SetGaugeStatus(char *);
#endif // __MAIN_H__