Update local copy of GPLv2 and FSF address in copyrights
[wmaker-crm.git] / src / application.h
bloba2766fea775d8b9c6c33dae5ef7b9a23e5625d21
1 /*
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;
38 int refcount;
40 struct WWindow *last_focused; /* focused window before hide */
42 int last_workspace; /* last workspace used to work on the
43 * app */
44 WMHandlerID *urgent_bounce_timer;
45 struct {
46 unsigned int skip_next_animation:1;
47 unsigned int hidden:1;
48 unsigned int emulated:1;
49 unsigned int bouncing:1;
50 } flags;
51 } WApplication;
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,
60 char *wm_class);
62 void wAppBounce(WApplication *);
63 void wAppBounceWhileUrgent(WApplication *);
65 #ifdef NEWAPPICON
66 #define wApplicationActivate(wapp) do { \
67 if (wapp->app_icon) { \
68 wIconSetHighlited(wapp->app_icon->icon, True); \
69 wAppIconPaint(wapp->app_icon);\
70 } \
71 } while (0)
72 #define wApplicationDeactivate(wapp) do { \
73 if (wapp->app_icon) { \
74 wIconSetHighlited(wapp->app_icon->icon, False); \
75 wAppIconPaint(wapp->app_icon);\
76 } \
77 } while (0)
78 #else
79 #define wApplicationActivate(wapp) do { } while (0)
80 #define wApplicationDeactivate(wapp) do { } while (0)
81 #endif /* NEWAPPICON */
83 #endif