Skip to content

Commit

Permalink
Define values necessary for non-GTK operation outside the ifdef
Browse files Browse the repository at this point in the history
  • Loading branch information
rbu committed Mar 23, 2009
1 parent 4d5d14d commit 0d7c094
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions img.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
*
*/

#ifndef NO_DISPLAY_WINDOW

#ifndef __IMG_H_ /* include guard */
#define __IMG_H_

Expand All @@ -22,6 +20,17 @@

#include <stdio.h>

#define PNG_CODE_LEN 4
#define PNG_CRC_LEN 4
#define PNG_SIG_LEN 8

struct png_chunk {
uint32_t datalen;
unsigned char code[PNG_CODE_LEN];
};

#ifndef NO_DISPLAY_WINDOW

#include <glib.h>

typedef uint8_t chan;
Expand All @@ -48,10 +57,6 @@ typedef uint32_t pel;
# error "no endianness defined"
#endif

#define PNG_CODE_LEN 4
#define PNG_CRC_LEN 4
#define PNG_SIG_LEN 8

typedef enum { unknown = 0, pnm = 1, gif = 2, jpeg = 3, png = 4, raw = 5 } imgtype;
typedef enum { none = 0, header = 1, full = 2 } imgstate;

Expand All @@ -74,11 +79,6 @@ typedef struct _img {
imgerr err;
} *img;

struct png_chunk {
uint32_t datalen;
unsigned char code[PNG_CODE_LEN];
};

img img_new(void);
img img_new_blank(const unsigned int width, const unsigned int height);
void img_alloc(img I);
Expand All @@ -95,6 +95,6 @@ void img_delete(img I);

void img_simple_blt(img dest, const int dx, const int dy, img src, const int sx, const int sy, const int w, const int h);

#endif /* __IMG_H_ */

#endif /* !NO_DISPLAY_WINDOW */

#endif /* __IMG_H_ */

0 comments on commit 0d7c094

Please sign in to comment.