libdockapp: Remove trailing whitespace.

This commit is contained in:
Doug Torrance 2014-11-28 10:22:49 -06:00 committed by Carlos R. Mafra
parent 3c0684b235
commit d02f58d26d
13 changed files with 49 additions and 49 deletions

View file

@ -1,7 +1,7 @@
# $Id: Imakefile,v 1.4 2002/10/16 07:19:18 dalroi Exp $
STD_INCLUDES = $(INC_PATH) -I/usr/local/include -I.
DEPLIBS = $(DEPXLIB)
DEPLIBS = $(DEPXLIB)
LOCAL_LIBRARIES = $(LIB_PATH) -L/usr/local/lib -L/usr/X11R6/lib \
-L../../src/.libs \

View file

@ -12,7 +12,7 @@ Public Domain Icons
These icons were originally made for Mosaic for X and have been
included in the NCSA httpd and Apache server distributions in the
past. They are in the public domain and may be freely included in any
application. The originals were done by Kevin Hughes
application. The originals were done by Kevin Hughes
(kevinh@kevcom.com).
Many thanks to Andy Polyakov for tuning the icon colors and adding a

View file

@ -1,7 +1,7 @@
/* $Id: basic.c,v 1.10 2003/02/10 12:35:03 dalroi Exp $
*
* Copyright (c) 2002 Alban G. Hertroys
*
*
* Basic example of libDockapp usage
*
* This dockapp will draw a rectangle with a
@ -179,7 +179,7 @@ moveBall()
x = 1;
dx = -dx + var;
}
if (y < 1) {
y = 1;
dy = -dy + var;
@ -189,7 +189,7 @@ moveBall()
x = 46 - ballPix->geometry.width;
dx = -dx + var;
}
if (y + ballPix->geometry.height > 46) {
y = 46 - ballPix->geometry.height;
dy = -dy + var;

View file

@ -1,7 +1,7 @@
# $Id: Imakefile,v 1.1 2002/10/16 07:19:18 dalroi Exp $
STD_INCLUDES = $(INC_PATH) -I/usr/local/include -I.
DEPLIBS = $(DEPXLIB)
DEPLIBS = $(DEPXLIB)
LOCAL_LIBRARIES = $(LIB_PATH) -L/usr/local/lib -L/usr/X11R6/lib \
-L../../src/.libs \

View file

@ -33,7 +33,7 @@ struct Colors {
GC black; /* background color, idem */
GC lightGray; /* Some GC's we'll have to define for colors */
GC darkGray;
GC slider; /* draw-color when not highlighted,
GC slider; /* draw-color when not highlighted,
* dark-color when highlighted
*/
GC sliderLight; /* draw-color when highlighted */
@ -125,7 +125,7 @@ main(int argc, char **argv)
/* define what to do if an event occurs in a rectangle */
DAActionRect *buttonPressRects, *buttonReleaseRects,
*mouseMoveRects, *mouseEnterRects, *mouseLeaveRects;
buttonPressRects = malloc(3 * sizeof(DAActionRect));
buttonPressRects[0] = setRectAction(btn, btnDown);
buttonPressRects[1] = setRectAction(square, squareDown);
@ -144,7 +144,7 @@ main(int argc, char **argv)
mouseLeaveRects = malloc(2 * sizeof(DAActionRect));
mouseLeaveRects[0] = setRectAction(btn, btnLeave);
mouseLeaveRects[1] = setRectAction(slider, sliderLeave);
/* XXX: make action rectangles available outside main()
* ...libDockapp should be able to do this... (reminder)
@ -208,7 +208,7 @@ main(int argc, char **argv)
*/
pointer = XCreateFontCursor(DADisplay, XC_based_arrow_up);
XDefineCursor(DADisplay, DAWindow, pointer);
/* a square with an image that changes when clicked (A button). */
createBtn(btn);
@ -258,7 +258,7 @@ setGCs(Drawable d)
/* don't send expose events */
gcv.graphics_exposures = False;
/* GC for white color */
gcv.foreground = WhitePixel(DADisplay, DefaultScreen(DADisplay));
colors->white = XCreateGC(DADisplay, d,
@ -272,7 +272,7 @@ setGCs(Drawable d)
#endif
colors->black = XCreateGC(DADisplay, d,
GCForeground|GCGraphicsExposures, &gcv);
/* GC for light borders */
gcv.foreground = DAGetColor("lightGray");
colors->lightGray = XCreateGC(DADisplay, d,
@ -329,7 +329,7 @@ adjustColor(unsigned long color, signed int adjustment)
r += adjustment;
g += adjustment;
b += adjustment;
if (r > 0xff) r = 0xff;
if (g > 0xff) g = 0xff;
if (b > 0xff) b = 0xff;
@ -337,7 +337,7 @@ adjustColor(unsigned long color, signed int adjustment)
if (r < 0) r = 0;
if (g < 0) g = 0;
if (b < 0) b = 0;
return ((unsigned short)r << 16) +
((unsigned short)g << 8) +
(unsigned short)b;
@ -449,7 +449,7 @@ squareDown(int x, int y, DARect rect, void *data)
if (data) {
int *tmp = (int*)data;
button = *tmp;
} else
button = 0;
@ -490,7 +490,7 @@ sliderMove(int x, int y, DARect rect, void *data)
sliderPos = (float)(rect.height - y)/(float)rect.height;
if (sliderPos > 1.0) sliderPos = 1.0;
if (sliderPos < 0.0) sliderPos = 0.0;
drawSlider(rect);
}
@ -556,7 +556,7 @@ drawSunkenFrame(DARect rect)
DASetPixmap(pixmap);
}
void
createSquare(DARect rect)
{

View file

@ -1,6 +1,6 @@
fontdir = @FONTDIR@
dist_font_DATA = luxel-ascii-06x09.pcf.gz \
seg7-ascii-05x07.pcf.gz
seg7-ascii-05x07.pcf.gz
install-data-hook:
@rm -f $(DESTDIR)$(fontdir)/font.dir

View file

@ -30,7 +30,7 @@ void
DASetCallbacks(DACallbacks *callbacks)
{
long mask = 0;
_daContext->callbacks = *callbacks;
if (callbacks->destroy)
@ -45,7 +45,7 @@ DASetCallbacks(DACallbacks *callbacks)
mask |= EnterWindowMask;
if (callbacks->leave)
mask |= LeaveWindowMask;
XSelectInput(DADisplay, DAWindow, mask);
XFlush(DADisplay);
}

View file

@ -31,17 +31,17 @@ unsigned long
DAGetColor(char *colorName)
{
XColor color;
if (!XParseColor(DADisplay,
DefaultColormap(DADisplay, DefaultScreen(DADisplay)),
colorName, &color))
DAError("could not parse color %s", colorName);
if (!XAllocColor(DADisplay, DefaultColormap(DADisplay, DefaultScreen(DADisplay)), &color)) {
DAWarning("could not allocate color %s. Using black instead", colorName);
return BlackPixel(DADisplay, DefaultScreen(DADisplay));
}
return color.pixel;
}

View file

@ -102,7 +102,7 @@ DAProcessEventForWindow(Window window, XEvent *event)
default:
return False;
}
return True;
}
@ -137,24 +137,24 @@ DANextEventOrTimeout(XEvent *event, unsigned long milliseconds)
{
struct timeval timeout;
fd_set rset;
XSync(DADisplay, False);
if (XPending(DADisplay)) {
XNextEvent(DADisplay, event);
return True;
}
timeout.tv_sec = milliseconds / 1000;
timeout.tv_usec = (milliseconds % 1000) * 1000;
FD_ZERO(&rset);
FD_SET(ConnectionNumber(DADisplay), &rset);
if (select(ConnectionNumber(DADisplay)+1, &rset, NULL, NULL, &timeout) > 0) {
XNextEvent(DADisplay, event);
return True;
}
return False;
}

