1998-05-20 14:01:55 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2001-10-19 18:29:32 +00:00
|
|
|
// Name: wx/gtk/app.h
|
2009-02-04 17:42:28 +00:00
|
|
|
// Purpose: wxApp definition for wxGTK
|
1998-05-20 14:01:55 +00:00
|
|
|
// Author: Robert Roebling
|
1998-10-26 10:56:58 +00:00
|
|
|
// Id: $Id$
|
1998-10-24 17:12:05 +00:00
|
|
|
// Copyright: (c) 1998 Robert Roebling, Julian Smart
|
2004-05-23 20:53:33 +00:00
|
|
|
// Licence: wxWindows licence
|
1998-05-20 14:01:55 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2006-08-26 18:36:19 +00:00
|
|
|
#ifndef _WX_GTK_APP_H_
|
|
|
|
#define _WX_GTK_APP_H_
|
1998-05-20 14:01:55 +00:00
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// classes
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
2009-09-24 12:36:34 +00:00
|
|
|
#if wxUSE_LIBHILDON || wxUSE_LIBHILDON2
|
2007-11-12 00:25:09 +00:00
|
|
|
typedef struct _HildonProgram HildonProgram;
|
2009-09-24 12:36:34 +00:00
|
|
|
#endif // wxUSE_LIBHILDON || wxUSE_LIBHILDON2
|
2007-11-12 00:25:09 +00:00
|
|
|
|
1998-05-20 14:01:55 +00:00
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// wxApp
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
2005-08-02 22:58:06 +00:00
|
|
|
class WXDLLIMPEXP_CORE wxApp: public wxAppBase
|
1998-05-20 14:01:55 +00:00
|
|
|
{
|
1999-07-06 00:44:26 +00:00
|
|
|
public:
|
1999-01-08 20:33:18 +00:00
|
|
|
wxApp();
|
2001-09-28 13:53:55 +00:00
|
|
|
virtual ~wxApp();
|
1998-08-07 15:09:04 +00:00
|
|
|
|
1999-07-06 00:44:26 +00:00
|
|
|
/* override for altering the way wxGTK intializes the GUI
|
|
|
|
* (palette/visual/colorcube). under wxMSW, OnInitGui() does nothing by
|
|
|
|
* default. when overriding this method, the code in it is likely to be
|
|
|
|
* platform dependent, otherwise use OnInit(). */
|
2008-02-27 17:46:14 +00:00
|
|
|
virtual bool SetNativeTheme(const wxString& theme);
|
1999-01-08 20:33:18 +00:00
|
|
|
virtual bool OnInitGui();
|
1999-07-06 00:44:26 +00:00
|
|
|
|
|
|
|
// override base class (pure) virtuals
|
2003-06-24 00:56:19 +00:00
|
|
|
virtual void WakeUpIdle();
|
1998-06-03 19:06:13 +00:00
|
|
|
|
2003-06-30 20:02:05 +00:00
|
|
|
virtual bool Initialize(int& argc, wxChar **argv);
|
2003-06-30 18:43:09 +00:00
|
|
|
virtual void CleanUp();
|
1998-08-07 15:09:04 +00:00
|
|
|
|
2006-08-25 22:48:07 +00:00
|
|
|
virtual void OnAssertFailure(const wxChar *file,
|
|
|
|
int line,
|
|
|
|
const wxChar *func,
|
|
|
|
const wxChar *cond,
|
|
|
|
const wxChar *msg);
|
1999-07-06 00:44:26 +00:00
|
|
|
|
2007-04-15 23:06:45 +00:00
|
|
|
// GTK-specific methods
|
|
|
|
// -------------------
|
|
|
|
|
|
|
|
// this can be overridden to return a specific visual to be used for GTK+
|
|
|
|
// instead of the default one (it's used by wxGLApp)
|
|
|
|
//
|
|
|
|
// must return XVisualInfo pointer (it is not freed by caller)
|
|
|
|
virtual void *GetXVisualInfo() { return NULL; }
|
|
|
|
|
2009-09-24 12:36:34 +00:00
|
|
|
#if wxUSE_LIBHILDON || wxUSE_LIBHILDON2
|
2007-11-12 00:25:09 +00:00
|
|
|
// Maemo-specific method: get the main program object
|
2009-09-24 12:36:34 +00:00
|
|
|
HildonProgram *GetHildonProgram();
|
|
|
|
#endif // wxUSE_LIBHILDON || wxUSE_LIBHILDON2
|
2007-04-15 23:06:45 +00:00
|
|
|
|
|
|
|
// implementation only from now on
|
|
|
|
// -------------------------------
|
|
|
|
|
2007-04-19 16:58:07 +00:00
|
|
|
// check for pending events, without interference from our idle source
|
|
|
|
bool EventsPending();
|
|
|
|
bool DoIdle();
|
|
|
|
|
1999-07-06 00:44:26 +00:00
|
|
|
private:
|
2001-07-11 15:19:32 +00:00
|
|
|
// true if we're inside an assert modal dialog
|
|
|
|
bool m_isInAssert;
|
2009-03-21 23:36:37 +00:00
|
|
|
|
2007-04-19 16:58:07 +00:00
|
|
|
#if wxUSE_THREADS
|
2009-10-13 15:40:35 +00:00
|
|
|
wxMutex m_idleMutex;
|
2007-04-19 16:58:07 +00:00
|
|
|
#endif
|
2011-09-07 16:56:50 +00:00
|
|
|
unsigned m_idleSourceId;
|
1999-07-06 00:44:26 +00:00
|
|
|
|
2009-09-24 12:36:34 +00:00
|
|
|
#if wxUSE_LIBHILDON || wxUSE_LIBHILDON2
|
2007-11-12 00:25:09 +00:00
|
|
|
HildonProgram *m_hildonProgram;
|
2009-09-24 12:36:34 +00:00
|
|
|
#endif // wxUSE_LIBHILDON || wxUSE_LIBHILDON2
|
2007-11-12 00:25:09 +00:00
|
|
|
|
1999-08-24 20:26:06 +00:00
|
|
|
DECLARE_DYNAMIC_CLASS(wxApp)
|
1998-05-20 14:01:55 +00:00
|
|
|
};
|
|
|
|
|
2006-08-26 18:36:19 +00:00
|
|
|
#endif // _WX_GTK_APP_H_
|