Split up E.h a bit.

SVN revision: 15796
This commit is contained in:
Kim Woelders 2005-07-16 16:57:45 +00:00
parent 25fea7cdc5
commit 5124d0981e
69 changed files with 696 additions and 486 deletions

482
src/E.h
View File

@ -157,6 +157,8 @@ int Esnprintf(va_alist);
#define N_(String) (String)
#endif
#include "eobj.h"
#ifndef MAX
#define MAX(a,b) ((a)>(b)?(a):(b))
#endif
@ -322,7 +324,6 @@ int Esnprintf(va_alist);
* Types
*/
typedef struct _eobj EObj;
typedef struct _ewin EWin;
typedef struct _menu Menu;
typedef struct _menuitem MenuItem;
@ -484,78 +485,6 @@ struct _textclass
unsigned int ref_count;
};
struct _eobj
{
Window win; /* The top level window */
short type; /* Ewin, button, other, ... */
short ilayer; /* Internal stacking layer */
short layer; /* Stacking layer */
short desk; /* Belongs on desk */
int x, y;
int w, h;
signed char stacked;
char sticky;
char floating;
char shown;
char gone;
#if USE_COMPOSITE
char shadow; /* Enable shadows */
unsigned int opacity;
void *cmhook;
#endif
char *name;
};
#define EOBJ_TYPE_EWIN 0
#define EOBJ_TYPE_BUTTON 1
#define EOBJ_TYPE_DESK 2
#define EOBJ_TYPE_MISC 3
#define EOBJ_TYPE_EVENT 4
#define EOBJ_TYPE_EXT 5
#define EoObj(eo) (&((eo)->o))
#define EoGetWin(eo) ((eo)->o.win)
#define EoGetName(eo) ((eo)->o.name)
#define EoGetType(eo) ((eo)->o.type)
#define EoGetX(eo) ((eo)->o.x)
#define EoGetY(eo) ((eo)->o.y)
#define EoGetW(eo) ((eo)->o.w)
#define EoGetH(eo) ((eo)->o.h)
#define EoIsSticky(eo) ((eo)->o.sticky)
#define EoIsFloating(eo) ((eo)->o.floating)
#define EoIsShown(eo) ((eo)->o.shown)
#define EoGetDesk(eo) ((eo)->o.desk)
#define EoGetLayer(eo) ((eo)->o.layer)
#define EoGetPixmap(eo) EobjGetPixmap(EoObj(eo))
#define EoSetName(eo, _x) (eo)->o.name = (_x)
#define EoSetSticky(eo, _x) (eo)->o.sticky = ((_x)?1:0)
#define EoSetFloating(eo, _f) EobjSetFloating(EoObj(eo), (_f))
#define EoSetDesk(eo, _d) EobjSetDesk(EoObj(eo), (_d))
#define EoSetLayer(eo, _l) EobjSetLayer(EoObj(eo), (_l))
#if USE_COMPOSITE
#define EoSetOpacity(eo, _o) (eo)->o.opacity = (_o)
#define EoGetOpacity(eo) ((eo)->o.opacity)
#define EoChangeOpacity(eo, _o) EobjChangeOpacity(EoObj(eo), _o)
#define EoSetShadow(eo, _x) (eo)->o.shadow = (_x)
#define EoGetShadow(eo) ((eo)->o.shadow)
#else
#define EoSetOpacity(eo, _o)
#define EoChangeOpacity(eo, _o)
#define EoSetShadow(eo, _x)
#define EoGetShadow(eo) 0
#endif
#define EoMap(eo, raise) EobjMap(EoObj(eo), raise)
#define EoUnmap(eo) EobjUnmap(EoObj(eo))
#define EoMove(eo, x, y) EobjMove(EoObj(eo), x, y)
#define EoResize(eo, w, h) EobjResize(EoObj(eo), w, h)
#define EoMoveResize(eo, x, y, w, h) EobjMoveResize(EoObj(eo), x, y, w, h)
#define EoReparent(eo, d, x, y) EobjReparent(EoObj(eo), d, x, y)
#define EoRaise(eo) EobjRaise(EoObj(eo))
#define EoLower(eo) EobjLower(EoObj(eo))
#define EoChangeShape(eo) EobjChangeShape(EoObj(eo))
typedef struct
{
EObj o;
@ -637,181 +566,6 @@ typedef struct _ewinbit
}
EWinBit;
typedef struct _winclient
{
Window win;
int x, y, w, h, bw;
Colormap cmap;
Window icon_win;
Pixmap icon_pmap, icon_mask;
Window group;
Window client_leader;
char start_iconified;
char need_input;
char urgency;
char take_focus;
char delete_window;
signed char transient;
Window transient_for;
char is_group_leader;
char no_resize_h;
char no_resize_v;
Constraints width, height;
int base_w, base_h;
int w_inc, h_inc;
int grav;
double aspect_min, aspect_max;
long event_mask;
}
WinClient;
#define EWIN_STATE_NEW 0 /* New */
#define EWIN_STATE_STARTUP 1 /* New - during startup */
#define EWIN_STATE_WITHDRAWN 2
#define EWIN_STATE_ICONIC 3
#define EWIN_STATE_MAPPED 4
#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
#define EwinIsMapped(ewin) (ewin->state.state >= EWIN_STATE_MAPPED)
#define EwinIsInternal(ewin) (ewin->type != EWIN_TYPE_NORMAL)
struct _ewin
{
EObj o;
char type;
int vx, vy; /* Position in virtual root */
int lx, ly; /* Last pos */
int lw, lh; /* Last size */
int ll; /* Last layer */
char toggle;
Window win_container;
WinClient client;
const Border *border;
const Border *normal_border;
const Border *previous_border;
EWinBit *bits;
struct
{
char state;
char shaped;
char docked;
char visibility;
char iconified;
char shaded;
char active;
unsigned placed:1;
unsigned maximized_horz:1;
unsigned maximized_vert:1;
unsigned fullscreen:1;
unsigned showingdesk:1; /* Iconified by show desktop */
unsigned attention:1;
unsigned animated:1;
/* Derived state flags. Change only in EwinStateUpdate() */
unsigned no_border:1;
unsigned inhibit_move:1;
unsigned inhibit_resize:1;
unsigned inhibit_iconify:1;
unsigned inhibit_shade:1;
unsigned inhibit_stick:1;
unsigned inhibit_max_hor:1;
unsigned inhibit_max_ver:1;
unsigned inhibit_fullscreeen:1;
unsigned inhibit_change_desk:1;
unsigned inhibit_close:1;
unsigned inhibit_actions:1;
unsigned inhibit_focus:1;
} state;
struct
{
char fixedpos;
char never_use_area;
char ignorearrange;
char skip_ext_task;
char skip_ext_pager;
char skip_focuslist;
char skip_winlist;
char focusclick; /* Click to focus */
char never_focus; /* Never focus */
char no_button_grabs;
char no_actions;
unsigned donthide:1; /* Don't hide on show desktop */
unsigned vroot:1; /* Virtual root window */
unsigned autosave:1;
unsigned no_border:1; /* Never apply border */
unsigned never_iconify:1; /* Never iconify */
} props;
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
{
unsigned valid:1;
unsigned decor_border:1;
unsigned decor_resizeh:1;
unsigned decor_title:1;
unsigned decor_menu:1;
unsigned decor_minimize:1;
unsigned decor_maximize:1;
unsigned func_resize:1;
unsigned func_move:1;
unsigned func_minimize:1;
unsigned func_maximize:1;
unsigned func_close:1;
} mwm;
struct
{
char *wm_name;
char *wm_icon_name;
unsigned int *wm_icon, wm_icon_len;
unsigned int opacity;
} ewmh;
struct
{
int left, right, top, bottom;
} strut;
struct
{
char shape;
char border;
} update;
int num_groups;
Group **groups;
int area_x, area_y;
char *session_id;
int has_transients;
PmapMask mini_pmm;
int mini_w, mini_h;
int shape_x, shape_y, shape_w, shape_h;
int req_x, req_y;
Snapshot *snap;
int head; /* Unused? */
void *data; /* Data hook for internal windows */
void (*Layout) (EWin * ewin, int *px, int *py, int *pw,
int *ph);
void (*MoveResize) (EWin * ewin, int resize);
void (*Close) (EWin * ewin);
};
typedef struct _groupconfig
{
char iconify;
@ -1516,45 +1270,6 @@ void EdgeCheckMotion(int x, int y);
void EdgeWindowsShow(void);
void EdgeWindowsHide(void);
/* eobj.c */
void EobjInit(EObj * eo, int type, Window win, int x, int y,
int w, int h, int su, const char *name);
void EobjFini(EObj * eo);
void EobjDestroy(EObj * eo);
EObj *EobjWindowCreate(int type, int x, int y, int w, int h,
int su, const char *name);
void EobjWindowDestroy(EObj * eo);
EObj *EobjRegister(Window win, int type);
void EobjUnregister(EObj * eo);
void EobjMap(EObj * eo, int raise);
void EobjUnmap(EObj * eo);
void EobjMove(EObj * eo, int x, int y);
void EobjResize(EObj * eo, int w, int h);
void EobjMoveResize(EObj * eo, int x, int y, int w, int h);
void EobjReparent(EObj * eo, EObj * dst, int x, int y);
int EobjRaise(EObj * eo);
int EobjLower(EObj * eo);
void EobjChangeShape(EObj * eo);
void EobjsRepaint(void);
Pixmap EobjGetPixmap(const EObj * eo);
#if USE_COMPOSITE
void EobjChangeOpacity(EObj * eo, unsigned int opacity);
#else
#define EobjChangeOpacity(eo, opacity)
#endif
void EobjSetDesk(EObj * eo, int desk);
void EobjSetLayer(EObj * eo, int layer);
void EobjSetFloating(EObj * eo, int floating);
int EobjIsShaped(const EObj * eo);
void EobjSlideTo(EObj * eo, int fx, int fy, int tx, int ty,
int speed);
void EobjsSlideBy(EObj ** peo, int num, int dx, int dy,
int speed);
void EobjSlideSizeTo(EObj * eo, int fx, int fy, int tx, int ty,
int fw, int fh, int tw, int th, int speed);
/* events.c */
/* Re-mapped X-events */
#define EX_EVENT_SHAPE_NOTIFY 64
@ -1592,95 +1307,6 @@ void WaitEvent(void);
void EventDebugInit(const char *s);
void EventShow(const XEvent * ev);
/* ewins.c */
#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)
#define EWIN_CHANGE_OPACITY (1<<5)
#define EWIN_CHANGE_ATTENTION (1<<6)
void EwinShapeSet(EWin * ewin);
void EwinFloatAt(EWin * ewin, int x, int y);
void EwinUnfloatAt(EWin * ewin, int desk, int x, int y);
void RaiseEwin(EWin * ewin);
void LowerEwin(EWin * ewin);
void ShowEwin(EWin * ewin);
void HideEwin(EWin * ewin);
void DetermineEwinFloat(EWin * ewin, int dx, int dy);
EWin *GetEwinPointerInClient(void);
EWin *GetEwinByCurrentPointer(void);
EWin *GetFocusEwin(void);
EWin *GetContextEwin(void);
void SetContextEwin(EWin * ewin);
void EwinGetPosition(const EWin * ewin, int x, int y, int bw,
int grav, int *px, int *py);
void EwinUpdateShapeInfo(EWin * ewin);
void EwinPropagateShapes(EWin * ewin);
void EwinStateUpdate(EWin * ewin);
void AddToFamily(EWin * ewin, Window win);
EWin *AddInternalToFamily(Window win, const char *bname, int type,
void *ptr,
void (*init) (EWin * ewin, void *ptr));
void EwinReparent(EWin * ewin, Window parent);
Window EwinGetClientWin(const EWin * ewin);
const char *EwinGetName(const EWin * ewin);
const char *EwinGetIconName(const EWin * ewin);
int EwinIsOnScreen(EWin * ewin);
void EwinRememberPositionSet(EWin * ewin);
void EwinRememberPositionGet(EWin * ewin, int *px, int *py);
void EwinChange(EWin * ewin, unsigned int flag);
void EwinsEventsConfigure(int mode);
void EwinsSetFree(void);
void EwinsShowDesktop(int on);
/* ewin-ops.c */
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 EwinFixPosition(EWin * ewin);
void EwinMove(EWin * ewin, int x, int y);
void EwinResize(EWin * ewin, int w, int h);
void EwinMoveResize(EWin * ewin, int x, int y, int w, int h);
void EwinMoveResizeWithGravity(EWin * ewin, int x, int y, int w,
int h, int grav);
void EwinIconify(EWin * ewin);
void EwinDeIconify(EWin * ewin);
void EwinStick(EWin * ewin);
void EwinUnStick(EWin * ewin);
void EwinInstantShade(EWin * ewin, int force);
void EwinInstantUnShade(EWin * ewin);
void EwinShade(EWin * ewin);
void EwinUnShade(EWin * ewin);
void EwinSetFullscreen(EWin * ewin, int on);
void EwinMoveToArea(EWin * ewin, int ax, int ay);
void EwinMoveToDesktop(EWin * ewin, int num);
void EwinMoveToDesktopAt(EWin * ewin, int num, int x, int y);
unsigned int OpacityExt(int op);
void EwinOpClose(EWin * ewin);
void EwinOpKill(EWin * ewin);
void EwinOpRaise(EWin * ewin);
void EwinOpLower(EWin * ewin);
void EwinOpRaiseLower(EWin * ewin);
void EwinOpStick(EWin * ewin, int on);
void EwinOpSkipLists(EWin * ewin, int skip);
void EwinOpSkipTask(EWin * ewin, int skip);
void EwinOpSkipFocus(EWin * ewin, int skip);
void EwinOpSkipWinlist(EWin * ewin, int skip);
void EwinOpNeverFocus(EWin * ewin, int on);
void EwinOpIconify(EWin * ewin, int on);
void EwinOpShade(EWin * ewin, int on);
void EwinOpSetLayer(EWin * ewin, int layer);
void EwinOpSetBorder(EWin * ewin, const char *name);
void EwinOpSetOpacity(EWin * ewin, int opacity);
void EwinOpMoveToDesk(EWin * ewin, int desk);
void EwinOpMoveToArea(EWin * ewin, int x, int y);
#if ENABLE_EWMH
/* ewmh.c */
void EWMH_Init(Window win_wm_check);
@ -2246,108 +1872,6 @@ Border *WindowMatchEwinBorder(const EWin * ewin);
const char *WindowMatchEwinIcon(const EWin * ewin);
void WindowMatchEwinOps(EWin * ewin);
/* x.c */
Display *EDisplayOpen(const char *dstr, int scr);
void EDisplayClose(void);
void EDisplayDisconnect(void);
void EGrabServer(void);
void EUngrabServer(void);
int EServerIsGrabbed(void);
void EFlush(void);
void ESync(void);
Time EGetTimestamp(void);
void ERegisterWindow(Window win);
void EUnregisterWindow(Window win);
typedef void (EventCallbackFunc) (XEvent * ev, void *prm);
void EventCallbackRegister(Window win, int type,
EventCallbackFunc * func, void *prm);
void EventCallbackUnregister(Window win, int type,
EventCallbackFunc * func,
void *prm);
void EventCallbacksProcess(XEvent * ev);
Window ECreateWindow(Window parent, int x, int y, int w, int h,
int saveunder);
Window ECreateVisualWindow(Window parent, int x, int y, int w,
int h, int saveunder,
XWindowAttributes * child_attr);
Window ECreateEventWindow(Window parent, int x, int y, int w,
int h);
Window ECreateFocusWindow(Window parent, int x, int y, int w,
int h);
void EWindowSync(Window win);
void EWindowSetMapped(Window win, int mapped);
Window EWindowGetParent(Window win);
void ESelectInputAdd(Window win, long mask);
void EMoveWindow(Window win, int x, int y);
void EResizeWindow(Window win, int w, int h);
void EMoveResizeWindow(Window win, int x, int y, int w, int h);
void EDestroyWindow(Window win);
void EMapWindow(Window win);
void EMapRaised(Window win);
void EUnmapWindow(Window win);
void EReparentWindow(Window win, Window parent, int x, int y);
int EGetGeometry(Window win, Window * root_return,
int *x, int *y, int *w, int *h, int *bw,
int *depth);
void EConfigureWindow(Window win, unsigned int mask,
XWindowChanges * wc);
void ESetWindowBackgroundPixmap(Window win, Pixmap pmap);
void ESetWindowBackground(Window win, int col);
int ETranslateCoordinates(Window src_w, Window dst_w,
int src_x, int src_y,
int *dest_x_return,
int *dest_y_return,
Window * child_return);
#define ESelectInput(win, mask) XSelectInput(disp, win, mask)
#define EGetWindowAttributes(win, attr) XGetWindowAttributes(disp, win, attr)
#define EChangeWindowAttributes(win, mask, attr) XChangeWindowAttributes(disp, win, mask, attr)
#define ERaiseWindow(win) XRaiseWindow(disp, win)
#define ELowerWindow(win) XLowerWindow(disp, win)
#define EClearWindow(win) XClearWindow(disp, win)
#define EClearArea(win, x, y, w, h, exp) XClearArea(disp, win, x, y, w, h, exp)
#define ECreatePixmap(draw, w, h, dep) XCreatePixmap(disp, draw, w, h, dep)
#define EFreePixmap(pmap) XFreePixmap(disp, pmap)
void EShapeCombineMask(Window win, int dest, int x, int y,
Pixmap pmap, int op);
void EShapeCombineMaskTiled(Window win, int dest, int x, int y,
Pixmap pmap, int op, int w, int h);
void EShapeCombineRectangles(Window win, int dest, int x, int y,
XRectangle * rect, int n_rects,
int op, int ordering);
void EShapeCombineShape(Window win, int dest, int x, int y,
Window src_win, int src_kind, int op);
XRectangle *EShapeGetRectangles(Window win, int dest, int *rn,
int *ord);
int EShapeCopy(Window dst, Window src);
void EShapePropagate(Window win);
Pixmap EWindowGetShapePixmap(Window win);
GC ECreateGC(Drawable d, unsigned long mask, XGCValues * val);
int EFreeGC(GC gc);
#define EAllocColor(pxc) \
XAllocColor(disp, VRoot.cmap, pxc)
void ESetColor(XColor * pxc, int r, int g, int b);
void EGetColor(const XColor * pxc, int *pr, int *pg, int *pb);
Window WindowAtXY_0(Window base, int bx, int by, int x, int y);
Window WindowAtXY(int x, int y);
Bool PointerAt(int *x, int *y);
void EDrawableDumpImage(Drawable draw, const char *txt);
/* zoom.c */
EWin *GetZoomEWin(void);
void ReZoom(EWin * ewin);
char InZoom(void);
char CanZoom(void);
void ZoomInit(void);
void Zoom(EWin * ewin);
/*
* Global vars
*/
@ -2361,5 +1885,3 @@ extern EConf Conf;
extern EMode Mode;
#define FILEPATH_LEN_MAX 4096
#include "emodule.h"

View File

@ -21,10 +21,13 @@ e16_SOURCES = \
econfig.h \
ecore-e16.h \
emodule.h \
eobj.h \
ewins.h \
ewin-ops.h \
icons.h \
snaps.h \
timestamp.h \
xwin.h \
aclass.c \
actions.c \
alert.c \

View File

@ -23,6 +23,8 @@
*/
#include "E.h"
#include "conf.h"
#include "emodule.h"
#include "ewins.h"
typedef struct _actiontype
{

View File

@ -26,6 +26,11 @@
#define ExTextExtents XmbTextExtents
#define ExDrawString XmbDrawString
#define ExSetColor(pxc, r, g, b) \
do { \
(pxc)->red = (r << 8) | r; (pxc)->green = (g << 8) | g; (pxc)->blue = (b << 8) | b; \
} while (0)
static void ShowAlert(char *text);
static char *TitleText = NULL;
@ -197,23 +202,23 @@ ShowAlert(char *text)
colorful = 0;
if (DefaultDepth(dd, DefaultScreen(dd)) > 4)
{
ESetColor(&xcl, 220, 220, 220);
ExSetColor(&xcl, 220, 220, 220);
if (!XAllocColor(dd, cmap, &xcl))
goto CN;
cols[cnum++] = xcl.pixel;
ESetColor(&xcl, 160, 160, 160);
ExSetColor(&xcl, 160, 160, 160);
if (!XAllocColor(dd, cmap, &xcl))
goto CN;
cols[cnum++] = xcl.pixel;
ESetColor(&xcl, 100, 100, 100);
ExSetColor(&xcl, 100, 100, 100);
if (!XAllocColor(dd, cmap, &xcl))
goto CN;
cols[cnum++] = xcl.pixel;
ESetColor(&xcl, 0, 0, 0);
ExSetColor(&xcl, 0, 0, 0);
if (!XAllocColor(dd, cmap, &xcl))
goto CN;
cols[cnum++] = xcl.pixel;
ESetColor(&xcl, 255, 255, 255);
ExSetColor(&xcl, 255, 255, 255);
if (!XAllocColor(dd, cmap, &xcl))
goto CN;
cols[cnum++] = xcl.pixel;

View File

@ -21,6 +21,8 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "E.h"
#include "emodule.h"
#include "ewins.h"
static int area_w = 3;
static int area_h = 3;

View File

@ -22,6 +22,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "E.h"
#include "ewins.h"
static int
ArrangeAddToList(int **array, int current_size, int value)

View File

@ -23,6 +23,8 @@
*/
#include <time.h>
#include "E.h"
#include "emodule.h"
#include "xwin.h"
typedef struct
{

View File

@ -22,7 +22,9 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "E.h"
#include "ewins.h"
#include "snaps.h"
#include "xwin.h"
#include <sys/time.h>
#define EWIN_BORDER_PART_EVENT_MASK \

View File

@ -22,6 +22,8 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "E.h"
#include "emodule.h"
#include "xwin.h"
#define BUTTON_EVENT_MASK \
(KeyPressMask | KeyReleaseMask | \

View File

@ -23,6 +23,7 @@
*/
#include "E.h"
#include "ecore-e16.h"
#include "xwin.h"
struct _client
{

View File

@ -21,6 +21,8 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "E.h"
#include "ewins.h"
#include "xwin.h"
static EObj *coord_eo = NULL;

View File

@ -24,6 +24,8 @@
#include "E.h"
#include "X11/cursorfont.h"
#include "conf.h"
#include "emodule.h"
#include "xwin.h"
struct _ecursor
{

View File

@ -23,6 +23,9 @@
*/
#include "E.h"
#include <time.h>
#include "emodule.h"
#include "ewins.h"
#include "xwin.h"
#define EDESK_EVENT_MASK \
(ButtonPressMask | ButtonReleaseMask | \

View File

@ -22,6 +22,8 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "E.h"
#include "ewins.h"
#include "xwin.h"
typedef struct
{

View File

@ -22,6 +22,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "E.h"
#include "ewins.h"
static void
DockappFindEmptySpotFor(EWin * eapp)

View File

@ -21,6 +21,8 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "E.h"
#include "ewins.h"
#include "xwin.h"
#include <sys/ipc.h>
#include <sys/shm.h>

View File

@ -30,6 +30,8 @@
#include "E.h"
#if USE_COMPOSITE
#include "ecompmgr.h"
#include "emodule.h"
#include "xwin.h"
#include <stdlib.h>
#include <stdio.h>

View File

@ -22,6 +22,7 @@
*/
#include "E.h"
#include "econfig.h"
#include "emodule.h"
#include <ctype.h>
/*

View File

@ -22,6 +22,8 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "E.h"
#include "ewins.h"
#include "xwin.h"
/* FIXME: Screen resizing not handled. */

View File

@ -21,6 +21,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "E.h"
#include "emodule.h"
#if 0 /* No dynamic registration yet */
void

View File

@ -23,6 +23,8 @@
#include "E.h"
#include "ecompmgr.h"
#include "ecore-e16.h"
#include "ewins.h" /* FIXME - Should not be here */
#include "xwin.h"
void
EobjSetDesk(EObj * eo, int desk)

138
src/eobj.h Normal file
View File

@ -0,0 +1,138 @@
/*
* Copyright (C) 2004-2005 Kim Woelders
*
* 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:
*
* 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.
*
* 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.
*/
#ifndef _EOBJ_H_
#define _EOBJ_H_
typedef struct _eobj EObj;
struct _eobj
{
Window win; /* The top level window */
short type; /* Ewin, button, other, ... */
short ilayer; /* Internal stacking layer */
short layer; /* Stacking layer */
short desk; /* Belongs on desk */
int x, y;
int w, h;
signed char stacked;
char sticky;
char floating;
char shown;
char gone;
#if USE_COMPOSITE
char shadow; /* Enable shadows */
unsigned int opacity;
void *cmhook;
#endif
char *name;
};
#define EOBJ_TYPE_EWIN 0
#define EOBJ_TYPE_BUTTON 1
#define EOBJ_TYPE_DESK 2
#define EOBJ_TYPE_MISC 3
#define EOBJ_TYPE_EVENT 4
#define EOBJ_TYPE_EXT 5
#define EoObj(eo) (&((eo)->o))
#define EoGetWin(eo) ((eo)->o.win)
#define EoGetName(eo) ((eo)->o.name)
#define EoGetType(eo) ((eo)->o.type)
#define EoGetX(eo) ((eo)->o.x)
#define EoGetY(eo) ((eo)->o.y)
#define EoGetW(eo) ((eo)->o.w)
#define EoGetH(eo) ((eo)->o.h)
#define EoIsSticky(eo) ((eo)->o.sticky)
#define EoIsFloating(eo) ((eo)->o.floating)
#define EoIsShown(eo) ((eo)->o.shown)
#define EoGetDesk(eo) ((eo)->o.desk)
#define EoGetLayer(eo) ((eo)->o.layer)
#define EoGetPixmap(eo) EobjGetPixmap(EoObj(eo))
#define EoSetName(eo, _x) (eo)->o.name = (_x)
#define EoSetSticky(eo, _x) (eo)->o.sticky = ((_x)?1:0)
#define EoSetFloating(eo, _f) EobjSetFloating(EoObj(eo), (_f))
#define EoSetDesk(eo, _d) EobjSetDesk(EoObj(eo), (_d))
#define EoSetLayer(eo, _l) EobjSetLayer(EoObj(eo), (_l))
#if USE_COMPOSITE
#define EoSetOpacity(eo, _o) (eo)->o.opacity = (_o)
#define EoGetOpacity(eo) ((eo)->o.opacity)
#define EoChangeOpacity(eo, _o) EobjChangeOpacity(EoObj(eo), _o)
#define EoSetShadow(eo, _x) (eo)->o.shadow = (_x)
#define EoGetShadow(eo) ((eo)->o.shadow)
#else
#define EoSetOpacity(eo, _o)
#define EoChangeOpacity(eo, _o)
#define EoSetShadow(eo, _x)
#define EoGetShadow(eo) 0
#endif
#define EoMap(eo, raise) EobjMap(EoObj(eo), raise)
#define EoUnmap(eo) EobjUnmap(EoObj(eo))
#define EoMove(eo, x, y) EobjMove(EoObj(eo), x, y)
#define EoResize(eo, w, h) EobjResize(EoObj(eo), w, h)
#define EoMoveResize(eo, x, y, w, h) EobjMoveResize(EoObj(eo), x, y, w, h)
#define EoReparent(eo, d, x, y) EobjReparent(EoObj(eo), d, x, y)
#define EoRaise(eo) EobjRaise(EoObj(eo))
#define EoLower(eo) EobjLower(EoObj(eo))
#define EoChangeShape(eo) EobjChangeShape(EoObj(eo))
void EobjInit(EObj * eo, int type, Window win, int x, int y,
int w, int h, int su, const char *name);
void EobjFini(EObj * eo);
void EobjDestroy(EObj * eo);
EObj *EobjWindowCreate(int type, int x, int y, int w, int h,
int su, const char *name);
void EobjWindowDestroy(EObj * eo);
EObj *EobjRegister(Window win, int type);
void EobjUnregister(EObj * eo);
void EobjMap(EObj * eo, int raise);
void EobjUnmap(EObj * eo);
void EobjMove(EObj * eo, int x, int y);
void EobjResize(EObj * eo, int w, int h);
void EobjMoveResize(EObj * eo, int x, int y, int w, int h);
void EobjReparent(EObj * eo, EObj * dst, int x, int y);
int EobjRaise(EObj * eo);
int EobjLower(EObj * eo);
void EobjChangeShape(EObj * eo);
void EobjsRepaint(void);
Pixmap EobjGetPixmap(const EObj * eo);
#if USE_COMPOSITE
void EobjChangeOpacity(EObj * eo, unsigned int opacity);
#else
#define EobjChangeOpacity(eo, opacity)
#endif
void EobjSetDesk(EObj * eo, int desk);
void EobjSetLayer(EObj * eo, int layer);
void EobjSetFloating(EObj * eo, int floating);
int EobjIsShaped(const EObj * eo);
void EobjSlideTo(EObj * eo, int fx, int fy, int tx, int ty,
int speed);
void EobjsSlideBy(EObj ** peo, int num, int dx, int dy,
int speed);
void EobjSlideSizeTo(EObj * eo, int fx, int fy, int tx, int ty,
int fw, int fh, int tw, int th, int speed);
#endif /* _EOBJ_H_ */

View File

@ -22,6 +22,9 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "E.h"
#include "emodule.h"
#include "ewins.h" /* FIXME - Should not be here */
#include "xwin.h"
#include <errno.h>
#include <sys/time.h>
#if USE_XRANDR

View File

@ -22,8 +22,11 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "E.h"
#include "emodule.h"
#include "ewins.h"
#include "ewin-ops.h"
#include "snaps.h"
#include "xwin.h"
#include <math.h>
#include <sys/time.h>

View File

@ -23,8 +23,11 @@
*/
#include "E.h"
#include "ecompmgr.h"
#include "emodule.h"
#include "ewins.h"
#include "icons.h"
#include "snaps.h"
#include "xwin.h"
#include <sys/time.h>
#define EWIN_TOP_EVENT_MASK \

304
src/ewins.h Normal file
View File

@ -0,0 +1,304 @@
/*
* Copyright (C) 2000-2005 Carsten Haitzler, Geoff Harrison and various contributors
* Copyright (C) 2004-2005 Kim Woelders
*
* 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:
*
* 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.
*
* 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.
*/
#ifndef _EWIN_H_
#define _EWIN_H_
#if 0
typedef struct _ewin EWin;
#endif
#define EWIN_STATE_NEW 0 /* New */
#define EWIN_STATE_STARTUP 1 /* New - during startup */
#define EWIN_STATE_WITHDRAWN 2
#define EWIN_STATE_ICONIC 3
#define EWIN_STATE_MAPPED 4
#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
#define EwinIsMapped(ewin) (ewin->state.state >= EWIN_STATE_MAPPED)
#define EwinIsInternal(ewin) (ewin->type != EWIN_TYPE_NORMAL)
struct _ewin
{
EObj o;
char type;
char toggle;
Window win_container;
const Border *border;
const Border *normal_border;
const Border *previous_border;
EWinBit *bits;
struct
{
Window win;
int x, y, w, h, bw;
Colormap cmap;
Window icon_win;
Pixmap icon_pmap, icon_mask;
Window group;
Window client_leader;
char start_iconified;
char need_input;
char urgency;
char take_focus;
char delete_window;
signed char transient;
Window transient_for;
char is_group_leader;
char no_resize_h;
char no_resize_v;
Constraints width, height;
int base_w, base_h;
int w_inc, h_inc;
int grav;
double aspect_min, aspect_max;
long event_mask;
} client;
struct
{
char state;
char shaped;
char docked;
char visibility;
char iconified;
char shaded;
char active;
unsigned placed:1;
unsigned maximized_horz:1;
unsigned maximized_vert:1;
unsigned fullscreen:1;
unsigned showingdesk:1; /* Iconified by show desktop */
unsigned attention:1;
unsigned animated:1;
/* Derived state flags. Change only in EwinStateUpdate() */
unsigned no_border:1;
unsigned inhibit_move:1;
unsigned inhibit_resize:1;
unsigned inhibit_iconify:1;
unsigned inhibit_shade:1;
unsigned inhibit_stick:1;
unsigned inhibit_max_hor:1;
unsigned inhibit_max_ver:1;
unsigned inhibit_fullscreeen:1;
unsigned inhibit_change_desk:1;
unsigned inhibit_close:1;
unsigned inhibit_actions:1;
unsigned inhibit_focus:1;
} state;
struct
{
char fixedpos;
char never_use_area;
char ignorearrange;
char skip_ext_task;
char skip_ext_pager;
char skip_focuslist;
char skip_winlist;
char focusclick; /* Click to focus */
char never_focus; /* Never focus */
char no_button_grabs;
char no_actions;
unsigned donthide:1; /* Don't hide on show desktop */
unsigned vroot:1; /* Virtual root window */
unsigned autosave:1;
unsigned no_border:1; /* Never apply border */
unsigned never_iconify:1; /* Never iconify */
} props;
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
{
unsigned valid:1;
unsigned decor_border:1;
unsigned decor_resizeh:1;
unsigned decor_title:1;
unsigned decor_menu:1;
unsigned decor_minimize:1;
unsigned decor_maximize:1;
unsigned func_resize:1;
unsigned func_move:1;
unsigned func_minimize:1;
unsigned func_maximize:1;
unsigned func_close:1;
} mwm;
struct
{
char *wm_name;
char *wm_icon_name;
unsigned int *wm_icon, wm_icon_len;
unsigned int opacity;
} ewmh;
struct
{
int left, right, top, bottom;
} strut;
struct
{
char shape;
char border;
} update;
int num_groups;
Group **groups;
int area_x, area_y;
char *session_id;
int has_transients;
PmapMask mini_pmm;
int mini_w, mini_h;
int shape_x, shape_y, shape_w, shape_h;
int req_x, req_y;
Snapshot *snap;
int head; /* Unused? */
int vx, vy; /* Position in virtual root */
int lx, ly; /* Last pos */
int lw, lh; /* Last size */
int ll; /* Last layer */
void *data; /* Data hook for internal windows */
void (*Layout) (EWin * ewin, int *px, int *py, int *pw,
int *ph);
void (*MoveResize) (EWin * ewin, int resize);
void (*Close) (EWin * ewin);
};
/* ewins.c */
#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)
#define EWIN_CHANGE_OPACITY (1<<5)
#define EWIN_CHANGE_ATTENTION (1<<6)
void EwinShapeSet(EWin * ewin);
void EwinFloatAt(EWin * ewin, int x, int y);
void EwinUnfloatAt(EWin * ewin, int desk, int x, int y);
void RaiseEwin(EWin * ewin);
void LowerEwin(EWin * ewin);
void ShowEwin(EWin * ewin);
void HideEwin(EWin * ewin);
void DetermineEwinFloat(EWin * ewin, int dx, int dy);
EWin *GetEwinPointerInClient(void);
EWin *GetEwinByCurrentPointer(void);
EWin *GetFocusEwin(void);
EWin *GetContextEwin(void);
void SetContextEwin(EWin * ewin);
void EwinGetPosition(const EWin * ewin, int x, int y, int bw,
int grav, int *px, int *py);
void EwinUpdateShapeInfo(EWin * ewin);
void EwinPropagateShapes(EWin * ewin);
void EwinStateUpdate(EWin * ewin);
void AddToFamily(EWin * ewin, Window win);
EWin *AddInternalToFamily(Window win, const char *bname, int type,
void *ptr,
void (*init) (EWin * ewin, void *ptr));
void EwinReparent(EWin * ewin, Window parent);
Window EwinGetClientWin(const EWin * ewin);
const char *EwinGetName(const EWin * ewin);
const char *EwinGetIconName(const EWin * ewin);
int EwinIsOnScreen(EWin * ewin);
void EwinRememberPositionSet(EWin * ewin);
void EwinRememberPositionGet(EWin * ewin, int *px, int *py);
void EwinChange(EWin * ewin, unsigned int flag);
void EwinsEventsConfigure(int mode);
void EwinsSetFree(void);
void EwinsShowDesktop(int on);
/* ewin-ops.c */
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 EwinFixPosition(EWin * ewin);
void EwinMove(EWin * ewin, int x, int y);
void EwinResize(EWin * ewin, int w, int h);
void EwinMoveResize(EWin * ewin, int x, int y, int w, int h);
void EwinMoveResizeWithGravity(EWin * ewin, int x, int y, int w,
int h, int grav);
void EwinIconify(EWin * ewin);
void EwinDeIconify(EWin * ewin);
void EwinStick(EWin * ewin);
void EwinUnStick(EWin * ewin);
void EwinInstantShade(EWin * ewin, int force);
void EwinInstantUnShade(EWin * ewin);
void EwinShade(EWin * ewin);
void EwinUnShade(EWin * ewin);
void EwinSetFullscreen(EWin * ewin, int on);
void EwinMoveToArea(EWin * ewin, int ax, int ay);
void EwinMoveToDesktop(EWin * ewin, int num);
void EwinMoveToDesktopAt(EWin * ewin, int num, int x, int y);
unsigned int OpacityExt(int op);
void EwinOpClose(EWin * ewin);
void EwinOpKill(EWin * ewin);
void EwinOpRaise(EWin * ewin);
void EwinOpLower(EWin * ewin);
void EwinOpRaiseLower(EWin * ewin);
void EwinOpStick(EWin * ewin, int on);
void EwinOpSkipLists(EWin * ewin, int skip);
void EwinOpSkipTask(EWin * ewin, int skip);
void EwinOpSkipFocus(EWin * ewin, int skip);
void EwinOpSkipWinlist(EWin * ewin, int skip);
void EwinOpNeverFocus(EWin * ewin, int on);
void EwinOpIconify(EWin * ewin, int on);
void EwinOpShade(EWin * ewin, int on);
void EwinOpSetLayer(EWin * ewin, int layer);
void EwinOpSetBorder(EWin * ewin, const char *name);
void EwinOpSetOpacity(EWin * ewin, int opacity);
void EwinOpMoveToDesk(EWin * ewin, int desk);
void EwinOpMoveToArea(EWin * ewin, int x, int y);
/* zoom.c */
EWin *GetZoomEWin(void);
void ReZoom(EWin * ewin);
char InZoom(void);
char CanZoom(void);
void ZoomInit(void);
void Zoom(EWin * ewin);
#endif /* _EWIN_H_ */

View File

@ -25,6 +25,7 @@
*/
#include "E.h"
#include "ecore-e16.h"
#include "ewins.h"
/*
* _NET_WM_MOVERESIZE client message actions

View File

@ -23,6 +23,7 @@
*/
#include "E.h"
#include "ecore-e16.h"
#include "xwin.h"
#include <X11/keysym.h>
#include <sys/time.h>

View File

@ -21,6 +21,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "E.h"
#include "ewins.h"
EWin *
EwinFindByPtr(const EWin * ewin)

View File

@ -22,6 +22,9 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "E.h"
#include "emodule.h"
#include "ewins.h"
#include "xwin.h"
#define EwinListFocusRaise(ewin) EobjListFocusRaise(EoObj(ewin))
#define EwinListFocusLower(ewin) EobjListFocusLower(EoObj(ewin))

View File

@ -21,6 +21,8 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "E.h"
#include "emodule.h"
#include "xwin.h"
#include <math.h>
/* FIXME - Needs cleaning up */

View File

@ -23,6 +23,8 @@
*/
#include "E.h"
#include "ecore-e16.h"
#include "ewins.h"
#include "xwin.h"
/* WIN_WM_NAME STRING - contains a string identifier for the WM's name */
#define XA_WIN_WM_NAME "_WIN_WM_NAME"

View File

@ -22,6 +22,8 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "E.h"
#include "emodule.h"
#include "ewins.h"
#include "snaps.h"
#include <math.h>

View File

@ -22,6 +22,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "E.h"
#include "xwin.h"
#include <sys/wait.h>
#include <signal.h>

View File

@ -25,6 +25,8 @@
*/
#include "E.h"
#include "ecore-e16.h"
#include "ewins.h"
#include "xwin.h"
/*
* Functions that set X11-properties from E-internals

View File

@ -23,6 +23,8 @@
*/
#include "E.h"
#include "ecore-e16.h"
#include "ewins.h"
#include "xwin.h"
void
ICCCM_Init(void)

View File

@ -23,6 +23,8 @@
*/
#include "E.h"
#include "conf.h"
#include "emodule.h"
#include "xwin.h"
#ifdef ENABLE_THEME_TRANSPARENCY

View File

@ -23,7 +23,10 @@
*/
#include "E.h"
#include "ecore-e16.h"
#include "emodule.h"
#include "ewins.h"
#include "icons.h"
#include "xwin.h"
#include <math.h>
typedef struct _iconbox Iconbox;

View File

@ -22,7 +22,9 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "E.h"
#include "ewins.h"
#include "icons.h"
#include "xwin.h"
static int
NetwmIconFindBestSize(unsigned int *val, unsigned int len, int size)

View File

@ -21,9 +21,12 @@
* 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.
*/
#include <ctype.h>
#include "E.h"
#include "emodule.h"
#include "ewins.h"
#include "ewin-ops.h"
#include "xwin.h"
#include <ctype.h>
#define SS(s) ((s) ? (s) : NoText)
static const char NoText[] = "-NONE-";

View File

@ -22,7 +22,9 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "E.h"
#include "emodule.h"
#include "timestamp.h"
#include "xwin.h"
#include <sys/utsname.h>
#include <signal.h>
#include <time.h>

View File

@ -23,6 +23,8 @@
*/
#include "E.h"
#include "conf.h"
#include "ewins.h"
#include "xwin.h"
#include <errno.h>
#include <sys/stat.h>

View File

@ -22,6 +22,9 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "E.h"
#include "emodule.h"
#include "ewins.h"
#include "xwin.h"
#include <X11/keysym.h>
#define DEBUG_MENU_EVENTS 0

View File

@ -22,6 +22,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "E.h"
#include "xwin.h"
#include <sys/time.h>
#include <time.h>

View File

@ -21,6 +21,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "E.h"
#include "emodule.h"
/***********************************************************************
* *** should all go elsewhere ***

View File

@ -22,6 +22,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "E.h"
#include "emodule.h"
#ifdef ENABLE_THEME_TRANSPARENCY
/*

View File

@ -22,6 +22,9 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "E.h"
#include "emodule.h"
#include "ewins.h"
#include "xwin.h"
static EWin *mode_moveresize_ewin = NULL;
static int move_swapcoord_x = 0;

View File

@ -21,6 +21,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "E.h"
#include "ewins.h"
/* Motif window hints */
#define MWM_HINTS_FUNCTIONS (1L << 0)

View File

@ -22,6 +22,9 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "E.h"
#include "emodule.h"
#include "ewins.h"
#include "xwin.h"
#define DEBUG_PAGER 0

View File

@ -21,6 +21,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "E.h"
#include "xwin.h"
struct _progressbar
{

View File

@ -22,6 +22,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "E.h"
#include "ewins.h"
#ifdef HAS_XINERAMA
static XineramaScreenInfo *screens = NULL;

View File

@ -23,6 +23,9 @@
*/
#include "E.h"
#include "ecore-e16.h"
#include "emodule.h"
#include "ewins.h"
#include "xwin.h"
#include <errno.h>
#include <fcntl.h>
#include <signal.h>

View File

@ -22,6 +22,8 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "E.h"
#include "ewins.h"
#include "xwin.h"
#include <signal.h>
#include <X11/keysym.h>
#include <signal.h>

View File

@ -22,6 +22,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "E.h"
#include "ewins.h"
#define MAX_HOR 0x1
#define MAX_VER 0x2

View File

@ -22,6 +22,9 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "E.h"
#include "emodule.h"
#include "ewins.h"
#include "xwin.h"
typedef struct
{

View File

@ -22,7 +22,9 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "E.h"
#include "ewins.h"
#include "snaps.h"
#include "xwin.h"
struct _snapshot
{

View File

@ -22,6 +22,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "E.h"
#include "emodule.h"
#ifdef HAVE_LIBESD
#include <esd.h>

View File

@ -21,6 +21,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "E.h"
#include "ewins.h"
#define ENABLE_DEBUG_STACKING 1

View File

@ -22,6 +22,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "E.h"
#include "xwin.h"
#include <time.h>
static EObj *init_win1 = NULL;

View File

@ -23,6 +23,8 @@
*/
#include "E.h"
#include "conf.h"
#include "emodule.h"
#include "xwin.h"
static char *
TextstateFontLookup(const char *name)

View File

@ -22,6 +22,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "E.h"
#include "xwin.h"
#define ExTextExtents XmbTextExtents
#define ExDrawString XmbDrawString

View File

@ -22,6 +22,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "E.h"
#include "emodule.h"
#define ENABLE_THEME_SANITY_CHECKING 0

View File

@ -23,6 +23,9 @@
*/
#include "E.h"
#include "conf.h"
#include "emodule.h"
#include "ewins.h" /* FIXME - Should not be here */
#include "xwin.h"
static struct
{

View File

@ -22,6 +22,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "E.h"
#include "xwin.h"
struct _efont
{

View File

@ -32,7 +32,10 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/
#include "E.h"
#include "emodule.h"
#include "ewins.h"
#include "icons.h"
#include "xwin.h"
#include <X11/keysym.h>
typedef struct

View File

@ -23,6 +23,8 @@
*/
#include "E.h"
#include "conf.h"
#include "emodule.h"
#include "ewins.h"
#include "ewin-ops.h"
static int WindowMatchEwinOpsParse(EWin * ewin, const char *ops);

View File

@ -23,6 +23,7 @@
*/
#include "E.h"
#include "ecore-e16.h"
#include "xwin.h"
#include <X11/Xutil.h>
#include <X11/Xresource.h>

121
src/xwin.h Normal file
View File

@ -0,0 +1,121 @@
/*
* Copyright (C) 2000-2005 Carsten Haitzler, Geoff Harrison and various contributors
* Copyright (C) 2004-2005 Kim Woelders
*
* 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:
*
* 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.
*
* 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.
*/
#ifndef _XWIN_H_
#define _XWIN_H_
Display *EDisplayOpen(const char *dstr, int scr);
void EDisplayClose(void);
void EDisplayDisconnect(void);
void EGrabServer(void);
void EUngrabServer(void);
int EServerIsGrabbed(void);
void EFlush(void);
void ESync(void);
Time EGetTimestamp(void);
void ERegisterWindow(Window win);
void EUnregisterWindow(Window win);
typedef void (EventCallbackFunc) (XEvent * ev, void *prm);
void EventCallbackRegister(Window win, int type,
EventCallbackFunc * func, void *prm);
void EventCallbackUnregister(Window win, int type,
EventCallbackFunc * func,
void *prm);
void EventCallbacksProcess(XEvent * ev);
Window ECreateWindow(Window parent, int x, int y, int w, int h,
int saveunder);
Window ECreateVisualWindow(Window parent, int x, int y, int w,
int h, int saveunder,
XWindowAttributes * child_attr);
Window ECreateEventWindow(Window parent, int x, int y, int w,
int h);
Window ECreateFocusWindow(Window parent, int x, int y, int w,
int h);
void EWindowSync(Window win);
void EWindowSetMapped(Window win, int mapped);
Window EWindowGetParent(Window win);
void ESelectInputAdd(Window win, long mask);
void EMoveWindow(Window win, int x, int y);
void EResizeWindow(Window win, int w, int h);
void EMoveResizeWindow(Window win, int x, int y, int w, int h);
void EDestroyWindow(Window win);
void EMapWindow(Window win);
void EMapRaised(Window win);
void EUnmapWindow(Window win);
void EReparentWindow(Window win, Window parent, int x, int y);
int EGetGeometry(Window win, Window * root_return,
int *x, int *y, int *w, int *h, int *bw,
int *depth);
void EConfigureWindow(Window win, unsigned int mask,
XWindowChanges * wc);
void ESetWindowBackgroundPixmap(Window win, Pixmap pmap);
void ESetWindowBackground(Window win, int col);
int ETranslateCoordinates(Window src_w, Window dst_w,
int src_x, int src_y,
int *dest_x_return,
int *dest_y_return,
Window * child_return);
#define ESelectInput(win, mask) XSelectInput(disp, win, mask)
#define EGetWindowAttributes(win, attr) XGetWindowAttributes(disp, win, attr)
#define EChangeWindowAttributes(win, mask, attr) XChangeWindowAttributes(disp, win, mask, attr)
#define ERaiseWindow(win) XRaiseWindow(disp, win)
#define ELowerWindow(win) XLowerWindow(disp, win)
#define EClearWindow(win) XClearWindow(disp, win)
#define EClearArea(win, x, y, w, h, exp) XClearArea(disp, win, x, y, w, h, exp)
#define ECreatePixmap(draw, w, h, dep) XCreatePixmap(disp, draw, w, h, dep)
#define EFreePixmap(pmap) XFreePixmap(disp, pmap)
void EShapeCombineMask(Window win, int dest, int x, int y,
Pixmap pmap, int op);
void EShapeCombineMaskTiled(Window win, int dest, int x, int y,
Pixmap pmap, int op, int w, int h);
void EShapeCombineRectangles(Window win, int dest, int x, int y,
XRectangle * rect, int n_rects,
int op, int ordering);
void EShapeCombineShape(Window win, int dest, int x, int y,
Window src_win, int src_kind, int op);
XRectangle *EShapeGetRectangles(Window win, int dest, int *rn,
int *ord);
int EShapeCopy(Window dst, Window src);
void EShapePropagate(Window win);
Pixmap EWindowGetShapePixmap(Window win);
GC ECreateGC(Drawable d, unsigned long mask, XGCValues * val);
int EFreeGC(GC gc);
#define EAllocColor(pxc) \
XAllocColor(disp, VRoot.cmap, pxc)
void ESetColor(XColor * pxc, int r, int g, int b);
void EGetColor(const XColor * pxc, int *pr, int *pg, int *pb);
Window WindowAtXY_0(Window base, int bx, int by, int x, int y);
Window WindowAtXY(int x, int y);
Bool PointerAt(int *x, int *y);
void EDrawableDumpImage(Drawable draw, const char *txt);
#endif /* _XWIN_H_ */

View File

@ -22,6 +22,8 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "E.h"
#include "ewins.h"
#include "xwin.h"
#ifdef WITH_ZOOM
#include <X11/extensions/xf86vmode.h>