2 Situare - A location system for Facebook
3 Copyright (C) 2010 Ixonos Plc. Authors:
5 Henri Lampela - henri.lampela@ixonos.com
7 Situare is free software; you can redistribute it and/or
8 modify it under the terms of the GNU General Public License
9 version 2 as published by the Free Software Foundation.
11 Situare is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with Situare; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
25 #include <QApplication>
28 * @brief Application class is a subclass of QApplication
30 * This class handles X11 events
32 class Application : public QApplication
40 * @param argc number of arguments
41 * @param argv arguments
43 Application(int &argc, char **argv);
45 /*******************************************************************************
46 * MEMBER FUNCTIONS AND SLOTS
47 ******************************************************************************/
50 * @brief Registers window
52 * @param wId window id
54 void registerWindow(WId wId);
57 * @brief Unregisters window
59 * @param wId window id
61 void unregisterWindow(WId wId);
65 * @brief Return active window
67 * @param display display
68 * @param rootWindow rootwindow
69 * @return WId window id
71 WId activeDesktopWindow(Display *display, WId rootWindow);
74 * @brief Event filter for window
76 * @param event window event
77 * @return bool Return true if you want to stop the event from being processed.
78 * Return false for normal event dispatching
80 bool x11EventFilter(XEvent *event);
82 /*******************************************************************************
84 ******************************************************************************/
87 * @brief Signal is emitted when full screen button must be invoked and it's hiding timer
90 * Signal is emitted when user interacts with keyboard or with mouse/finger, or when the
91 * main window is exposed.
93 void showFullScreenButton();
96 * @brief Emitted when topmost window is changed
98 * @param mainWindowIsTopmost True if MainWindow is the topmost window
100 void topmostWindowChanged(bool mainWindowIsTopmost);
102 /*******************************************************************************
104 ******************************************************************************/
106 bool m_topmost; ///< Flag for topmost
108 QList<WId> m_windows; ///< List of window ids
111 #endif // APPLICATION_H