00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef _STRUCT_H_
00023 #define _STRUCT_H_
00024
00025 #if defined(__BEOS__)
00026 #include <inttypes.h>
00027 #else
00028 #include <stdint.h>
00029 #endif
00030
00031 #include "const.h"
00032
00033
00034
00035 typedef uint8_t byte;
00036 typedef uint16_t word;
00037 typedef uint32_t dword;
00038
00039 typedef void (* fonction_action) (void);
00040 typedef void (* fonction_afficheur) (word,word,byte);
00041 typedef byte (* fonction_lecteur) (word,word);
00042 typedef void (* fonction_effaceur) (byte);
00043 typedef void (* fonction_display) (word,word,word);
00044 typedef byte (* fonction_effet) (word,word,byte);
00045 typedef void (* fonction_block) (word,word,word,word,byte);
00046 typedef byte (* fonction_test_sign) (void);
00047 typedef void (* fonction_Ligne_XOR) (word,word,word);
00048 typedef void (* fonction_display_brush_Color) (word,word,word,word,word,word,byte,word);
00049 typedef void (* fonction_display_brush_Mono) (word,word,word,word,word,word,byte,byte,word);
00050 typedef void (* fonction_degrade) (long,short,short);
00051 typedef void (* fonction_remap) (word,word,word,word,byte *);
00052 typedef void (* fonction_procsline) (word,word,word,byte *);
00053 typedef void (* fonction_display_zoom) (word,word,word,byte *);
00054 typedef void (* fonction_display_brush_Color_zoom) (word,word,word,word,word,word,byte,word,byte *);
00055 typedef void (* fonction_display_brush_Mono_zoom) (word,word,word,word,word,word,byte,byte,word,byte *);
00056 typedef void (* fonction_affiche_brosse) (byte *,word,word,word,word,word,word,byte,word);
00057
00058 struct __attribute__ ((__packed__)) Composantes
00059 {
00060 byte R;
00061 byte V;
00062 byte B;
00063 };
00064 typedef struct Composantes T_Palette[256];
00065
00066
00067
00068 struct Fenetre_Bouton_normal
00069 {
00070 short Numero;
00071 word Pos_X;
00072 word Pos_Y;
00073 word Largeur;
00074 word Hauteur;
00075 byte Clickable;
00076 byte Repetable;
00077 word Raccourci;
00078 struct Fenetre_Bouton_normal * Next;
00079 };
00080
00081 struct Fenetre_Bouton_palette
00082 {
00083 short Numero;
00084 word Pos_X;
00085 word Pos_Y;
00086 struct Fenetre_Bouton_palette * Next;
00087 };
00088
00089 struct Fenetre_Bouton_scroller
00090 {
00091 short Numero;
00092 word Pos_X;
00093 word Pos_Y;
00094 word Hauteur;
00095 word Nb_elements;
00096 word Nb_visibles;
00097 word Position;
00098 word Hauteur_curseur;
00099 struct Fenetre_Bouton_scroller * Next;
00100 };
00101
00102 struct Fenetre_Bouton_special
00103 {
00104 short Numero;
00105 word Pos_X;
00106 word Pos_Y;
00107 word Largeur;
00108 word Hauteur;
00109 struct Fenetre_Bouton_special * Next;
00110 };
00111
00112 struct Bouton_dropdown_choix
00113 {
00114 short Numero;
00115 const char * Libelle;
00116 struct Bouton_dropdown_choix * Next;
00117 };
00118
00119 struct Fenetre_Bouton_dropdown
00120 {
00121 short Numero;
00122 word Pos_X;
00123 word Pos_Y;
00124 word Largeur;
00125 word Hauteur;
00126 byte Affiche_choix;
00127 byte Affiche_centre;
00128 byte Affiche_fleche;
00129 byte Bouton_actif;
00130 word Largeur_choix;
00131 struct Bouton_dropdown_choix * Premier_choix;
00132 struct Fenetre_Bouton_dropdown * Next;
00133 };
00134
00135
00136 struct T_Drive
00137 {
00138 char Lettre;
00139 byte Type;
00140 char *Chemin;
00141 };
00142
00143
00144
00145 struct Element_de_liste_de_fileselect
00146 {
00147 char NomAbrege[13];
00148 char NomComplet[256];
00149 byte Type;
00150
00151
00152 struct Element_de_liste_de_fileselect * Suivant;
00153 struct Element_de_liste_de_fileselect * Precedent;
00154 };
00155
00156 typedef struct {
00157 char type;
00158 char * texte;
00159 int valeur;
00160 } T_TABLEAIDE;
00161
00162
00163 struct Section_d_aide
00164 {
00165 const T_TABLEAIDE* Table_aide;
00166 word Nombre_de_lignes;
00167 };
00168
00169
00170 struct T_Degrade_Tableau
00171 {
00172 byte Debut;
00173 byte Fin;
00174 dword Inverse;
00175 dword Melange;
00176 dword Technique;
00177 } __attribute__((__packed__));
00178
00179
00180 struct T_Shade
00181 {
00182 word Liste[512];
00183 byte Pas;
00184 byte Mode;
00185 };
00186
00187
00188
00189
00190
00191 struct Config_Mode_video
00192 {
00193 byte Etat;
00194 word Largeur;
00195 word Hauteur;
00196 } __attribute__((__packed__));
00197
00198 struct Config_Header
00199 {
00200 char Signature[3];
00201 byte Version1;
00202 byte Version2;
00203 byte Beta1;
00204 byte Beta2;
00205 } __attribute__((__packed__));
00206
00207 struct Config_Chunk
00208 {
00209 byte Numero;
00210 word Taille;
00211 } __attribute__((__packed__));
00212
00213 struct Config_Infos_touche
00214 {
00215 word Numero;
00216 word Touche;
00217 word Touche2;
00218 } __attribute__((__packed__));
00219
00220
00221
00222
00223
00224
00225
00226
00227
00228
00229 typedef struct
00230 {
00231 byte * Image;
00232 int Largeur;
00233 int Hauteur;
00234 T_Palette Palette;
00235
00236 char Commentaire[TAILLE_COMMENTAIRE+1];
00237
00238 char Repertoire_fichier[TAILLE_CHEMIN_FICHIER];
00239 char Nom_fichier[TAILLE_CHEMIN_FICHIER];
00240 byte Format_fichier;
00241
00242
00243
00244
00245
00246
00247
00248
00249
00250
00251
00252
00253
00254
00255
00256
00257
00258
00259 } S_Page;
00260
00261 typedef struct
00262 {
00263 int Taille_liste;
00264 int Nb_pages_allouees;
00265 S_Page * Pages;
00266 } S_Liste_de_pages;
00267
00268
00269
00270 #endif