Files
wmaker/src/application.h
T

86 lines
2.6 KiB
C
Raw Normal View History

1998-09-29 22:36:29 +00:00
/*
1998-10-21 14:43:47 +00:00
* Window Maker window manager
2004-10-12 21:28:27 +00:00
*
2003-01-16 23:30:45 +00:00
* Copyright (c) 1997-2003 Alfredo K. Kojima
2004-10-12 21:28:27 +00:00
*
1998-09-29 22:36:29 +00:00
* 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.
1998-09-29 22:36:29 +00:00
*/
#ifndef WMAPPLICATION_H_
#define WMAPPLICATION_H_
/* for tracking single application instances */
typedef struct WApplication {
struct WApplication *next;
struct WApplication *prev;
2004-10-12 21:28:27 +00:00
1998-09-29 22:36:29 +00:00
Window main_window; /* ID of the group leader */
struct WWindow *main_window_desc; /* main (leader) window descriptor */
WMenu *menu; /* application menu */
struct WAppIcon *app_icon;
int refcount;
struct WWindow *last_focused; /* focused window before hide */
2001-12-17 04:02:33 +00:00
2004-10-12 21:28:27 +00:00
int last_workspace; /* last workspace used to work on the
* app */
2010-09-16 17:05:13 -04:00
WMHandlerID *urgent_bounce_timer;
1998-09-29 22:36:29 +00:00
struct {
2004-10-12 21:28:27 +00:00
unsigned int skip_next_animation:1;
unsigned int hidden:1;
unsigned int emulated:1;
2010-09-10 20:51:03 +04:00
unsigned int bouncing:1;
1998-09-29 22:36:29 +00:00
} flags;
} WApplication;
WApplication *wApplicationCreate(struct WWindow *wwin);
1998-09-29 22:36:29 +00:00
void wApplicationDestroy(WApplication *wapp);
WApplication *wApplicationOf(Window window);
2004-10-12 21:28:27 +00:00
void wApplicationExtractDirPackIcon(WScreen *scr,char *path, char *wm_instance,
char *wm_class);
2010-10-08 15:08:34 -04:00
void wApplicationSaveIconPathFor(char *iconPath, char *wm_instance,
char *wm_class);
2010-09-10 20:51:03 +04:00
void wAppBounce(WApplication *);
2010-09-16 17:05:13 -04:00
void wAppBounceWhileUrgent(WApplication *);
2004-10-12 21:28:27 +00:00
2010-09-10 20:51:07 +04:00
#ifdef NEWAPPICON
#define wApplicationActivate(wapp) do { \
if (wapp->app_icon) { \
wIconSetHighlited(wapp->app_icon->icon, True); \
wAppIconPaint(wapp->app_icon);\
} \
} while (0)
#define wApplicationDeactivate(wapp) do { \
if (wapp->app_icon) { \
wIconSetHighlited(wapp->app_icon->icon, False); \
wAppIconPaint(wapp->app_icon);\
} \
} while (0)
#else
#define wApplicationActivate(wapp) do { } while (0)
#define wApplicationDeactivate(wapp) do { } while (0)
#endif /* NEWAPPICON */
#endif