Upload files to ''
This commit is contained in:
parent
233092c3f8
commit
197669677c
58
README
Normal file
58
README
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
This is a prototype (I'd even say a mockup) of an application I am developping as
|
||||||
|
well as a custom gui lib, so please keep that in mind.
|
||||||
|
I'm aware that this code is pure spagetti garbage, mostly because I was just throwing
|
||||||
|
shit at the wall to see what sticks and also to quickly get an MVP (somewhat) for
|
||||||
|
personal usage.
|
||||||
|
|
||||||
|
!!!
|
||||||
|
This software is provided as is and should be treated as INCOMPLETE, BUGGY and
|
||||||
|
UNMAINTAINED.
|
||||||
|
!!!
|
||||||
|
|
||||||
|
This is just a peak for those that are interested.
|
||||||
|
|
||||||
|
I am currently in the process of slowly redoing everything from scratch the
|
||||||
|
right way. And except for the core ideas, nothing will be left in the new codebase,
|
||||||
|
not even the name of the project.
|
||||||
|
|
||||||
|
No keyboard controls are implemented except for text fields (recognisable with a red
|
||||||
|
underscore in the text, arrows, pgup/down, home/end, only ascii letters - I didn't
|
||||||
|
bother with utf8 in this for now - it will be done in the real release tho).
|
||||||
|
|
||||||
|
Use your mouse to navigate, left click to activate stuff.
|
||||||
|
For the chart in the main program you will need to be able to use mouse button 6-7 to
|
||||||
|
pan it left-right, usually it will be the left-right gestures on a trackpad (I made
|
||||||
|
this shit on a laptop). Mouse wheel (or button 4-5) to scroll up and down. You can also
|
||||||
|
left-right click on the table header to grow-shrink a column.
|
||||||
|
Double left cliking on a list or table row will activate it.
|
||||||
|
Windows can be resized.
|
||||||
|
|
||||||
|
If you wish to fuck around with the appearance of the program, you can edit the
|
||||||
|
btk/btk-config.h file.
|
||||||
|
Btw the font is set to Terminus, if its not installed on your system the rendering
|
||||||
|
will be fucked up, so either install that font or change the btk_font_name[] property
|
||||||
|
to your font of choice - note that the internal font parameters have antialias disabled,
|
||||||
|
so preferably use a bitmap font or it will look like shit.
|
||||||
|
|
||||||
|
There is a test "database" that the program takes cares of in ./htpt-db-example navigate
|
||||||
|
to it from the open button in the main program (in the file list if you want to go up to a
|
||||||
|
parent folder double click the topmost ".." row), a folder that has been populated with this
|
||||||
|
specific "db" (its a hidden ".htpt" file in the target dir) will be highlighed in green
|
||||||
|
by default, select it (without double click) then click the open button.
|
||||||
|
The "add file" button will copy whatever you select into the location the of "db"
|
||||||
|
|
||||||
|
to compile:
|
||||||
|
make hello (just a hello world window)
|
||||||
|
or:
|
||||||
|
make hotpot (the actual program)
|
||||||
|
|
||||||
|
dependencies :
|
||||||
|
xcb
|
||||||
|
cairo
|
||||||
|
libc
|
||||||
|
pthread
|
||||||
|
c99 compiler
|
||||||
|
|
||||||
|
Again, this is a mockup of a program and lib, please don't scorn me for this, I promise
|
||||||
|
that in the actual release everything should be done as one would expect form a normal
|
||||||
|
library.
|
27
hello.c
Normal file
27
hello.c
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
#include <stdlib.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#include "btk/btk.h"
|
||||||
|
|
||||||
|
btk_session_t *s = NULL;
|
||||||
|
btk_window_t *w = NULL;
|
||||||
|
btk_window_t *W[1];
|
||||||
|
|
||||||
|
int
|
||||||
|
main(int argc, char **argv)
|
||||||
|
{
|
||||||
|
s = btk_open();
|
||||||
|
w = btk_window_create(s->x_con, s->x_scr, s->x_vis, 1, 1, 0, 0, 200, 0, 1, NULL);
|
||||||
|
|
||||||
|
btk_window_set_name(w, "hello world");
|
||||||
|
btk_cell_set_mark(&(w->cells[0]), 0, 0, 1, BTK_JUSTIFY_LEFT, "hello world");
|
||||||
|
|
||||||
|
W[0] = w;
|
||||||
|
btk_map(s, w);
|
||||||
|
btk_loop(s, W, 1);
|
||||||
|
|
||||||
|
btk_close(s);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
25
makefile
Normal file
25
makefile
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
# hotpot - simple literrature manager
|
||||||
|
|
||||||
|
# bucket version
|
||||||
|
VERSION = 1.0.0
|
||||||
|
|
||||||
|
# btk
|
||||||
|
BTK = btk
|
||||||
|
BTKFILES = ${BTK}/btk.c ${BTK}/btk-window.c ${BTK}/btk-cell.c ${BTK}/btk-text.c ${BTK}/btk-log.c
|
||||||
|
|
||||||
|
# external libraries
|
||||||
|
LIBS = -lxcb -lcairo
|
||||||
|
|
||||||
|
# flags
|
||||||
|
CPPFLAGS = -D_POSIX_C_SOURCE=200809L -DVERSION=\"${VERSION}\"
|
||||||
|
CFLAGS = -std=c99 -pedantic -Wall -Wno-deprecated-declarations -Os
|
||||||
|
|
||||||
|
# compiler and linker
|
||||||
|
CC = cc
|
||||||
|
|
||||||
|
|
||||||
|
hotpot:
|
||||||
|
${CC} -o hotpot main.c ${BTKFILES} ${CPPFLAGS} ${CFLAGS} ${LIBS}
|
||||||
|
|
||||||
|
hello:
|
||||||
|
${CC} -o hello hello.c ${BTKFILES} ${CPPFLAGS} ${CFLAGS} ${LIBS}
|
BIN
screenshot.png
Normal file
BIN
screenshot.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 76 KiB |
Loading…
Reference in New Issue
Block a user