1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-21 13:28:05 +01:00

Change to the linux kernel coding style

for arq in `git ls-files *.c`; do
    echo $arq;
    indent -linux -l115 $arq;
    done

The different line break at 115 columns is because
I use a widescreen monitor :-)
This commit is contained in:
Carlos R. Mafra
2009-08-20 00:59:40 +02:00
parent 59fc927dc9
commit 688a56e8ab
209 changed files with 87034 additions and 98138 deletions

View File

@@ -2,95 +2,82 @@
#include "WindowMaker.h"
#include "window.h"
typedef struct {
WWindow *wwin;
WMLabel *mini;
WWindow *wwin;
WMLabel *mini;
} WSMWindow;
typedef struct {
WScreen *scr;
WScreen *scr;
WMWindow *win;
WMWindow *win;
WSMWindow *windows;
int windowCount;
WSMWindow *windows;
int windowCount;
int xcount, ycount;
int wswidth, wsheight;
int xcount, ycount;
int wswidth, wsheight;
} WWorkspaceMap;
#define WSMAP_DEFAULT_WIDTH 150
static WWorkspaceMap *createWorkspaceMap(WMScreen *scr, int xcount, int ycount)
static WWorkspaceMap *createWorkspaceMap(WMScreen * scr, int xcount, int ycount)
{
WWorkspaceMap *wsm= wnew0(WWorkspaceMap, 1);
WMRect rect;
//
rect.width= 1024;
rect.height= 768;
WWorkspaceMap *wsm = wnew0(WWorkspaceMap, 1);
WMRect rect;
//
rect.width = 1024;
rect.height = 768;
wsm->win= WMCreateWindow(scr, "wsmap");
/* find out the ideal size of the mini-workspaces */
wsm->win = WMCreateWindow(scr, "wsmap");
wsm->wswidth = WSMAP_DEFAULT_WIDTH;
wsm->wsheight = (wsm->wswidth*rect.height) / rect.width;
/* find out the ideal size of the mini-workspaces */
// check if it fits screen
wsm->wswidth = WSMAP_DEFAULT_WIDTH;
wsm->wsheight = (wsm->wswidth * rect.height) / rect.width;
wsm->xcount = xcount;
wsm->ycount = ycount;
// check if it fits screen
return wsm;
wsm->xcount = xcount;
wsm->ycount = ycount;
return wsm;
}
static void handleEvent(WWorkspaceMap *map, XEvent *event)
static void handleEvent(WWorkspaceMap * map, XEvent * event)
{
switch (event->type)
{
}
switch (event->type) {
}
}
void wShowWorkspaceMap(WScreen *scr)
void wShowWorkspaceMap(WScreen * scr)
{
}
Display *dpy;
int main(int argc, char **argv)
{
WWorkspaceMap *wsmap;
WMScreen *scr;
WMInitializeApplication("WSMap", &argc, argv);
WWorkspaceMap *wsmap;
WMScreen *scr;
dpy = XOpenDisplay("");
if (!dpy) {
wfatal("cant open display");
exit(0);
}
WMInitializeApplication("WSMap", &argc, argv);
scr = WMCreateSimpleApplicationScreen(dpy);
wsmap= createWorkspaceMap(scr);
WMRealizeWidget(wsmap->win);
WMMapWidget(wsmap->win);
WMScreenMainLoop(scr);
dpy = XOpenDisplay("");
if (!dpy) {
wfatal("cant open display");
exit(0);
}
return 0;
scr = WMCreateSimpleApplicationScreen(dpy);
wsmap = createWorkspaceMap(scr);
WMRealizeWidget(wsmap->win);
WMMapWidget(wsmap->win);
WMScreenMainLoop(scr);
return 0;
}