Core functionality of a simple window manager
/*
* $QNXLicenseC:
* Copyright 2012, QNX Software Systems Limited. All Rights Reserved.
*
* This software is QNX Confidential Information subject to
* confidentiality restrictions. DISCLOSURE OF THIS SOFTWARE
* IS PROHIBITED UNLESS AUTHORIZED BY QNX SOFTWARE SYSTEMS IN
* WRITING.
*
* You must obtain a written license from and pay applicable license
* fees to QNX Software Systems Limited before you may reproduce, modify
* or distribute this software, or any work that includes all or part
* of this software. For more information visit
* http://licensing.qnx.com or email licensing@qnx.com.
*
* This file may contain contributions from others. Please review
* this entire file for other proprietary rights or license notices,
* as well as the QNX Development Suite License Guide at
* http://licensing.qnx.com/license-guide/ for other information.
* $
*/
#include "struct.h"
void core_app_stopped(window_manager_t *winmgr, char *data)
{
/* Delete from the application list */
if (winmgr->car_app.pid && !strcmp(data, winmgr->car_app.pid)) {
free(winmgr->car_app.pid);
winmgr->car_app.pid = NULL;
}
if (winmgr->weather_app.pid && !strcmp(data, winmgr->weather_app.pid)) {
free(winmgr->weather_app.pid);
winmgr->weather_app.pid = NULL;
}
}
void
core_app_started(window_manager_t *winmgr, char *id, char *data, int error, char *errstr)
{
/* Append to the application list */
if (error) {
SLOG_WARNING("failed to launch app: %s", errstr);
return;
}
if (!strcmp(id, winmgr->car_app.id)) {
winmgr->car_app.pid = strdup(data);
} else if (!strcmp(id, winmgr->car_app.id)) {
winmgr->weather_app.pid = strdup(data);
}
}
void core_lowmem(window_manager_t *winmgr, char *data)
{
}