1999-08-17 15:56:46 -07:00
|
|
|
/*****************************************************************************/
|
|
|
|
/* Enlightenment - The Window Manager that dares to do what others don't */
|
|
|
|
/*****************************************************************************/
|
1999-10-04 15:06:00 -07:00
|
|
|
/*
|
2004-01-19 14:30:35 -08:00
|
|
|
* Copyright (C) 2000-2004 Carsten Haitzler, Geoff Harrison and various contributors
|
2000-04-05 16:22:56 -07:00
|
|
|
*
|
1999-10-04 15:06:00 -07:00
|
|
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
|
|
* of this software and associated documentation files (the "Software"), to
|
|
|
|
* deal in the Software without restriction, including without limitation the
|
|
|
|
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
|
|
* sell copies of the Software, and to permit persons to whom the Software is
|
|
|
|
* furnished to do so, subject to the following conditions:
|
2000-04-05 16:22:56 -07:00
|
|
|
*
|
1999-10-04 15:06:00 -07:00
|
|
|
* The above copyright notice and this permission notice shall be included in
|
|
|
|
* all copies of the Software, its documentation and marketing & publicity
|
|
|
|
* materials, and acknowledgment shall be given in the documentation, materials
|
|
|
|
* and software packages that this Software was used.
|
2000-04-05 16:22:56 -07:00
|
|
|
*
|
1999-10-04 15:06:00 -07:00
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
|
|
* THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
|
|
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
|
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
|
*/
|
2004-02-28 17:30:18 -08:00
|
|
|
#define _GNU_SOURCE
|
2003-07-15 11:35:04 -07:00
|
|
|
#include "config.h"
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2004-03-20 07:28:04 -08:00
|
|
|
#if HAVE_STRDUP
|
|
|
|
#define USE_LIBC_STRDUP 1 /* Use libc strdup if present */
|
|
|
|
#endif
|
|
|
|
#if HAVE_STRNDUP
|
|
|
|
#define USE_LIBC_STRNDUP 1 /* Use libc strndup if present */
|
|
|
|
#endif
|
|
|
|
#if HAVE_SETENV
|
|
|
|
#define USE_LIBC_SETENV 1 /* Use libc setenv if present */
|
|
|
|
#endif
|
2004-03-26 13:42:03 -08:00
|
|
|
#define USE_LIBC_MALLOC 1 /* Use unwrapped libc malloc/realloc/free */
|
2004-03-13 14:49:48 -08:00
|
|
|
|
1999-08-17 15:56:46 -07:00
|
|
|
#include <X11/Xlib.h>
|
|
|
|
#include <X11/Xutil.h>
|
|
|
|
#include <X11/Xproto.h>
|
2003-11-15 14:27:17 -08:00
|
|
|
#include <X11/Xatom.h>
|
1999-08-17 15:56:46 -07:00
|
|
|
#include <X11/Xlocale.h>
|
|
|
|
#include <X11/extensions/shape.h>
|
|
|
|
#include <X11/extensions/XShm.h>
|
2004-03-13 14:49:48 -08:00
|
|
|
#ifdef HAS_XRANDR
|
|
|
|
#ifdef HAVE_X11_EXTENSIONS_XRANDR_H
|
|
|
|
#define USE_XRANDR 1
|
|
|
|
#endif
|
|
|
|
#endif
|
2004-02-28 07:14:02 -08:00
|
|
|
|
2003-11-15 14:27:17 -08:00
|
|
|
#if USE_IMLIB2
|
|
|
|
#include <Imlib2.h>
|
|
|
|
|
|
|
|
#define IMLIB1_SET_CONTEXT(root_ctx)
|
|
|
|
|
|
|
|
#define EAllocColor(pxc) \
|
|
|
|
XAllocColor(disp, root.cmap, pxc)
|
|
|
|
|
|
|
|
#define IMLIB_FREE_PIXMAP_AND_MASK(pmap, mask) \
|
|
|
|
imlib_free_pixmap_and_mask(pmap)
|
|
|
|
|
|
|
|
#define IC_RenderDepth() DefaultDepth(disp, root.scr)
|
|
|
|
|
2004-02-11 17:17:21 -08:00
|
|
|
#define ENABLE_TRANSPARENCY 1
|
|
|
|
#define ENABLE_THEME_TRANSPARENCY 1
|
|
|
|
|
2003-11-15 14:27:17 -08:00
|
|
|
#else
|
|
|
|
|
1999-08-17 15:56:46 -07:00
|
|
|
#include <Imlib.h>
|
2003-11-15 14:27:17 -08:00
|
|
|
|
|
|
|
extern ImlibData *pI1Ctx;
|
|
|
|
extern ImlibImage *pIcImg;
|
|
|
|
extern Drawable vIcDrw;
|
|
|
|
|
|
|
|
#define IMLIB1_SET_CONTEXT(root_ctx) \
|
|
|
|
pI1Ctx = ((root_ctx) && prImlib_Context) ? prImlib_Context : pImlib_Context
|
|
|
|
|
|
|
|
#define imlib_context_set_image(im_img) \
|
|
|
|
pIcImg = im_img
|
|
|
|
#define imlib_context_set_drawable(im_drw) \
|
|
|
|
vIcDrw = im_drw
|
|
|
|
|
|
|
|
#define imlib_context_set_dither(onoff) \
|
|
|
|
Imlib_set_render_type(pI1Ctx, RT_DITHER_TRUECOL)
|
|
|
|
#define imlib_context_get_dither() \
|
|
|
|
Imlib_get_render_type(pI1Ctx)
|
|
|
|
|
|
|
|
#define imlib_image_get_width() \
|
|
|
|
pIcImg->rgb_width
|
|
|
|
#define imlib_image_get_height() \
|
|
|
|
pIcImg->rgb_height
|
|
|
|
|
|
|
|
#define imlib_load_image(file) \
|
|
|
|
Imlib_load_image(pI1Ctx, file)
|
|
|
|
#define imlib_create_image_from_drawable(mask, x, y, w, h, grab) \
|
|
|
|
Imlib_create_image_from_drawable(pI1Ctx, vIcDrw, mask, x, y, w, h)
|
|
|
|
|
|
|
|
#define imlib_image_set_format(fmt)
|
|
|
|
#define imlib_save_image(file) \
|
|
|
|
Imlib_save_image_to_ppm(pI1Ctx, pIcImg, file)
|
|
|
|
|
|
|
|
#define imlib_render_pixmaps_for_whole_image(p, m) \
|
|
|
|
Imlib_render(pI1Ctx, pIcImg, imlib_image_get_width(), imlib_image_get_height()); \
|
|
|
|
if (p) *p = Imlib_copy_image(pI1Ctx, pIcImg); \
|
|
|
|
if (m) *m = Imlib_copy_mask(pI1Ctx, pIcImg)
|
|
|
|
#define imlib_render_pixmaps_for_whole_image_at_size(p, m, w, h) \
|
|
|
|
Imlib_render(pI1Ctx, pIcImg, w, h); \
|
|
|
|
if (p) *p = Imlib_copy_image(pI1Ctx, pIcImg); \
|
|
|
|
if (m) *m = Imlib_copy_mask(pI1Ctx, pIcImg)
|
|
|
|
#define imlib_render_image_on_drawable(x, y) \
|
|
|
|
Imlib_apply_image(pI1Ctx, pIcImg, vIcDrw)
|
|
|
|
#define imlib_render_image_on_drawable_at_size(x, y, w, h) \
|
|
|
|
Imlib_paste_image(pI1Ctx, pIcImg, vIcDrw, x, y, w, h)
|
|
|
|
|
|
|
|
#define imlib_create_cropped_scaled_image(x, y, w, h, w2, h2) \
|
|
|
|
Imlib_clone_scaled_image(pI1Ctx, pIcImg, w2, h2)
|
|
|
|
|
|
|
|
#define imlib_image_orientate(rot) \
|
|
|
|
switch (rot) { \
|
|
|
|
case 1: \
|
|
|
|
Imlib_rotate_image(pI1Ctx, pIcImg, 1); \
|
|
|
|
Imlib_flip_image_horizontal(pI1Ctx, pIcImg); \
|
|
|
|
break; \
|
|
|
|
case 2: \
|
|
|
|
Imlib_flip_image_vertical(pI1Ctx, pIcImg); \
|
|
|
|
Imlib_flip_image_horizontal(pI1Ctx, pIcImg); \
|
|
|
|
case 3: \
|
|
|
|
Imlib_rotate_image(pI1Ctx, pIcImg, -1); \
|
|
|
|
Imlib_flip_image_vertical(pI1Ctx, pIcImg); \
|
|
|
|
break; \
|
|
|
|
}
|
|
|
|
|
|
|
|
#define imlib_free_image() \
|
|
|
|
({ Imlib_destroy_image(pI1Ctx, pIcImg); pIcImg = NULL; })
|
|
|
|
#define imlib_free_image_and_decache() \
|
|
|
|
({ Imlib_kill_image(pI1Ctx, pIcImg); pIcImg = NULL; })
|
|
|
|
#define imlib_free_pixmap_and_mask(pmap) \
|
|
|
|
Imlib_free_pixmap(pI1Ctx, pmap)
|
|
|
|
|
|
|
|
#define IMLIB_FREE_PIXMAP_AND_MASK(pmap, mask) \
|
|
|
|
({ Imlib_free_pixmap(pI1Ctx, pmap); Imlib_free_pixmap(pI1Ctx, mask); })
|
|
|
|
|
|
|
|
#define imlib_image_set_border(im_bdr) \
|
|
|
|
Imlib_set_image_border(pI1Ctx, pIcImg, im_bdr)
|
|
|
|
|
|
|
|
#define EAllocColor(pxc) \
|
|
|
|
({ int r = ((pxc)->red)>>8, g = ((pxc)->green)>>8, b = ((pxc)->blue)>>8; \
|
|
|
|
(pxc)->pixel = Imlib_best_color_match(pI1Ctx, &r, &g, &b); })
|
|
|
|
|
|
|
|
#define Imlib_Context ImlibData
|
|
|
|
#define Imlib_Image ImlibImage
|
|
|
|
#define Imlib_Color ImlibColor
|
|
|
|
#define Imlib_Border ImlibBorder
|
|
|
|
#define IC_RenderDepth() (pImlib_Context->x.render_depth)
|
|
|
|
#endif
|
2003-07-12 07:34:14 -07:00
|
|
|
#if USE_FNLIB
|
1999-08-17 15:56:46 -07:00
|
|
|
#include <Fnlib.h>
|
2003-07-12 07:34:14 -07:00
|
|
|
#endif
|
1999-08-30 17:02:54 -07:00
|
|
|
|
2000-04-27 14:32:41 -07:00
|
|
|
#define XSync(d, f) \
|
|
|
|
{XImage *__xim; \
|
|
|
|
__xim = XGetImage(d, root.win, 0, 0, 1, 1, 0xffffffff, ZPixmap); \
|
|
|
|
if (__xim) XDestroyImage(__xim);}
|
|
|
|
|
2000-03-23 21:51:51 -08:00
|
|
|
#ifdef HAS_XINERAMA
|
|
|
|
#include <X11/extensions/Xinerama.h>
|
|
|
|
#endif
|
|
|
|
|
1999-09-21 19:13:51 -07:00
|
|
|
/* dmalloc debugging */
|
|
|
|
/*#include <dmalloc.h> */
|
|
|
|
|
1999-08-17 15:56:46 -07:00
|
|
|
/* sgi's stdio.h has:
|
|
|
|
*
|
|
|
|
* #if _SGIAPI && _NO_ANSIMODE
|
|
|
|
* extern int vsnprintf(char *, ssize_t, const char *, char *);
|
|
|
|
* #endif
|
|
|
|
*
|
|
|
|
* so workaround...
|
|
|
|
*/
|
1999-08-30 17:02:54 -07:00
|
|
|
|
1999-08-17 15:56:46 -07:00
|
|
|
#ifdef __sgi
|
|
|
|
#ifdef _NO_ANSIMODE
|
|
|
|
#undef _NO_ANSIMODE
|
|
|
|
#endif
|
|
|
|
#endif
|
1999-08-30 17:02:54 -07:00
|
|
|
|
1999-08-17 15:56:46 -07:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <stdarg.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <sys/types.h>
|
2004-03-11 15:44:19 -08:00
|
|
|
#include <unistd.h>
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2004-03-20 07:20:40 -08:00
|
|
|
#if HAVE___ATTRIBUTE__
|
|
|
|
#define __UNUSED__ __attribute__((unused))
|
|
|
|
#else
|
|
|
|
#define __UNUSED__
|
|
|
|
#endif
|
|
|
|
|
1999-08-17 15:56:46 -07:00
|
|
|
/* workaround for 64bit architectures - xlib expects 32bit CARDINALS to be */
|
|
|
|
/* long's on 64bit machines... thus well the CARD32's Im unsing shoudl be.. */
|
|
|
|
#define CARD32 long
|
|
|
|
|
|
|
|
#ifndef HAVE_GETCWD
|
|
|
|
#error "ERROR: Enlightenment needs a system with getcwd() in it's libs."
|
|
|
|
#error "You may have to upgrade your Operating system, Distribution, base"
|
|
|
|
#error "system libraries etc. Please see the the instructions for your"
|
|
|
|
#error "particular Operating System or Distribution"
|
|
|
|
#endif
|
|
|
|
#ifndef HAVE_MKDIR
|
|
|
|
#error "ERROR: Enlightenment needs a system with mkdir() in it's libs."
|
|
|
|
#error "You may have to upgrade your Operating system, Distribution, base"
|
|
|
|
#error "system libraries etc. Please see the the instructions for your"
|
|
|
|
#error "particular Operating System or Distribution"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define FILEPATH_LEN_MAX 4096
|
|
|
|
/* This turns on E's internal stack tracking system for coarse debugging */
|
|
|
|
/* and being able to trace E for profiling/optimisation purposes (which */
|
|
|
|
/* believe it or not I'm actually doing) */
|
|
|
|
|
|
|
|
/* #define DEBUG 1 */
|
|
|
|
|
|
|
|
#ifdef DEBUG
|
|
|
|
extern int call_level;
|
|
|
|
extern char *call_stack[1024];
|
|
|
|
|
|
|
|
#endif
|
|
|
|
#ifdef DEBUG
|
|
|
|
#define EDBUG(l,x) \
|
|
|
|
{ \
|
|
|
|
call_stack[call_level] = x; \
|
|
|
|
call_level++; \
|
|
|
|
}
|
|
|
|
#else
|
|
|
|
#define EDBUG(l,x) \
|
|
|
|
;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef DEBUG
|
|
|
|
#define EDBUG_RETURN(x) \
|
|
|
|
{ \
|
|
|
|
call_level--; \
|
|
|
|
return (x); \
|
|
|
|
}
|
|
|
|
#define EDBUG_RETURN_ \
|
|
|
|
{ \
|
|
|
|
call_level--; \
|
|
|
|
return; \
|
|
|
|
}
|
|
|
|
#else
|
|
|
|
#define EDBUG_RETURN(x) \
|
|
|
|
{ \
|
|
|
|
return (x); \
|
|
|
|
}
|
|
|
|
#define EDBUG_RETURN_ \
|
|
|
|
{ \
|
|
|
|
return; \
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2003-12-09 12:25:17 -08:00
|
|
|
#ifdef HAVE_SNPRINTF
|
|
|
|
#define Evsnprintf vsnprintf
|
|
|
|
#define Esnprintf snprintf
|
|
|
|
#else /* HAVE_SNPRINTF */
|
1999-12-06 09:12:20 -08:00
|
|
|
int Evsnprintf(char *str, size_t count, const char *fmt,
|
2003-05-22 12:15:03 -07:00
|
|
|
va_list args);
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2003-05-01 10:01:14 -07:00
|
|
|
#ifdef HAVE_STDARG_H
|
2000-06-04 12:45:55 -07:00
|
|
|
int Esnprintf(char *str, size_t count, const char *fmt, ...);
|
1999-08-17 15:56:46 -07:00
|
|
|
|
|
|
|
#else
|
|
|
|
int Esnprintf(va_alist);
|
|
|
|
#endif
|
2003-12-09 12:25:17 -08:00
|
|
|
#endif /* HAVE_SNPRINTF */
|
1999-08-17 15:56:46 -07:00
|
|
|
|
1999-12-06 09:12:20 -08:00
|
|
|
/* This is a start to providing internationalization by means */
|
|
|
|
/* of gettext */
|
|
|
|
|
2000-01-04 03:31:20 -08:00
|
|
|
#ifdef HAVE_LOCALE_H
|
1999-12-06 09:12:20 -08:00
|
|
|
#include <locale.h>
|
2000-01-04 03:31:20 -08:00
|
|
|
#endif
|
1999-12-06 09:12:20 -08:00
|
|
|
|
2000-01-04 03:31:20 -08:00
|
|
|
#include <libintl.h>
|
|
|
|
#define _(String) gettext(String)
|
|
|
|
#ifdef gettext_noop
|
|
|
|
#define N_(String) gettext_noop(String)
|
|
|
|
#else
|
|
|
|
#define N_(String) (String)
|
|
|
|
#endif
|
1999-12-06 09:12:20 -08:00
|
|
|
|
1999-08-17 15:56:46 -07:00
|
|
|
#ifndef MAX
|
|
|
|
#define MAX(a,b) ((a)>(b)?(a):(b))
|
|
|
|
#endif
|
2000-06-04 12:45:55 -07:00
|
|
|
#ifndef MIN
|
|
|
|
#define MIN(a,b) ((a)<(b)?(a):(b))
|
|
|
|
#endif
|
1999-08-17 15:56:46 -07:00
|
|
|
|
|
|
|
#define IN_RANGE(a, b, range) \
|
|
|
|
((((a) > (b)) && ((a) - (b) <= (range))) || \
|
|
|
|
(((a) <= (b)) && ((b) - (a) <= (range))))
|
|
|
|
|
|
|
|
#define IN_ABOVE(a, b, range) \
|
|
|
|
(((a) >= (b)) && ((a) - (b) <= (range)))
|
|
|
|
|
|
|
|
#define IN_BELOW(a, b, range) \
|
|
|
|
(((a) <= (b)) && ((b) - (a) <= (range)))
|
|
|
|
|
|
|
|
#define SPANS_COMMON(x1, w1, x2, w2) \
|
|
|
|
(!((((x2) + (w2)) <= (x1)) || ((x2) >= ((x1) + (w1)))))
|
|
|
|
|
|
|
|
#define LIST_FINDBY_NAME 0
|
|
|
|
#define LIST_FINDBY_ID 1
|
|
|
|
#define LIST_FINDBY_BOTH 2
|
|
|
|
#define LIST_FINDBY_NONE 3
|
|
|
|
#define LIST_FINDBY_POINTER 4
|
|
|
|
|
|
|
|
#define LIST_TYPE_ANY 0
|
|
|
|
#define LIST_TYPE_CLIENT 1
|
|
|
|
#define LIST_TYPE_EWIN 2
|
|
|
|
#define LIST_TYPE_BORDER 3
|
|
|
|
#define LIST_TYPE_ICLASS 4
|
|
|
|
#define LIST_TYPE_ACLASS 5
|
|
|
|
#define LIST_TYPE_AWAIT_ICLASS 6
|
|
|
|
#define LIST_TYPE_ACLASS_GLOBAL 7
|
|
|
|
#define LIST_TYPE_ACLASS_DESK 8
|
|
|
|
#define LIST_TYPE_TCLASS 9
|
|
|
|
#define LIST_TYPE_BACKGROUND 10
|
|
|
|
#define LIST_TYPE_BUTTON 11
|
|
|
|
#define LIST_TYPE_SCLASS 12
|
|
|
|
#define LIST_TYPE_WINDOWMATCH 13
|
|
|
|
#define LIST_TYPE_COLORMODIFIER 14
|
|
|
|
#define LIST_TYPE_ICONIFIEDS 15
|
|
|
|
#define LIST_TYPE_SLIDEOUT 16
|
|
|
|
#define LIST_TYPE_DRAW 17
|
|
|
|
#define LIST_TYPE_TOOLTIP 18
|
|
|
|
#define LIST_TYPE_CONTAINER 19
|
|
|
|
#define LIST_TYPE_QUEUE_ENTRY 20
|
|
|
|
#define LIST_TYPE_MENU 21
|
|
|
|
#define LIST_TYPE_MENU_STYLE 22
|
|
|
|
#define LIST_TYPE_ECURSOR 23
|
|
|
|
#define LIST_TYPE_SNAPSHOT 24
|
|
|
|
#define LIST_TYPE_DIALOG 25
|
|
|
|
#define LIST_TYPE_CLONE 26
|
|
|
|
#define LIST_TYPE_PAGER 27
|
|
|
|
#define LIST_TYPE_ICONBOX 28
|
|
|
|
#define LIST_TYPE_WARP_RING 29
|
|
|
|
#define LIST_TYPE_XID 30
|
|
|
|
#define LIST_TYPE_ICONDEF 31
|
1999-08-20 05:23:26 -07:00
|
|
|
#define LIST_TYPE_GROUP 32
|
1999-08-17 15:56:46 -07:00
|
|
|
|
1999-08-20 05:23:26 -07:00
|
|
|
#define LIST_TYPE_COUNT 33
|
1999-08-17 15:56:46 -07:00
|
|
|
|
|
|
|
#define BEVEL_NONE 0
|
|
|
|
#define BEVEL_AMIGA 1
|
|
|
|
#define BEVEL_MOTIF 2
|
|
|
|
#define BEVEL_NEXT 3
|
|
|
|
#define BEVEL_DOUBLE 4
|
|
|
|
#define BEVEL_WIDEDOUBLE 5
|
|
|
|
#define BEVEL_THINPOINT 6
|
|
|
|
#define BEVEL_THICKPOINT 7
|
|
|
|
|
|
|
|
#define EWIN_NORMAL 0
|
|
|
|
#define EWIN_ACTIVE 1
|
|
|
|
#define EWIN_STICKY 2
|
|
|
|
#define EWIN_ICONIFIED 4
|
|
|
|
|
|
|
|
#define STATE_NORMAL 0
|
|
|
|
#define STATE_HILITED 1
|
|
|
|
#define STATE_CLICKED 2
|
|
|
|
#define STATE_DISABLED 3
|
|
|
|
|
|
|
|
#define FILL_STRETCH 0
|
|
|
|
#define FILL_TILE_H 1
|
|
|
|
#define FILL_TILE_V 2
|
|
|
|
#define FILL_INT_TILE_H 4
|
|
|
|
#define FILL_INT_TILE_V 8
|
|
|
|
|
|
|
|
#define FLAG_BUTTON 0
|
|
|
|
#define FLAG_TITLE 1
|
|
|
|
#define FLAG_MINIICON 2
|
|
|
|
#define FLAG_FIXED 4
|
|
|
|
#define FLAG_FIXED_HORIZ 8
|
|
|
|
#define FLAG_FIXED_VERT 16
|
|
|
|
|
2004-01-21 15:32:45 -08:00
|
|
|
#define MODE_FOCUS_POINTER 0
|
|
|
|
#define MODE_FOCUS_SLOPPY 1
|
|
|
|
#define MODE_FOCUS_CLICK 2
|
1999-08-17 15:56:46 -07:00
|
|
|
|
|
|
|
#define DOCK_LEFT 0
|
|
|
|
#define DOCK_RIGHT 1
|
|
|
|
#define DOCK_UP 2
|
|
|
|
#define DOCK_DOWN 3
|
|
|
|
|
|
|
|
#define ICON_LEFT 0
|
|
|
|
#define ICON_RIGHT 1
|
|
|
|
#define ICON_UP 2
|
|
|
|
#define ICON_DOWN 3
|
|
|
|
|
|
|
|
#define ACTION_NONE 0
|
|
|
|
#define ACTION_EXEC 1
|
|
|
|
#define ACTION_ALERT 2
|
|
|
|
#define ACTION_MOVE 3
|
|
|
|
#define ACTION_RESIZE 4
|
|
|
|
#define ACTION_RAISE 5
|
|
|
|
#define ACTION_LOWER 6
|
|
|
|
#define ACTION_EXIT 7
|
|
|
|
#define ACTION_CLEANUP 8
|
|
|
|
#define ACTION_SHOW_MENU 9
|
|
|
|
#define ACTION_HIDE_MENU 10
|
|
|
|
#define ACTION_RESIZE_H 11
|
|
|
|
#define ACTION_RESIZE_V 12
|
|
|
|
#define ACTION_KILL 13
|
|
|
|
#define ACTION_KILL_NASTY 14
|
|
|
|
#define ACTION_DESKTOP_NEXT 15
|
|
|
|
#define ACTION_DESKTOP_PREV 16
|
|
|
|
#define ACTION_DESKTOP_RAISE 17
|
|
|
|
#define ACTION_DESKTOP_LOWER 18
|
|
|
|
#define ACTION_DESKTOP_DRAG 19
|
|
|
|
#define ACTION_STICK 20
|
|
|
|
#define ACTION_DESKTOP_INPLACE 21
|
|
|
|
#define ACTION_DRAG_BUTTON 22
|
|
|
|
#define ACTION_FOCUSMODE_SET 23
|
|
|
|
#define ACTION_MOVEMODE_SET 24
|
|
|
|
#define ACTION_RESIZEMODE_SET 25
|
|
|
|
#define ACTION_SLIDEMODE_SET 26
|
|
|
|
#define ACTION_CLEANUPSILDE_SET 27
|
|
|
|
#define ACTION_MAPSLIDE_SET 28
|
|
|
|
#define ACTION_SOUND_SET 29
|
|
|
|
#define ACTION_BUTTONMOVE_RESIST_SET 30
|
|
|
|
#define ACTION_DESKTOPBG_TIMEOUT_SET 31
|
|
|
|
#define ACTION_MAPSLIDE_SPEED_SET 32
|
|
|
|
#define ACTION_CLEANUPSLIDE_SPEED_SET 33
|
|
|
|
#define ACTION_DRAGDIR_SET 34
|
|
|
|
#define ACTION_DRAGBAR_ORDER_SET 35
|
|
|
|
#define ACTION_DRAGBAR_WIDTH_SET 36
|
|
|
|
#define ACTION_DRAGBAR_LENGTH_SET 37
|
|
|
|
#define ACTION_DESKSLIDE_SET 38
|
|
|
|
#define ACTION_DESKSLIDE_SPEED_SET 39
|
|
|
|
#define ACTION_HIQUALITYBG_SET 40
|
|
|
|
#define ACTION_PLAYSOUNDCLASS 41
|
|
|
|
#define ACTION_GOTO_DESK 42
|
|
|
|
#define ACTION_DESKRAY 43
|
|
|
|
#define ACTION_AUTOSAVE_SET 44
|
|
|
|
#define ACTION_HIDESHOW_BUTTON 45
|
|
|
|
#define ACTION_ICONIFY 46
|
|
|
|
#define ACTION_SLIDEOUT 47
|
|
|
|
#define ACTION_SCROLL_WINDOWS 48
|
|
|
|
#define ACTION_SHADE 49
|
|
|
|
#define ACTION_MAX_HEIGHT 50
|
|
|
|
#define ACTION_MAX_WIDTH 51
|
|
|
|
#define ACTION_MAX_SIZE 52
|
|
|
|
#define ACTION_SEND_TO_NEXT_DESK 53
|
|
|
|
#define ACTION_SEND_TO_PREV_DESK 54
|
|
|
|
#define ACTION_SNAPSHOT 55
|
|
|
|
#define ACTION_SCROLL_CONTAINER 56
|
|
|
|
#define ACTION_TOOLTIP_SET 57
|
|
|
|
#define ACTION_FOCUS_NEXT 58
|
|
|
|
#define ACTION_FOCUS_PREV 59
|
|
|
|
#define ACTION_FOCUS_SET 60
|
|
|
|
#define ACTION_BACKGROUND_SET 61
|
|
|
|
#define ACTION_AREA_SET 62
|
|
|
|
#define ACTION_MOVE_BY 63
|
|
|
|
#define ACTION_TOGGLE_FIXED 64
|
|
|
|
#define ACTION_SET_LAYER 65
|
|
|
|
#define ACTION_WARP_POINTER 66
|
|
|
|
#define ACTION_MOVE_WINDOW_TO_AREA 67
|
|
|
|
#define ACTION_MOVE_WINDOW_BY_AREA 68
|
|
|
|
#define ACTION_SET_WINDOW_BORDER 69
|
|
|
|
#define ACTION_LINEAR_AREA_SET 70
|
|
|
|
#define ACTION_LINEAR_MOVE_BY 71
|
|
|
|
#define ACTION_ABOUT 72
|
|
|
|
#define ACTION_FX 73
|
|
|
|
#define ACTION_MOVE_WINDOW_TO_LINEAR_AREA 74
|
|
|
|
#define ACTION_MOVE_WINDOW_BY_LINEAR_AREA 75
|
|
|
|
#define ACTION_SET_PAGER_HIQ 76
|
|
|
|
#define ACTION_SET_PAGER_SNAP 77
|
|
|
|
#define ACTION_CONFIG 78
|
|
|
|
#define ACTION_MOVE_CONSTRAINED 79
|
|
|
|
#define ACTION_INSERT_KEYS 80
|
|
|
|
#define ACTION_START_GROUP 81
|
|
|
|
#define ACTION_ADD_TO_GROUP 82
|
|
|
|
#define ACTION_REMOVE_FROM_GROUP 83
|
|
|
|
#define ACTION_BREAK_GROUP 84
|
|
|
|
#define ACTION_SHOW_HIDE_GROUP 85
|
|
|
|
#define ACTION_CREATE_ICONBOX 86
|
|
|
|
#define ACTION_RAISE_LOWER 87
|
|
|
|
#define ACTION_ZOOM 88
|
1999-09-08 17:39:43 -07:00
|
|
|
#define ACTION_SET_WINDOW_BORDER_NG 89
|
|
|
|
#define ACTION_ICONIFY_NG 90
|
|
|
|
#define ACTION_KILL_NG 91
|
|
|
|
#define ACTION_MOVE_NG 92
|
|
|
|
#define ACTION_RAISE_NG 93
|
|
|
|
#define ACTION_LOWER_NG 94
|
|
|
|
#define ACTION_STICK_NG 95
|
|
|
|
#define ACTION_SHADE_NG 96
|
1999-09-16 11:26:02 -07:00
|
|
|
#define ACTION_RAISE_LOWER_NG 97
|
2000-02-21 12:53:42 -08:00
|
|
|
#define ACTION_SKIPFOCUS 98
|
|
|
|
#define ACTION_SKIPTASK 99
|
|
|
|
#define ACTION_SKIPWINLIST 100
|
2000-02-27 07:02:10 -08:00
|
|
|
#define ACTION_NEVERFOCUS 101
|
2000-02-28 10:08:25 -08:00
|
|
|
#define ACTION_SKIPLISTS 102
|
2000-05-09 13:00:16 -07:00
|
|
|
#define ACTION_SWAPMOVE 103
|
1999-08-17 15:56:46 -07:00
|
|
|
/* false number excluding the above list */
|
2000-05-09 13:00:16 -07:00
|
|
|
#define ACTION_NUMBEROF 104
|
1999-08-17 15:56:46 -07:00
|
|
|
|
|
|
|
#define MODE_NONE 0
|
2004-01-18 02:24:06 -08:00
|
|
|
#define MODE_MOVE_PENDING 1
|
|
|
|
#define MODE_MOVE 2
|
|
|
|
#define MODE_RESIZE 3
|
|
|
|
#define MODE_RESIZE_H 4
|
|
|
|
#define MODE_RESIZE_V 5
|
|
|
|
#define MODE_DESKDRAG 6
|
|
|
|
#define MODE_BUTTONDRAG 7
|
|
|
|
#define MODE_DESKRAY 8
|
|
|
|
#define MODE_PAGER_DRAG_PENDING 9
|
|
|
|
#define MODE_PAGER_DRAG 10
|
|
|
|
#define MODE_DESKSWITCH 11
|
1999-08-17 15:56:46 -07:00
|
|
|
|
|
|
|
#define EVENT_MOUSE_DOWN 0
|
|
|
|
#define EVENT_MOUSE_UP 1
|
|
|
|
#define EVENT_MOUSE_ENTER 2
|
|
|
|
#define EVENT_MOUSE_LEAVE 3
|
|
|
|
#define EVENT_KEY_DOWN 4
|
|
|
|
#define EVENT_KEY_UP 5
|
|
|
|
#define EVENT_DOUBLE_DOWN 6
|
|
|
|
|
1999-09-08 17:39:43 -07:00
|
|
|
#define GROUP_SELECT_ALL 0
|
|
|
|
#define GROUP_SELECT_EWIN_ONLY 1
|
|
|
|
#define GROUP_SELECT_ALL_EXCEPT_EWIN 2
|
|
|
|
|
|
|
|
#define GROUP_FEATURE_BORDER 1
|
|
|
|
#define GROUP_FEATURE_KILL 2
|
|
|
|
#define GROUP_FEATURE_MOVE 4
|
|
|
|
#define GROUP_FEATURE_RAISE 8
|
|
|
|
#define GROUP_FEATURE_ICONIFY 16
|
|
|
|
#define GROUP_FEATURE_STICK 32
|
|
|
|
#define GROUP_FEATURE_SHADE 64
|
|
|
|
#define GROUP_FEATURE_MIRROR 128
|
|
|
|
|
1999-09-13 16:35:50 -07:00
|
|
|
#define SET_OFF 0
|
|
|
|
#define SET_ON 1
|
|
|
|
#define SET_TOGGLE 2
|
|
|
|
|
2001-08-16 06:33:43 -07:00
|
|
|
/* ISO encodings */
|
|
|
|
#define ENCOING_ISO_8859_1 0
|
|
|
|
#define ENCOING_ISO_8859_2 1
|
|
|
|
#define ENCOING_ISO_8859_3 2
|
|
|
|
#define ENCOING_ISO_8859_4 3
|
|
|
|
|
2004-02-10 12:25:17 -08:00
|
|
|
/*
|
|
|
|
* Types
|
|
|
|
*/
|
|
|
|
|
2004-03-01 13:03:54 -08:00
|
|
|
typedef struct _ewin EWin;
|
1999-08-17 15:56:46 -07:00
|
|
|
typedef struct _menu Menu;
|
2003-12-14 09:24:34 -08:00
|
|
|
typedef struct _menuitem MenuItem;
|
|
|
|
typedef struct _menustyle MenuStyle;
|
1999-08-17 15:56:46 -07:00
|
|
|
typedef struct _dialog Dialog;
|
2003-11-09 12:28:24 -08:00
|
|
|
typedef struct _ditem DItem;
|
1999-08-17 15:56:46 -07:00
|
|
|
typedef struct _pager Pager;
|
|
|
|
typedef struct _snapshot Snapshot;
|
|
|
|
typedef struct _iconbox Iconbox;
|
|
|
|
typedef struct _group Group;
|
2003-12-07 01:18:55 -08:00
|
|
|
typedef struct _button Button;
|
2004-01-09 01:11:33 -08:00
|
|
|
typedef struct _slideout Slideout;
|
2004-01-03 04:29:58 -08:00
|
|
|
typedef struct _soundclass SoundClass;
|
2004-04-10 12:39:02 -07:00
|
|
|
typedef struct _background Background;
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2003-12-12 10:42:15 -08:00
|
|
|
typedef struct _efont Efont;
|
|
|
|
|
2003-11-15 14:27:17 -08:00
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
char type;
|
|
|
|
Pixmap pmap;
|
|
|
|
Pixmap mask;
|
|
|
|
}
|
|
|
|
PmapMask;
|
|
|
|
|
2003-05-22 12:15:03 -07:00
|
|
|
typedef struct _icondef
|
|
|
|
{
|
2000-06-04 12:45:55 -07:00
|
|
|
char *title_match;
|
|
|
|
char *name_match;
|
|
|
|
char *class_match;
|
|
|
|
char *icon_file;
|
2003-05-22 12:15:03 -07:00
|
|
|
}
|
|
|
|
Icondef;
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2003-05-22 12:15:03 -07:00
|
|
|
typedef struct _actiontype
|
|
|
|
{
|
2000-06-04 12:45:55 -07:00
|
|
|
void *params;
|
|
|
|
struct _actiontype *Next;
|
|
|
|
int Type;
|
2003-05-22 12:15:03 -07:00
|
|
|
}
|
|
|
|
ActionType;
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2003-05-22 12:15:03 -07:00
|
|
|
typedef struct _list
|
|
|
|
{
|
2000-06-04 12:45:55 -07:00
|
|
|
char *name;
|
|
|
|
int id;
|
|
|
|
void *item;
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2000-06-04 12:45:55 -07:00
|
|
|
struct _list *next;
|
2003-05-22 12:15:03 -07:00
|
|
|
}
|
|
|
|
List;
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2003-05-22 12:15:03 -07:00
|
|
|
typedef struct _client
|
|
|
|
{
|
2000-06-04 12:45:55 -07:00
|
|
|
char *name;
|
|
|
|
Window win;
|
|
|
|
char *msg;
|
|
|
|
char *clientname;
|
|
|
|
char *version;
|
|
|
|
char *author;
|
|
|
|
char *email;
|
|
|
|
char *web;
|
|
|
|
char *address;
|
|
|
|
char *info;
|
|
|
|
Pixmap pmap;
|
2003-05-22 12:15:03 -07:00
|
|
|
}
|
|
|
|
Client;
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2003-05-22 12:15:03 -07:00
|
|
|
typedef struct _root
|
|
|
|
{
|
2000-06-04 12:45:55 -07:00
|
|
|
Window win;
|
|
|
|
Visual *vis;
|
|
|
|
int depth;
|
|
|
|
Colormap cmap;
|
|
|
|
int scr;
|
|
|
|
int w, h;
|
2003-05-22 12:15:03 -07:00
|
|
|
}
|
|
|
|
Root;
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2003-05-22 12:15:03 -07:00
|
|
|
typedef struct _modcurve
|
|
|
|
{
|
2000-06-04 12:45:55 -07:00
|
|
|
int num;
|
|
|
|
unsigned char *px;
|
|
|
|
unsigned char *py;
|
|
|
|
unsigned char map[256];
|
2003-05-22 12:15:03 -07:00
|
|
|
}
|
|
|
|
ModCurve;
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2003-05-22 12:15:03 -07:00
|
|
|
typedef struct _colormodifierclass
|
|
|
|
{
|
2000-06-04 12:45:55 -07:00
|
|
|
char *name;
|
|
|
|
ModCurve red, green, blue;
|
|
|
|
unsigned int ref_count;
|
2003-05-22 12:15:03 -07:00
|
|
|
}
|
|
|
|
ColorModifierClass;
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2003-05-22 12:15:03 -07:00
|
|
|
typedef struct _imagestate
|
|
|
|
{
|
2000-06-04 12:45:55 -07:00
|
|
|
char *im_file;
|
|
|
|
char *real_file;
|
|
|
|
char unloadable;
|
2003-12-28 09:57:31 -08:00
|
|
|
char transparent;
|
2003-11-15 14:27:17 -08:00
|
|
|
Imlib_Image *im;
|
|
|
|
Imlib_Border *border;
|
2000-06-04 12:45:55 -07:00
|
|
|
int pixmapfillstyle;
|
2003-11-15 14:27:17 -08:00
|
|
|
XColor bg, hi, lo, hihi, lolo;
|
2000-06-04 12:45:55 -07:00
|
|
|
int bevelstyle;
|
|
|
|
ColorModifierClass *colmod;
|
2003-05-22 12:15:03 -07:00
|
|
|
}
|
|
|
|
ImageState;
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2003-05-22 12:15:03 -07:00
|
|
|
typedef struct _ImageStateArray
|
|
|
|
{
|
2000-06-04 12:45:55 -07:00
|
|
|
ImageState *normal;
|
|
|
|
ImageState *hilited;
|
|
|
|
ImageState *clicked;
|
|
|
|
ImageState *disabled;
|
2003-05-22 12:15:03 -07:00
|
|
|
}
|
|
|
|
ImageStateArray;
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2003-05-22 12:15:03 -07:00
|
|
|
typedef struct _imageclass
|
|
|
|
{
|
2000-06-04 12:45:55 -07:00
|
|
|
char *name;
|
|
|
|
char external;
|
|
|
|
ImageStateArray norm, active, sticky, sticky_active;
|
2003-11-15 14:27:17 -08:00
|
|
|
Imlib_Border padding;
|
2000-06-04 12:45:55 -07:00
|
|
|
ColorModifierClass *colmod;
|
|
|
|
unsigned int ref_count;
|
2003-05-22 12:15:03 -07:00
|
|
|
}
|
|
|
|
ImageClass;
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2003-07-12 07:34:14 -07:00
|
|
|
#if !USE_FNLIB
|
|
|
|
#define MODE_VERBATIM 0
|
|
|
|
#define MODE_WRAP_CHAR 1
|
|
|
|
#define MODE_WRAP_WORD 2
|
|
|
|
|
|
|
|
#define FONT_TO_RIGHT 0
|
|
|
|
#define FONT_TO_DOWN 1
|
|
|
|
#define FONT_TO_UP 2
|
|
|
|
#define FONT_TO_LEFT 3
|
|
|
|
#endif
|
|
|
|
|
2003-05-22 12:15:03 -07:00
|
|
|
typedef struct _textstate
|
|
|
|
{
|
2000-06-04 12:45:55 -07:00
|
|
|
char *fontname;
|
2003-07-12 07:34:14 -07:00
|
|
|
#if USE_FNLIB
|
2000-06-04 12:45:55 -07:00
|
|
|
FnlibStyle style;
|
|
|
|
FnlibFont *font;
|
2003-07-12 07:34:14 -07:00
|
|
|
#else
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
char mode;
|
|
|
|
char orientation;
|
|
|
|
} style;
|
|
|
|
#endif
|
2003-11-15 14:27:17 -08:00
|
|
|
XColor fg_col;
|
|
|
|
XColor bg_col;
|
2000-06-04 12:45:55 -07:00
|
|
|
int effect;
|
|
|
|
Efont *efont;
|
|
|
|
XFontStruct *xfont;
|
|
|
|
XFontSet xfontset;
|
|
|
|
int xfontset_ascent;
|
2003-05-22 12:15:03 -07:00
|
|
|
}
|
|
|
|
TextState;
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2003-05-22 12:15:03 -07:00
|
|
|
typedef struct _textclass
|
|
|
|
{
|
2000-06-04 12:45:55 -07:00
|
|
|
char *name;
|
2003-05-22 12:15:03 -07:00
|
|
|
struct
|
|
|
|
{
|
2000-06-04 12:45:55 -07:00
|
|
|
TextState *normal;
|
|
|
|
TextState *hilited;
|
|
|
|
TextState *clicked;
|
|
|
|
TextState *disabled;
|
2003-05-22 12:15:03 -07:00
|
|
|
}
|
|
|
|
norm , active, sticky, sticky_active;
|
2000-06-04 12:45:55 -07:00
|
|
|
int justification;
|
|
|
|
unsigned int ref_count;
|
2003-05-22 12:15:03 -07:00
|
|
|
}
|
|
|
|
TextClass;
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2003-05-22 12:15:03 -07:00
|
|
|
typedef struct _action
|
|
|
|
{
|
2000-06-04 12:45:55 -07:00
|
|
|
char event;
|
|
|
|
char anymodifier;
|
|
|
|
int modifiers;
|
|
|
|
char anybutton;
|
|
|
|
int button;
|
|
|
|
char anykey;
|
|
|
|
KeyCode key;
|
|
|
|
char *key_str;
|
|
|
|
char *tooltipstring;
|
|
|
|
ActionType *action;
|
2003-05-22 12:15:03 -07:00
|
|
|
}
|
|
|
|
Action;
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2003-05-22 12:15:03 -07:00
|
|
|
typedef struct _actionclass
|
|
|
|
{
|
2000-06-04 12:45:55 -07:00
|
|
|
char *name;
|
|
|
|
int num;
|
|
|
|
Action **list;
|
|
|
|
char *tooltipstring;
|
|
|
|
unsigned int ref_count;
|
2003-05-22 12:15:03 -07:00
|
|
|
}
|
|
|
|
ActionClass;
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2003-05-22 12:15:03 -07:00
|
|
|
typedef struct _constraints
|
|
|
|
{
|
2000-06-04 12:45:55 -07:00
|
|
|
int min, max;
|
2003-05-22 12:15:03 -07:00
|
|
|
}
|
|
|
|
Constraints;
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2003-05-22 12:15:03 -07:00
|
|
|
typedef struct _winpoint
|
|
|
|
{
|
2000-06-04 12:45:55 -07:00
|
|
|
int originbox;
|
2003-05-22 12:15:03 -07:00
|
|
|
struct
|
|
|
|
{
|
2000-06-04 12:45:55 -07:00
|
|
|
int percent;
|
|
|
|
int absolute;
|
2003-05-22 12:15:03 -07:00
|
|
|
}
|
|
|
|
x , y;
|
|
|
|
}
|
|
|
|
WinPoint;
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2003-05-22 12:15:03 -07:00
|
|
|
typedef struct _geometry
|
|
|
|
{
|
2000-06-04 12:45:55 -07:00
|
|
|
Constraints width, height;
|
|
|
|
WinPoint topleft, bottomright;
|
2003-05-22 12:15:03 -07:00
|
|
|
}
|
|
|
|
Geometry;
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2003-05-22 12:15:03 -07:00
|
|
|
typedef struct _ecursor
|
|
|
|
{
|
2000-06-04 12:45:55 -07:00
|
|
|
char *name;
|
2003-11-15 14:27:17 -08:00
|
|
|
#if 0 /* Not used */
|
|
|
|
Imlib_Color fg, bg;
|
|
|
|
#endif
|
2000-06-04 12:45:55 -07:00
|
|
|
char *file;
|
|
|
|
Cursor cursor;
|
|
|
|
unsigned int ref_count;
|
|
|
|
char inroot;
|
2003-05-22 12:15:03 -07:00
|
|
|
}
|
|
|
|
ECursor;
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2003-05-22 12:15:03 -07:00
|
|
|
typedef struct _winpart
|
|
|
|
{
|
2000-06-04 12:45:55 -07:00
|
|
|
Geometry geom;
|
|
|
|
ImageClass *iclass;
|
|
|
|
ActionClass *aclass;
|
|
|
|
TextClass *tclass;
|
|
|
|
ECursor *ec;
|
|
|
|
signed char ontop;
|
|
|
|
int flags;
|
|
|
|
char keep_for_shade;
|
2003-05-22 12:15:03 -07:00
|
|
|
}
|
|
|
|
WinPart;
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2003-05-22 12:15:03 -07:00
|
|
|
typedef struct _border
|
|
|
|
{
|
2000-06-04 12:45:55 -07:00
|
|
|
char *name;
|
|
|
|
char *group_border_name;
|
2003-11-15 14:27:17 -08:00
|
|
|
Imlib_Border border;
|
2000-06-04 12:45:55 -07:00
|
|
|
int num_winparts;
|
|
|
|
WinPart *part;
|
|
|
|
char changes_shape;
|
|
|
|
char shadedir;
|
|
|
|
unsigned int ref_count;
|
2003-05-22 12:15:03 -07:00
|
|
|
}
|
|
|
|
Border;
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2003-05-22 12:15:03 -07:00
|
|
|
typedef struct _ewinbit
|
|
|
|
{
|
2000-06-04 12:45:55 -07:00
|
|
|
Window win;
|
|
|
|
int x, y, w, h;
|
|
|
|
int cx, cy, cw, ch;
|
|
|
|
int state;
|
|
|
|
char expose;
|
|
|
|
char no_expose;
|
|
|
|
char left;
|
2003-05-22 12:15:03 -07:00
|
|
|
}
|
|
|
|
EWinBit;
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2003-05-22 12:15:03 -07:00
|
|
|
typedef struct _winclient
|
|
|
|
{
|
2000-06-04 12:45:55 -07:00
|
|
|
Window win;
|
|
|
|
int x, y, w, h, bw;
|
|
|
|
Colormap cmap;
|
|
|
|
Window icon_win;
|
|
|
|
Pixmap icon_pmap;
|
|
|
|
Pixmap icon_mask;
|
|
|
|
char start_iconified;
|
|
|
|
Window group;
|
|
|
|
Window client_leader;
|
|
|
|
char need_input;
|
|
|
|
char transient;
|
|
|
|
Window transient_for;
|
|
|
|
char is_group_leader;
|
|
|
|
char no_resize_h;
|
|
|
|
char no_resize_v;
|
|
|
|
char shaped;
|
|
|
|
Constraints width, height;
|
|
|
|
int base_w, base_h;
|
|
|
|
int w_inc, h_inc;
|
|
|
|
int grav;
|
|
|
|
double aspect_min, aspect_max;
|
|
|
|
char already_placed;
|
|
|
|
char mwm_decor_border;
|
|
|
|
char mwm_decor_resizeh;
|
|
|
|
char mwm_decor_title;
|
|
|
|
char mwm_decor_menu;
|
|
|
|
char mwm_decor_minimize;
|
|
|
|
char mwm_decor_maximize;
|
|
|
|
char mwm_func_resize;
|
|
|
|
char mwm_func_move;
|
|
|
|
char mwm_func_minimize;
|
|
|
|
char mwm_func_maximize;
|
|
|
|
char mwm_func_close;
|
|
|
|
unsigned int app_state;
|
2004-04-15 12:44:38 -07:00
|
|
|
long event_mask;
|
2003-05-22 12:15:03 -07:00
|
|
|
}
|
|
|
|
WinClient;
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2004-04-21 13:51:57 -07:00
|
|
|
#define EWIN_STATE_UNKNOWN 0
|
|
|
|
#define EWIN_STATE_WITHDRAWN 1
|
|
|
|
#define EWIN_STATE_ICONIC 2
|
|
|
|
#define EWIN_STATE_MAPPED 3
|
|
|
|
|
2003-05-04 03:31:27 -07:00
|
|
|
#define EWIN_TYPE_NORMAL 0x00
|
|
|
|
#define EWIN_TYPE_DIALOG 0x01
|
|
|
|
#define EWIN_TYPE_MENU 0x02
|
|
|
|
#define EWIN_TYPE_ICONBOX 0x04
|
|
|
|
#define EWIN_TYPE_PAGER 0x08
|
|
|
|
|
2004-03-01 13:03:54 -08:00
|
|
|
struct _ewin
|
2003-05-22 12:15:03 -07:00
|
|
|
{
|
2000-06-04 12:45:55 -07:00
|
|
|
Window win;
|
|
|
|
int x, y, w, h, reqx, reqy;
|
|
|
|
int lx, ly, lw, lh;
|
2003-05-04 03:31:27 -07:00
|
|
|
char type;
|
2004-04-21 13:51:57 -07:00
|
|
|
char state;
|
2003-05-04 03:31:27 -07:00
|
|
|
char internal;
|
2000-06-04 12:45:55 -07:00
|
|
|
char toggle;
|
|
|
|
Window win_container;
|
|
|
|
WinClient client;
|
|
|
|
Border *border;
|
|
|
|
Border *previous_border;
|
|
|
|
EWinBit *bits;
|
|
|
|
int flags;
|
|
|
|
int desktop;
|
|
|
|
Group **groups;
|
|
|
|
int num_groups;
|
2004-02-26 11:33:21 -08:00
|
|
|
char docked;
|
2000-06-04 12:45:55 -07:00
|
|
|
char sticky;
|
|
|
|
char visible;
|
|
|
|
char iconified;
|
|
|
|
char shaded;
|
|
|
|
char active;
|
|
|
|
int layer;
|
|
|
|
char never_use_area;
|
|
|
|
Window parent;
|
|
|
|
char floating;
|
|
|
|
char shapedone;
|
|
|
|
char fixedpos;
|
2003-05-22 12:15:03 -07:00
|
|
|
#if 0 /* ENABLE_GNOME - Not actually used */
|
2000-06-04 12:45:55 -07:00
|
|
|
int expanded_x;
|
|
|
|
int expanded_y;
|
|
|
|
int expanded_width;
|
|
|
|
int expanded_height;
|
2003-05-04 03:24:24 -07:00
|
|
|
#endif
|
2000-06-04 12:45:55 -07:00
|
|
|
char ignorearrange;
|
|
|
|
char skiptask;
|
2003-05-04 03:31:27 -07:00
|
|
|
char skip_ext_pager;
|
2000-06-04 12:45:55 -07:00
|
|
|
char skipfocus;
|
|
|
|
char skipwinlist;
|
|
|
|
char focusclick;
|
|
|
|
char neverfocus;
|
2004-01-20 09:17:36 -08:00
|
|
|
char no_actions;
|
2003-03-23 19:48:09 -08:00
|
|
|
int ewmh_flags;
|
2000-06-04 12:45:55 -07:00
|
|
|
Menu *menu;
|
|
|
|
Window shownmenu;
|
|
|
|
Dialog *dialog;
|
|
|
|
Pager *pager;
|
|
|
|
Iconbox *ibox;
|
|
|
|
int area_x;
|
|
|
|
int area_y;
|
|
|
|
char *session_id;
|
|
|
|
int has_transients;
|
2003-11-15 14:27:17 -08:00
|
|
|
PmapMask mini_pmm;
|
2000-06-04 12:45:55 -07:00
|
|
|
int mini_w, mini_h;
|
|
|
|
Snapshot *snap;
|
2003-11-15 14:27:17 -08:00
|
|
|
PmapMask icon_pmm;
|
|
|
|
int icon_w, icon_h;
|
2000-06-04 12:45:55 -07:00
|
|
|
int head;
|
2004-02-28 17:30:18 -08:00
|
|
|
struct
|
|
|
|
{
|
|
|
|
char *wm_name;
|
|
|
|
char *wm_icon_name;
|
|
|
|
char *wm_res_name;
|
|
|
|
char *wm_res_class;
|
|
|
|
char *wm_role;
|
|
|
|
char *wm_command;
|
|
|
|
char *wm_machine;
|
|
|
|
} icccm;
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
char *wm_name;
|
|
|
|
char *wm_icon_name;
|
|
|
|
} ewmh;
|
2004-03-01 13:03:54 -08:00
|
|
|
void (*MoveResize) (EWin * ewin, int resize);
|
|
|
|
void (*Refresh) (EWin * ewin);
|
2004-04-07 14:50:19 -07:00
|
|
|
void (*Close) (EWin * ewin);
|
2004-03-01 13:03:54 -08:00
|
|
|
};
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2003-05-22 12:15:03 -07:00
|
|
|
typedef struct _groupconfig
|
|
|
|
{
|
2000-06-04 12:45:55 -07:00
|
|
|
char iconify;
|
|
|
|
char kill;
|
|
|
|
char move;
|
|
|
|
char raise;
|
|
|
|
char set_border;
|
|
|
|
char stick;
|
|
|
|
char shade;
|
|
|
|
char mirror;
|
2003-05-22 12:15:03 -07:00
|
|
|
}
|
|
|
|
GroupConfig;
|
1999-09-08 17:39:43 -07:00
|
|
|
|
2003-05-22 12:15:03 -07:00
|
|
|
struct _group
|
|
|
|
{
|
2000-06-04 12:45:55 -07:00
|
|
|
int index;
|
|
|
|
EWin **members;
|
|
|
|
int num_members;
|
|
|
|
GroupConfig cfg;
|
|
|
|
};
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2003-05-22 12:15:03 -07:00
|
|
|
typedef struct _awaiticlass
|
|
|
|
{
|
2000-06-04 12:45:55 -07:00
|
|
|
Window client_win;
|
|
|
|
int ewin_bit;
|
|
|
|
ImageClass *iclass;
|
2003-05-22 12:15:03 -07:00
|
|
|
}
|
|
|
|
AwaitIclass;
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2003-12-07 01:18:55 -08:00
|
|
|
#ifdef DECLARE_STRUCT_BUTTON
|
2003-05-22 12:15:03 -07:00
|
|
|
typedef struct _bgeometry
|
|
|
|
{
|
2000-06-04 12:45:55 -07:00
|
|
|
Constraints width, height;
|
|
|
|
int xorigin, yorigin;
|
|
|
|
int xabs, xrel;
|
|
|
|
int yabs, yrel;
|
|
|
|
int xsizerel, xsizeabs;
|
|
|
|
int ysizerel, ysizeabs;
|
|
|
|
char size_from_image;
|
2003-05-22 12:15:03 -07:00
|
|
|
}
|
|
|
|
BGeometry;
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2003-12-07 01:18:55 -08:00
|
|
|
struct _button
|
2003-05-22 12:15:03 -07:00
|
|
|
{
|
2000-06-04 12:45:55 -07:00
|
|
|
char *name;
|
|
|
|
BGeometry geom;
|
|
|
|
ImageClass *iclass;
|
|
|
|
ActionClass *aclass;
|
|
|
|
TextClass *tclass;
|
|
|
|
char *label;
|
|
|
|
signed char ontop;
|
|
|
|
int flags;
|
|
|
|
char sticky;
|
|
|
|
int desktop;
|
|
|
|
char visible;
|
|
|
|
char internal;
|
|
|
|
char default_show;
|
|
|
|
char used;
|
|
|
|
|
|
|
|
Window win;
|
|
|
|
int x, y, w, h;
|
|
|
|
int cx, cy, cw, ch;
|
|
|
|
int state;
|
|
|
|
char expose;
|
|
|
|
Window inside_win;
|
|
|
|
Window event_win;
|
|
|
|
char destroy_inside_win;
|
|
|
|
char left;
|
|
|
|
unsigned int ref_count;
|
2003-12-07 01:18:55 -08:00
|
|
|
};
|
|
|
|
#endif /* DECLARE_STRUCT_BUTTON */
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2004-04-12 01:28:34 -07:00
|
|
|
#ifdef DECLARE_STRUCT_BACKGROUND
|
2003-11-21 16:15:41 -08:00
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
char *file;
|
|
|
|
char *real_file;
|
|
|
|
Imlib_Image *im;
|
|
|
|
char keep_aspect;
|
|
|
|
int xjust, yjust;
|
|
|
|
int xperc, yperc;
|
|
|
|
}
|
|
|
|
BgPart;
|
|
|
|
|
2004-04-10 12:39:02 -07:00
|
|
|
struct _background
|
2003-05-22 12:15:03 -07:00
|
|
|
{
|
2000-06-04 12:45:55 -07:00
|
|
|
char *name;
|
|
|
|
Pixmap pmap;
|
|
|
|
time_t last_viewed;
|
2003-11-21 16:15:41 -08:00
|
|
|
XColor bg_solid;
|
|
|
|
char bg_tile;
|
|
|
|
BgPart bg;
|
|
|
|
BgPart top;
|
2000-06-04 12:45:55 -07:00
|
|
|
ColorModifierClass *cmclass;
|
|
|
|
char keepim;
|
|
|
|
unsigned int ref_count;
|
2004-04-10 12:39:02 -07:00
|
|
|
};
|
2004-04-12 01:28:34 -07:00
|
|
|
#endif /* DECLARE_STRUCT_BACKGROUND */
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2003-05-22 12:15:03 -07:00
|
|
|
typedef struct _desk
|
|
|
|
{
|
2000-06-04 12:45:55 -07:00
|
|
|
char viewable;
|
|
|
|
Window win;
|
|
|
|
int x, y;
|
|
|
|
Background *bg;
|
|
|
|
Button *tag;
|
|
|
|
int current_area_x;
|
|
|
|
int current_area_y;
|
2003-05-22 12:15:03 -07:00
|
|
|
}
|
|
|
|
Desk;
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2004-02-11 07:39:13 -08:00
|
|
|
#define ENLIGHTENMENT_CONF_NUM_DESKTOPS 32
|
|
|
|
/* the cast is so -1 will == UINT_MAX */
|
|
|
|
#define DESKTOPS_WRAP_NUM(x) \
|
2004-03-20 07:49:05 -08:00
|
|
|
(((unsigned int) (x)) % Conf.desks.num)
|
2004-02-11 07:39:13 -08:00
|
|
|
|
2003-05-22 12:15:03 -07:00
|
|
|
typedef struct _desktops
|
|
|
|
{
|
2000-06-04 12:45:55 -07:00
|
|
|
int current;
|
|
|
|
Desk desk[ENLIGHTENMENT_CONF_NUM_DESKTOPS];
|
2004-02-11 07:39:13 -08:00
|
|
|
int order[ENLIGHTENMENT_CONF_NUM_DESKTOPS];
|
2003-05-22 12:15:03 -07:00
|
|
|
}
|
|
|
|
Desktops;
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2003-05-22 12:15:03 -07:00
|
|
|
typedef struct _windowmatch
|
|
|
|
{
|
2000-06-04 12:45:55 -07:00
|
|
|
char *name;
|
|
|
|
char *win_title;
|
|
|
|
char *win_name;
|
|
|
|
char *win_class;
|
|
|
|
Constraints width;
|
|
|
|
Constraints height;
|
|
|
|
signed char transient;
|
|
|
|
signed char no_resize_h;
|
|
|
|
signed char no_resize_v;
|
|
|
|
signed char shaped;
|
|
|
|
Border *border;
|
|
|
|
ImageClass *icon;
|
|
|
|
int desk;
|
|
|
|
char make_sticky;
|
2003-05-22 12:15:03 -07:00
|
|
|
}
|
|
|
|
WindowMatch;
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2004-01-12 12:43:18 -08:00
|
|
|
/* Configuration parameters */
|
|
|
|
typedef struct
|
2003-05-22 12:15:03 -07:00
|
|
|
{
|
2004-01-12 12:43:18 -08:00
|
|
|
struct
|
|
|
|
{
|
2004-02-06 11:56:26 -08:00
|
|
|
int nx;
|
|
|
|
int ny;
|
2004-01-12 12:43:18 -08:00
|
|
|
char wraparound;
|
|
|
|
} areas;
|
|
|
|
struct
|
2004-02-04 12:32:08 -08:00
|
|
|
{
|
|
|
|
char enable;
|
|
|
|
float delay;
|
|
|
|
} autoraise;
|
|
|
|
struct
|
2004-02-11 07:39:13 -08:00
|
|
|
{
|
|
|
|
char hiquality;
|
|
|
|
char user;
|
|
|
|
int timeout;
|
|
|
|
} backgrounds;
|
|
|
|
struct
|
2004-01-12 12:43:18 -08:00
|
|
|
{
|
2004-02-06 11:56:26 -08:00
|
|
|
int num;
|
2004-01-12 12:43:18 -08:00
|
|
|
char wraparound;
|
2004-02-06 11:56:26 -08:00
|
|
|
int dragdir;
|
|
|
|
int dragbar_width;
|
|
|
|
int dragbar_ordering;
|
|
|
|
int dragbar_length;
|
|
|
|
char slidein;
|
|
|
|
int slidespeed;
|
2004-01-12 12:43:18 -08:00
|
|
|
} desks;
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
char headers;
|
|
|
|
} dialogs;
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
char dirmode;
|
|
|
|
int startx;
|
|
|
|
int starty;
|
|
|
|
} dock;
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
int mode;
|
|
|
|
char clickraises;
|
|
|
|
char transientsfollowleader;
|
|
|
|
char switchfortransientmap;
|
|
|
|
char all_new_windows_get_focus;
|
|
|
|
char new_transients_get_focus;
|
|
|
|
char new_transients_get_focus_if_group_focused;
|
|
|
|
char raise_on_next_focus;
|
|
|
|
char raise_after_next_focus;
|
|
|
|
char warp_on_next_focus;
|
|
|
|
char warp_after_next_focus;
|
|
|
|
} focus;
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
char set_xroot_info_on_root_window;
|
|
|
|
} hints;
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
char enable;
|
|
|
|
char zoom;
|
|
|
|
char title;
|
|
|
|
char hiq;
|
|
|
|
char snap;
|
|
|
|
int scanspeed;
|
|
|
|
int sel_button;
|
|
|
|
int win_button;
|
|
|
|
int menu_button;
|
|
|
|
} pagers;
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
char enable;
|
|
|
|
int edge_snap_dist;
|
|
|
|
int screen_snap_dist;
|
|
|
|
} snap;
|
|
|
|
struct
|
2004-02-11 17:17:21 -08:00
|
|
|
{
|
|
|
|
char *name;
|
|
|
|
int transparency;
|
|
|
|
} theme;
|
|
|
|
struct
|
2004-01-12 12:43:18 -08:00
|
|
|
{
|
|
|
|
char enable;
|
|
|
|
char showroottooltip;
|
2004-02-04 12:32:08 -08:00
|
|
|
float delay;
|
2004-01-12 12:43:18 -08:00
|
|
|
} tooltips;
|
|
|
|
struct
|
|
|
|
{
|
2004-02-06 11:56:26 -08:00
|
|
|
char enable;
|
2004-01-12 12:43:18 -08:00
|
|
|
char warpsticky;
|
|
|
|
char warpshaded;
|
|
|
|
char warpiconified;
|
|
|
|
char warpfocused;
|
|
|
|
} warplist;
|
2000-06-04 12:45:55 -07:00
|
|
|
int deskmode;
|
2004-01-12 12:43:18 -08:00
|
|
|
int movemode;
|
|
|
|
int resizemode;
|
|
|
|
int geominfomode;
|
|
|
|
int slidemode;
|
|
|
|
char cleanupslide;
|
|
|
|
char mapslide;
|
|
|
|
int slidespeedmap;
|
|
|
|
int slidespeedcleanup;
|
|
|
|
char animate_shading;
|
|
|
|
int shadespeed;
|
|
|
|
char sound;
|
|
|
|
int button_move_resistance;
|
|
|
|
char autosave;
|
|
|
|
char memory_paranoia;
|
|
|
|
char dockapp_support; /* wmdockapp only */
|
|
|
|
char save_under;
|
|
|
|
char menuslide;
|
|
|
|
char menusonscreen;
|
|
|
|
char manual_placement;
|
|
|
|
char manual_placement_mouse_pointer;
|
|
|
|
char warpmenus;
|
|
|
|
int edge_flip_resistance;
|
|
|
|
GroupConfig group_config;
|
|
|
|
char group_swapmove;
|
|
|
|
|
|
|
|
/* Not used */
|
|
|
|
char primaryicondir;
|
|
|
|
#ifdef HAS_XINERAMA
|
|
|
|
char extra_head; /* Not used */
|
|
|
|
#endif
|
|
|
|
#if 0 /* Not used */
|
|
|
|
TextClass *icon_textclass;
|
|
|
|
int icon_mode;
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
EConf;
|
|
|
|
|
|
|
|
/* State parameters */
|
2004-04-09 05:59:56 -07:00
|
|
|
#define DRAW_QUEUE_ENABLE 1
|
|
|
|
|
2004-01-12 12:43:18 -08:00
|
|
|
typedef struct
|
|
|
|
{
|
2004-04-07 07:32:36 -07:00
|
|
|
struct
|
|
|
|
{
|
|
|
|
int screens;
|
|
|
|
} display;
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
char master; /* We are the master E */
|
|
|
|
char single; /* No slaves */
|
|
|
|
pid_t master_pid;
|
|
|
|
int master_screen;
|
|
|
|
} wm;
|
2004-03-09 11:07:05 -08:00
|
|
|
int debug;
|
2004-01-12 12:43:18 -08:00
|
|
|
int mode;
|
2000-06-04 12:45:55 -07:00
|
|
|
char place;
|
|
|
|
char flipp;
|
|
|
|
char startup;
|
|
|
|
char xselect;
|
2004-01-12 12:43:18 -08:00
|
|
|
int next_move_x_plus, next_move_y_plus;
|
2000-06-04 12:45:55 -07:00
|
|
|
Button *button;
|
|
|
|
int resize_detail;
|
|
|
|
int win_x, win_y, win_w, win_h;
|
|
|
|
int start_x, start_y;
|
|
|
|
char have_place_grab;
|
2004-01-11 05:20:17 -08:00
|
|
|
char action_inhibit;
|
|
|
|
char justclicked;
|
2000-06-04 12:45:55 -07:00
|
|
|
char click_focus_grabbed;
|
|
|
|
EWin *focuswin;
|
|
|
|
EWin *mouse_over_win;
|
|
|
|
int px, py, x, y;
|
|
|
|
char firstlast;
|
|
|
|
int swapmovemode;
|
|
|
|
int swapcoord_x, swapcoord_y;
|
|
|
|
char doingslide;
|
|
|
|
int server_grabbed;
|
|
|
|
int deskdrag;
|
|
|
|
char button_move_pending;
|
|
|
|
Colormap current_cmap;
|
|
|
|
Slideout *slideout;
|
|
|
|
Window context_win;
|
|
|
|
char cur_menu_mode;
|
|
|
|
int cur_menu_depth;
|
|
|
|
Menu *cur_menu[256];
|
|
|
|
Window menu_cover_win;
|
2003-05-18 04:46:35 -07:00
|
|
|
Window menu_win_covered;
|
2004-01-12 12:43:18 -08:00
|
|
|
int context_w, context_h;
|
2000-06-04 12:45:55 -07:00
|
|
|
Pager *context_pager;
|
|
|
|
char constrained;
|
|
|
|
char nogroup;
|
|
|
|
char keybinds_changed;
|
|
|
|
char firsttime;
|
2004-01-13 12:01:44 -08:00
|
|
|
Window button_proxy_win;
|
2004-02-01 03:28:06 -08:00
|
|
|
const XEvent *current_event;
|
2004-02-02 11:32:25 -08:00
|
|
|
Window last_bpress;
|
|
|
|
int last_button;
|
|
|
|
Time last_time;
|
2004-04-09 05:59:56 -07:00
|
|
|
char queue_up;
|
2003-05-22 12:15:03 -07:00
|
|
|
}
|
|
|
|
EMode;
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2003-05-22 12:15:03 -07:00
|
|
|
typedef struct _handlestruct
|
|
|
|
{
|
2000-06-04 12:45:55 -07:00
|
|
|
void (*func) (XEvent * ev);
|
2003-05-22 12:15:03 -07:00
|
|
|
}
|
|
|
|
HandleStruct;
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2003-05-22 12:15:03 -07:00
|
|
|
typedef struct _tooltip
|
|
|
|
{
|
2000-06-04 12:45:55 -07:00
|
|
|
char *name;
|
|
|
|
|
|
|
|
ImageClass *iclass;
|
|
|
|
ImageClass *s_iclass[4];
|
|
|
|
TextClass *tclass;
|
|
|
|
int dist;
|
|
|
|
Window win;
|
|
|
|
Window iwin;
|
|
|
|
Window s_win[4];
|
|
|
|
char visible;
|
|
|
|
ImageClass *tooltippic;
|
|
|
|
unsigned int ref_count;
|
2003-05-22 12:15:03 -07:00
|
|
|
}
|
|
|
|
ToolTip;
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2003-05-22 12:15:03 -07:00
|
|
|
typedef struct _qentry
|
|
|
|
{
|
2000-06-04 12:45:55 -07:00
|
|
|
char *name;
|
|
|
|
double in_time;
|
|
|
|
void (*func) (int val, void *data);
|
|
|
|
struct _qentry *next;
|
|
|
|
int runtime_val;
|
|
|
|
void *runtime_data;
|
|
|
|
char just_added;
|
2003-05-22 12:15:03 -07:00
|
|
|
}
|
|
|
|
Qentry;
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2003-12-14 09:24:34 -08:00
|
|
|
#ifdef DECLARE_STRUCT_MENU
|
|
|
|
struct _menustyle
|
2003-05-22 12:15:03 -07:00
|
|
|
{
|
2000-06-04 12:45:55 -07:00
|
|
|
char *name;
|
|
|
|
TextClass *tclass;
|
|
|
|
ImageClass *bg_iclass;
|
|
|
|
ImageClass *item_iclass;
|
|
|
|
ImageClass *sub_iclass;
|
|
|
|
char use_item_bg;
|
|
|
|
char iconpos;
|
|
|
|
int maxx;
|
|
|
|
int maxy;
|
|
|
|
char *border_name;
|
|
|
|
unsigned int ref_count;
|
2003-12-14 09:24:34 -08:00
|
|
|
};
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2003-12-14 09:24:34 -08:00
|
|
|
struct _menuitem
|
2003-05-22 12:15:03 -07:00
|
|
|
{
|
2000-06-04 12:45:55 -07:00
|
|
|
ImageClass *icon_iclass;
|
|
|
|
char *text;
|
|
|
|
short act_id;
|
|
|
|
void *params;
|
|
|
|
Menu *child;
|
|
|
|
char state;
|
2003-11-15 14:27:17 -08:00
|
|
|
PmapMask pmm[3];
|
2000-06-04 12:45:55 -07:00
|
|
|
Window win;
|
|
|
|
Window icon_win;
|
|
|
|
short icon_w;
|
|
|
|
short icon_h;
|
|
|
|
short text_w;
|
|
|
|
short text_h;
|
|
|
|
short text_x;
|
|
|
|
short text_y;
|
2003-12-14 09:24:34 -08:00
|
|
|
};
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2003-05-22 12:15:03 -07:00
|
|
|
struct _menu
|
|
|
|
{
|
2000-06-04 12:45:55 -07:00
|
|
|
char *name;
|
|
|
|
char *title;
|
|
|
|
MenuStyle *style;
|
|
|
|
int num;
|
|
|
|
MenuItem **items;
|
|
|
|
Window win;
|
2003-11-15 14:27:17 -08:00
|
|
|
PmapMask pmm;
|
2003-12-14 09:24:34 -08:00
|
|
|
char shown;
|
2000-06-04 12:45:55 -07:00
|
|
|
char stuck;
|
2003-12-14 09:24:34 -08:00
|
|
|
char internal; /* Don't destroy when reloading */
|
2000-06-04 12:45:55 -07:00
|
|
|
Menu *parent;
|
|
|
|
MenuItem *sel_item;
|
|
|
|
time_t last_change;
|
|
|
|
void *data;
|
|
|
|
Menu *ref_menu;
|
|
|
|
unsigned int ref_count;
|
|
|
|
};
|
2003-12-14 09:24:34 -08:00
|
|
|
#endif /* DECLARE_STRUCT_MENU */
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2003-05-22 12:15:03 -07:00
|
|
|
typedef struct _progressbar
|
|
|
|
{
|
2000-06-04 12:45:55 -07:00
|
|
|
char *name;
|
|
|
|
int value;
|
|
|
|
int x;
|
|
|
|
int y;
|
|
|
|
int w;
|
|
|
|
int h;
|
|
|
|
Window win;
|
|
|
|
Window n_win;
|
|
|
|
Window p_win;
|
|
|
|
ImageClass *ic, *inc, *ipc;
|
|
|
|
TextClass *tc, *tnc;
|
2003-05-22 12:15:03 -07:00
|
|
|
}
|
|
|
|
Progressbar;
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2003-05-22 12:15:03 -07:00
|
|
|
struct _snapshot
|
|
|
|
{
|
2000-06-04 12:45:55 -07:00
|
|
|
char *name;
|
|
|
|
char *win_title;
|
|
|
|
char *win_name;
|
|
|
|
char *win_class;
|
|
|
|
char *border_name;
|
|
|
|
char use_desktop;
|
|
|
|
int desktop;
|
|
|
|
int area_x, area_y;
|
|
|
|
char use_wh;
|
|
|
|
int w, h;
|
|
|
|
char use_xy;
|
|
|
|
int x, y;
|
|
|
|
char use_layer;
|
|
|
|
int layer;
|
|
|
|
char use_sticky;
|
|
|
|
char sticky;
|
|
|
|
char *iclass_name;
|
|
|
|
char use_shade;
|
|
|
|
char shade;
|
|
|
|
char use_cmd;
|
|
|
|
char *cmd;
|
|
|
|
int *groups;
|
|
|
|
int num_groups;
|
|
|
|
int used;
|
|
|
|
char use_skipwinlist;
|
|
|
|
char skipwinlist;
|
|
|
|
char use_skiplists;
|
|
|
|
char skiptask;
|
|
|
|
char skipfocus;
|
|
|
|
char use_neverfocus;
|
|
|
|
char neverfocus;
|
|
|
|
};
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2003-11-09 12:28:24 -08:00
|
|
|
/* Dialog items */
|
1999-08-17 15:56:46 -07:00
|
|
|
#define DITEM_NONE 0
|
|
|
|
#define DITEM_BUTTON 1
|
|
|
|
#define DITEM_CHECKBUTTON 2
|
|
|
|
#define DITEM_TEXT 3
|
|
|
|
#define DITEM_IMAGE 4
|
|
|
|
#define DITEM_SEPARATOR 5
|
|
|
|
#define DITEM_TABLE 6
|
|
|
|
#define DITEM_RADIOBUTTON 7
|
|
|
|
#define DITEM_SLIDER 8
|
|
|
|
#define DITEM_AREA 9
|
|
|
|
|
2003-05-22 12:15:03 -07:00
|
|
|
typedef struct _PixImg
|
|
|
|
{
|
2000-06-04 12:45:55 -07:00
|
|
|
XImage *xim;
|
|
|
|
XShmSegmentInfo *shminfo;
|
|
|
|
Pixmap pmap;
|
|
|
|
GC gc;
|
2003-05-22 12:15:03 -07:00
|
|
|
}
|
|
|
|
PixImg;
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2003-05-22 12:15:03 -07:00
|
|
|
typedef struct _Clone
|
|
|
|
{
|
2000-06-04 12:45:55 -07:00
|
|
|
char *name;
|
|
|
|
Window win;
|
|
|
|
EWin *ewin;
|
2003-05-22 12:15:03 -07:00
|
|
|
}
|
|
|
|
Clone;
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2003-11-24 09:07:23 -08:00
|
|
|
#ifdef DECLARE_STRUCT_ICONBOX
|
2003-05-22 12:15:03 -07:00
|
|
|
struct _iconbox
|
|
|
|
{
|
2000-06-04 12:45:55 -07:00
|
|
|
/* user settings */
|
|
|
|
char *name;
|
|
|
|
char orientation;
|
|
|
|
char animate;
|
|
|
|
char scrollbar_side;
|
|
|
|
char arrow_side;
|
|
|
|
char shownames;
|
|
|
|
char nobg;
|
|
|
|
int iconsize;
|
|
|
|
int icon_mode;
|
|
|
|
|
|
|
|
char auto_resize;
|
|
|
|
char draw_icon_base;
|
|
|
|
char scrollbar_hide;
|
|
|
|
char cover_hide;
|
|
|
|
int auto_resize_anchor;
|
|
|
|
|
|
|
|
/* internally set stuff */
|
|
|
|
int w, h;
|
|
|
|
int pos;
|
2003-11-24 09:07:23 -08:00
|
|
|
int max, max_min;
|
|
|
|
char force_update;
|
2000-06-04 12:45:55 -07:00
|
|
|
char arrow1_hilited;
|
|
|
|
char arrow1_clicked;
|
|
|
|
char arrow2_hilited;
|
|
|
|
char arrow2_clicked;
|
|
|
|
char icon_clicked;
|
|
|
|
char scrollbar_hilited;
|
|
|
|
char scrollbar_clicked;
|
|
|
|
char scrollbox_clicked;
|
|
|
|
|
|
|
|
Pixmap pmap;
|
|
|
|
|
|
|
|
Window win;
|
|
|
|
Window cover_win;
|
|
|
|
Window icon_win;
|
|
|
|
Window scroll_win;
|
|
|
|
Window arrow1_win;
|
|
|
|
Window arrow2_win;
|
|
|
|
Window scrollbar_win;
|
|
|
|
Window scrollbarknob_win;
|
|
|
|
EWin *ewin;
|
|
|
|
|
|
|
|
int num_icons;
|
|
|
|
EWin **icons;
|
|
|
|
|
|
|
|
/* these are theme-settable parameters */
|
|
|
|
int scroll_thickness;
|
|
|
|
int arrow_thickness;
|
|
|
|
int bar_thickness;
|
|
|
|
int knob_length;
|
|
|
|
|
|
|
|
};
|
2003-11-24 09:07:23 -08:00
|
|
|
#endif /* DECLARE_STRUCT_ICONBOX */
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2003-05-22 12:15:03 -07:00
|
|
|
typedef struct _drawqueue
|
|
|
|
{
|
2000-06-04 12:45:55 -07:00
|
|
|
Window win;
|
|
|
|
ImageClass *iclass;
|
|
|
|
int w, h, active, sticky, state, expose;
|
|
|
|
TextClass *tclass;
|
|
|
|
char *text;
|
|
|
|
char shape_propagate;
|
|
|
|
Pager *pager;
|
|
|
|
Pager *redraw_pager;
|
|
|
|
char newbg;
|
|
|
|
Dialog *d;
|
|
|
|
DItem *di;
|
|
|
|
int x, y;
|
2003-05-22 12:15:03 -07:00
|
|
|
}
|
|
|
|
DrawQueue;
|
1999-09-04 00:10:13 -07:00
|
|
|
|
2004-02-08 08:17:58 -08:00
|
|
|
typedef struct _rectbox
|
|
|
|
{
|
|
|
|
void *data;
|
|
|
|
int x, y, w, h;
|
|
|
|
int p;
|
|
|
|
}
|
|
|
|
RectBox;
|
|
|
|
|
2004-02-10 12:25:17 -08:00
|
|
|
/*
|
|
|
|
* Function prototypes
|
|
|
|
*/
|
1999-09-07 14:20:34 -07:00
|
|
|
|
2004-02-10 12:25:17 -08:00
|
|
|
/* actions.c */
|
|
|
|
void RefreshScreen(void);
|
|
|
|
void GrabButtonGrabs(EWin * ewin);
|
|
|
|
void UnGrabButtonGrabs(EWin * ewin);
|
2004-03-20 17:39:40 -08:00
|
|
|
ActionClass *CreateAclass(const char *name);
|
2004-02-10 12:25:17 -08:00
|
|
|
Action *CreateAction(char event, char anymod, int mod, int anybut,
|
|
|
|
int but, char anykey, char *key,
|
|
|
|
char *tooltipstring);
|
|
|
|
void RemoveActionClass(ActionClass * ActionToRemove);
|
|
|
|
void AddToAction(Action * act, int id, void *params);
|
|
|
|
void AddAction(ActionClass * a, Action * act);
|
|
|
|
int EventAclass(XEvent * ev, EWin * ewin, ActionClass * a);
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2004-03-20 17:39:40 -08:00
|
|
|
int ActionsCall(unsigned int type, EWin * ewin,
|
|
|
|
const void *params);
|
2004-02-10 12:25:17 -08:00
|
|
|
int ActionsSuspend(void);
|
|
|
|
int ActionsResume(void);
|
|
|
|
void ActionsHandleMotion(void);
|
|
|
|
int ActionsEnd(EWin * ewin);
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2004-03-20 17:39:40 -08:00
|
|
|
int execApplication(const void *params);
|
|
|
|
int doDragButtonEnd(const void *params);
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2004-02-10 12:25:17 -08:00
|
|
|
/* alert.c */
|
2004-03-11 08:58:14 -08:00
|
|
|
void AlertInit(void);
|
|
|
|
void Alert(const char *fmt, ...);
|
|
|
|
void AlertX(const char *title, const char *ignore,
|
2004-03-20 07:49:05 -08:00
|
|
|
const char *restart, const char *quit,
|
2004-03-11 08:58:14 -08:00
|
|
|
const char *fmt, ...);
|
2004-02-10 12:25:17 -08:00
|
|
|
void InitStringList(void);
|
2004-03-20 17:39:40 -08:00
|
|
|
void AssignIgnoreFunction(int (*func) (const void *),
|
|
|
|
const void *params);
|
|
|
|
void AssignRestartFunction(int (*func) (const void *),
|
|
|
|
const void *params);
|
|
|
|
void AssignExitFunction(int (*func) (const void *),
|
|
|
|
const void *params);
|
2004-03-11 08:58:14 -08:00
|
|
|
void AssignTitleText(const char *text);
|
|
|
|
void AssignIgnoreText(const char *text);
|
|
|
|
void AssignRestartText(const char *text);
|
|
|
|
void AssignExitText(const char *text);
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2004-02-10 12:25:17 -08:00
|
|
|
/* areas.c */
|
|
|
|
void AreaFix(int *ax, int *ay);
|
|
|
|
void SetNewAreaSize(int ax, int ay);
|
|
|
|
void GetCurrentArea(int *ax, int *ay);
|
|
|
|
void SetAreaSize(int aw, int ah);
|
|
|
|
void GetAreaSize(int *aw, int *ah);
|
|
|
|
void InitCurrentArea(int ax, int ay);
|
|
|
|
void SetCurrentArea(int ax, int ay);
|
|
|
|
void MoveCurrentAreaBy(int ax, int ay);
|
|
|
|
void SetCurrentLinearArea(int a);
|
|
|
|
int GetCurrentLinearArea(void);
|
|
|
|
void MoveCurrentLinearAreaBy(int a);
|
|
|
|
void SlideWindowsBy(Window * win, int num, int dx, int dy,
|
|
|
|
int speed);
|
|
|
|
void MoveEwinToLinearArea(EWin * ewin, int a);
|
|
|
|
void MoveEwinLinearAreaBy(EWin * ewin, int a);
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2004-02-10 12:25:17 -08:00
|
|
|
int Emkstemp(char *template);
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2004-02-10 12:25:17 -08:00
|
|
|
/* arrange.c */
|
|
|
|
#define ARRANGE_VERBATIM 0
|
|
|
|
#define ARRANGE_BY_SIZE 1
|
|
|
|
#define ARRANGE_BY_POSITION 2
|
|
|
|
|
|
|
|
void ArrangeRects(RectBox * fixed, int fixed_count,
|
|
|
|
RectBox * floating, int floating_count,
|
|
|
|
RectBox * sorted, int startx, int starty,
|
|
|
|
int width, int height, int policy,
|
|
|
|
char initial_window);
|
|
|
|
void SnapEwin(EWin * ewin, int dx, int dy, int *new_dx,
|
|
|
|
int *new_dy);
|
|
|
|
void ArrangeEwin(EWin * ewin);
|
|
|
|
void ArrangeEwinCentered(EWin * ewin, int focus);
|
|
|
|
void ArrangeEwinXY(EWin * ewin, int *px, int *py);
|
|
|
|
void ArrangeEwinCenteredXY(EWin * ewin, int *px, int *py);
|
|
|
|
|
|
|
|
/* atoms.c */
|
|
|
|
void *AtomGet(Window win, Atom to_get, Atom type, int *size);
|
|
|
|
void setSimpleHint(Window win, Atom atom, long value);
|
|
|
|
long *getSimpleHint(Window win, Atom atom);
|
|
|
|
void deleteHint(Window win, Atom atom);
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2004-04-10 12:39:02 -07:00
|
|
|
/* backgrounds.c */
|
|
|
|
char *BackgroundGetUniqueString(Background * bg);
|
2004-04-12 01:28:34 -07:00
|
|
|
void BackgroundPixmapFree(Background * bg);
|
|
|
|
void BackgroundImagesFree(Background * bg, int free_pmap);
|
|
|
|
void BackgroundImagesKeep(Background * bg, int onoff);
|
2004-04-10 12:39:02 -07:00
|
|
|
void BackgroundImagesRemove(Background * bg);
|
2004-04-12 01:28:34 -07:00
|
|
|
int BackgroundDestroy(Background * bg);
|
|
|
|
void BackgroundDelete(Background * bg);
|
2004-04-10 12:39:02 -07:00
|
|
|
Background *BackgroundCreate(const char *name, XColor * solid,
|
|
|
|
const char *bg, char tile,
|
|
|
|
char keep_aspect, int xjust, int yjust,
|
|
|
|
int xperc, int yperc, const char *top,
|
|
|
|
char tkeep_aspect, int txjust, int tyjust,
|
|
|
|
int txperc, int typerc);
|
2004-04-12 01:28:34 -07:00
|
|
|
void BackgroundDestroyByName(const char *name);
|
2004-04-10 12:39:02 -07:00
|
|
|
void BackgroundApply(Background * bg, Window win, int setbg);
|
2004-04-12 01:28:34 -07:00
|
|
|
void BackgroundIncRefcount(Background * bg);
|
|
|
|
void BackgroundDecRefcount(Background * bg);
|
|
|
|
void BackgroundTouch(Background * bg);
|
|
|
|
const char *BackgroundGetName(const Background * bg);
|
|
|
|
Pixmap BackgroundGetPixmap(const Background * bg);
|
2004-04-10 12:39:02 -07:00
|
|
|
void BackgroundsAccounting(void);
|
|
|
|
void BackgroundsInit(void);
|
|
|
|
|
2004-02-01 03:28:06 -08:00
|
|
|
/* borders.c */
|
2004-02-28 17:30:18 -08:00
|
|
|
#define EWIN_CHANGE_NAME (1<<0)
|
|
|
|
#define EWIN_CHANGE_ICON_NAME (1<<1)
|
|
|
|
#define EWIN_CHANGE_ICON_PMAP (1<<2)
|
|
|
|
#define EWIN_CHANGE_DESKTOP (1<<3)
|
|
|
|
#define EWIN_CHANGE_LAYER (1<<4)
|
|
|
|
|
2004-03-01 13:03:54 -08:00
|
|
|
void EwinRefresh(EWin * ewin);
|
2004-02-17 15:28:25 -08:00
|
|
|
void EwinUpdateAfterMoveResize(EWin * ewin, int resize);
|
1999-08-17 15:56:46 -07:00
|
|
|
void ResizeEwin(EWin * ewin, int w, int h);
|
|
|
|
void MoveEwin(EWin * ewin, int x, int y);
|
|
|
|
void MoveResizeEwin(EWin * ewin, int x, int y, int w, int h);
|
|
|
|
void FloatEwin(EWin * ewin);
|
|
|
|
void FloatEwinAt(EWin * ewin, int x, int y);
|
|
|
|
void RaiseEwin(EWin * ewin);
|
|
|
|
void LowerEwin(EWin * ewin);
|
|
|
|
void ShowEwin(EWin * ewin);
|
|
|
|
void HideEwin(EWin * ewin);
|
|
|
|
void FreeBorder(Border * b);
|
2004-03-20 17:39:40 -08:00
|
|
|
Border *CreateBorder(const char *name);
|
1999-08-17 15:56:46 -07:00
|
|
|
void AddBorderPart(Border * b, ImageClass * iclass,
|
2003-05-22 12:15:03 -07:00
|
|
|
ActionClass * aclass, TextClass * tclass,
|
|
|
|
ECursor * ec, char ontop, int flags,
|
|
|
|
char isregion, int wmin, int wmax, int hmin,
|
|
|
|
int hmax, int torigin, int txp, int txa,
|
|
|
|
int typ, int tya, int borigin, int bxp,
|
|
|
|
int bxa, int byp, int bya,
|
|
|
|
char keep_for_shade);
|
1999-08-17 15:56:46 -07:00
|
|
|
void MinShadeSize(EWin * ewin, int *mw, int *mh);
|
2003-12-27 11:20:15 -08:00
|
|
|
void InstantShadeEwin(EWin * ewin, int force);
|
1999-08-17 15:56:46 -07:00
|
|
|
void InstantUnShadeEwin(EWin * ewin);
|
|
|
|
void ShadeEwin(EWin * ewin);
|
|
|
|
void UnShadeEwin(EWin * ewin);
|
2003-12-27 11:20:15 -08:00
|
|
|
void EwinSetBorder(EWin * ewin, Border * b, int apply);
|
|
|
|
void EwinSetBorderByName(EWin * ewin, const char *name,
|
|
|
|
int apply);
|
2004-02-10 12:25:17 -08:00
|
|
|
void DetermineEwinFloat(EWin * ewin, int dx, int dy);
|
|
|
|
void SetEInfoOnAll(void);
|
|
|
|
EWin *GetEwinPointerInClient(void);
|
|
|
|
EWin *GetEwinByCurrentPointer(void);
|
|
|
|
EWin *GetFocusEwin(void);
|
|
|
|
EWin *GetContextEwin(void);
|
|
|
|
void SlideEwinTo(EWin * ewin, int fx, int fy, int tx, int ty,
|
|
|
|
int speed);
|
|
|
|
void SlideEwinsTo(EWin ** ewin, int *fx, int *fy, int *tx,
|
|
|
|
int *ty, int num_wins, int speed);
|
|
|
|
void AddToFamily(Window win);
|
2004-03-20 17:39:40 -08:00
|
|
|
EWin *AddInternalToFamily(Window win, const char *bname, int type,
|
2004-03-07 00:14:24 -08:00
|
|
|
void *ptr,
|
|
|
|
void (*init) (EWin * ewin, void *ptr));
|
2004-02-10 12:25:17 -08:00
|
|
|
void HonorIclass(char *s, int id);
|
2004-04-21 13:51:57 -07:00
|
|
|
void EwinWithdraw(EWin * ewin);
|
2004-02-10 12:25:17 -08:00
|
|
|
void SyncBorderToEwin(EWin * ewin);
|
2004-03-18 09:03:50 -08:00
|
|
|
void UpdateBorderInfo(EWin * ewin);
|
|
|
|
void RealiseEwinWinpart(EWin * ewin, int i);
|
2004-04-09 06:45:59 -07:00
|
|
|
void ChangeEwinWinpart(EWin * ewin, int i);
|
|
|
|
void EwinBorderDraw(EWin * ewin, int do_shape, int queue_off);
|
2004-02-10 12:25:17 -08:00
|
|
|
int ChangeEwinWinpartContents(EWin * ewin, int i);
|
2004-04-15 12:44:38 -07:00
|
|
|
void EwinEventDestroy(EWin * ewin);
|
2004-04-07 14:50:19 -07:00
|
|
|
void EwinEventMap(EWin * ewin);
|
|
|
|
void EwinEventUnmap(EWin * ewin);
|
2004-02-10 12:25:17 -08:00
|
|
|
void EwinSetArea(EWin * ewin, int ax, int ay);
|
|
|
|
void MoveEwinToArea(EWin * ewin, int ax, int ay);
|
|
|
|
void SetEwinToCurrentArea(EWin * ewin);
|
2004-02-28 17:30:18 -08:00
|
|
|
int EwinGetDesk(const EWin * ewin);
|
|
|
|
const char *EwinGetTitle(const EWin * ewin);
|
|
|
|
const char *EwinGetIconName(const EWin * ewin);
|
2004-02-10 12:25:17 -08:00
|
|
|
int EwinIsOnScreen(EWin * ewin);
|
|
|
|
int EwinWinpartIndex(EWin * ewin, Window win);
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2004-02-28 17:30:18 -08:00
|
|
|
void EwinChange(EWin * ewin, unsigned int flag);
|
|
|
|
void EwinChangesStart(EWin * ewin);
|
|
|
|
void EwinChangesProcess(EWin * ewin);
|
|
|
|
|
2004-04-12 06:57:43 -07:00
|
|
|
void EwinsEventsConfigure(int mode);
|
|
|
|
|
2004-03-02 11:17:17 -08:00
|
|
|
int BordersEventExpose(XEvent * ev);
|
2004-02-10 12:25:17 -08:00
|
|
|
int BordersEventMouseDown(XEvent * ev);
|
|
|
|
int BordersEventMouseUp(XEvent * ev);
|
|
|
|
int BordersEventMouseIn(XEvent * ev);
|
|
|
|
int BordersEventMouseOut(XEvent * ev);
|
|
|
|
int BordersEventMouseOut2(XEvent * ev);
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2004-02-10 12:25:17 -08:00
|
|
|
/* buttons.c */
|
2004-03-20 17:39:40 -08:00
|
|
|
Button *ButtonCreate(const char *name, ImageClass * iclass,
|
2004-02-10 12:25:17 -08:00
|
|
|
ActionClass * aclass, TextClass * tclass,
|
|
|
|
char *label, char ontop, int flags, int minw,
|
|
|
|
int maxw, int minh, int maxh, int xo, int yo,
|
|
|
|
int xa, int xr, int ya, int yr, int xsr,
|
|
|
|
int xsa, int ysr, int ysa, char simg, int desk,
|
|
|
|
char sticky);
|
|
|
|
void ButtonDestroy(Button * b);
|
|
|
|
void ButtonShow(Button * b);
|
|
|
|
void ButtonHide(Button * b);
|
|
|
|
void ButtonToggle(Button * b);
|
|
|
|
void ButtonDraw(Button * b);
|
|
|
|
void ButtonDrawWithState(Button * b, int state);
|
|
|
|
void ButtonMoveToDesktop(Button * b, int num);
|
|
|
|
void ButtonMoveToCoord(Button * b, int x, int y);
|
|
|
|
void ButtonMoveRelative(Button * b, int dx, int dy);
|
|
|
|
void ButtonIncRefcount(Button * b);
|
|
|
|
void ButtonDecRefcount(Button * b);
|
|
|
|
const char *ButtonGetName(Button * b);
|
|
|
|
int ButtonGetRefcount(Button * b);
|
|
|
|
int ButtonGetDesktop(Button * b);
|
|
|
|
void ButtonGetGeometry(Button * b, int *x, int *y,
|
|
|
|
unsigned int *w, unsigned int *h);
|
|
|
|
int ButtonGetInfo(Button * b, RectBox * r, int desk);
|
|
|
|
ActionClass *ButtonGetAClass(Button * b);
|
|
|
|
int ButtonIsFixed(Button * b);
|
|
|
|
int ButtonEmbedWindow(Button * ButtonToUse,
|
|
|
|
Window WindowToEmbed);
|
2004-03-20 17:39:40 -08:00
|
|
|
void ButtonFindEmptySpotFor(Button * bt, const char *listname,
|
2004-02-10 12:25:17 -08:00
|
|
|
char dirtomove);
|
|
|
|
int ButtonsEventExpose(XEvent * ev);
|
|
|
|
int ButtonsEventMouseDown(XEvent * ev);
|
|
|
|
int ButtonsEventMouseUp(XEvent * ev);
|
|
|
|
int ButtonsEventMouseIn(XEvent * ev);
|
|
|
|
int ButtonsEventMouseOut(XEvent * ev);
|
2004-01-21 15:32:45 -08:00
|
|
|
|
2004-02-10 12:25:17 -08:00
|
|
|
/* clone.c */
|
|
|
|
void RemoveClones(void);
|
|
|
|
void CloneDesktop(int d);
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2004-02-10 12:25:17 -08:00
|
|
|
/* cmclass.c */
|
|
|
|
void CreateCurve(ModCurve * c);
|
|
|
|
void FreeModCurve(ModCurve * c);
|
|
|
|
void FreeCMClass(ColorModifierClass * cm);
|
|
|
|
ColorModifierClass *CreateCMClass(char *name, int rnum, unsigned char *rpx,
|
|
|
|
unsigned char *rpy, int gnum,
|
|
|
|
unsigned char *gpx, unsigned char *gpy,
|
|
|
|
int bnum, unsigned char *bpx,
|
|
|
|
unsigned char *bpy);
|
|
|
|
void ModifyCMClass(char *name, int rnum, unsigned char *rpx,
|
|
|
|
unsigned char *rpy, int gnum,
|
|
|
|
unsigned char *gpx, unsigned char *gpy,
|
|
|
|
int bnum, unsigned char *bpx,
|
|
|
|
unsigned char *bpy);
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2004-02-10 12:25:17 -08:00
|
|
|
/* comms.c */
|
|
|
|
void CommsSetup(void);
|
|
|
|
void CommsFindCommsWindow(void);
|
2004-03-20 17:39:40 -08:00
|
|
|
void CommsSend(Client * c, const char *s);
|
|
|
|
void CommsSendToMasterWM(const char *s);
|
|
|
|
void CommsBroadcast(const char *s);
|
|
|
|
void CommsBroadcastToSlaveWMs(const char *s);
|
2004-02-10 12:25:17 -08:00
|
|
|
Client *MakeClient(Window win);
|
|
|
|
void ListFreeClient(void *ptr);
|
|
|
|
void DeleteClient(Client * c);
|
|
|
|
void HandleComms(XClientMessageEvent * ev);
|
2004-01-18 02:24:06 -08:00
|
|
|
|
2004-02-10 12:25:17 -08:00
|
|
|
/* config.c */
|
|
|
|
char *FindFile(const char *file);
|
|
|
|
int LoadConfigFile(const char *file);
|
|
|
|
int LoadEConfig(char *themelocation);
|
|
|
|
void SaveUserControlConfig(FILE * autosavefile);
|
2004-01-18 02:24:06 -08:00
|
|
|
|
2004-02-10 12:25:17 -08:00
|
|
|
/* coords.c */
|
|
|
|
void SetCoords(EWin * ewin);
|
|
|
|
void HideCoords(void);
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2004-02-10 12:25:17 -08:00
|
|
|
/* cursors.c */
|
|
|
|
ECursor *CreateECursor(char *name, char *image, int native_id,
|
|
|
|
XColor * fg, XColor * bg);
|
|
|
|
void ApplyECursor(Window win, ECursor * ec);
|
|
|
|
void FreeECursor(ECursor * ec);
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2004-02-22 00:39:07 -08:00
|
|
|
/* desktops.c */
|
|
|
|
void ChangeNumberOfDesktops(int quantity);
|
|
|
|
void ShowDesktopControls(void);
|
|
|
|
void ShowDesktopTabs(void);
|
|
|
|
void HideDesktopTabs(void);
|
|
|
|
void ShowDesktopButtons(void);
|
|
|
|
void MoveToDeskTop(int num);
|
|
|
|
void MoveToDeskBottom(int num);
|
|
|
|
void SlideWindowTo(Window win, int fx, int fy, int tx, int ty,
|
|
|
|
int speed);
|
|
|
|
void RefreshCurrentDesktop(void);
|
|
|
|
void RefreshDesktop(int num);
|
2004-04-12 01:28:34 -07:00
|
|
|
void DesktopsRefresh(void);
|
2004-02-22 00:39:07 -08:00
|
|
|
void InitDesktopBgs(void);
|
|
|
|
void InitDesktopControls(void);
|
2004-04-12 01:28:34 -07:00
|
|
|
void DesktopSetBg(int desk, Background * bg, int refresh);
|
2004-02-22 00:39:07 -08:00
|
|
|
void ConformEwinToDesktop(EWin * ewin);
|
|
|
|
int DesktopAt(int x, int y);
|
|
|
|
void GotoDesktop(int num);
|
|
|
|
void MoveDesktop(int num, int x, int y);
|
|
|
|
void RaiseDesktop(int num);
|
|
|
|
void LowerDesktop(int num);
|
|
|
|
void HideDesktop(int num);
|
|
|
|
void ShowDesktop(int num);
|
|
|
|
void StackDesktops(void);
|
|
|
|
void StackDesktop(int num);
|
|
|
|
void UncoverDesktop(int num);
|
|
|
|
void MoveEwinToDesktop(EWin * ewin, int num);
|
|
|
|
void DesktopAddEwinToBottom(EWin * ewin);
|
|
|
|
void DesktopAddEwinToTop(EWin * ewin);
|
|
|
|
void MoveEwinToDesktopAt(EWin * ewin, int num, int x, int y);
|
|
|
|
void GotoDesktopByEwin(EWin * ewin);
|
|
|
|
void FloatEwinAboveDesktops(EWin * ewin);
|
2004-04-12 06:57:43 -07:00
|
|
|
void DesktopsEventsConfigure(int mode);
|
2004-02-22 00:39:07 -08:00
|
|
|
|
2004-02-10 12:25:17 -08:00
|
|
|
/* dialog.c */
|
2004-03-20 17:39:40 -08:00
|
|
|
Dialog *DialogCreate(const char *name);
|
2004-02-10 12:25:17 -08:00
|
|
|
void DialogDestroy(Dialog * d);
|
2004-03-20 17:39:40 -08:00
|
|
|
void DialogBindKey(Dialog * d, const char *key,
|
2004-02-10 12:25:17 -08:00
|
|
|
void (*func) (int val, void *data), int val,
|
|
|
|
void *data);
|
|
|
|
void DialogSetText(Dialog * d, const char *text);
|
|
|
|
void DialogSetTitle(Dialog * d, const char *title);
|
|
|
|
void DialogSetExitFunction(Dialog * d,
|
|
|
|
void (*func) (int val, void *data),
|
|
|
|
int val, void *data);
|
|
|
|
void DialogRedraw(Dialog * d);
|
|
|
|
void ShowDialog(Dialog * d);
|
|
|
|
void DialogClose(Dialog * d);
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2004-03-20 17:39:40 -08:00
|
|
|
void DialogAddButton(Dialog * d, const char *text,
|
2004-02-10 12:25:17 -08:00
|
|
|
void (*func) (int val, void *data),
|
2004-03-20 07:49:05 -08:00
|
|
|
char doclose);
|
2004-02-10 12:25:17 -08:00
|
|
|
DItem *DialogInitItem(Dialog * d);
|
|
|
|
DItem *DialogAddItem(DItem * dii, int type);
|
|
|
|
DItem *DialogItem(Dialog * d);
|
|
|
|
void DialogItemSetCallback(DItem * di,
|
|
|
|
void (*func) (int val, void *data),
|
|
|
|
int val, char *data);
|
|
|
|
void DialogItemSetClass(DItem * di, ImageClass * iclass,
|
|
|
|
TextClass * tclass);
|
|
|
|
void DialogItemSetPadding(DItem * di, int left, int right,
|
|
|
|
int top, int bottom);
|
|
|
|
void DialogItemSetFill(DItem * di, char fill_h, char fill_v);
|
|
|
|
void DialogItemSetAlign(DItem * di, int align_h, int align_v);
|
|
|
|
void DialogItemCallCallback(DItem * di);
|
|
|
|
void DialogDrawItems(Dialog * d, DItem * di, int x, int y, int w,
|
|
|
|
int h);
|
2004-03-20 17:39:40 -08:00
|
|
|
void DialogItemButtonSetText(DItem * di, const char *text);
|
|
|
|
void DialogItemCheckButtonSetText(DItem * di, const char *text);
|
|
|
|
void DialogItemTextSetText(DItem * di, const char *text);
|
2004-02-10 12:25:17 -08:00
|
|
|
void DialogItemRadioButtonSetEventFunc(DItem * di,
|
|
|
|
void (*func) (int val,
|
|
|
|
void
|
|
|
|
*data));
|
|
|
|
void DialogItemCheckButtonSetState(DItem * di, char onoff);
|
|
|
|
void DialogItemCheckButtonSetPtr(DItem * di, char *onoff_ptr);
|
|
|
|
void DialogItemTableSetOptions(DItem * di, int num_columns,
|
|
|
|
char border, char homogenous_h,
|
|
|
|
char homogenous_v);
|
|
|
|
void DialogItemSeparatorSetOrientation(DItem * di,
|
|
|
|
char horizontal);
|
2004-03-20 17:39:40 -08:00
|
|
|
void DialogItemImageSetFile(DItem * di, const char *image);
|
2004-02-10 12:25:17 -08:00
|
|
|
void DialogFreeItem(DItem * di);
|
|
|
|
void DialogItemSetRowSpan(DItem * di, int row_span);
|
|
|
|
void DialogItemSetColSpan(DItem * di, int col_span);
|
2004-03-20 17:39:40 -08:00
|
|
|
void DialogItemRadioButtonSetText(DItem * di, const char *text);
|
2004-02-10 12:25:17 -08:00
|
|
|
void DialogItemRadioButtonSetFirst(DItem * di, DItem * first);
|
|
|
|
void DialogItemRadioButtonGroupSetValPtr(DItem * di,
|
|
|
|
int *val_ptr);
|
|
|
|
void DialogItemRadioButtonGroupSetVal(DItem * di, int val);
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2004-02-10 12:25:17 -08:00
|
|
|
void DialogItemSliderSetVal(DItem * di, int val);
|
|
|
|
void DialogItemSliderSetBounds(DItem * di, int lower, int upper);
|
|
|
|
void DialogItemSliderSetUnits(DItem * di, int units);
|
|
|
|
void DialogItemSliderSetJump(DItem * di, int jump);
|
|
|
|
void DialogItemSliderSetMinLength(DItem * di, int min);
|
|
|
|
void DialogItemSliderSetValPtr(DItem * di, int *val_ptr);
|
|
|
|
void DialogItemSliderSetOrientation(DItem * di, char horizontal);
|
|
|
|
int DialogItemSliderGetVal(DItem * di);
|
|
|
|
void DialogItemSliderGetBounds(DItem * di, int *lower,
|
|
|
|
int *upper);
|
2004-01-18 02:24:06 -08:00
|
|
|
|
2004-02-10 12:25:17 -08:00
|
|
|
void DialogItemAreaSetSize(DItem * di, int w, int h);
|
|
|
|
void DialogItemAreaGetSize(DItem * di, int *w, int *h);
|
|
|
|
Window DialogItemAreaGetWindow(DItem * di);
|
|
|
|
void DialogItemAreaSetEventFunc(DItem * di,
|
|
|
|
void (*func) (int val,
|
|
|
|
void *data));
|
|
|
|
|
|
|
|
void DialogOK(const char *title, const char *fmt, ...);
|
|
|
|
void DialogOKstr(const char *title, const char *txt);
|
|
|
|
void DialogRestart(int val, void *data);
|
|
|
|
void DialogQuit(int val, void *data);
|
|
|
|
void DialogAlert(const char *fmt, ...);
|
|
|
|
void DialogAlertOK(const char *fmt, ...);
|
|
|
|
|
|
|
|
int DialogEventKeyPress(XEvent * ev);
|
|
|
|
int DialogEventMotion(XEvent * ev);
|
|
|
|
int DialogEventExpose(XEvent * ev);
|
|
|
|
int DialogEventMouseDown(XEvent * ev);
|
|
|
|
int DialogEventMouseUp(XEvent * ev);
|
|
|
|
int DialogEventMouseIn(XEvent * ev);
|
|
|
|
int DialogEventMouseOut(XEvent * ev);
|
|
|
|
|
2004-03-01 13:03:54 -08:00
|
|
|
/* dock.c */
|
|
|
|
void DockIt(EWin * ewin);
|
|
|
|
void DockDestroy(EWin * ewin);
|
|
|
|
|
2004-02-10 12:25:17 -08:00
|
|
|
/* draw.c */
|
|
|
|
void HandleDrawQueue(void);
|
|
|
|
char IsPropagateEwinOnQueue(EWin * ewin);
|
|
|
|
void EFillPixmap(Window win, Pixmap pmap, int x, int y, int w,
|
|
|
|
int h);
|
|
|
|
void EPastePixmap(Window win, Pixmap pmap, int x, int y, int w,
|
|
|
|
int h);
|
|
|
|
void EBlendRemoveShape(EWin * ewin, Pixmap pmap, int x, int y);
|
|
|
|
PixImg *ECreatePixImg(Window win, int w, int h);
|
|
|
|
void EDestroyPixImg(PixImg * pi);
|
|
|
|
void EBlendPixImg(EWin * ewin, PixImg * s1, PixImg * s2,
|
|
|
|
PixImg * dst, int x, int y, int w, int h);
|
|
|
|
|
|
|
|
void ScaleLine(Pixmap dest, Window src, int dx, int dy, int sw,
|
|
|
|
int pw, int sy, int sh);
|
|
|
|
void ScaleRect(Pixmap dest, Window src, int sx, int sy, int dx,
|
|
|
|
int dy, int sw, int sh, int dw, int dh);
|
|
|
|
|
|
|
|
Imlib_Image *ELoadImage(char *file);
|
|
|
|
void DrawEwinShape(EWin * ewin, int md, int x, int y, int w,
|
|
|
|
int h, char firstlast);
|
|
|
|
void PropagateShapes(Window win);
|
|
|
|
|
2004-04-09 05:50:56 -07:00
|
|
|
/* edge.c */
|
|
|
|
void ShowEdgeWindows(void);
|
|
|
|
void HideEdgeWindows(void);
|
|
|
|
void EdgeHandleEnter(XEvent * ev);
|
|
|
|
void EdgeHandleLeave(XEvent * ev);
|
|
|
|
void EdgeHandleMotion(XEvent * ev);
|
|
|
|
|
2004-02-10 12:25:17 -08:00
|
|
|
/* events.c */
|
2004-02-17 15:15:54 -08:00
|
|
|
#define ENABLE_DEBUG_EVENTS 1
|
|
|
|
#if ENABLE_DEBUG_EVENTS
|
2004-04-23 15:23:37 -07:00
|
|
|
#define EDBUG_TYPE_EWINS 128
|
|
|
|
#define EDBUG_TYPE_FOCUS 129
|
|
|
|
#define EDBUG_TYPE_COMPRESSION 130
|
|
|
|
#define EDBUG_TYPE_STACKING 131
|
|
|
|
#define EDBUG_TYPE_RAISELOWER 132
|
|
|
|
#define EDBUG_TYPE_MOVERESIZE 133
|
|
|
|
#define EDBUG_TYPE_SESSION 134
|
2004-02-17 15:15:54 -08:00
|
|
|
int EventDebug(unsigned int type);
|
|
|
|
#else
|
|
|
|
#define EventDebug(type) 0
|
|
|
|
#endif
|
2004-02-10 12:25:17 -08:00
|
|
|
void EventsInit(void);
|
|
|
|
void CheckEvent(void);
|
|
|
|
void WaitEvent(void);
|
|
|
|
void EventDebugInit(const char *s);
|
|
|
|
void EventShow(const XEvent * ev);
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2004-02-01 03:28:06 -08:00
|
|
|
/* evhandlers.c */
|
2004-03-13 14:49:48 -08:00
|
|
|
void HandleMouseDown(XEvent * ev);
|
|
|
|
void HandleMouseUp(XEvent * ev);
|
|
|
|
void HandleMotion(XEvent * ev);
|
|
|
|
void HandleMouseIn(XEvent * ev);
|
|
|
|
void HandleMouseOut(XEvent * ev);
|
2004-01-28 12:09:07 -08:00
|
|
|
void HandleFocusIn(XEvent * ev);
|
|
|
|
void HandleFocusOut(XEvent * ev);
|
2004-03-13 14:49:48 -08:00
|
|
|
void HandleExpose(XEvent * ev);
|
1999-08-17 15:56:46 -07:00
|
|
|
void HandleDestroy(XEvent * ev);
|
2004-03-13 14:49:48 -08:00
|
|
|
void HandleUnmap(XEvent * ev);
|
|
|
|
void HandleMap(XEvent * ev);
|
|
|
|
void HandleMapRequest(XEvent * ev);
|
1999-08-17 15:56:46 -07:00
|
|
|
void HandleReparent(XEvent * ev);
|
2004-03-13 14:49:48 -08:00
|
|
|
void HandleConfigureNotify(XEvent * ev);
|
1999-08-17 15:56:46 -07:00
|
|
|
void HandleConfigureRequest(XEvent * ev);
|
|
|
|
void HandleResizeRequest(XEvent * ev);
|
2004-03-13 14:49:48 -08:00
|
|
|
void HandleCirculateRequest(XEvent * ev);
|
|
|
|
void HandleProperty(XEvent * ev);
|
|
|
|
void HandleClientMessage(XEvent * ev);
|
|
|
|
void HandleChildShapeChange(XEvent * ev);
|
|
|
|
void HandleScreenChange(XEvent * ev);
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2004-02-10 12:25:17 -08:00
|
|
|
#if ENABLE_EWMH
|
|
|
|
/* ewmh.c */
|
|
|
|
void EWMH_Init(Window win_wm_check);
|
|
|
|
void EWMH_SetDesktopCount(void);
|
|
|
|
void EWMH_SetDesktopNames(void);
|
|
|
|
void EWMH_SetDesktopSize(void);
|
|
|
|
void EWMH_SetCurrentDesktop(void);
|
|
|
|
void EWMH_SetDesktopViewport(void);
|
|
|
|
void EWMH_SetWorkArea(void);
|
|
|
|
void EWMH_SetClientList(void);
|
|
|
|
void EWMH_SetActiveWindow(const EWin * ewin);
|
|
|
|
void EWMH_SetWindowDesktop(const EWin * ewin);
|
|
|
|
void EWMH_SetWindowState(const EWin * ewin);
|
2004-02-28 17:30:18 -08:00
|
|
|
void EWMH_GetWindowName(EWin * ewin);
|
|
|
|
void EWMH_GetWindowIconName(EWin * ewin);
|
2004-02-10 12:25:17 -08:00
|
|
|
void EWMH_GetWindowDesktop(EWin * ewin);
|
|
|
|
void EWMH_GetWindowState(EWin * ewin);
|
|
|
|
void EWMH_GetWindowHints(EWin * ewin);
|
|
|
|
void EWMH_DelWindowHints(const EWin * ewin);
|
|
|
|
void EWMH_ProcessClientMessage(XClientMessageEvent * event);
|
|
|
|
void EWMH_ProcessPropertyChange(EWin * ewin, Atom atom_change);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* file.c */
|
|
|
|
void Etmp(char *s);
|
2004-03-20 07:49:05 -08:00
|
|
|
void E_md(const char *s);
|
2004-02-11 07:27:54 -08:00
|
|
|
int exists(const char *s);
|
|
|
|
void mkdirs(const char *s);
|
|
|
|
int isfile(const char *s);
|
|
|
|
int isdir(const char *s);
|
2004-02-18 14:18:41 -08:00
|
|
|
int isabspath(const char *s);
|
2004-03-20 07:49:05 -08:00
|
|
|
char **E_ls(const char *dir, int *num);
|
2004-02-10 12:25:17 -08:00
|
|
|
void freestrlist(char **l, int num);
|
2004-03-20 07:49:05 -08:00
|
|
|
void E_rm(const char *s);
|
|
|
|
void E_mv(const char *s, const char *ss);
|
|
|
|
void E_cp(const char *s, const char *ss);
|
2004-02-11 07:27:54 -08:00
|
|
|
time_t moddate(const char *s);
|
|
|
|
int filesize(const char *s);
|
|
|
|
int fileinode(const char *s);
|
|
|
|
int filedev(const char *s);
|
2004-03-20 07:49:05 -08:00
|
|
|
void E_cd(const char *s);
|
2004-02-10 12:25:17 -08:00
|
|
|
char *cwd(void);
|
2004-02-11 07:27:54 -08:00
|
|
|
int permissions(const char *s);
|
2004-02-10 12:25:17 -08:00
|
|
|
char *username(int uid);
|
|
|
|
char *homedir(int uid);
|
|
|
|
char *usershell(int uid);
|
2004-03-20 17:39:40 -08:00
|
|
|
const char *atword(const char *s, int num);
|
|
|
|
const char *atchar(const char *s, char c);
|
2004-02-10 12:25:17 -08:00
|
|
|
char *getword(char *s, int num);
|
2004-03-20 17:39:40 -08:00
|
|
|
void word(const char *s, int num, char *wd);
|
2004-02-11 07:27:54 -08:00
|
|
|
int canread(const char *s);
|
|
|
|
int canwrite(const char *s);
|
|
|
|
int canexec(const char *s);
|
|
|
|
char *fileof(const char *s);
|
|
|
|
char *fullfileof(const char *s);
|
|
|
|
char *pathtoexec(const char *file);
|
|
|
|
char *pathtofile(const char *file);
|
2004-03-20 17:39:40 -08:00
|
|
|
const char *FileExtension(const char *file);
|
2004-03-20 07:49:05 -08:00
|
|
|
char *field(char *s, int fieldno);
|
|
|
|
int fillfield(char *s, int fieldno, char *buf);
|
2004-02-10 12:25:17 -08:00
|
|
|
void fword(char *s, int num, char *wd);
|
|
|
|
int findLocalizedFile(char *fname);
|
2004-02-11 07:27:54 -08:00
|
|
|
void rmrf(const char *s);
|
2004-02-10 12:25:17 -08:00
|
|
|
|
|
|
|
/* finders.c */
|
1999-08-17 15:56:46 -07:00
|
|
|
EWin *FindEwinByBase(Window win);
|
|
|
|
EWin *FindEwinByChildren(Window win);
|
2003-12-07 01:54:37 -08:00
|
|
|
EWin *FindEwinByPartial(const char *win, int type);
|
1999-08-17 15:56:46 -07:00
|
|
|
EWin *FindEwinByDecoration(Window win);
|
|
|
|
Button *FindButton(Window win);
|
|
|
|
ActionClass *FindActionClass(Window win);
|
|
|
|
Menu *FindMenuItem(Window win, MenuItem ** mi);
|
|
|
|
Menu *FindMenu(Window win);
|
|
|
|
EWin *FindEwinByMenu(Menu * m);
|
1999-09-08 17:39:43 -07:00
|
|
|
Group **ListWinGroups(EWin * ewin, char group_select, int *num);
|
1999-12-06 09:12:20 -08:00
|
|
|
EWin **ListWinGroupMembersForEwin(EWin * ewin, int action,
|
2003-05-22 12:15:03 -07:00
|
|
|
char nogroup, int *num);
|
1999-08-17 15:56:46 -07:00
|
|
|
EWin **ListTransientsFor(Window win, int *num);
|
|
|
|
EWin **ListGroupMembers(Window win, int *num);
|
|
|
|
EWin *FindEwinByDialog(Dialog * d);
|
|
|
|
Dialog *FindDialogButton(Window win, int *bnum);
|
|
|
|
Dialog *FindDialog(Window win);
|
2004-03-07 00:14:24 -08:00
|
|
|
int FindADialog(void);
|
1999-08-17 15:56:46 -07:00
|
|
|
EWin *FindEwinSpawningMenu(Menu * m);
|
|
|
|
Pager *FindPager(Window win);
|
|
|
|
DItem *FindDialogItem(Window win, Dialog ** dret);
|
|
|
|
|
2004-02-10 12:25:17 -08:00
|
|
|
/* focus.c */
|
|
|
|
#define FOCUS_SET 0
|
|
|
|
#define FOCUS_NONE 1
|
|
|
|
#define FOCUS_ENTER 2
|
|
|
|
#define FOCUS_LEAVE 3
|
|
|
|
#define FOCUS_EWIN_NEW 4
|
|
|
|
#define FOCUS_EWIN_GONE 5
|
|
|
|
#define FOCUS_DESK_ENTER 6
|
|
|
|
#define FOCUS_DESK_LEAVE 7
|
|
|
|
#define FOCUS_NEXT 8
|
|
|
|
#define FOCUS_WARP_NEXT 9
|
|
|
|
#define FOCUS_WARP_DONE 10
|
|
|
|
#define FOCUS_CLICK 11
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2004-02-10 12:25:17 -08:00
|
|
|
void FocusGetNextEwin(void);
|
|
|
|
void FocusGetPrevEwin(void);
|
|
|
|
void FocusEwinSetGrabs(EWin * ewin);
|
|
|
|
void FocusFix(void);
|
|
|
|
void FocusToEWin(EWin * ewin, int why);
|
|
|
|
void FocusHandleEnter(XEvent * ev);
|
|
|
|
void FocusHandleLeave(XEvent * ev);
|
|
|
|
void FocusHandleClick(Window win);
|
|
|
|
void FocusNewDeskBegin(void);
|
|
|
|
void FocusNewDesk(void);
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2004-02-10 12:25:17 -08:00
|
|
|
/* fx.c */
|
|
|
|
#define FX_OP_START 1
|
|
|
|
#define FX_OP_STOP 2
|
|
|
|
#define FX_OP_TOGGLE 3
|
|
|
|
void FX_Op(const char *name, int fx_op);
|
|
|
|
void FX_DeskChange(void);
|
|
|
|
void FX_Pause(void);
|
|
|
|
char **FX_Active(int *num);
|
2004-03-20 17:39:40 -08:00
|
|
|
int FX_IsOn(const char *effect);
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2003-03-23 19:48:09 -08:00
|
|
|
#if ENABLE_GNOME
|
2004-02-10 12:25:17 -08:00
|
|
|
/* gnome.c */
|
2003-07-12 07:06:37 -07:00
|
|
|
void GNOME_SetHints(Window win_wm_check);
|
1999-08-17 15:56:46 -07:00
|
|
|
void GNOME_GetHintIcons(EWin * ewin, Atom atom_change);
|
|
|
|
void GNOME_SetCurrentDesk(void);
|
|
|
|
void GNOME_SetUsedHints(void);
|
|
|
|
void GNOME_GetExpandedSize(EWin * ewin, Atom atom_change);
|
|
|
|
void GNOME_GetHintDesktop(EWin * ewin, Atom atom_change);
|
|
|
|
void GNOME_GetHint(EWin * ewin, Atom atom_change);
|
|
|
|
void GNOME_GetHintAppState(EWin * ewin, Atom atom_change);
|
|
|
|
void GNOME_GetHintState(EWin * ewin, Atom atom_change);
|
|
|
|
void GNOME_GetHintLayer(EWin * ewin, Atom atom_change);
|
|
|
|
void GNOME_SetEwinArea(EWin * ewin);
|
|
|
|
void GNOME_SetDeskCount(void);
|
|
|
|
void GNOME_SetDeskNames(void);
|
|
|
|
void GNOME_SetClientList(void);
|
|
|
|
void GNOME_GetHints(EWin * ewin, Atom atom_change);
|
|
|
|
void GNOME_SetHint(EWin * ewin);
|
|
|
|
void GNOME_SetEwinDesk(EWin * ewin);
|
|
|
|
void GNOME_SetCurrentArea(void);
|
|
|
|
void GNOME_SetAreaCount(void);
|
|
|
|
void GNOME_DelHints(EWin * ewin);
|
2003-03-23 19:48:09 -08:00
|
|
|
void GNOME_ProcessClientMessage(XClientMessageEvent * event);
|
|
|
|
#endif
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2004-02-22 00:39:07 -08:00
|
|
|
/* grabs.c */
|
|
|
|
void GrabActionKey(Action * a);
|
|
|
|
void UnGrabActionKey(Action * a);
|
|
|
|
void GrabTheButtons(Window win);
|
|
|
|
int GrabConfineThePointer(Window win);
|
|
|
|
int GrabThePointer(Window win);
|
|
|
|
void UnGrabTheButtons(void);
|
|
|
|
|
2004-02-10 12:25:17 -08:00
|
|
|
/* groups.c */
|
|
|
|
Group *CreateGroup(void);
|
|
|
|
void FreeGroup(Group * g);
|
|
|
|
void CopyGroupConfig(GroupConfig * src, GroupConfig * dest);
|
|
|
|
void BreakWindowGroup(EWin * ewin, Group * g);
|
|
|
|
void BuildWindowGroup(EWin ** ewins, int num);
|
|
|
|
int EwinInGroup(EWin * ewin, Group * g);
|
|
|
|
Group *EwinsInGroup(EWin * ewin1, EWin * ewin2);
|
|
|
|
char **GetWinGroupMemberNames(Group ** groups, int num);
|
|
|
|
void AddEwinToGroup(EWin * ewin, Group * g);
|
|
|
|
void RemoveEwinFromGroup(EWin * ewin, Group * g);
|
|
|
|
void ShowHideWinGroups(EWin * ewin, Group * g, char onoff);
|
|
|
|
void ChooseGroupDialog(EWin * ewin, char *message,
|
|
|
|
char group_select, int action);
|
|
|
|
void SaveGroups(void);
|
|
|
|
void LoadGroups(void);
|
|
|
|
void GroupSelectCallback(int val, void *data);
|
|
|
|
void GroupFeatureChangeCallback(int val, void *data);
|
|
|
|
void GroupCallback(int val, void *data);
|
|
|
|
|
|
|
|
/* handlers.c */
|
|
|
|
void SignalsSetup(void);
|
|
|
|
void SignalsRestore(void);
|
|
|
|
void EHandleXError(Display * d, XErrorEvent * ev);
|
|
|
|
void HandleXIOError(Display * d);
|
2003-03-23 19:48:09 -08:00
|
|
|
|
2004-02-10 12:25:17 -08:00
|
|
|
/* hints.c */
|
2003-03-23 19:48:09 -08:00
|
|
|
void HintsInit(void);
|
|
|
|
void HintsSetDesktopConfig(void);
|
|
|
|
void HintsSetViewportConfig(void);
|
|
|
|
void HintsSetCurrentDesktop(void);
|
|
|
|
void HintsSetDesktopViewport(void);
|
|
|
|
void HintsSetClientList(void);
|
2003-05-04 03:27:21 -07:00
|
|
|
void HintsSetActiveWindow(EWin * ewin);
|
2003-03-27 21:16:21 -08:00
|
|
|
void HintsSetWindowDesktop(EWin * ewin);
|
|
|
|
void HintsSetWindowArea(EWin * ewin);
|
|
|
|
void HintsSetWindowState(EWin * ewin);
|
|
|
|
void HintsSetWindowHints(EWin * ewin);
|
2003-12-27 11:20:15 -08:00
|
|
|
void HintsSetWindowBorder(EWin * ewin);
|
2003-03-27 21:16:21 -08:00
|
|
|
void HintsGetWindowHints(EWin * ewin);
|
|
|
|
void HintsDelWindowHints(EWin * ewin);
|
|
|
|
void HintsProcessPropertyChange(EWin * ewin, Atom atom_change);
|
|
|
|
void HintsProcessClientMessage(XClientMessageEvent * event);
|
2003-11-21 16:15:41 -08:00
|
|
|
void HintsSetRootInfo(Window win, Pixmap pmap, int color);
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2004-02-10 12:25:17 -08:00
|
|
|
/* icccm.c */
|
|
|
|
void ICCCM_Init(void);
|
|
|
|
void ICCCM_ProcessClientMessage(XClientMessageEvent * event);
|
|
|
|
void ICCCM_GetTitle(EWin * ewin, Atom atom_change);
|
|
|
|
void ICCCM_GetColormap(EWin * ewin);
|
|
|
|
void ICCCM_Delete(EWin * ewin);
|
|
|
|
void ICCCM_Save(EWin * ewin);
|
|
|
|
void ICCCM_Iconify(EWin * ewin);
|
|
|
|
void ICCCM_DeIconify(EWin * ewin);
|
|
|
|
void ICCCM_MatchSize(EWin * ewin);
|
|
|
|
void ICCCM_Configure(EWin * ewin);
|
|
|
|
void ICCCM_AdoptStart(EWin * ewin);
|
|
|
|
void ICCCM_Adopt(EWin * ewin);
|
|
|
|
void ICCCM_Withdraw(EWin * ewin);
|
|
|
|
void ICCCM_Cmap(EWin * ewin);
|
|
|
|
void ICCCM_Focus(EWin * ewin);
|
|
|
|
void ICCCM_GetGeoms(EWin * ewin, Atom atom_change);
|
|
|
|
void ICCCM_GetInfo(EWin * ewin, Atom atom_change);
|
|
|
|
void ICCCM_GetHints(EWin * ewin, Atom atom_change);
|
|
|
|
void ICCCM_GetShapeInfo(EWin * ewin);
|
|
|
|
void ICCCM_SetIconSizes(void);
|
|
|
|
void ICCCM_SetEInfo(EWin * ewin);
|
|
|
|
int ICCCM_GetEInfo(EWin * ewin);
|
|
|
|
void ICCCM_SetMainEInfo(void);
|
|
|
|
void ICCCM_GetMainEInfo(void);
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2004-02-10 12:25:17 -08:00
|
|
|
/* iclass.c */
|
2004-02-11 17:17:21 -08:00
|
|
|
void TransparencySet(int transparency);
|
2004-02-10 12:25:17 -08:00
|
|
|
ImageClass *CreateIclass(void);
|
|
|
|
void FreeImageClass(ImageClass * i);
|
|
|
|
ImageState *CreateImageState(void);
|
|
|
|
void ImageStatePopulate(ImageState * is);
|
|
|
|
void ImageStateRealize(ImageState * is);
|
|
|
|
void IclassPopulate(ImageClass * iclass);
|
|
|
|
int IclassIsTransparent(ImageClass * iclass);
|
|
|
|
void IclassApply(ImageClass * iclass, Window win, int w, int h,
|
|
|
|
int active, int sticky, int state, char expose);
|
|
|
|
void IclassApplyCopy(ImageClass * iclass, Window win, int w,
|
|
|
|
int h, int active, int sticky, int state,
|
|
|
|
PmapMask * pmm, int make_mask);
|
|
|
|
void FreePmapMask(PmapMask * pmm);
|
2003-07-11 11:36:52 -07:00
|
|
|
|
2004-02-10 12:25:17 -08:00
|
|
|
/* iconify.c */
|
1999-08-17 15:56:46 -07:00
|
|
|
void IconifyEwin(EWin * ewin);
|
|
|
|
void DeIconifyEwin(EWin * ewin);
|
2004-03-18 16:27:16 -08:00
|
|
|
void MakeIcon(EWin * ewin);
|
1999-08-17 15:56:46 -07:00
|
|
|
void RemoveMiniIcon(EWin * ewin);
|
2003-11-24 09:07:23 -08:00
|
|
|
Iconbox *IconboxCreate(char *name);
|
|
|
|
void IconboxDestroy(Iconbox * ib);
|
|
|
|
Window IconboxGetWin(Iconbox * ib);
|
|
|
|
void IconboxShow(Iconbox * ib);
|
|
|
|
void IconboxHide(Iconbox * ib);
|
|
|
|
void IconboxIconifyEwin(Iconbox * ib, EWin * ewin);
|
|
|
|
void IconboxAddEwin(Iconbox * ib, EWin * ewin);
|
|
|
|
void IconboxDelEwin(Iconbox * ib, EWin * ewin);
|
|
|
|
void IconboxUpdateEwinIcon(Iconbox * ib, EWin * ewin,
|
|
|
|
int icon_mode);
|
|
|
|
void IconboxesUpdateEwinIcon(EWin * ewin, int icon_mode);
|
|
|
|
void IconboxesHandleEvent(XEvent * ev);
|
|
|
|
void UpdateAppIcon(EWin * ewin, int imode);
|
1999-08-17 15:56:46 -07:00
|
|
|
void IB_CompleteRedraw(Iconbox * ib);
|
|
|
|
void IB_Setup(void);
|
|
|
|
Iconbox **ListAllIconboxes(int *num);
|
|
|
|
Iconbox *SelectIconboxForEwin(EWin * ewin);
|
|
|
|
|
2004-02-10 12:25:17 -08:00
|
|
|
/* init.c */
|
|
|
|
void SetupFallbackClasses(void);
|
2004-01-09 01:11:33 -08:00
|
|
|
|
2004-02-10 12:25:17 -08:00
|
|
|
/* ipc.c */
|
2004-03-20 17:39:40 -08:00
|
|
|
int HandleIPC(const char *params, Client * c);
|
2004-02-10 12:25:17 -08:00
|
|
|
void ButtonIPC(int val, void *data);
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2004-04-01 14:48:32 -08:00
|
|
|
/* lang.c */
|
|
|
|
void LangInit(void);
|
|
|
|
char *Eiconv(const char *txt, size_t len);
|
|
|
|
|
2004-02-10 12:25:17 -08:00
|
|
|
/* lists.c */
|
|
|
|
void *FindItem(const char *name, int id, int find_by, int type);
|
|
|
|
void AddItem(void *item, const char *name, int id, int type);
|
|
|
|
void AddItemEnd(void *item, const char *name, int id, int type);
|
|
|
|
void *RemoveItem(const char *name, int id, int find_by, int type);
|
|
|
|
void *RemoveItemByPtr(void *ptritem, int type);
|
|
|
|
void **ListItemType(int *num, int type);
|
|
|
|
char **ListItems(int *num, int type);
|
|
|
|
void **ListItemTypeID(int *num, int type, int id);
|
2004-03-20 17:39:40 -08:00
|
|
|
void **ListItemTypeName(int *num, int type, const char *name);
|
2004-02-10 12:25:17 -08:00
|
|
|
void MoveItemToListTop(void *item, int type);
|
|
|
|
void ListChangeItemID(int type, void *ptr, int id);
|
|
|
|
void MoveItemToListBottom(void *item, int type);
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2004-02-10 12:25:17 -08:00
|
|
|
/* memory.c */
|
|
|
|
void EDisplayMemUse(void);
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2004-02-10 12:25:17 -08:00
|
|
|
/* menus.c */
|
2003-12-14 09:24:34 -08:00
|
|
|
void MenusInit(void);
|
|
|
|
void MenusHide(void);
|
|
|
|
MenuStyle *MenuStyleCreate(void);
|
|
|
|
Menu *MenuCreate(const char *name);
|
|
|
|
void MenuDestroy(Menu * m);
|
|
|
|
void MenuHide(Menu * m);
|
|
|
|
void MenuShow(Menu * m, char noshow);
|
|
|
|
void MenuRepack(Menu * m);
|
|
|
|
void MenuEmpty(Menu * m);
|
2004-02-28 17:30:18 -08:00
|
|
|
MenuItem *MenuItemCreate(const char *text, ImageClass * iclass,
|
2004-03-20 17:39:40 -08:00
|
|
|
int action_id, const char *action_params,
|
2003-05-22 12:15:03 -07:00
|
|
|
Menu * child);
|
2003-12-14 09:24:34 -08:00
|
|
|
void MenuAddItem(Menu * menu, MenuItem * item);
|
|
|
|
void MenuAddName(Menu * menu, const char *name);
|
|
|
|
void MenuAddTitle(Menu * menu, const char *title);
|
|
|
|
void MenuAddStyle(Menu * menu, const char *style);
|
|
|
|
void MenuRealize(Menu * m);
|
2004-03-20 17:39:40 -08:00
|
|
|
Menu *MenuCreateFromDirectory(const char *name, MenuStyle * ms,
|
|
|
|
const char *dir);
|
|
|
|
Menu *MenuCreateFromFlatFile(const char *name, MenuStyle * ms,
|
|
|
|
const char *file, Menu * parent);
|
|
|
|
Menu *MenuCreateFromGnome(const char *name, MenuStyle * ms,
|
|
|
|
const char *dir);
|
|
|
|
Menu *MenuCreateFromAllEWins(const char *name, MenuStyle * ms);
|
|
|
|
Menu *MenuCreateFromDesktopEWins(const char *name, MenuStyle * ms,
|
2003-05-22 12:15:03 -07:00
|
|
|
int desk);
|
2004-03-20 17:39:40 -08:00
|
|
|
Menu *MenuCreateFromDesktops(const char *name, MenuStyle * ms);
|
|
|
|
Menu *MenuCreateFromThemes(const char *name, MenuStyle * ms);
|
|
|
|
Menu *MenuCreateFromBorders(const char *name, MenuStyle * ms);
|
2003-12-14 09:24:34 -08:00
|
|
|
Window MenuWindow(Menu * menu);
|
|
|
|
void MenuShowMasker(Menu * m);
|
|
|
|
void MenuHideMasker(void);
|
|
|
|
void MenusDestroyLoaded(void);
|
|
|
|
void MenusHideByWindow(Window win);
|
|
|
|
int MenusEventMouseDown(XEvent * ev);
|
2004-01-11 05:20:17 -08:00
|
|
|
int MenusEventMouseUp(XEvent * ev);
|
2003-12-14 09:24:34 -08:00
|
|
|
int MenusEventMouseIn(XEvent * ev);
|
|
|
|
int MenusEventMouseOut(XEvent * ev);
|
|
|
|
|
|
|
|
void ShowNamedMenu(const char *name);
|
|
|
|
void ShowTaskMenu(void);
|
|
|
|
void ShowAllTaskMenu(void);
|
|
|
|
void ShowDeskMenu(void);
|
1999-09-02 09:40:05 -07:00
|
|
|
void ShowGroupMenu(void);
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2004-02-10 12:25:17 -08:00
|
|
|
/* misc.c */
|
|
|
|
void BlumFlimFrub(void);
|
2004-02-13 10:36:52 -08:00
|
|
|
const char *EDirRoot(void);
|
|
|
|
const char *EDirBin(void);
|
|
|
|
void EDirUserSet(const char *d);
|
|
|
|
char *EDirUser(void);
|
|
|
|
void EDirUserCacheSet(const char *d);
|
|
|
|
char *EDirUserCache(void);
|
2004-02-10 12:25:17 -08:00
|
|
|
int EExit(void *code);
|
|
|
|
void Quicksort(void **a, int l, int r,
|
|
|
|
int (*CompareFunc) (void *d1, void *d2));
|
2004-04-08 05:54:46 -07:00
|
|
|
void Eprintf(const char *fmt, ...);
|
2004-02-08 08:17:58 -08:00
|
|
|
|
2004-02-10 12:25:17 -08:00
|
|
|
/* moveresize.c */
|
2004-03-20 17:39:40 -08:00
|
|
|
int ActionMoveStart(EWin * ewin, const void *params,
|
|
|
|
char constrained, int nogroup);
|
2004-02-10 12:25:17 -08:00
|
|
|
int ActionMoveEnd(EWin * ewin);
|
|
|
|
int ActionMoveSuspend(void);
|
|
|
|
int ActionMoveResume(void);
|
|
|
|
void ActionMoveHandleMotion(void);
|
2004-03-20 17:39:40 -08:00
|
|
|
int ActionResizeStart(EWin * ewin, const void *params, int hv);
|
2004-02-10 12:25:17 -08:00
|
|
|
int ActionResizeEnd(EWin * ewin);
|
|
|
|
void ActionResizeHandleMotion(void);
|
|
|
|
|
|
|
|
/* mwm.c */
|
|
|
|
void MWM_GetHints(EWin * ewin, Atom atom_change);
|
|
|
|
void MWM_SetInfo(void);
|
|
|
|
|
|
|
|
/* pager.c */
|
|
|
|
Pager *PagerCreate(void);
|
|
|
|
void PagerDestroy(Pager * p);
|
|
|
|
void PagerShow(Pager * p);
|
|
|
|
void PagerHide(Pager * p);
|
|
|
|
Pager **PagersForDesktop(int d, int *num);
|
|
|
|
void RedrawPagersForDesktop(int d, char newbg);
|
|
|
|
void ForceUpdatePagersForDesktop(int d);
|
|
|
|
void PagerRedraw(Pager * p, char newbg);
|
|
|
|
void PagerForceUpdate(Pager * p);
|
|
|
|
void PagerReArea(void);
|
|
|
|
void PagerEwinOutsideAreaUpdate(EWin * ewin);
|
|
|
|
void UpdatePagerSel(void);
|
|
|
|
void EnableAllPagers(void);
|
|
|
|
void DisableAllPagers(void);
|
|
|
|
void PagerHideHi(Pager * p);
|
|
|
|
void PagerSetHiQ(char onoff);
|
|
|
|
void PagerSetSnap(char onoff);
|
|
|
|
void PagerHideAllHi(void);
|
|
|
|
void NewPagerForDesktop(int desk);
|
|
|
|
void EnableSinglePagerForDesktop(int desk);
|
|
|
|
int PagerForDesktop(int desk);
|
|
|
|
void DisablePagersForDesktop(int desk);
|
|
|
|
Window PagerGetWin(Pager * p);
|
|
|
|
Window PagerGetHiWin(Pager * p);
|
|
|
|
void PagerEventUnmap(Pager * p);
|
|
|
|
int PagersEventMotion(XEvent * ev);
|
|
|
|
int PagersEventMouseDown(XEvent * ev);
|
|
|
|
int PagersEventMouseUp(XEvent * ev);
|
|
|
|
int PagersEventMouseIn(XEvent * ev);
|
|
|
|
int PagersEventMouseOut(XEvent * ev);
|
|
|
|
|
|
|
|
/* progress.c */
|
|
|
|
Progressbar *CreateProgressbar(char *name, int width, int height);
|
|
|
|
void SetProgressbar(Progressbar * p, int progress);
|
|
|
|
void ShowProgressbar(Progressbar * p);
|
|
|
|
void HideProgressbar(Progressbar * p);
|
|
|
|
void FreeProgressbar(Progressbar * p);
|
|
|
|
Window *ListProgressWindows(int *num);
|
|
|
|
void RaiseProgressbars(void);
|
|
|
|
|
|
|
|
/* regex.c */
|
|
|
|
int matchregexp(const char *rx, const char *s);
|
|
|
|
|
|
|
|
/* screen.c */
|
|
|
|
void ScreenInit(void);
|
|
|
|
int ScreenGetGeometry(int x, int y, int *px, int *py,
|
|
|
|
int *pw, int *ph);
|
|
|
|
int GetPointerScreenGeometry(int *px, int *py,
|
|
|
|
int *pw, int *ph);
|
1999-10-01 14:38:22 -07:00
|
|
|
|
2004-01-03 04:55:08 -08:00
|
|
|
/* session.c */
|
1999-08-17 15:56:46 -07:00
|
|
|
void SessionInit(void);
|
|
|
|
void SessionSave(int shutdown);
|
2004-03-20 17:39:40 -08:00
|
|
|
int SessionExit(const void *params);
|
1999-08-17 15:56:46 -07:00
|
|
|
void ProcessICEMSGS(void);
|
|
|
|
int GetSMfd(void);
|
|
|
|
void SessionGetInfo(EWin * ewin, Atom atom_change);
|
2004-03-20 17:39:40 -08:00
|
|
|
void SetSMID(const char *smid);
|
|
|
|
void SetSMFile(const char *path);
|
2004-02-13 10:36:52 -08:00
|
|
|
void SetSMProgName(const char *name);
|
|
|
|
void SetSMUserThemePath(const char *path);
|
1999-08-17 15:56:46 -07:00
|
|
|
char *GetSMFile(void);
|
|
|
|
char *GetGenericSMFile(void);
|
|
|
|
void MatchEwinToSM(EWin * ewin);
|
1999-09-21 19:13:51 -07:00
|
|
|
void MatchToSnapInfoPager(Pager * p);
|
|
|
|
void MatchToSnapInfoIconbox(Iconbox * ib);
|
1999-08-17 15:56:46 -07:00
|
|
|
void SaveSession(int shutdown);
|
|
|
|
void autosave(void);
|
|
|
|
|
2004-02-10 12:25:17 -08:00
|
|
|
/* settings.c */
|
|
|
|
void SettingsPager(void);
|
|
|
|
void SettingsFocus(void);
|
|
|
|
void SettingsMoveResize(void);
|
|
|
|
void SettingsDesktops(void);
|
|
|
|
void SettingsArea(void);
|
|
|
|
void SettingsPlacement(void);
|
|
|
|
void SettingsIcons(void);
|
|
|
|
void SettingsAutoRaise(void);
|
|
|
|
void SettingsTooltips(void);
|
|
|
|
void SettingsAudio(void);
|
|
|
|
void SettingsSpecialFX(void);
|
|
|
|
void SettingsBackground(Background * bg);
|
|
|
|
void SettingsIconbox(char *name);
|
|
|
|
void SettingsGroups(EWin * ewin);
|
|
|
|
void SettingsDefaultGroupControl(void);
|
|
|
|
void RemoveRememberedWindow(EWin * ewin);
|
|
|
|
void SettingsRemember(void);
|
|
|
|
void SettingsMiscellaneous(void);
|
|
|
|
void BGSettingsGoTo(Background * bg);
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2004-02-10 12:25:17 -08:00
|
|
|
/* setup.c */
|
|
|
|
void MapUnmap(int start);
|
|
|
|
void SetupX(void);
|
|
|
|
void SetupDirs(void);
|
|
|
|
void SetupEnv(void);
|
|
|
|
Window MakeExtInitWin(void);
|
|
|
|
void SetupUserInitialization(void);
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2004-02-10 12:25:17 -08:00
|
|
|
/* size.c */
|
2004-03-20 17:39:40 -08:00
|
|
|
void MaxSize(EWin * ewin, const char *resize_type);
|
|
|
|
void MaxWidth(EWin * ewin, const char *resize_type);
|
|
|
|
void MaxHeight(EWin * ewin, const char *resize_type);
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2004-02-10 12:25:17 -08:00
|
|
|
/* slideouts.c */
|
|
|
|
void SlideWindowSizeTo(Window win, int fx, int fy, int tx,
|
|
|
|
int ty, int fw, int fh, int tw, int th,
|
|
|
|
int speed);
|
|
|
|
Slideout *SlideoutCreate(char *name, char dir);
|
|
|
|
void SlideoutShow(Slideout * s, EWin * ewin, Window win);
|
|
|
|
void SlideoutHide(Slideout * s);
|
|
|
|
void SlideoutAddButton(Slideout * s, Button * b);
|
|
|
|
void SlideoutRemoveButton(Slideout * s, Button * b);
|
|
|
|
const char *SlideoutGetName(Slideout * s);
|
|
|
|
EWin *SlideoutsGetContextEwin(void);
|
|
|
|
void SlideoutsHide(void);
|
|
|
|
void SlideoutsHideIfContextWin(Window win);
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2004-02-10 12:25:17 -08:00
|
|
|
/* snaps.c */
|
1999-08-17 15:56:46 -07:00
|
|
|
void SnapshotEwinDialog(EWin * ewin);
|
|
|
|
Snapshot *FindSnapshot(EWin * ewin);
|
|
|
|
void SnapshotEwinBorder(EWin * ewin);
|
|
|
|
void SnapshotEwinDesktop(EWin * ewin);
|
|
|
|
void SnapshotEwinSize(EWin * ewin);
|
|
|
|
void SnapshotEwinLocation(EWin * ewin);
|
|
|
|
void SnapshotEwinLayer(EWin * ewin);
|
|
|
|
void SnapshotEwinSticky(EWin * ewin);
|
|
|
|
void SnapshotEwinIcon(EWin * ewin);
|
|
|
|
void SnapshotEwinShade(EWin * ewin);
|
|
|
|
void SnapshotEwinCmd(EWin * ewin);
|
2000-02-28 10:08:25 -08:00
|
|
|
void SnapshotEwinSkipLists(EWin * ewin);
|
2000-02-27 07:02:10 -08:00
|
|
|
void SnapshotEwinNeverFocus(EWin * ewin);
|
1999-09-08 17:39:43 -07:00
|
|
|
void SnapshotEwinGroups(EWin * ewin, char onoff);
|
1999-08-17 15:56:46 -07:00
|
|
|
void SnapshotEwinAll(EWin * ewin);
|
|
|
|
void UnsnapshotEwin(EWin * ewin);
|
2000-03-30 18:25:00 -08:00
|
|
|
void Real_SaveSnapInfo(int dumval, void *dumdat);
|
1999-08-17 15:56:46 -07:00
|
|
|
void SaveSnapInfo(void);
|
|
|
|
void SpawnSnappedCmds(void);
|
|
|
|
void LoadSnapInfo(void);
|
|
|
|
void MatchEwinToSnapInfo(EWin * ewin);
|
2003-12-09 12:35:14 -08:00
|
|
|
void UnmatchEwinToSnapInfo(EWin * ewin);
|
1999-08-26 11:56:06 -07:00
|
|
|
void RememberImportantInfoForEwin(EWin * ewin);
|
|
|
|
void RememberImportantInfoForEwins(EWin * ewin);
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2004-02-10 12:25:17 -08:00
|
|
|
/* sound.c */
|
|
|
|
SoundClass *SclassCreate(const char *name, const char *file);
|
|
|
|
const char *SclassGetName(SoundClass * sclass);
|
|
|
|
void SoundInit(void);
|
|
|
|
void SoundExit(void);
|
|
|
|
int SoundPlay(const char *name);
|
|
|
|
int SoundFree(const char *name);
|
|
|
|
|
2004-03-16 14:10:07 -08:00
|
|
|
/* stacking.c */
|
|
|
|
typedef struct _ewinlist EWinList;
|
|
|
|
extern EWinList EwinListFocus;
|
|
|
|
extern EWinList EwinListStack;
|
2004-04-04 14:44:45 -07:00
|
|
|
int EwinListGetIndex(EWinList * ewl, EWin * ewin);
|
2004-03-16 14:10:07 -08:00
|
|
|
void EwinListAdd(EWinList * ewl, EWin * ewin);
|
|
|
|
void EwinListDelete(EWinList * ewl, EWin * ewin);
|
|
|
|
int EwinListRaise(EWinList * ewl, EWin * ewin, int mode);
|
|
|
|
int EwinListLower(EWinList * ewl, EWin * ewin, int mode);
|
2004-04-01 14:41:22 -08:00
|
|
|
EWin *const *EwinListGet(EWinList * ewl, int *num);
|
2004-03-26 13:21:47 -08:00
|
|
|
EWin *const *EwinListGetForDesktop(int desk, int *num);
|
|
|
|
|
2004-04-01 14:41:22 -08:00
|
|
|
#define EwinListGetFocus(pnum) EwinListGet(&EwinListFocus, pnum)
|
|
|
|
#define EwinListGetStacking(pnum) EwinListGet(&EwinListStack, pnum)
|
|
|
|
#define EwinListGetAll EwinListGetStacking
|
2004-03-16 14:10:07 -08:00
|
|
|
int EwinListStackingRaise(EWin * ewin);
|
|
|
|
int EwinListStackingLower(EWin * ewin);
|
|
|
|
int EwinListFocusRaise(EWin * ewin);
|
|
|
|
|
2004-02-13 10:36:52 -08:00
|
|
|
/* startup.c */
|
|
|
|
void AddE(void);
|
|
|
|
void CreateStartupDisplay(char start);
|
|
|
|
|
2004-02-10 12:25:17 -08:00
|
|
|
/* sticky.c */
|
|
|
|
void MakeWindowSticky(EWin * ewin);
|
|
|
|
void MakeWindowUnSticky(EWin * ewin);
|
|
|
|
|
|
|
|
/* tclass.c */
|
|
|
|
TextClass *CreateTclass(void);
|
|
|
|
void FreeTextState(TextState * ts);
|
|
|
|
void DeleteTclass(TextClass * t);
|
|
|
|
TextState *CreateTextState(void);
|
|
|
|
void TclassPopulate(TextClass * tclass);
|
|
|
|
void TclassApply(ImageClass * iclass, Window win, int w, int h,
|
|
|
|
int active, int sticky, int state, char expose,
|
2004-02-28 17:30:18 -08:00
|
|
|
TextClass * tclass, const char *text);
|
2004-02-10 12:25:17 -08:00
|
|
|
|
|
|
|
/* text.c */
|
|
|
|
TextState *TextGetState(TextClass * tclass, int active, int sticky,
|
|
|
|
int state);
|
|
|
|
char **TextGetLines(const char *text, int *count);
|
|
|
|
void TextStateLoadFont(TextState * ts);
|
|
|
|
void TextSize(TextClass * tclass, int active, int sticky,
|
|
|
|
int state, const char *text, int *width,
|
|
|
|
int *height, int fsize);
|
|
|
|
void TextDraw(TextClass * tclass, Window win, int active,
|
2004-02-28 17:30:18 -08:00
|
|
|
int sticky, int state, const char *text, int x,
|
|
|
|
int y, int w, int h, int fsize, int justification);
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2004-02-10 12:25:17 -08:00
|
|
|
/* theme.c */
|
2004-02-11 07:27:54 -08:00
|
|
|
char *ThemeGetDefault(void);
|
|
|
|
void ThemeSetDefault(const char *theme);
|
|
|
|
void ThemeCleanup(void);
|
|
|
|
void ThemeBadDialog(void);
|
1999-08-17 15:56:46 -07:00
|
|
|
char **ListThemes(int *number);
|
2004-02-11 07:27:54 -08:00
|
|
|
char *FindTheme(const char *theme);
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2004-02-10 12:25:17 -08:00
|
|
|
/* timers.c */
|
|
|
|
double GetTime(void);
|
2004-03-20 17:39:40 -08:00
|
|
|
void DoIn(const char *name, double in_time,
|
2004-02-10 12:25:17 -08:00
|
|
|
void (*func) (int val, void *data), int runtime_val,
|
|
|
|
void *runtime_data);
|
|
|
|
Qentry *GetHeadTimerQueue(void);
|
|
|
|
void HandleTimerEvent(void);
|
2004-03-20 17:39:40 -08:00
|
|
|
void RemoveTimerEvent(const char *name);
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2004-02-10 12:25:17 -08:00
|
|
|
/* tooltips.c */
|
2004-03-20 17:39:40 -08:00
|
|
|
ToolTip *CreateToolTip(const char *name, ImageClass * ic0,
|
2004-02-10 12:25:17 -08:00
|
|
|
ImageClass * ic1, ImageClass * ic2,
|
|
|
|
ImageClass * ic3, ImageClass * ic4,
|
|
|
|
TextClass * tclass, int dist,
|
|
|
|
ImageClass * tooltippic);
|
2004-02-28 17:30:18 -08:00
|
|
|
void ShowToolTip(ToolTip * tt, const char *text,
|
|
|
|
ActionClass * ac, int x, int y);
|
2004-02-10 12:25:17 -08:00
|
|
|
void HideToolTip(ToolTip * tt);
|
|
|
|
void FreeToolTip(ToolTip * tt);
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2004-02-10 12:25:17 -08:00
|
|
|
/* ttfont.c */
|
2004-03-20 17:39:40 -08:00
|
|
|
void Efont_extents(Efont * f, const char *text,
|
2004-02-10 12:25:17 -08:00
|
|
|
int *font_ascent_return,
|
|
|
|
int *font_descent_return, int *width_return,
|
|
|
|
int *max_ascent_return,
|
|
|
|
int *max_descent_return, int *lbearing_return,
|
|
|
|
int *rbearing_return);
|
2004-03-20 17:39:40 -08:00
|
|
|
Efont *Efont_load(const char *file, int size);
|
2004-02-10 12:25:17 -08:00
|
|
|
void Efont_free(Efont * f);
|
|
|
|
void EFont_draw_string(Display * disp, Drawable win, GC gc,
|
2004-03-20 17:39:40 -08:00
|
|
|
int x, int y, const char *text, Efont * f,
|
2004-02-10 12:25:17 -08:00
|
|
|
Visual * vis, Colormap cm);
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2004-02-10 12:25:17 -08:00
|
|
|
/* warp.c */
|
1999-08-17 15:56:46 -07:00
|
|
|
int WarpFocusHandleEvent(XEvent * event);
|
|
|
|
void WarpFocus(int delta);
|
1999-09-13 09:06:37 -07:00
|
|
|
void WarpFocusFinish(void);
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2004-02-10 12:25:17 -08:00
|
|
|
/* windowmatch.c */
|
2004-03-20 17:39:40 -08:00
|
|
|
WindowMatch *CreateWindowMatch(const char *name);
|
2004-02-10 12:25:17 -08:00
|
|
|
char TestWindowMatch(EWin * ewin, WindowMatch * b);
|
|
|
|
Border *MatchEwinBorder(EWin * ewin, WindowMatch * b);
|
|
|
|
ImageClass *MatchEwinIcon(EWin * ewin, WindowMatch * b);
|
|
|
|
int MatchEwinDesktop(EWin * ewin, WindowMatch * b);
|
|
|
|
void *MatchEwinByFunction(EWin * ewin,
|
|
|
|
void *(*FunctionToTest) (EWin *,
|
|
|
|
WindowMatch
|
|
|
|
*));
|
|
|
|
void RemoveWindowMatch(WindowMatch * wm);
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2004-02-10 12:25:17 -08:00
|
|
|
/* x.c */
|
|
|
|
void EMoveWindow(Display * d, Window win, int x, int y);
|
|
|
|
void EResizeWindow(Display * d, Window win, int w, int h);
|
|
|
|
void EMoveResizeWindow(Display * d, Window win, int x, int y,
|
|
|
|
int w, int h);
|
|
|
|
void EDestroyWindow(Display * d, Window win);
|
|
|
|
void EForgetWindow(Display * d, Window win);
|
|
|
|
void EMapWindow(Display * d, Window win);
|
|
|
|
void EUnmapWindow(Display * d, Window win);
|
|
|
|
void EShapeCombineMask(Display * d, Window win, int dest, int x,
|
|
|
|
int y, Pixmap pmap, int op);
|
|
|
|
void EShapeCombineMaskTiled(Display * d, Window win, int dest,
|
|
|
|
int x, int y, Pixmap pmap, int op,
|
|
|
|
int w, int h);
|
|
|
|
void EShapeCombineRectangles(Display * d, Window win, int dest,
|
|
|
|
int x, int y, XRectangle * rect,
|
|
|
|
int n_rects, int op, int ordering);
|
|
|
|
void EShapeCombineShape(Display * d, Window win, int dest, int x,
|
|
|
|
int y, Window src_win, int src_kind,
|
|
|
|
int op);
|
|
|
|
XRectangle *EShapeGetRectangles(Display * d, Window win, int dest,
|
|
|
|
int *rn, int *ord);
|
|
|
|
void EReparentWindow(Display * d, Window win, Window parent,
|
|
|
|
int x, int y);
|
|
|
|
void EMapRaised(Display * d, Window win);
|
|
|
|
int EGetGeometry(Display * d, Window win, Window * root_return,
|
|
|
|
int *x, int *y, unsigned int *w,
|
|
|
|
unsigned int *h, unsigned int *bw,
|
|
|
|
unsigned int *depth);
|
|
|
|
void EConfigureWindow(Display * d, Window win, unsigned int mask,
|
|
|
|
XWindowChanges * wc);
|
|
|
|
void ESetWindowBackgroundPixmap(Display * d, Window win,
|
|
|
|
Pixmap pmap);
|
|
|
|
void ESetWindowBackground(Display * d, Window win, int col);
|
|
|
|
Pixmap ECreatePixmap(Display * display, Drawable d,
|
|
|
|
unsigned int width, unsigned int height,
|
|
|
|
unsigned depth);
|
|
|
|
void EFreePixmap(Display * display, Pixmap pixmap);
|
|
|
|
Window ECreateWindow(Window parent, int x, int y, int w, int h,
|
|
|
|
int saveunder);
|
|
|
|
Window ECreateEventWindow(Window parent, int x, int y, int w,
|
|
|
|
int h);
|
|
|
|
Window ECreateFocusWindow(Window parent, int x, int y, int w,
|
|
|
|
int h);
|
2004-04-24 06:16:38 -07:00
|
|
|
void ESetColor(XColor * pxc, int r, int g, int b);
|
|
|
|
void EGetColor(XColor * pxc, int *pr, int *pg, int *pb);
|
2004-02-10 12:25:17 -08:00
|
|
|
void GrabX(void);
|
|
|
|
void UngrabX(void);
|
|
|
|
void GetWinXY(Window win, int *x, int *y);
|
|
|
|
void GetWinWH(Window win, unsigned int *w, unsigned int *h);
|
|
|
|
int GetWinDepth(Window win);
|
2004-04-04 14:30:59 -07:00
|
|
|
Window GetWinParent(Window win);
|
2004-02-10 12:25:17 -08:00
|
|
|
int WinExists(Window win);
|
|
|
|
Window WindowAtXY_0(Window base, int bx, int by, int x, int y);
|
|
|
|
Window WindowAtXY(int x, int y);
|
|
|
|
void PointerAt(int *x, int *y);
|
|
|
|
void PastePixmap(Display * d, Drawable w, Pixmap p, Mask m,
|
|
|
|
int x, int y);
|
|
|
|
void PasteMask(Display * d, Drawable w, Pixmap p, int x, int y,
|
|
|
|
int wd, int ht);
|
|
|
|
|
|
|
|
/* zoom.c */
|
1999-08-17 15:56:46 -07:00
|
|
|
EWin *GetZoomEWin(void);
|
1999-08-17 17:42:24 -07:00
|
|
|
void ReZoom(EWin * ewin);
|
1999-08-17 15:56:46 -07:00
|
|
|
char InZoom(void);
|
|
|
|
char CanZoom(void);
|
|
|
|
void ZoomInit(void);
|
1999-08-17 17:42:24 -07:00
|
|
|
void Zoom(EWin * ewin);
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2004-03-26 13:42:03 -08:00
|
|
|
#if USE_LIBC_MALLOC
|
2004-02-10 12:25:17 -08:00
|
|
|
|
2004-03-26 13:42:03 -08:00
|
|
|
#define Efree free
|
|
|
|
#define Emalloc malloc
|
|
|
|
#define Erealloc realloc
|
2004-02-10 12:25:17 -08:00
|
|
|
|
|
|
|
#elif defined(__FILE__) && defined(__LINE__)
|
|
|
|
|
|
|
|
#define Efree(x) \
|
|
|
|
__Efree(x, __FILE__, __LINE__)
|
|
|
|
#define Emalloc(x) \
|
|
|
|
__Emalloc(x, __FILE__, __LINE__)
|
|
|
|
#define Erealloc(x, y) \
|
|
|
|
__Erealloc(x, y, __FILE__, __LINE__)
|
|
|
|
void *__Emalloc(int size, const char *file, int line);
|
|
|
|
void *__Erealloc(void *ptr, int size, const char *file, int line);
|
|
|
|
void __Efree(void *ptr, const char *file, int line);
|
|
|
|
|
|
|
|
#else
|
|
|
|
/* We still want our special handling, even if they don't have file/line stuff -- mej */
|
|
|
|
#define Efree(x) \
|
|
|
|
__Efree(x, "<unknown>", 0)
|
|
|
|
#define Emalloc(x) \
|
|
|
|
__Emalloc(x, "<unknown>", 0)
|
|
|
|
#define Erealloc(x, y) \
|
|
|
|
__Erealloc(x, y, "<unknown>", 0)
|
|
|
|
#endif
|
|
|
|
|
2004-03-20 07:28:04 -08:00
|
|
|
#if USE_LIBC_STRDUP
|
2004-02-28 07:14:02 -08:00
|
|
|
#define Estrdup(s) ((s) ? strdup(s) : NULL)
|
|
|
|
#else
|
|
|
|
char *Estrdup(const char *s);
|
|
|
|
#endif
|
2004-03-20 07:28:04 -08:00
|
|
|
#if USE_LIBC_STRNDUP
|
2004-02-28 07:14:02 -08:00
|
|
|
#define Estrndup(s,n) ((s) ? strndup(s,n) : NULL)
|
2004-02-10 12:25:17 -08:00
|
|
|
#else
|
2004-02-28 07:14:02 -08:00
|
|
|
char *Estrndup(const char *s, int n);
|
2004-02-10 12:25:17 -08:00
|
|
|
#endif
|
2004-04-08 05:54:46 -07:00
|
|
|
#if USE_LIBC_SETENV
|
|
|
|
#define Esetenv setenv
|
|
|
|
#else
|
|
|
|
int Esetenv(const char *name, const char *value, int overwrite);
|
|
|
|
#endif
|
2003-07-20 11:02:16 -07:00
|
|
|
|
2004-02-10 12:25:17 -08:00
|
|
|
/*
|
|
|
|
* Global vars
|
|
|
|
*/
|
2003-07-12 07:06:37 -07:00
|
|
|
extern const char e_wm_name[];
|
|
|
|
extern const char e_wm_version[];
|
1999-08-17 15:56:46 -07:00
|
|
|
extern Display *disp;
|
2003-07-12 07:34:14 -07:00
|
|
|
|
2003-11-15 14:27:17 -08:00
|
|
|
#if !USE_IMLIB2
|
|
|
|
extern Imlib_Context *pImlib_Context;
|
|
|
|
extern Imlib_Context *prImlib_Context;
|
|
|
|
#endif
|
2003-07-12 07:34:14 -07:00
|
|
|
#if USE_FNLIB
|
|
|
|
extern FnlibData *pFnlibData;
|
|
|
|
#endif
|
1999-08-17 15:56:46 -07:00
|
|
|
extern List *lists;
|
|
|
|
extern Root root;
|
2004-03-20 07:49:05 -08:00
|
|
|
extern EConf Conf;
|
|
|
|
extern EMode Mode;
|
1999-08-17 15:56:46 -07:00
|
|
|
extern Desktops desks;
|
|
|
|
extern Window init_win1;
|
|
|
|
extern Window init_win2;
|
|
|
|
extern Window init_win_ext;
|
|
|
|
|
|
|
|
#define FILEPATH_LEN_MAX 4096
|
|
|
|
extern char themepath[FILEPATH_LEN_MAX];
|
2003-09-28 12:21:34 -07:00
|
|
|
|
1999-08-17 15:56:46 -07:00
|
|
|
extern char no_overwrite;
|
|
|
|
extern char clickmenu;
|
|
|
|
extern int child_count;
|
|
|
|
extern pid_t *e_children;
|
|
|
|
extern int numlock_mask;
|
|
|
|
extern int scrollock_mask;
|
|
|
|
extern int mask_mod_combos[8];
|
|
|
|
extern Group *current_group;
|
2004-03-20 17:39:40 -08:00
|
|
|
extern const char *dstr;
|
1999-10-28 05:24:39 -07:00
|
|
|
extern char *e_machine_name;
|
1999-08-17 15:56:46 -07:00
|
|
|
|
2000-03-23 21:51:51 -08:00
|
|
|
#ifdef HAS_XINERAMA
|
|
|
|
extern char xinerama_active;
|
|
|
|
#endif
|