move enums and structs to dunst.h

This commit is contained in:
Sascha Kruse 2012-08-30 06:28:14 +02:00
parent be626b68a5
commit 8d8834a8f3
2 changed files with 33 additions and 35 deletions

12
dunst.c
View File

@ -40,18 +40,6 @@
#define INFO 2
#define DEBUG 3
enum follow_mode { FOLLOW_NONE, FOLLOW_MOUSE, FOLLOW_KEYBOARD };
/* structs */
typedef struct _screen_info {
int scr;
dimension_t dim;
} screen_info;
typedef struct _notification_buffer {
char txt[BUFSIZ];
notification *n;
} notification_buffer;
/* global variables */

56
dunst.h
View File

@ -15,23 +15,20 @@
enum alignment { left, center, right };
enum separator_color { FOREGROUND, AUTO };
enum follow_mode { FOLLOW_NONE, FOLLOW_MOUSE, FOLLOW_KEYBOARD };
typedef struct _rule_t {
char *name;
/* filters */
char *appname;
char *summary;
char *body;
char *icon;
typedef struct _dimension_t {
int x;
int y;
unsigned int h;
unsigned int w;
int mask;
} dimension_t;
/* actions */
int timeout;
int urgency;
char *fg;
char *bg;
const char *format;
} rule_t;
typedef struct _screen_info {
int scr;
dimension_t dim;
} screen_info;
typedef struct _draw_txt {
char *txt;
@ -59,13 +56,27 @@ typedef struct _notification {
char *color_strings[2];
} notification;
typedef struct _dimension_t {
int x;
int y;
unsigned int h;
unsigned int w;
int mask;
} dimension_t;
typedef struct _notification_buffer {
char txt[BUFSIZ];
notification *n;
} notification_buffer;
typedef struct _rule_t {
char *name;
/* filters */
char *appname;
char *summary;
char *body;
char *icon;
/* actions */
int timeout;
int urgency;
char *fg;
char *bg;
const char *format;
} rule_t;
typedef struct _keyboard_shortcut {
const char *str;
@ -75,7 +86,6 @@ typedef struct _keyboard_shortcut {
int is_valid;
} keyboard_shortcut;
extern int verbosity;
/* return id of notification */