Assembled 2
A column based text editor
Loading...
Searching...
No Matches
Functions | Variables
main.c File Reference
#include <editor/syntax/syntax.h>
#include <editor/buffer/editor.h>
#include <editor/keyboard.h>
#include <editor/config.h>
#include <interface/screens/editor_scr.h>
#include <interface/screens/file_load_scr.h>
#include <interface/theming/themes.h>
#include <interface/interface.h>
#include <interface/screens/start.h>
#include <global.h>
#include <util.h>
#include <includes.h>

Functions

void init_ncurses ()
 
void editor ()
 
void interface ()
 
void terminate (int signal)
 
int main (int argc, char **argv)
 

Variables

bool running = 1
 
bool update = 0
 
FILE * __AS_DBG_LOG_FILE__ = NULL
 
struct AS_GlobalCtx as_ctx = { 0 }
 

Detailed Description

Author
awewsomegamer awews.nosp@m.omeg.nosp@m.amer@.nosp@m.gmai.nosp@m.l.com

LICENSE

Assembled - Column based text editor Copyright (C) 2023-2024 awewsomegamer

This file is apart of Assembled.

Assembled is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

DESCRIPTION

The main program file.

Function Documentation

◆ editor()

void editor ( )

Update the state of the editor

Checks if the keyboard has any new input and updates the current screen.

◆ init_ncurses()

void init_ncurses ( )

Initialize ncurses library

Initialize the terminal.

◆ interface()

void interface ( )

Render the current screen

Render the current active screen, clearing the screen in the process

◆ terminate()

void terminate ( int signal)

Function to be called when SIGINT is received.

Variable Documentation

◆ __AS_DBG_LOG_FILE__

FILE* __AS_DBG_LOG_FILE__ = NULL

Debug log file pointer.

This file is only used if Assembled is compiled with AS_DEBUG_ENABLE defined. This can be acheived through adding the debug target to the make command. make debug

◆ as_ctx

struct AS_GlobalCtx as_ctx = { 0 }

The global context variable.

◆ running

bool running = 1

Controls whether the main loop is running (1) or not (0).

◆ update

bool update = 0

Set when new input from the keyboard is present, otherwise 0.