home *** CD-ROM | disk | FTP | other *** search
- /*
- pmwinimo.c 12/12/88
-
- % Window Request handler function for use by mouse borders & maybe others.
- By Ted.
-
- OWL 1.1
- Copyright (c) 1988, by Oakland Group, Inc.
- ALL RIGHTS RESERVED.
-
- Revision History:
- -----------------
- 5/19/89 jmd removed static for silly UNIX compiler
- 8/11/89 jmd reconstructed init function
- */
-
- #include "oakhead.h"
- #include "disppriv.h"
- #include "pmwinod.h"
- #include "pmwinobj.h"
- #include "bordobj.h"
-
- OSTATIC objreq_func (pmwinreq_mouse);
-
- /* -------------------------------------------------------------------------- */
-
- void pmwin_MouseInit()
- /*
- Attach mouse handling function to pmwin_Class
- */
- {
- pmwinreq_mousefptr = pmwinreq_mouse;
-
- win_MouseInit();
- }
-
- /* -------------------------------------------------------------------------- */
-
- static int pmwinreq_mouse(objdata, msg, indata, outdata)
- VOID *objdata;
- int msg; /* message */
- VOID *indata; /* message input data */
- VOID *outdata; /* message output data */
- {
- pmwin_od *pmwd;
- win_type win;
- opcoord nx, ny;
-
- /* outdata not used in this function */ oak_notused(outdata);
-
- pmwd = (pmwin_od *) objdata;
-
- switch(msg) {
- case WINM_SCROLLREQ:
- win = pmwinod_GetSelf(pmwd);
- nx = ((opoint *)indata)->x;
- ny = ((opoint *)indata)->y;
- pmwd->xoffs += nx;
- pmwd->yoffs += ny;
-
- win_ScrollPix(win, nx, ny);
-
- bord_SendMsg(win, BDM_SCROLL, NULL, NULL);
- break;
- }
- return(TRUE);
- }
- /* -------------------------------------------------------------------------- */
-
-