# dont perform the libgen and libsocket test in configure for AROS.
[AROS-Contrib.git] / fish / surf / menudef.c
blobf822d8541e04473beca3fca49cfed3d33bcb4b4f
1 #include <aros/oldprograms.h>
2 #include <stdio.h>
3 #include <exec/types.h>
4 #include <exec/memory.h>
5 #include <intuition/intuition.h>
6 #include <graphics/gfxmacros.h>
7 #ifdef MANX
8 #include <functions.h>
9 #endif
10 #include "scrnio.h"
11 #include "menudef.h"
13 #include "scrndef.h"
14 #include "poly.h"
15 #include "readilbm.h"
17 #define Selected(ax) ((ax).Flags & CHECKED)
19 #include "menu_color.c"
20 #include "menu_scrn.c"
21 #include "menu_image.c"
22 #include "menu_files.c"
24 struct Menu menu[] ={
25 { &menu[1], /* next menu */
26 8, 0, /* x, y */
27 6*8, 10, /* w,h */
28 MENUENABLED,
29 (BYTE *)"File",
30 fileitems,
31 0,0,0,0
33 { &menu[2], /* next menu */
34 7*8, 0, /* x, y */
35 6*8, 10, /* w,h */
36 MENUENABLED,
37 (BYTE *)"Color",
38 coloritems,
39 0,0,0,0
41 { &menu[3], /* next menu */
42 14*8,0, /* x, y */
43 7*8, 10, /* w,h */
44 MENUENABLED,
45 (BYTE *)"Screen",
46 scrnitems,
47 0,0,0,0
49 { NULL, /* next menu */
50 22*8,0, /* x, y */
51 6*8, 10, /* w,h */
52 MENUENABLED,
53 (BYTE *)"Image",
54 imageitems,
55 0,0,0,0
61 void MenuHandler(code)
62 USHORT code;
64 if( code == 0xffff ) { /* invalid menu pick */
65 return;
68 switch( MENUNUM(code)) {
69 case 0: /* write ilbm */
70 MenuDoFile(ITEMNUM(code));
71 break;
72 case 1: /* set screen color */
73 MenuSetColMap();
74 break;
75 case 2: /* set screen type */
76 MenuSetScrn();
77 break;
78 case 3: /* set image stuff */
79 MenuSetImage();
80 break;
81 default:
82 break;