Added DefaultWindowShapeFunc. Calls WDM_WINDOWSHAPE.
[tangerine.git] / workbench / utilities / Presenter / presenter.c
blob27c24b789f5c8af968d0ce4d49753a0db6b341b9
1 /*
2 Copyright © 2003-2004, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #define MUIMASTER_YES_INLINE_STDARG
8 #include <proto/intuition.h>
9 #include <proto/muimaster.h>
10 #include <proto/diskfont.h>
11 #include <proto/utility.h>
12 #include <graphics/text.h>
13 #include <libraries/mui.h>
14 #include <zune/customclasses.h>
16 #include "presentation.h"
17 #include "presenter.h"
19 /*** Instance data **********************************************************/
20 struct Presenter_DATA
22 Object *pd_Window;
25 /*** Macros *****************************************************************/
26 #define SETUP_INST_DATA struct Presenter_DATA *data = INST_DATA(CLASS, self)
28 /*** Methods ****************************************************************/
29 Object *Presenter__OM_NEW
31 Class *CLASS, Object *self, struct opSet *message
34 Object *window;
36 self = (Object *) DoSuperNewTags
38 CLASS, self, NULL,
40 SubWindow, (IPTR) (window = WindowObject,
41 MUIA_Window_Title, (IPTR) "Presenter",
42 MUIA_Window_Activate, TRUE,
43 MUIA_Window_Width, 800,
44 MUIA_Window_Height, 600,
46 WindowContents, (IPTR) (PresentationObject,
47 End),
48 End),
50 TAG_MORE, (IPTR) message->ops_AttrList
53 if (self != NULL)
55 SETUP_INST_DATA;
57 /* Store instance data ---------------------------------------------*/
58 data->pd_Window = window;
60 /* Setup notifications ---------------------------------------------*/
61 DoMethod
63 window, MUIM_Notify, MUIA_Window_CloseRequest, TRUE,
64 (IPTR) self, 2, MUIM_Application_ReturnID, MUIV_Application_ReturnID_Quit
68 return self;
71 IPTR Presenter__MUIM_Application_Execute
73 Class *CLASS, Object *self, Msg message
76 SETUP_INST_DATA;
78 SET(data->pd_Window, MUIA_Window_Open, TRUE);
79 DoSuperMethodA(CLASS, self, message);
80 SET(data->pd_Window, MUIA_Window_Open, FALSE);
82 return TRUE;
85 /*** Setup ******************************************************************/
86 ZUNE_CUSTOMCLASS_2
88 Presenter, NULL, MUIC_Application, NULL,
89 OM_NEW, struct opSet *,
90 MUIM_Application_Execute, Msg