summaryrefslogtreecommitdiffstats
path: root/kdecore/kapplication.h
diff options
context:
space:
mode:
Diffstat (limited to 'kdecore/kapplication.h')
-rw-r--r--kdecore/kapplication.h45
1 files changed, 30 insertions, 15 deletions
diff --git a/kdecore/kapplication.h b/kdecore/kapplication.h
index 9558d528e..ee0d48f02 100644
--- a/kdecore/kapplication.h
+++ b/kdecore/kapplication.h
@@ -113,9 +113,11 @@ public:
* This constructor takes aboutData and command line
* arguments from KCmdLineArgs.
*
- * If ARGB (transparent) widgets are to be used in your application,
- * please use KARGBApplication(new object name) or
- * KARGBApplication(new object name, allow_styles) instead of KApplication(...).
+ * If ARGB (transparent) widgets are to be used in your application,
+ * please use
+ * KApplication app(KApplication::openX11RGBADisplay());
+ * or
+ * KApplication app(KApplication::openX11RGBADisplay(), useStyles);
*
* @param allowStyles Set to false to disable the loading on plugin based
* styles. This is only useful to applications that do not display a GUI
@@ -131,6 +133,25 @@ public:
#ifdef Q_WS_X11
/**
* Constructor. Parses command-line arguments. Use this constructor when you
+ * you want ARGB support to be automatically detected and enabled.
+ *
+ * @param display Will be passed to Qt as the X display. The display must be
+ * valid and already opened.
+ *
+ * @param allowStyles Set to false to disable the loading on plugin based
+ * styles. This is only useful to applications that do not display a GUI
+ * normally. If you do create an application with @p allowStyles set to false
+ * that normally runs in the background but under special circumstances
+ * displays widgets call enableStyles() before displaying any widgets.
+ *
+ * @since KDE 3.5
+ *
+ * @see RGBADisplay()
+ */
+ KApplication(Display *display, bool allowStyles);
+
+ /**
+ * Constructor. Parses command-line arguments. Use this constructor when you
* you need to use a non-default visual or colormap.
*
* @param display Will be passed to Qt as the X display. The display must be
@@ -899,19 +920,13 @@ public:
/**
* @internal
- * Opens an X11 display and returns the handle to it
- * @return the X11 display handle
+ * Opens the display
+ * This can be used to initialize a KApplication with RGBA support like this:
+ * KApplication app(KApplication::openX11RGBADisplay());
+ * or
+ * KApplication app(KApplication::openX11RGBADisplay(), useStyles);
*/
- Display *openX11RGBADisplay();
-
- /**
- * @internal
- * Creates a default KApplication with transparency support
- * (if available)
- */
- static KApplication KARGBApplicationObject( bool allowStyles=true );
-
- #define KARGBApplication(objectname, ...) const KApplication &__kapplication_internal_app = KApplication::KARGBApplicationObject(__VA_ARGS__); KApplication &objectname = const_cast<KApplication&>(__kapplication_internal_app);
+ static Display* openX11RGBADisplay();
/**
* Returns the X11 display visual