home *** CD-ROM | disk | FTP | other *** search
- /*
- npwin.c 6/23/88
-
- % Non-painting window object
- used for masking out portions of the screen.
- By Ted.
-
- OWL 1.1
- Copyright (c) 1988, by Oakland Group, Inc.
- ALL RIGHTS RESERVED.
-
- Revision History:
- -----------------
- 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
- 8/12/89 jmd added WHO message
- 8/13/89 ted added WINM_SETSIZE support.
- */
-
- #include "oakhead.h"
- #include "disppriv.h"
- #include "winod.h"
- /* -------------------------------------------------------------------------- */
-
- int npwin_Class(objdata, msg, indata, outdata)
- VOID *objdata; /* object instance data pointer */
- int msg; /* message */
- VOID *indata; /* message input data */
- VOID *outdata; /* message output data */
- /*
- npwin object dispatch function
- Handles no window messages except for GETATTR and SETATTR.
- */
- {
- npwin_od *npwd;
- win_type win;
- int rval;
-
- npwd = (npwin_od *) objdata;
-
- switch(msg) {
-
- case OBJM_GETDATASIZE:
- ((ogds_struct *) outdata)->odsize = sizeof(npwin_od);
- ((ogds_struct *) outdata)->xdsize = sizeof(npwin_xd);
- ((ogds_struct *) outdata)->id = ID_NPWIN;
- break;
-
- case OBJM_OPEN:
- /* Send OPEN to win superclass */
- rval = win_DoRaw(&(npwd->wd), msg, indata, outdata);
-
- /* Override default: allow any pix size for pmwin's */
- win = npwinod_GetSelf(npwd);
- win_SetCharSize(win, FALSE);
-
- return(rval);
-
- case OBJM_WHO:
- /* Identify ourselves */
- if (*((int *) indata) == ID_NPWIN) {
- return(TRUE);
- }
- return(win_DoRaw(&(npwd->wd), msg, indata, outdata));
-
- default:
- /* pass only object messages to win superclass */
- /* also pass the SETFONT message because it is part of the OPEN method */
- if (msg < OBJM_LASTMSG || msg == WINM_SETFONT || msg == WINM_SETSIZE) {
- return(win_DoRaw(&(npwd->wd), msg, indata, outdata));
- }
- }
- return(TRUE);
- }
- /* -------------------------------------------------------------------------- */
-
-