Posted: Fri 16 Feb 2018, 00:46
Here are github projects to replace larger versions:
pulseaudio
systemd
logind
udev
libevent
alsa
x11
xserver
glibc over musl
pulseaudio
systemd
logind
udev
libevent
alsa
x11
xserver
glibc over musl
READ-ONLY Archive
https://oldforum.puppylinux.com/
Thanks Techno... Gonna reply just so I can "pin" this to my list...technosaurus wrote:Here are github projects to replace larger versions:
[...]
One of the good things about the DebianDogs being on Puppy forum is that they contain simple tools for extracting and creating debs. Nowadays I normally create my own packages in deb format, since it is so universal (and easy to change to dotpet format as explained next).musher0 wrote: 3) how do you integrate them with any Puppy? One of those authors mention a
way to do a debian install of his project. That is neither fun nor funny.
BFN.
Code: Select all
//filename.h
//author, copyright
//license
//description, etc...
#ifndef FILENAME_H
#define FILENAME_H
//Define feature test macros
#define _GNU_SOURCE 1
//local includes
#include "my_other_header.h"
//global includes
#include <stdio.h>
//Define config macros
#define Y(...) __VA_ARGS__
#define N(...)
//Followed by config by config options
#define USE_FOO Y
#define USE_BAR N
//Pragmas?
//Constant macros
#define PI 3.14f
//function-like macros
#define X(...) __VA_ARGS__
//enums
enum {A,B,C};
//forward struct declarations
struct G;
//forward typedef declarations;
typedef struct G G;
//typedefs
typedef unsigned char u8;
//struct definitions
struct G {int a,b,c;};
//external variables
extern int extern_global_int;
//function prototypes
//externally visible static inline functions
#endif //FILENAME_H
///above here would go in header (*.h) file, below in C (*.c) file.
#ifdef FILENAME_IMPLEMENTATION
#ifndef FILENAME_IMPLEMENTED
#define FILENAME_IMPLEMENTED
//Anything above that you don't want to be externally visible can be here instead
//exported globals: To access, should have corresponding extern in *.h
int global_int; // Are you really sure you need this?
//static (local) variables
static int static_int;
//local function implementations
static inline int get0(void){return 0;}
//exported function implementations
int main_like(int argc, char **argv){
int x=get0();
return x;
}
#endif FILENAME_IMPLEMENTED
#endif //FILENAME_IMPLEMENTATION
Some members of the Syllable forum did a comparison of the various forks of tinygl and recommended picogl. I started with the source for it and added some features from other forks. I've been working on adding new features to the code to improve OpenGL compatibility as time allows. I can get Emilia pinball working with it. If anyone's interested, I'd love to compare notes on updating picogl and improving it.technosaurus wrote:FWIW I never tracked down the (proprietary?) MorphOS sources either; however, there are a couple of forks with some improvements tinysdgl and picogl IIRC
Do you have a github project page?lmemsm wrote:If anyone's interested, I'd love to compare notes on updating picogl and improving it.
I do, but I really don't use it much. You'll find links to what I'm working on here for now:technosaurus wrote:Do you have a github project page?
Was reading your blog comments on LittlevGL a few days ago. Am always looking for a good lightweight cross-platform GUI. Was wondering how LVGL compares to using SDL with PDcurses for a GUI. Version 1.2.15 of SDL has framebuffer support. (Version 2.x only works in framebuffer with DirectFB. Keep wondering if an OpenGL backend might be an alternative on some systems though.) PDCurses has a SDL backend that lets you still use the graphics capabilities of SDL along with the text (TUI) capabilities of curses. There are ports of BSD libmenu and libform that work with PDCurses as well. Fonts can be bitmap or TrueType (using SDL2_ttf with SDL 1.x or 2.x). I'm guessing LVGL is probably much more compact than using multiple libraries. Was just wondering about how the capabilities (what kind of user interfaces you can create/support) compared. Am also curious about what you thought of the LVGL API. Is it easy to learn and work with? Thanks.BarryK wrote:I narrowed it down to LittlevGL (LVGL), and found it to be very nice, capable of creating very small static apps, that I compiled with uClibc and musl.
Extremely efficient handling of fonts and images, with no external library deps, only libc/uclibc/musl. Or, SDL if you want to create desktop apps.
I don't know anything about PDCurses, but with SDL it would have to be much bigger final size.lmemsm wrote:Was reading your blog comments on LittlevGL a few days ago. Am always looking for a good lightweight cross-platform GUI. Was wondering how LVGL compares to using SDL with PDcurses for a GUI. Version 1.2.15 of SDL has framebuffer support. (Version 2.x only works in framebuffer with DirectFB. Keep wondering if an OpenGL backend might be an alternative on some systems though.) PDCurses has a SDL backend that lets you still use the graphics capabilities of SDL along with the text (TUI) capabilities of curses. There are ports of BSD libmenu and libform that work with PDCurses as well. Fonts can be bitmap or TrueType (using SDL2_ttf with SDL 1.x or 2.x). I'm guessing LVGL is probably much more compact than using multiple libraries. Was just wondering about how the capabilities (what kind of user interfaces you can create/support) compared. Am also curious about what you thought of the LVGL API. Is it easy to learn and work with? Thanks.BarryK wrote:I narrowed it down to LittlevGL (LVGL), and found it to be very nice, capable of creating very small static apps, that I compiled with uClibc and musl.
Extremely efficient handling of fonts and images, with no external library deps, only libc/uclibc/musl. Or, SDL if you want to create desktop apps.
Was also wondering if any of the keyboard code from Android (which also uses the Linux kernel) might be useful for LVGL. The android_native_app_glue.c gives one example of how keyboard input could be handled and the system code behind it is available as Open Source from Google.
Code: Select all
pntr_20x32_img.o show_36x32_img.o show_not_36x32_img.o lv_group.o lv_indev.o lv_obj.o lv_refr.o lv_style.o lv_vdb.o lv_hal_disp.o lv_hal_indev.o lv_hal_tick.o lv_bar.o lv_cb.o lv_ddlist.o lv_kb.o lv_line.o lv_mbox.o lv_roller.o lv_tabview.o lv_btn.o lv_chart.o lv_gauge.o lv_label.o lv_list.o lv_slider.o lv_ta.o lv_btnm.o lv_cont.o lv_img.o lv_led.o lv_lmeter.o lv_page.o lv_sw.o lv_win.o lv_font_dejavu_10.o lv_font_dejavu_20.o lv_font_dejavu_30.o lv_font_dejavu_40.o lv_font_dejavu_10_cyrillic.o lv_font_dejavu_20_cyrillic.o lv_font_dejavu_30_cyrillic.o lv_font_dejavu_40_cyrillic.o lv_font_dejavu_10_latin_sup.o lv_font_dejavu_20_latin_sup.o lv_font_dejavu_30_latin_sup.o lv_font_dejavu_40_latin_sup.o lv_font_symbol_10.o lv_font_symbol_20.o lv_font_symbol_30.o lv_font_symbol_40.o lv_font.o lv_circ.o lv_area.o lv_task.o lv_fs.o lv_anim.o lv_mem.o lv_ll.o lv_color.o lv_txt.o lv_ufs.o lv_trigo.o lv_math.o lv_theme_alien.o lv_theme.o lv_theme_default.o lv_theme_night.o lv_theme_templ.o lv_theme_zen.o lv_theme_material.o lv_draw_vbasic.o lv_draw.o lv_draw_rbasic.o fbdev.o monitor.o R61581.o SSD1963.o ST7565.o FT5406EE8.o keyboard.o mouse.o evdev.o XPT2046.o main.o
Code: Select all
#include "lvgl/lvgl.h"
#include "lv_drivers/display/fbdev.h"
#include "lv_drivers/indev/evdev.h"
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
/*images*/
extern const lv_img_t pntr_img;
extern const lv_img_t show_img;
extern const lv_img_t show_not_img;
lv_obj_t *show_obj;
lv_obj_t *label3;
//Add a display for the LittlevGL using the frame buffer driver
void register_display(void)
{
lv_disp_drv_t disp_drv;
lv_disp_drv_init(&disp_drv);
disp_drv.disp_flush = fbdev_flush; //It flushes the internal graphical buffer to the frame buffer
lv_disp_drv_register(&disp_drv);
}
static lv_res_t btn3_click_action(lv_obj_t * btn)
{
uint8_t id = lv_obj_get_free_num(btn);
printf("Button %d is released\n", id);
// lv_img_set_src(show_obj, &show_not_img);
lv_label_set_text(label3, "Hide");
/* The button is released.
* Make something here */
return LV_RES_OK; /*Return OK if the button is not deleted*/
}
static lv_res_t ok_action_func(lv_obj_t * btn)
{
exit(0);
}
int main(void)
{
/*LittlevGL init*/
lv_init();
/*Linux frame buffer device init*/
fbdev_init();
// get a display
register_display();
// enable event input
evdev_init();
// get an input device like mouse
lv_indev_drv_t indev_drv;
lv_indev_drv_init(&indev_drv);
indev_drv.type = LV_INDEV_TYPE_POINTER;
indev_drv.read = evdev_read;
lv_indev_t * mouse_indev = lv_indev_drv_register(&indev_drv);
/*need an image for the mouse*/
lv_obj_t * cursor_obj = lv_img_create(lv_scr_act(), NULL); /*Create an image for the cursor */
//lv_img_set_src(cursor_obj, SYMBOL_GPS); /*For simlicity add a built in symbol not an image*/
lv_img_set_src(cursor_obj, &pntr_img);
lv_indev_set_cursor(mouse_indev, cursor_obj); /* connect the object to the driver*/
/*Create a title label*/
lv_obj_t *label1 = lv_label_create(lv_scr_act(), NULL);
lv_label_set_text(label1, "Title text here");
lv_obj_align(label1, NULL, LV_ALIGN_IN_TOP_MID, 0, 5);
/*create map for custom kbd*/
/*ref: https://littlevgl.com/object-types/button-matrix-lv_btnm*/
const char *map1[] = {"1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "\n",
"q", "w", "e", "r", "t", "y", "u", "i", "o", "p", "\n",
"a", "s", "d", "f", "g", "h", "j", "k", "l", "\n",
"z", "x", "c", "v", "b", "n", "m", "Del", SYMBOL_OK, ""};
/*create a keyboard*/
lv_obj_t *kb = lv_kb_create(lv_scr_act(), NULL);
lv_kb_set_cursor_manage(kb, true);
/*create a custom kbd*/
lv_kb_set_map(kb, map1);
/*action when click ok button*/
lv_kb_set_ok_action(kb, ok_action_func);
/*Create a one lined text area with password mode*/
lv_obj_t * ta2 = lv_ta_create(lv_scr_act(), NULL);
lv_obj_set_size(ta2, 100, 20);
lv_obj_align(ta2, label1, LV_ALIGN_OUT_BOTTOM_MID, 0, 10);
/*Apply the background style*/
lv_ta_set_one_line(ta2, true);
lv_ta_set_cursor_type(ta2, LV_CURSOR_LINE);
lv_ta_set_pwd_mode(ta2, true);
lv_ta_set_text(ta2, "");
/*Assign the text area to the keyboard*/
lv_kb_set_ta(kb, ta2);
/*create a group for keyboard input*/
lv_group_t *group2 = lv_group_create();
lv_group_add_obj(group2, ta2);
/*evdev to handle kb input*/
lv_indev_drv_t kb_drv;
lv_indev_drv_init(&kb_drv);
kb_drv.type = LV_INDEV_TYPE_KEYPAD;
kb_drv.read = evdev_read;
/*assign kb to group*/
lv_indev_t *kb_indev = lv_indev_drv_register(&kb_drv);
lv_indev_set_group(kb_indev, group2);
/*set focus on ta2*/
lv_group_focus_obj(ta2);
lv_group_focus_freeze(group2, true);
/*button to show or hide password*/
lv_obj_t *btn3 = lv_btn_create(lv_scr_act(), NULL);
lv_cont_set_fit(btn3, true, true); /*Enable resizing horizontally and vertically*/
lv_obj_align(btn3, ta2, LV_ALIGN_OUT_RIGHT_MID, 10, 0);
lv_obj_set_free_num(btn3, 3); /*Set a unique number for the button*/
lv_btn_set_action(btn3, LV_BTN_ACTION_CLICK, btn3_click_action);
label3 = lv_label_create(btn3, NULL);
lv_label_set_text(label3, "Show");
// show_obj = lv_img_create(btn3, NULL); /*Create an image for the button */
// lv_img_set_src(show_obj, &show_img);
/*Handle LitlevGL tasks (tickless mode)*/
while(1)
{
lv_tick_inc(5);
lv_task_handler();
usleep(5000);
}
return 0;
}