NULL terminate strncpy destination string
[dockapps/wmnotify.git] / src / dockapp.h
index c278b66..44458c9 100644 (file)
@@ -1,53 +1,43 @@
-/* dockapp.h */
+/*
+ * dockapp.h
+ *
+ * Copyright (C) 2003 Hugo Villeneuve <hugo@hugovil.com>
+ *
+ * This file is released under the GPLv2
+ */
 
 #ifndef DOCKAPP_H
 #define DOCKAPP_H 1
 
-
 #include <X11/xpm.h>
 
-
-#define XLIB_FAILURE 0
-#define XLIB_SUCCESS 1
-
-/* Specifies the border width */
-#define BWIDTH 1
-
-/* Width and height in pixels of Window Maker icons. */
-#define ICON_SIZE 64
-
-typedef struct XpmIcon
-{
-  XpmAttributes attributes;
-  Pixmap shapemask;
-  Pixmap image;
-} XpmIcon;
-
-typedef struct dockapp_t
-{
-  Display *display;
-  Window  root_win;
-  int     screen;
-  int     d_depth;
-  Pixel   back_pix;
-  Pixel   fore_pix;
-  Window  iconwin;
-  Window  win;
-  GC      NormalGC;
-  XpmIcon xpm_icon;
-} dockapp_t;
-
+struct XpmIcon {
+       XpmAttributes attributes;
+       Pixmap shapemask;
+       Pixmap image;
+};
+
+struct dockapp_t {
+       Display *display;
+       Window root_win;
+       Window win;
+       Window iconwin;
+       int screen;
+       int d_depth;
+       Pixel back_pix;
+       Pixel fore_pix;
+       GC NormalGC;
+       struct XpmIcon xpm_icon;
+};
 
 void
-InitDockAppWindow( int argc, char *argv[], char *pixmap_data[],
-                  char *display_arg, char *geometry_arg );
+InitDockAppWindow(int argc, char *argv[], char *pixmap_data[]);
 
-void
-RedrawWindow( void );
+void RedrawWindow(void);
 
 void
-copyXPMArea( int x, int y, unsigned int sx, unsigned int sy, int dx, int dy );
-
+copyXPMArea(int x, int y, unsigned int sx, unsigned int sy, int dx,
+           int dy);
 
 /* Exported variables */
 #undef _SCOPE_
@@ -57,7 +47,6 @@ copyXPMArea( int x, int y, unsigned int sx, unsigned int sy, int dx, int dy );
 #define _SCOPE_ extern
 #endif
 
-_SCOPE_ dockapp_t dockapp;
-
+_SCOPE_ struct dockapp_t dockapp;
 
-#endif /* DOCKAPP_H */
+#endif                         /* DOCKAPP_H */