Files
wmaker/src/application.c
T

70 lines
1.9 KiB
C

/*
* Window Maker window manager
*
* Copyright (c) 1997-2003 Alfredo K. Kojima
* Copyright (c) 1998-2003 Dan Pascu
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "wconfig.h"
#include <X11/Xlib.h>
#include <string.h>
#include "WindowMaker.h"
#include "menu.h"
#include "window.h"
#ifdef USER_MENU
#include "usermenu.h"
#endif /* USER_MENU */
#include "appicon.h"
#include "application.h"
#include "appmenu.h"
#include "properties.h"
#include "workspace.h"
#include "dock.h"
#include "defaults.h"
/******** Decls of functions defined in application.rs. ********/
WApplication* wApplicationOfRust(Display *dpy, Window window);
WApplication *wApplicationCreateRust(Display *dpy, WWindow *wwin, int enable_user_menu);
void wApplicationDestroyRust(Display *dpy, WApplication *wapp);
/******** Lifecycle/etc. ********/
WApplication *wApplicationOf(Window window)
{
return wApplicationOfRust(dpy, window);
}
WApplication *wApplicationCreate(WWindow * wwin)
{
#ifdef USER_MENU
return wApplicationCreateRust(dpy, wwin, 1);
#else
return wApplicationCreateRust(dpy, wwin, 0);
#endif // USER_MENU
}
void wApplicationDestroy(WApplication *wapp)
{
if (!wapp)
return;
wApplicationDestroyRust(dpy, wapp);
}