home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / xfe / scroller.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  2.2 KB  |  67 lines

  1. /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  2.  *
  3.  * The contents of this file are subject to the Netscape Public License
  4.  * Version 1.0 (the "NPL"); you may not use this file except in
  5.  * compliance with the NPL.  You may obtain a copy of the NPL at
  6.  * http://www.mozilla.org/NPL/
  7.  *
  8.  * Software distributed under the NPL is distributed on an "AS IS" basis,
  9.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
  10.  * for the specific language governing rights and limitations under the
  11.  * NPL.
  12.  *
  13.  * The Initial Developer of this code under the NPL is Netscape
  14.  * Communications Corporation.  Portions created by Netscape are
  15.  * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
  16.  * Reserved.
  17.  */
  18. /* 
  19.    scroller.c --- defines a subclass of XmScrolledWindow
  20.    Created: Jamie Zawinski <jwz@netscape.com>, 23-Jul-94.
  21.  */
  22.  
  23.  
  24. #ifndef _FE_SCROLLER_H_
  25. #define _FE_SCROLLER_H_
  26.  
  27. #include <Xm/Xm.h>
  28.  
  29. #if XmVersion >= 2000
  30.  
  31. /*
  32.  * There is a backward compatibility bug in motif 2.0 that prevents
  33.  * the XmScrolledWindow class from behaving just as the motif 1.2
  34.  * one.  For whatever reasons, the mozilla scrolling code depends on
  35.  * the 1.2 behavior.  Fixing the problem in Mozilla should not be
  36.  * hard.  The logic in scroll.c should probably be updated to work
  37.  * with both motif 1.2 and 2.0.
  38.  *
  39.  * The current hackery solution (yes its disgusting) is to use the
  40.  * XmScrolledWindow code from 1.2.  In defense of Netscape:  The only
  41.  * reason whay such a sickening solution was used, was to make the
  42.  * free mozilla date with building motif 2.0 code.
  43.  *
  44.  * -ramiro
  45.  *
  46.  */
  47. #ifdef FEATURE_MOTIF20_SCROLLED_WINDOW_HACKING
  48. #include <XmPatches/HackedW.h>
  49. #define SCROLLER_SET_AREAS XmHackedWindowSetAreas
  50. #else
  51. #include <Xm/ScrolledW.h>
  52. #define SCROLLER_SET_AREAS XmScrolledWindowSetAreas
  53. #endif /* FEATURE_MOTIF20_SCROLLED_WINDOW_HACKING */
  54.  
  55. #else
  56. #include <Xm/ScrolledW.h>
  57. #define SCROLLER_SET_AREAS XmScrolledWindowSetAreas
  58.  
  59. #endif /* XmVersion >= 2000 */
  60.  
  61. extern WidgetClass scrollerClass;
  62. typedef struct _ScrollerClassRec *ScrollerClass;
  63. typedef struct _ScrollerRec      *Scroller;
  64.  
  65.  
  66. #endif /* _FE_SCROLLER_H_ */
  67.