Header file and other cleanups.

SVN revision: 21409
This commit is contained in:
Kim Woelders 2006-03-19 14:59:48 +00:00
parent dcd00b99d6
commit d22580d185
9 changed files with 51 additions and 48 deletions

View File

@ -41,15 +41,7 @@
#define USE_LIBC_MALLOC 1 /* Use unwrapped libc malloc/realloc/free */
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xproto.h>
#include <X11/Xatom.h>
#include <X11/Xlocale.h>
#include <X11/extensions/shape.h>
#include <X11/extensions/XShm.h>
#ifdef HAS_XINERAMA
#include <X11/extensions/Xinerama.h>
#endif
#ifdef HAS_XRANDR
#ifdef HAVE_X11_EXTENSIONS_XRANDR_H
@ -886,6 +878,7 @@ int matchregexp(const char *rx, const char *s);
/* screen.c */
void ScreenInit(void);
void ScreenShowInfo(void);
int ScreenGetGeometry(int x, int y, int *px, int *py,
int *pw, int *ph);
int ScreenGetAvailableArea(int x, int y, int *px, int *py,

View File

@ -27,6 +27,7 @@
#include "xwin.h"
#include <sys/ipc.h>
#include <sys/shm.h>
#include <X11/extensions/XShm.h>
static void
EFillPixmap(Window win, Pixmap pmap, int x, int y, int w, int h)

View File

@ -25,6 +25,7 @@
#include "xwin.h"
#include <sys/wait.h>
#include <signal.h>
#include <X11/Xproto.h>
static void
SignalHandler(int sig)

View File

@ -30,6 +30,7 @@
#include "ewins.h"
#include "hints.h"
#include "xwin.h"
#include <X11/Xatom.h>
/* Misc atoms */
Atom E_XROOTPMAP_ID;

View File

@ -133,35 +133,7 @@ SetEwinBoolean(const char *txt, char *item, const char *value, int set)
static void
IPC_Screen(const char *params __UNUSED__, Client * c __UNUSED__)
{
#ifdef HAS_XINERAMA
if (Mode.display.xinerama_active)
{
XineramaScreenInfo *screens;
int num, i;
screens = XineramaQueryScreens(disp, &num);
IpcPrintf("Xinerama active:\n");
IpcPrintf("Head Screen X-Origin Y-Origin Width Height\n");
for (i = 0; i < num; i++)
{
IpcPrintf(" %2d %2d %5d %5d %5d %5d\n",
i, screens[i].screen_number,
screens[i].x_org, screens[i].y_org, screens[i].width,
screens[i].height);
}
XFree(screens);
return;
}
else
{
IpcPrintf("Xinerama is not active\n");
}
#endif
IpcPrintf("Head Screen X-Origin Y-Origin Width Height\n");
IpcPrintf(" %2d %2d %5d %5d %5d %5d\n",
0, VRoot.scr, 0, 0, VRoot.w, VRoot.h);
ScreenShowInfo();
}
static void

View File

@ -23,10 +23,7 @@
#include "E.h"
#include "ewins.h"
#include "hints.h"
/* 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
#include <X11/Xatom.h>
/* Motif window hints */
#define MWM_HINTS_FUNCTIONS (1L << 0)
@ -63,13 +60,13 @@
static Atom _MOTIF_WM_HINTS = 0;
/* Motif window hints */
typedef struct _mwmhints
typedef struct
{
CARD32 flags;
CARD32 functions;
CARD32 decorations;
INT32 inputMode;
CARD32 status;
long flags;
long functions;
long decorations;
long inputMode;
long status;
}
MWMHints;

View File

@ -24,6 +24,9 @@
#include "E.h"
#include "ewins.h"
#include "xwin.h"
#ifdef HAS_XINERAMA
#include <X11/extensions/Xinerama.h>
#endif
#ifdef HAS_XINERAMA
static XineramaScreenInfo *screens = NULL;
@ -43,6 +46,40 @@ ScreenInit(void)
#endif
}
void
ScreenShowInfo(void)
{
#ifdef HAS_XINERAMA
if (Mode.display.xinerama_active)
{
XineramaScreenInfo *scrns;
int num, i;
scrns = XineramaQueryScreens(disp, &num);
IpcPrintf("Xinerama active:\n");
IpcPrintf("Head Screen X-Origin Y-Origin Width Height\n");
for (i = 0; i < num; i++)
{
IpcPrintf(" %2d %2d %5d %5d %5d %5d\n",
i, scrns[i].screen_number,
scrns[i].x_org, scrns[i].y_org, scrns[i].width,
scrns[i].height);
}
XFree(screens);
return;
}
else
{
IpcPrintf("Xinerama is not active\n");
}
#endif
IpcPrintf("Head Screen X-Origin Y-Origin Width Height\n");
IpcPrintf(" %2d %2d %5d %5d %5d %5d\n",
0, VRoot.scr, 0, 0, VRoot.w, VRoot.h);
}
int
ScreenGetGeometry(int xi, int yi, int *px, int *py, int *pw, int *ph)
{

View File

@ -305,7 +305,7 @@ SoundInit(void)
sound_fd = fd;
else
{
AlertX(_("Error initialising sound"), _("OK"), " ", " ",
AlertX(_("Error initialising sound"), _("OK"), NULL, NULL,
_("Audio was enabled for Enlightenment but there was an error\n"
"communicating with the audio server (Esound). Audio will\n"
"now be disabled.\n"));

View File

@ -26,6 +26,7 @@
#include <Ecore_X.h>
#endif
#include "xwin.h"
#include <X11/Xatom.h>
#include <X11/Xutil.h>
#include <X11/Xresource.h>