1998-09-29 22:36:29 +00:00
|
|
|
/* appicon.h- application icon
|
2004-10-12 21:28:27 +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.
|
|
|
|
|
*
|
2010-10-08 01:32:11 +02:00
|
|
|
* 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 WMAPPICON_H_
|
|
|
|
|
#define WMAPPICON_H_
|
|
|
|
|
|
|
|
|
|
#include <wraster.h>
|
|
|
|
|
|
|
|
|
|
#include "window.h"
|
|
|
|
|
#include "icon.h"
|
|
|
|
|
#include "application.h"
|
|
|
|
|
|
|
|
|
|
typedef struct WAppIcon {
|
2012-04-14 01:52:40 +02:00
|
|
|
short xindex;
|
|
|
|
|
short yindex;
|
|
|
|
|
struct WAppIcon *next;
|
|
|
|
|
struct WAppIcon *prev;
|
|
|
|
|
WIcon *icon;
|
|
|
|
|
int x_pos, y_pos; /* absolute screen coordinate */
|
|
|
|
|
char *command; /* command used to launch app */
|
2015-04-06 17:58:12 +02:00
|
|
|
#ifdef USE_DOCK_XDND
|
2012-04-14 01:52:40 +02:00
|
|
|
char *dnd_command; /* command to use when something is */
|
|
|
|
|
/* dropped on us */
|
1998-09-29 22:36:29 +00:00
|
|
|
#endif
|
2012-04-14 01:52:40 +02:00
|
|
|
char *paste_command; /* command to run when
|
|
|
|
|
* something is pasted */
|
|
|
|
|
char *wm_class;
|
|
|
|
|
char *wm_instance;
|
|
|
|
|
pid_t pid; /* for apps launched from the dock */
|
|
|
|
|
Window main_window;
|
|
|
|
|
struct WDock *dock; /* In which dock is docked. */
|
|
|
|
|
struct _AppSettingsPanel *panel; /* Settings Panel */
|
|
|
|
|
unsigned int docked:1;
|
|
|
|
|
unsigned int omnipresent:1; /* If omnipresent when
|
|
|
|
|
* docked in clip */
|
|
|
|
|
unsigned int attracted:1; /* If it was attracted by the clip */
|
|
|
|
|
unsigned int launching:1;
|
|
|
|
|
unsigned int running:1; /* application is already running */
|
|
|
|
|
unsigned int relaunching:1; /* launching 2nd instance */
|
|
|
|
|
unsigned int forced_dock:1;
|
|
|
|
|
unsigned int auto_launch:1; /* launch app on startup */
|
|
|
|
|
unsigned int remote_start:1;
|
|
|
|
|
unsigned int updated:1;
|
|
|
|
|
unsigned int editing:1; /* editing docked icon */
|
|
|
|
|
unsigned int drop_launch:1; /* launching from drop action */
|
|
|
|
|
unsigned int paste_launch:1; /* launching from paste action */
|
|
|
|
|
unsigned int destroyed:1; /* appicon was destroyed */
|
|
|
|
|
unsigned int buggy_app:1; /* do not make dock rely on hints
|
|
|
|
|
* set by app */
|
|
|
|
|
unsigned int lock:1; /* do not allow to be destroyed */
|
1998-09-29 22:36:29 +00:00
|
|
|
} WAppIcon;
|
|
|
|
|
|
2013-06-16 17:57:50 +02:00
|
|
|
WAppIcon *wAppIconCreateForDock(WScreen *scr, const char *command, const char *wm_instance,
|
|
|
|
|
const char *wm_class, int tile);
|
2013-04-12 01:42:38 +02:00
|
|
|
Bool wHandleAppIconMove(WAppIcon *aicon, XEvent *event);
|
1998-09-29 22:36:29 +00:00
|
|
|
|
|
|
|
|
void wAppIconDestroy(WAppIcon *aicon);
|
2012-11-10 20:25:14 +01:00
|
|
|
void wAppIconPaint(WAppIcon *aicon);
|
1998-09-29 22:36:29 +00:00
|
|
|
void wAppIconMove(WAppIcon *aicon, int x, int y);
|
2013-01-22 21:18:15 +01:00
|
|
|
void create_appicon_for_application(WApplication *wapp, WWindow *wwin);
|
2012-06-01 12:40:44 +02:00
|
|
|
void removeAppIconFor(WApplication * wapp);
|
2015-08-23 20:56:55 +02:00
|
|
|
void save_appicon(WAppIcon *aicon);
|
2012-06-01 12:50:12 +02:00
|
|
|
void paint_app_icon(WApplication *wapp);
|
2012-10-08 05:43:22 +02:00
|
|
|
void unpaint_app_icon(WApplication *wapp);
|
2013-09-05 21:08:17 +02:00
|
|
|
void wApplicationExtractDirPackIcon(const char *path, const char *wm_instance,
|
2013-06-16 17:57:50 +02:00
|
|
|
const char *wm_class);
|
2012-10-29 15:35:56 -07:00
|
|
|
WAppIcon *wAppIconFor(Window window);
|
2013-06-30 16:02:37 +02:00
|
|
|
|
|
|
|
|
void appIconMouseDown(WObjDescriptor * desc, XEvent * event);
|
|
|
|
|
|
1998-09-29 22:36:29 +00:00
|
|
|
#endif
|