View file

@ -70,7 +70,7 @@ DAProposeIconSize(unsigned width, unsigned height)
/* Get the nearest allowed icon size if the WM specifies such */
iconSizes = XAllocIconSize();
if (XGetIconSizes(DADisplay, DefaultRootWindow(DADisplay),
if (XGetIconSizes(DADisplay, DefaultRootWindow(DADisplay),
&iconSizes, &nrSizes)) {
int i;
int da = -1;
@ -80,25 +80,25 @@ DAProposeIconSize(unsigned width, unsigned height)
for (i = 0; i < nrSizes; i++) {
int w1, h1, w, h;
if ((max_w < iconSizes[i].max_width) ||
if ((max_w < iconSizes[i].max_width) ||
(max_h < iconSizes[i].max_height)) {
max_w = iconSizes[i].max_width;
max_h = iconSizes[i].max_height;
}
if ((min_w > iconSizes[i].min_width) ||
(min_h > iconSizes[i].min_height) ||
if ((min_w > iconSizes[i].min_width) ||
(min_h > iconSizes[i].min_height) ||
(min_w == -1)) {
min_w = iconSizes[i].min_width;
min_h = iconSizes[i].min_height;
}
if ((width > iconSizes[i].max_width) ||
(width < iconSizes[i].min_width) ||
(height > iconSizes[i].max_height) ||
(height < iconSizes[i].min_height))
continue;
w1 = (iconSizes[i].max_width - width ) % iconSizes[i].width_inc;
h1 = (iconSizes[i].max_height - height) % iconSizes[i].height_inc;
w = MIN(w1, iconSizes[i].width_inc - w1);
@ -181,7 +181,7 @@ DACreateIcon(char *name, unsigned width, unsigned height, int argc, char **argv)
/* Set WMProtocols */
WM_DELETE_WINDOW = XInternAtom(DADisplay, "WM_DELETE_WINDOW", True);
XSetWMProtocols(DADisplay, DALeader, &WM_DELETE_WINDOW, 1);
/* Set Command to start the app so it can be docked properly */
XSetCommand(DADisplay, DALeader, argv, argc);

View file

@ -118,11 +118,11 @@ _daMakePixmap(daXpmSource source,
unsigned short *width, unsigned short *height)
{
XpmAttributes xpmAttr;
xpmAttr.valuemask = XpmCloseness;
xpmAttr.closeness = 40000;
if (source == daXpmSourceData
&& (XpmCreatePixmapFromData(
DADisplay, DAWindow, data, pixmap, mask, &xpmAttr) != 0))
@ -135,7 +135,7 @@ _daMakePixmap(daXpmSource source,
*width = xpmAttr.width;
*height = xpmAttr.height;
return True;
}

View file

@ -17,7 +17,7 @@
* AUTHOR 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.
*
*
* $Id: dashaped.c,v 1.11 2008/05/01 09:49:06 dalroi Exp $
*/
@ -57,7 +57,7 @@ DAMakeShapedPixmap()
dasp->shape = DAMakeShape();
dasp->geometry.width = _daContext->width;
dasp->geometry.height = _daContext->height;
setGCs(dasp);
DASPClear(dasp);
@ -177,7 +177,7 @@ _daMakeShapedPixmap(daShapeSource source, char **data)
if (dasp == NULL)
return NULL;
memset(dasp, 0, sizeof(DAShapedPixmap));
if (source == daShapeSourceData)
@ -189,7 +189,7 @@ _daMakeShapedPixmap(daShapeSource source, char **data)
if (!success)
return NULL;
setGCs(dasp);
return dasp;

View file

@ -17,7 +17,7 @@
* AUTHOR 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.
*
*
* $Id: dockapp.h,v 1.18 2005/07/16 11:49:10 dalroi Exp $
*/
@ -49,7 +49,7 @@
/* !!! DEPRECATED !!!
* This feature may be removed in the future. Use DAEventCallbacks instead.
*
*
* the callbacks for events related to the dockapp window your program wants
* to handle
*/
@ -75,10 +75,10 @@ typedef struct {
char *shortForm; /* short form for option, like -w */
char *longForm; /* long form for option, like --withdrawn */
char *description; /* description for the option */
short type; /* type of argument */
Bool used; /* if the argument was passed on the cmd-line */
/* the following are only set if the "used" field is True */
union {
void *ptr; /* a ptr for the value that was passed */