home *** CD-ROM | disk | FTP | other *** search
- /*
- blwin.c 3/11/88
-
- % Blank window object
- used for unsaved default window etc.
- By Ted.
-
- OWL 1.1
- Copyright (c) 1988, by Oakland Group, Inc.
- ALL RIGHTS RESERVED.
-
- Revision History:
- -----------------
- 6/16/88 Ted revised to have inheritance and class factory functions.
- 8/09/88 jmd revised to use new object stuff
- 9/12/88 jmd Added in and out data to objects
- 11/20/88 jmd Added ID to obj struct
- 3/13/89 ted fixed bug: put color in emsgdata for paint/clear.
-
- 8/12/89 jmd added WHO message
- */
-
- #include "oakhead.h"
- #include "disppriv.h"
- #include "winod.h"
- /* -------------------------------------------------------------------------- */
-
- int blwin_Class(objdata, msg, indata, outdata)
- VOID *objdata; /* object instance data pointer */
- int msg; /* message */
- VOID *indata; /* message input data */
- VOID *outdata; /* message output data */
- /*
- blank window object dispatch function
- */
- {
- blwin_od *blwd;
- ptd_struct *ptd;
- opixval blcolor;
- int rval;
-
- blwd = (blwin_od *) objdata;
-
- switch(msg) {
- case OBJM_GETDATASIZE:
- ((ogds_struct *) outdata)->odsize = sizeof(blwin_od);
- ((ogds_struct *) outdata)->xdsize = sizeof(blwin_xd);
- ((ogds_struct *) outdata)->id = ID_BLWIN;
- break;
-
- case OBJM_OPEN:
- /* Send OPEN msg to win superclass */
- rval = win_DoRaw(&(blwd->wd), msg, indata, outdata);
-
- /* Override default: allow any pix size for pmwin's */
- win_SetCharSize(blwinod_GetSelf(blwd), FALSE);
-
- return(rval);
-
- case OBJM_WHO:
- /* Identify ourselves */
- if (*((int *) indata) == ID_BLWIN) {
- return(TRUE);
- }
- return(win_DoRaw(&(blwd->wd), msg, indata, outdata));
-
- case WINM_SCROLL:
- break; /* don't bother scrolling- it's blank anyway */
-
- case WINM_PAINT:
- ptd = (ptd_struct *)indata;
-
- msg = WINM_CLEAR; /* to paint, just let the window clear itself */
- blcolor = win_GetBgColor(blwinod_GetSelf(blwd));
- ptd->emsgdata = (VOID *) &blcolor;
- /* no break; fall through to win class */
- default:
- return(win_DoRaw(&(blwd->wd), msg, indata, outdata));
- }
- return(TRUE);
- }
- /* -------------------------------------------------------------------------- */
-
-