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

  1. /* -*- Mode: C++; tab-width: 4; 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.    Splash.h -- class for dealing with the unix splash screen.
  20.    Created: Chris Toshok <toshok@netscape.com>, 21-Dec-1996.
  21.  */
  22.  
  23.  
  24.  
  25. #ifndef _xfe_splash_h
  26. #define _xfe_splash_h
  27.  
  28. #include "structs.h"
  29. #include "xp_core.h"
  30. #include "Component.h"
  31. #include "prmon.h"
  32. #include "prthread.h"
  33. #ifndef NSPR20
  34. #include "prevent.h"
  35. #else
  36. #include "plevent.h"
  37. #endif
  38. #include "xfe.h"
  39. #include "icons.h"
  40.  
  41. typedef struct XFE_SplashEvent XFE_SplashEvent;
  42.  
  43. class XFE_Splash : public XFE_Component
  44. {
  45. public:
  46.   XFE_Splash(Widget toplevel);
  47.   virtual ~XFE_Splash();
  48.  
  49.   virtual void show();
  50.   virtual void hide();
  51.  
  52.   void waitForExpose();
  53.  
  54.   PRMonitor *getEventMonitor();
  55.   PRMonitor *getStopMonitor();
  56.   PREventQueue *getEventQueue();
  57.   PRThread *getThread();
  58.  
  59.   void setStatus(char *text);
  60.  
  61.   static void update_text_handler(XFE_SplashEvent *event);
  62.   static void update_text_destructor(XFE_SplashEvent *event);
  63.  
  64.   int m_done;
  65.  
  66. private:
  67.   Widget m_shell;
  68.   Widget m_rc;
  69.   Widget m_splashlabel;
  70.   Widget m_statuslabel;
  71.   MWContext *m_context;
  72.  
  73.   static fe_icon splash_icon;
  74.  
  75.   PRThread *m_thread;
  76.   PREventQueue *m_eventqueue;
  77.   PRMonitor *m_eventmonitor;
  78.   PRMonitor *m_exposemonitor;
  79.   PRMonitor *m_stopmonitor;
  80.  
  81.   void splashExpose();
  82.   static void splashExpose_eh(Widget, XtPointer, XEvent *, Boolean *);
  83.  
  84.   void splashThreadProc();
  85. #ifndef NSPR20
  86.   static void splashThreadProc(void *, void*);
  87. #else
  88.   static void splashThreadProc(void *);
  89. #endif /* NSPR20 */
  90. };
  91.  
  92.  
  93. extern "C" void fe_splashStart(Widget toplevel);
  94. extern "C" void fe_splashUpdateText(char *text);
  95. extern "C" void fe_splashStop();
  96.  
  97. #endif /* _xfe_splash_h */
  98.