2 * Window Maker window manager
4 * Copyright (c) 1997-2003 Alfredo K. Kojima
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program 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 along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22 #ifndef WMAPPLICATION_H_
23 #define WMAPPLICATION_H_
25 /* for tracking single application instances */
26 typedef struct WApplication
{
27 struct WApplication
*next
;
28 struct WApplication
*prev
;
30 Window main_window
; /* ID of the group leader */
32 struct WWindow
*main_window_desc
; /* main (leader) window descriptor */
34 WMenu
*menu
; /* application menu */
36 struct WAppIcon
*app_icon
;
40 struct WWindow
*last_focused
; /* focused window before hide */
42 int last_workspace
; /* last workspace used to work on the
44 WMHandlerID
*urgent_bounce_timer
;
46 unsigned int skip_next_animation
:1;
47 unsigned int hidden
:1;
48 unsigned int emulated
:1;
49 unsigned int bouncing
:1;
54 WApplication
*wApplicationCreate(struct WWindow
*wwin
);
55 void wApplicationDestroy(WApplication
*wapp
);
57 WApplication
*wApplicationOf(Window window
);
59 void wApplicationExtractDirPackIcon(WScreen
*scr
,char *path
, char *wm_instance
,
61 void wApplicationSaveIconPathFor(char *iconPath
, char *wm_instance
,
64 void wAppBounce(WApplication
*);
65 void wAppBounceWhileUrgent(WApplication
*);
68 #define wApplicationActivate(wapp) do { \
69 if (wapp->app_icon) { \
70 wIconSetHighlited(wapp->app_icon->icon, True); \
71 wAppIconPaint(wapp->app_icon);\
74 #define wApplicationDeactivate(wapp) do { \
75 if (wapp->app_icon) { \
76 wIconSetHighlited(wapp->app_icon->icon, False); \
77 wAppIconPaint(wapp->app_icon);\
81 #define wApplicationActivate(wapp) do { } while (0)
82 #define wApplicationDeactivate(wapp) do { } while (0)
83 #endif /* NEWAPPICON */