1. Top

This document focuses on anything related to norns + monolith.

1.1. C File

<<norns.c>>=
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <fcntl.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <linux/input.h>
#include <signal.h>
#include <linux/fb.h>
#include <sys/mman.h>
#include <sys/ioctl.h>

#include "graforge.h"
#include "runt.h"
#include "monolith.h"
#define MONOLITH_ANSI
#include "janet/janet.h"
#define MONOLITH_NORNS_PRIVATE
#include "norns.h"

<<norns_default_font>>
<<norns_functions>>

1.2. Header File

<<norns.h>>=
#ifndef MONOLITH_NORNS_H
#define MONOLITH_NORNS_H
<<norns_typedefs>>
#ifdef MONOLITH_NORNS_PRIVATE
<<norns_structs>>
#endif
<<norns_funcdefs>>
#endif

Monolith struct is needed for some functions, which is causing some header circular deps. To fix this, a monolith_d typedef has been added to the top of this header in case monolith.h has not been included yet or is includded after norns.h.


In the future, it may be better to move the monolith specific stuff outside of this file and into the main monolith file.



prev | home | next