Krolyxon
Commit 01121ce

Branches

Refs →

nsxiv01121ce

Basic app_* stuff

Author
Bert
Date
2011-01-17 16:40 +0100
Parent
1f6af53
Commit
01121cea86aa9890b20ba48c674b8085ee799b5c

+27 −1

2 files changed

  1. M app.c +22 −0
  2. M app.h +5 −1
M app.c View
@@ -16,6 +16,28 @@
1616 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1717 */
1818
19+#include <X11/Xlib.h>
20+
1921 #include "sxiv.h"
2022 #include "app.h"
2123
24+void app_init(app_t *app) {
25+ if (app == NULL)
26+ return;
27+
28+ app->fileidx = 0;
29+
30+ app->img.zoom = 100;
31+ app->img.scalemode = SCALE_DOWN;
32+
33+ app->win.w = WIN_WIDTH;
34+ app->win.h = WIN_HEIGHT;
35+
36+ win_open(&app->win);
37+}
38+
39+void app_run(app_t *app) {
40+}
41+
42+void app_quit(app_t *app) {
43+}
M app.h View
@@ -23,11 +23,15 @@
2323 #include "window.h"
2424
2525 typedef struct app_s {
26− const char **filenames;
26+ char **filenames;
2727 unsigned int filecnt;
2828 unsigned int fileidx;
2929 img_t img;
3030 win_t win;
3131 } app_t;
3232
33+void app_init(app_t*);
34+void app_run(app_t*);
35+void app_quit(app_t*);
36+
3337 #endif /* APP_H */