Browse Source

Shorter typedefs

master
Bert 14 years ago
parent
commit
955c39a5c5
6 changed files with 12 additions and 12 deletions
  1. +1
    -1
      Makefile
  2. +3
    -3
      image.h
  3. +1
    -1
      main.c
  4. +1
    -1
      options.h
  5. +3
    -3
      thumbs.h
  6. +3
    -3
      window.h

+ 1
- 1
Makefile View File

@@ -1,6 +1,6 @@
all: sxiv all: sxiv


VERSION=git-20110227 VERSION=git-20110301


CC?=gcc CC?=gcc
PREFIX?=/usr/local PREFIX?=/usr/local


+ 3
- 3
image.h View File

@@ -23,20 +23,20 @@


#include "window.h" #include "window.h"


typedef enum scalemode_e { typedef enum {
SCALE_DOWN = 0, SCALE_DOWN = 0,
SCALE_FIT, SCALE_FIT,
SCALE_ZOOM SCALE_ZOOM
} scalemode_t; } scalemode_t;


typedef enum pandir_e { typedef enum {
PAN_LEFT = 0, PAN_LEFT = 0,
PAN_RIGHT, PAN_RIGHT,
PAN_UP, PAN_UP,
PAN_DOWN PAN_DOWN
} pandir_t; } pandir_t;


typedef struct img_s { typedef struct {
Imlib_Image *im; Imlib_Image *im;


float zoom; float zoom;


+ 1
- 1
main.c View File

@@ -34,7 +34,7 @@
#include "util.h" #include "util.h"
#include "window.h" #include "window.h"


typedef enum appmode_e { typedef enum {
MODE_NORMAL = 0, MODE_NORMAL = 0,
MODE_THUMBS MODE_THUMBS
} appmode_t; } appmode_t;


+ 1
- 1
options.h View File

@@ -21,7 +21,7 @@


#include "image.h" #include "image.h"


typedef struct options_s { typedef struct {
const char **filenames; const char **filenames;
int filecnt; int filecnt;
unsigned char from_stdin; unsigned char from_stdin;


+ 3
- 3
thumbs.h View File

@@ -21,14 +21,14 @@


#include "window.h" #include "window.h"


typedef enum tnsdir_e { typedef enum {
TNS_LEFT = 0, TNS_LEFT = 0,
TNS_RIGHT, TNS_RIGHT,
TNS_UP, TNS_UP,
TNS_DOWN TNS_DOWN
} tnsdir_t; } tnsdir_t;


typedef struct thumb_s { typedef struct {
Pixmap pm; Pixmap pm;
int x; int x;
int y; int y;
@@ -36,7 +36,7 @@ typedef struct thumb_s {
int h; int h;
} thumb_t; } thumb_t;


typedef struct tns_s { typedef struct {
thumb_t *thumbs; thumb_t *thumbs;
int cap; int cap;
int cnt; int cnt;


+ 3
- 3
window.h View File

@@ -23,14 +23,14 @@


#define CLEANMASK(mask) ((mask) & ~LockMask) #define CLEANMASK(mask) ((mask) & ~LockMask)


typedef enum win_cur_e { typedef enum {
CURSOR_ARROW = 0, CURSOR_ARROW = 0,
CURSOR_NONE, CURSOR_NONE,
CURSOR_HAND, CURSOR_HAND,
CURSOR_WATCH CURSOR_WATCH
} win_cur_t; } win_cur_t;


typedef struct win_env_s { typedef struct {
Display *dpy; Display *dpy;
int scr; int scr;
int scrw, scrh; int scrw, scrh;
@@ -39,7 +39,7 @@ typedef struct win_env_s {
int depth; int depth;
} win_env_t; } win_env_t;


typedef struct win_s { typedef struct {
Window xwin; Window xwin;
win_env_t env; win_env_t env;




||||||
x
 
000:0
Loading…
Cancel
Save