home *** CD-ROM | disk | FTP | other *** search
- /*
- demofram.c
-
- Copyright (c) 1988, by Oakland Group, Inc.
- ALL RIGHTS RESERVED.
-
- Example using the framer menuing system.
-
- All of the menu choices call the function 'empty' defined below.
- */
-
- #include <stdio.h>
-
- #include <cscape.h>
- #include <popdecl.h>
- #include <framer.h>
-
- /*** Note: C-scape uses the _arg macro to turn off prototyping
- for older compilers */
-
- int empty(_arg2(VOID *, int));
-
- struct frame_def test_frame[] = { /* note: values must be positive */
- { "Help!", empty, 0 },
- { "Help!", empty, 1 },
- { "The night before", empty, 2 },
- { "You've got to hide your love away", empty, 3 },
- { "I need you", empty, 4 },
- { "Another girl", empty, 5 },
- { "You're going to lose that girl", empty, 6 },
- { "Ticket to ride", empty, 7 },
- { "Act naturally", empty, 8 },
- { "It's only love", empty, 9 },
- { "You like me too much", empty, 10 },
- { "Tell me what you see", empty, 11 },
- { "I've just seen a face", empty, 12 },
- { "Yesterday", empty, 13 },
- { "Dizzy miss lizzie", empty, 14 },
- { FRAME_END },
- { "Rubber Soul", empty, 20 },
- { "Drive my car", empty, 21 },
- { "Norwegian wood", empty, 22 },
- { "You won't see me", empty, 23 },
- { "Nowhere man", empty, 24 },
- { "Think for yourself", empty, 25 },
- { "The word", empty, 26 },
- { "Michelle", empty, 27 },
- { "What goes on", empty, 28 },
- { "Girl", empty, 29 },
- { "I'm looking through you", empty, 30 },
- { "In my life", empty, 31 },
- { "Wait", empty, 32 },
- { "If I needed someone", empty, 33 },
- { "Run for your life", empty, 34 },
- { FRAME_END },
- { "Revolver", empty, 40 },
- { "Taxman", empty, 41 },
- { "Eleanor rigby", empty, 42 },
- { "I'm only sleeping", empty, 43 },
- { "Love you to", empty, 44 },
- { "Here, there and everywhere", empty, 45 },
- { "Yellow submarine", empty, 46 },
- { "She said she said", empty, 47 },
- { "Good day sunshine", empty, 48 },
- { "And your bird can sing", empty, 49 },
- { "For no one", empty, 50 },
- { "Doctor robert", empty, 51 },
- { "I want to tell you", empty, 52 },
- { "Got to get you into my life", empty, 53 },
- { "Tomorrow never knows", empty, 54 },
- { FRAME_END },
- { "Sgt. Pepper's Lonely Hearts Club Band", empty, 60 },
- { "Sgt. pepper's lonely hearts club band", empty, 61 },
- { "With a little help from my friends", empty, 62 },
- { "Lucy in the sky with diamonds", empty, 63 },
- { "Getting better", empty, 64 },
- { "Fixing a hole", empty, 65 },
- { "She's leaving home", empty, 66 },
- { "Being for the benefit of mr. kite", empty, 67 },
- { "Within you without you", empty, 68 },
- { "When I'm sixty-four", empty, 69 },
- { "Lovely rita", empty, 70 },
- { "Good morning good morning", empty, 71 },
- { "Sgt. pepper's lonely hearts club band (reprise)", empty, 72 },
- { "A day in the life", empty, 73 },
- { FRAME_END },
- { FRAME_END }
- };
-
- void main()
- {
- sed_type frame;
-
- /* Initialize the display */
- disp_Init(def_ModeText, NULL);
-
- frame = frame_Open(test_frame, bd_1, '\x70', '\x07', '\x70');
- frame_Repaint(frame);
-
- /* get a keystroke */
- kb_Read();
-
- frame_Go(frame, (char) ' ', NULL);
- frame_Close(frame);
-
- /* Close down the display interface */
- disp_Close();
- }
-
- int empty(sdata, idata)
- VOID *sdata;
- int idata;
- /*
- A user supplied function...
- */
- {
- char msg[80];
-
- sprintf(msg, "This is message number %d\n", idata);
-
- pop_Prompt(msg, -1, -1, -1, -1, '\x70', bd_2);
-
- /* return 0 to return to menuing system */
- /* return positive value to exit menuing system */
-
- return(0);
- }
-
-
-