2012-04-29 00:46:36 +02:00
|
|
|
/****************************************************************************
|
2018-09-17 01:23:45 +02:00
|
|
|
* apps/include/graphics/nxwm/cnxtaskbar.hxx
|
2012-04-29 00:46:36 +02:00
|
|
|
*
|
2013-06-04 16:11:45 +02:00
|
|
|
* Copyright (C) 2012-2013 Gregory Nutt. All rights reserved.
|
2012-04-29 00:46:36 +02:00
|
|
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
|
|
|
*
|
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted provided that the following conditions
|
|
|
|
* are met:
|
|
|
|
*
|
|
|
|
* 1. Redistributions of source code must retain the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer.
|
|
|
|
* 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer in
|
|
|
|
* the documentation and/or other materials provided with the
|
|
|
|
* distribution.
|
|
|
|
* 3. Neither the name NuttX, NxWidgets, nor the names of its contributors
|
|
|
|
* me be used to endorse or promote products derived from this software
|
|
|
|
* without specific prior written permission.
|
|
|
|
*
|
|
|
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
|
|
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
|
|
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
|
|
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
|
|
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
|
|
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
|
|
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
|
|
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
|
|
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
|
|
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
|
* POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
2012-04-30 03:21:26 +02:00
|
|
|
#ifndef __NXWM_INCLUDE_CTASKBAR_HXX
|
|
|
|
#define __NXWM_INCLUDE_CTASKBAR_HXX
|
2012-04-29 00:46:36 +02:00
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Included Files
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
#include <nuttx/config.h>
|
|
|
|
|
2018-09-17 01:23:45 +02:00
|
|
|
#include "graphics/nxwidgets/nxconfig.hxx"
|
|
|
|
#include "graphics/nxwidgets/tnxarray.hxx"
|
|
|
|
#include "graphics/nxwidgets/cnxwindow.hxx"
|
|
|
|
#include "graphics/nxwidgets/cnxserver.hxx"
|
|
|
|
#include "graphics/nxwidgets/cwidgeteventhandler.hxx"
|
|
|
|
#include "graphics/nxwidgets/cwidgeteventargs.hxx"
|
2012-04-30 03:21:26 +02:00
|
|
|
|
2018-09-17 01:23:45 +02:00
|
|
|
#include "graphics/nxwm/nxwmconfig.hxx"
|
|
|
|
#include "graphics/nxwm/nxwmglyphs.hxx"
|
2012-05-09 21:31:48 +02:00
|
|
|
|
2018-09-17 01:23:45 +02:00
|
|
|
#include "graphics/nxwm/capplicationwindow.hxx"
|
|
|
|
#include "graphics/nxwm/cfullscreenwindow.hxx"
|
|
|
|
#include "graphics/nxwm/iapplication.hxx"
|
2012-04-29 00:46:36 +02:00
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Pre-processor Definitions
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Implementation Class Definition
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
#if defined(__cplusplus)
|
|
|
|
|
|
|
|
namespace NxWM
|
|
|
|
{
|
|
|
|
/**
|
2012-04-30 22:38:44 +02:00
|
|
|
* This class describes the NX window manager's task bar. That task bar is,
|
|
|
|
* of course, used to dock active applications. But in NxWM, it is also
|
|
|
|
* the heart of the window manager: It inherits for CNxServer and, hence,
|
|
|
|
* represents the NX server itself. It also then serves as the NxWM
|
|
|
|
* window factory.
|
|
|
|
*
|
|
|
|
* Why do it this way? The only reason is so that if you have an instance
|
|
|
|
* of CTaskbar, you have everything you need to manage new applications.
|
|
|
|
* It might have been a better decision to separate the window factory into
|
|
|
|
* a separate class instead of making the task bar of such central importance
|
|
|
|
* (and I may still do that someday)
|
2012-04-29 00:46:36 +02:00
|
|
|
*/
|
|
|
|
|
2012-05-12 15:50:21 +02:00
|
|
|
class CTaskbar : public NXWidgets::CNxServer,
|
2013-02-08 16:28:07 +01:00
|
|
|
protected NXWidgets::CWidgetEventHandler
|
2012-04-29 00:46:36 +02:00
|
|
|
{
|
2013-02-08 16:28:07 +01:00
|
|
|
protected:
|
2012-04-30 22:38:44 +02:00
|
|
|
/**
|
2012-05-01 00:51:34 +02:00
|
|
|
* This structure represents an application and its associated icon image
|
2012-04-30 22:38:44 +02:00
|
|
|
*/
|
2013-06-04 16:11:45 +02:00
|
|
|
|
2012-04-30 22:38:44 +02:00
|
|
|
struct STaskbarSlot
|
|
|
|
{
|
2013-10-15 22:29:06 +02:00
|
|
|
IApplication *app; /**< A reference to the application */
|
|
|
|
NXWidgets::CImage *image; /**< The icon image for the application */
|
2012-04-30 22:38:44 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Taskbar state
|
|
|
|
*/
|
|
|
|
|
|
|
|
NXWidgets::CNxWindow *m_taskbar; /**< The task bar window */
|
|
|
|
NXWidgets::CNxWindow *m_background; /**< The background window */
|
|
|
|
NXWidgets::CImage *m_backImage; /**< The background image */
|
2012-05-03 00:03:05 +02:00
|
|
|
IApplication *m_topApp; /**< The top application in the hierarchy */
|
2012-04-30 22:38:44 +02:00
|
|
|
TNxArray<struct STaskbarSlot> m_slots; /**< List of application slots in the task bar */
|
2012-05-03 15:29:07 +02:00
|
|
|
bool m_started; /**< True if window manager has been started */
|
2012-04-29 00:46:36 +02:00
|
|
|
|
|
|
|
/**
|
2013-06-04 16:11:45 +02:00
|
|
|
* Create a raw window.
|
2012-04-29 00:46:36 +02:00
|
|
|
*
|
2012-05-19 06:20:56 +02:00
|
|
|
* 1) Create a dumb NXWidgets::CWidgetControl instance (See not).
|
|
|
|
* 2) Pass the dumb NXWidgets::CWindowMessenger instance to the window constructor
|
2012-05-19 01:08:34 +02:00
|
|
|
* that inherits from INxWindow. This will "smarten" the NXWidgets::CWidgetControl
|
2012-04-29 00:46:36 +02:00
|
|
|
* instance with some window knowlede
|
|
|
|
* 3) Call the open() method on the window to display the window.
|
2012-05-19 01:08:34 +02:00
|
|
|
* 4) After that, the fully smartened NXWidgets::CWidgetControl instance can
|
2012-04-29 00:46:36 +02:00
|
|
|
* be used to generate additional widgets by passing it to the
|
|
|
|
* widget constructor
|
2012-05-19 06:20:56 +02:00
|
|
|
*
|
|
|
|
* NOTE: Actually, NxWM uses the CWindowMessenger class that inherits from
|
2012-05-19 17:26:38 +02:00
|
|
|
* CWidgetControl. That class just adds some unrelated messaging capability;
|
|
|
|
* It cohabitates with CWidgetControl only becuase it needs the CWidgetControl
|
2012-05-19 06:20:56 +02:00
|
|
|
* this point.
|
2012-04-29 00:46:36 +02:00
|
|
|
*/
|
|
|
|
|
2012-04-29 16:34:56 +02:00
|
|
|
NXWidgets::CNxWindow *openRawWindow(void);
|
2012-04-29 00:46:36 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Create a framed application window
|
|
|
|
*
|
2012-04-30 03:21:26 +02:00
|
|
|
* This may be used to provide the window parater to the IApplication constructor
|
2012-04-29 00:46:36 +02:00
|
|
|
*
|
|
|
|
* @return A partially initialized application window instance.
|
|
|
|
*/
|
2013-06-04 16:11:45 +02:00
|
|
|
|
2012-04-29 16:34:56 +02:00
|
|
|
NXWidgets::CNxTkWindow *openFramedWindow(void);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Set size and position of a window in the application area.
|
|
|
|
*
|
|
|
|
* @param window. The window to be resized and repositioned
|
2012-05-09 21:31:48 +02:00
|
|
|
* @param fullscreen. True: Use full screen
|
2012-04-29 16:34:56 +02:00
|
|
|
*/
|
|
|
|
|
2012-05-09 21:31:48 +02:00
|
|
|
void setApplicationGeometry(NXWidgets::INxWindow *window, bool fullscreen);
|
2012-04-29 00:46:36 +02:00
|
|
|
|
|
|
|
/**
|
2012-04-30 22:38:44 +02:00
|
|
|
* Create the task bar window.
|
2012-04-29 00:46:36 +02:00
|
|
|
*
|
|
|
|
* @return true on success
|
|
|
|
*/
|
|
|
|
|
2013-02-08 16:28:07 +01:00
|
|
|
virtual bool createTaskbarWindow(void);
|
2012-04-29 00:46:36 +02:00
|
|
|
|
|
|
|
/**
|
2013-06-04 16:11:45 +02:00
|
|
|
* Create the background window.
|
2012-04-29 00:46:36 +02:00
|
|
|
*
|
|
|
|
* @return true on success
|
|
|
|
*/
|
|
|
|
|
2013-02-08 16:28:07 +01:00
|
|
|
virtual bool createBackgroundWindow(void);
|
2012-04-29 00:46:36 +02:00
|
|
|
|
2012-04-30 22:38:44 +02:00
|
|
|
/**
|
2013-06-04 16:11:45 +02:00
|
|
|
* Create the background image.
|
2012-04-30 22:38:44 +02:00
|
|
|
*
|
|
|
|
* @return true on success
|
|
|
|
*/
|
|
|
|
|
2013-02-08 16:28:07 +01:00
|
|
|
virtual bool createBackgroundImage(void);
|
2012-04-30 22:38:44 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* (Re-)draw the task bar window.
|
|
|
|
*
|
|
|
|
* @return true on success
|
|
|
|
*/
|
|
|
|
|
2013-02-08 16:28:07 +01:00
|
|
|
virtual bool redrawTaskbarWindow(void);
|
2012-04-30 22:38:44 +02:00
|
|
|
|
2012-05-02 16:38:54 +02:00
|
|
|
/**
|
|
|
|
* Redraw the window at the top of the heirarchy.
|
|
|
|
*
|
|
|
|
* @return true on success
|
|
|
|
*/
|
|
|
|
|
2013-02-08 16:28:07 +01:00
|
|
|
virtual bool redrawTopApplication(void);
|
2012-05-21 00:10:34 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Raise the top window to the top of the NXheirarchy.
|
|
|
|
*
|
|
|
|
* @return true on success
|
|
|
|
*/
|
|
|
|
|
|
|
|
void raiseTopApplication(void);
|
2012-05-02 16:38:54 +02:00
|
|
|
|
2012-04-30 22:38:44 +02:00
|
|
|
/**
|
|
|
|
* (Re-)draw the background window.
|
|
|
|
*
|
|
|
|
* @return true on success
|
|
|
|
*/
|
|
|
|
|
2013-02-08 16:28:07 +01:00
|
|
|
virtual bool redrawBackgroundWindow(void);
|
2012-04-30 22:38:44 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Redraw the last application in the list of application maintained by
|
|
|
|
* the task bar.
|
|
|
|
*
|
2012-05-02 16:38:54 +02:00
|
|
|
* @param app. The new top application to draw
|
2012-04-30 22:38:44 +02:00
|
|
|
* @return true on success
|
|
|
|
*/
|
|
|
|
|
2012-05-02 16:38:54 +02:00
|
|
|
bool redrawApplicationWindow(IApplication *app);
|
2012-04-30 00:10:52 +02:00
|
|
|
|
2012-05-03 00:03:05 +02:00
|
|
|
/**
|
|
|
|
* The application window is hidden (either it is minimized or it is
|
|
|
|
* maximized, but not at the top of the hierarchy)
|
|
|
|
*
|
|
|
|
* @param app. The application to hide
|
|
|
|
*/
|
|
|
|
|
|
|
|
void hideApplicationWindow(IApplication *app);
|
|
|
|
|
2012-04-30 00:10:52 +02:00
|
|
|
/**
|
2012-05-15 18:40:43 +02:00
|
|
|
* Handle a widget action event. For CImage, this is a mouse button pre-release event.
|
2012-04-30 00:10:52 +02:00
|
|
|
*
|
|
|
|
* @param e The event data.
|
|
|
|
*/
|
|
|
|
|
2012-05-15 18:40:43 +02:00
|
|
|
void handleActionEvent(const NXWidgets::CWidgetEventArgs &e);
|
2012-04-30 00:10:52 +02:00
|
|
|
|
2012-05-01 22:36:19 +02:00
|
|
|
public:
|
|
|
|
/**
|
|
|
|
* CTaskbar Constructor
|
|
|
|
*
|
|
|
|
* @param hWnd - NX server handle
|
|
|
|
*/
|
|
|
|
|
|
|
|
CTaskbar(void);
|
|
|
|
|
2012-04-29 00:46:36 +02:00
|
|
|
/**
|
2012-04-30 03:21:26 +02:00
|
|
|
* CTaskbar Destructor
|
2012-04-29 00:46:36 +02:00
|
|
|
*/
|
|
|
|
|
2012-04-30 03:21:26 +02:00
|
|
|
~CTaskbar(void);
|
2012-04-29 00:46:36 +02:00
|
|
|
|
|
|
|
/**
|
2012-05-01 22:36:19 +02:00
|
|
|
* Connect to the server
|
2012-04-29 00:46:36 +02:00
|
|
|
*/
|
2013-06-04 16:11:45 +02:00
|
|
|
|
2012-05-01 22:36:19 +02:00
|
|
|
bool connect(void);
|
2012-04-29 00:46:36 +02:00
|
|
|
|
2012-05-01 22:36:19 +02:00
|
|
|
/**
|
|
|
|
* Disconnect from the server
|
|
|
|
*/
|
|
|
|
|
|
|
|
void disconnect(void);
|
2012-04-29 00:46:36 +02:00
|
|
|
|
2012-04-30 22:38:44 +02:00
|
|
|
/**
|
|
|
|
* Initialize task bar. Task bar initialization is separate from
|
|
|
|
* object instantiation so that failures can be reported. The window
|
|
|
|
* manager start-up sequence is:
|
|
|
|
*
|
|
|
|
* 1. Create the CTaskbar instance,
|
|
|
|
* 2. Call the CTaskbar::connect() method to connect to the NX server (CTaskbar
|
|
|
|
* inherits the connect method from CNxServer),
|
|
|
|
* 3. Call the CTaskbar::initWindowManager() method to initialize the task bar.
|
|
|
|
* 4. Call CTaskBar::startApplication repeatedly to add applications to the task bar
|
|
|
|
* 5. Call CTaskBar::startWindowManager() to start the display with applications in place
|
|
|
|
*
|
|
|
|
* CTaskbar::initWindowManager() prepares the task bar to receive applications.
|
|
|
|
* CTaskBar::startWindowManager() brings the window manager up with those applications
|
|
|
|
* in place.
|
|
|
|
*
|
|
|
|
* @return True if the window was successfully initialized.
|
|
|
|
*/
|
|
|
|
|
|
|
|
bool initWindowManager(void);
|
|
|
|
|
2012-04-29 00:46:36 +02:00
|
|
|
/**
|
|
|
|
* Start the window manager and present the initial displays. The window
|
|
|
|
* manager start-up sequence is:
|
|
|
|
*
|
2012-04-30 03:21:26 +02:00
|
|
|
* 1. Create the CTaskbar instance,
|
2012-04-30 22:38:44 +02:00
|
|
|
* 2. Call the CTaskbar::connect() method to connect to the NX server (CTaskbar
|
|
|
|
* inherits the connect method from CNxServer),
|
|
|
|
* 3. Call the CTaskbar::initWindowManager() method to initialize the task bar.
|
|
|
|
* 4. Call CTaskBar::startApplication repeatedly to add applications to the task bar
|
|
|
|
* 5. Call CTaskBar::startWindowManager to start the display with applications in place
|
2012-04-29 00:46:36 +02:00
|
|
|
*
|
2012-04-30 22:38:44 +02:00
|
|
|
* CTaskbar::initWindowManager() prepares the task bar to receive applications.
|
|
|
|
* CTaskBar::startWindowManager() brings the window manager up with those applications
|
|
|
|
* in place.
|
|
|
|
*
|
|
|
|
* CTaskBar::startWindowManager() will present the task bar and the background image.
|
|
|
|
* The The initial taskbar will contain only the start window icon.
|
|
|
|
*
|
|
|
|
* @return true on success
|
2012-04-29 00:46:36 +02:00
|
|
|
*/
|
|
|
|
|
2012-04-30 03:21:26 +02:00
|
|
|
bool startWindowManager(void);
|
2012-04-29 00:46:36 +02:00
|
|
|
|
2012-04-29 16:34:56 +02:00
|
|
|
/**
|
2012-05-09 21:31:48 +02:00
|
|
|
* Create an normal application window. Creating a normal application in the
|
|
|
|
* start window requires three steps:
|
2012-04-29 16:34:56 +02:00
|
|
|
*
|
2012-04-30 03:21:26 +02:00
|
|
|
* 1. Call CTaskBar::openApplicationWindow to create a window for the application,
|
2012-04-29 16:34:56 +02:00
|
|
|
* 2. Instantiate the application, providing the window to the application's
|
|
|
|
* constructor,
|
2012-04-30 03:21:26 +02:00
|
|
|
* 3. Then call CStartWindow::addApplication to add the application to the
|
|
|
|
* start window.
|
2012-04-29 16:34:56 +02:00
|
|
|
*
|
|
|
|
* When the application is selected from the start window:
|
|
|
|
*
|
2012-04-30 03:21:26 +02:00
|
|
|
* 4. Call CTaskBar::startApplication start the application and bring its window to
|
2012-04-29 16:34:56 +02:00
|
|
|
* the top.
|
2012-05-13 16:36:59 +02:00
|
|
|
*
|
|
|
|
* @param flags. CApplicationWindow flugs for window customization.
|
2012-04-29 16:34:56 +02:00
|
|
|
*/
|
|
|
|
|
2012-05-13 16:36:59 +02:00
|
|
|
CApplicationWindow *openApplicationWindow(uint8_t flags = 0);
|
2012-04-29 16:34:56 +02:00
|
|
|
|
2012-05-09 21:31:48 +02:00
|
|
|
/**
|
|
|
|
* Create a full screen application window. Creating a new full screen application
|
|
|
|
* requires three steps:
|
|
|
|
*
|
|
|
|
* 1. Call CTaskBar::FullScreenWindow to create a window for the application,
|
|
|
|
* 2. Instantiate the application, providing the window to the application's
|
|
|
|
* constructor,
|
|
|
|
* 3. Then call CStartWindow::addApplication to add the application to the
|
|
|
|
* start window.
|
|
|
|
*
|
|
|
|
* When the application is selected from the start window:
|
|
|
|
*
|
|
|
|
* 4. Call CTaskBar::startApplication start the application and bring its window to
|
|
|
|
* the top.
|
|
|
|
*/
|
|
|
|
|
|
|
|
CFullScreenWindow *openFullScreenWindow(void);
|
|
|
|
|
2012-04-29 00:46:36 +02:00
|
|
|
/**
|
|
|
|
* Start an application and add its icon to the taskbar. The applications's
|
2012-04-30 03:21:26 +02:00
|
|
|
* window is brought to the top. Creating a new application in the start
|
2012-04-29 16:34:56 +02:00
|
|
|
* window requires three steps:
|
|
|
|
*
|
2012-04-30 03:21:26 +02:00
|
|
|
* 1. Call CTaskBar::openApplicationWindow to create a window for the application,
|
2012-04-29 16:34:56 +02:00
|
|
|
* 2. Instantiate the application, providing the window to the application's
|
|
|
|
* constructor,
|
2012-04-30 03:21:26 +02:00
|
|
|
* 3. Then call CStartWindow::addApplication to add the application to the start window.
|
2012-04-29 16:34:56 +02:00
|
|
|
*
|
|
|
|
* When the application is selected from the start window:
|
|
|
|
*
|
2012-04-30 03:21:26 +02:00
|
|
|
* 4. Call CTaskBar::startApplication start the application and bring its window to
|
2012-04-29 16:34:56 +02:00
|
|
|
* the top.
|
2012-04-29 00:46:36 +02:00
|
|
|
*
|
2012-04-30 03:21:26 +02:00
|
|
|
* @param app. The new application to add to the task bar
|
|
|
|
* @param minimized. The new application starts in the minimized state
|
2012-04-29 00:46:36 +02:00
|
|
|
* @return true on success
|
|
|
|
*/
|
|
|
|
|
2012-04-30 03:21:26 +02:00
|
|
|
bool startApplication(IApplication *app, bool minimized);
|
2012-04-29 00:46:36 +02:00
|
|
|
|
|
|
|
/**
|
2012-04-30 22:38:44 +02:00
|
|
|
* Move window to the top of the hierarchy and re-draw it. This method
|
|
|
|
* does nothing if the application is minimized.
|
2012-04-29 00:46:36 +02:00
|
|
|
*
|
2012-04-30 22:38:44 +02:00
|
|
|
* @param app. The new application to show
|
|
|
|
* @return true on success
|
|
|
|
*/
|
|
|
|
|
|
|
|
bool topApplication(IApplication *app);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Maximize an application by moving its window to the top of the hierarchy
|
|
|
|
* and re-drawing it. If the application was already maximized, then this
|
|
|
|
* method is equivalent to topApplication().
|
|
|
|
*
|
|
|
|
* @param app. The new application to add to the task bar
|
|
|
|
* @return true on success
|
|
|
|
*/
|
|
|
|
|
|
|
|
bool maximizeApplication(IApplication *app);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Minimize an application by moving its window to the bottom of the
|
2018-09-17 01:23:45 +02:00
|
|
|
* and redrawing the next visible application.
|
2012-04-30 22:38:44 +02:00
|
|
|
*
|
|
|
|
* @param app. The new application to add to the task bar
|
2012-04-29 00:46:36 +02:00
|
|
|
* @return true on success
|
|
|
|
*/
|
|
|
|
|
2012-04-30 22:38:44 +02:00
|
|
|
bool minimizeApplication(IApplication *app);
|
2012-04-29 00:46:36 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Destroy an application. Move its window to the bottom and remove its
|
|
|
|
* icon from the task bar.
|
|
|
|
*
|
2012-04-30 22:38:44 +02:00
|
|
|
* @param app. The new application to remove from the task bar
|
2012-04-29 00:46:36 +02:00
|
|
|
* @return true on success
|
|
|
|
*/
|
|
|
|
|
2012-04-30 22:38:44 +02:00
|
|
|
bool stopApplication(IApplication *app);
|
2012-05-01 22:36:19 +02:00
|
|
|
|
2012-05-11 02:05:25 +02:00
|
|
|
/**
|
|
|
|
* Get the size of the physical display device as it is known to the task
|
|
|
|
* bar.
|
|
|
|
*
|
|
|
|
* @return The size of the display
|
|
|
|
*/
|
|
|
|
|
2012-05-12 18:59:57 +02:00
|
|
|
void getDisplaySize(FAR struct nxgl_size_s &size);
|
2013-06-04 16:11:45 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Force a redraw of the taskbar and current application.
|
|
|
|
* This should only be necessary if the display loses state due to e.g. powerdown
|
|
|
|
* or other manual intervention.
|
|
|
|
*/
|
|
|
|
|
|
|
|
inline void redraw() { redrawTopApplication(); }
|
|
|
|
|
2012-05-01 22:36:19 +02:00
|
|
|
/**
|
2012-05-19 01:08:34 +02:00
|
|
|
* Simulate a mouse click or release on the icon at index. This method
|
|
|
|
* is only available during automated testing of NxWM.
|
|
|
|
*
|
|
|
|
* @param index. Selects the icon in the start window
|
|
|
|
* @param click. True to click and false to release
|
2012-05-01 22:36:19 +02:00
|
|
|
*/
|
|
|
|
|
2012-05-10 00:30:19 +02:00
|
|
|
#if defined(CONFIG_NXWM_UNITTEST) && !defined(CONFIG_NXWM_TOUCHSCREEN)
|
2012-05-19 01:08:34 +02:00
|
|
|
void clickIcon(int index, bool click);
|
2012-05-03 21:46:37 +02:00
|
|
|
#endif
|
2012-04-29 00:46:36 +02:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // __cplusplus
|
2012-04-30 03:21:26 +02:00
|
|
|
#endif // __NXWM_INCLUDE_CTASKBAR_HXX
|