From 38cd3c4ee4c5c4571c5cfd4c4b1dad22ce3e5736 Mon Sep 17 00:00:00 2001 From: Serhii Sakhno Date: Thu, 30 Jun 2016 16:05:59 +0000 Subject: [PATCH] C Layer: new project structure git-svn-id: svn://kolibrios.org@6456 a494cfbc-eb01-0410-851d-a64ba20cac60 --- contrib/C_Layer/ASM/Makefile | 7 +++ .../{libguic_kolibri => ASM}/loadboxlib.asm | 0 contrib/C_Layer/{buf2d => ASM}/loadbuf2d.asm | 0 .../C_Layer/{http_lib => ASM}/loadhttp.asm | 0 contrib/C_Layer/{kmenu => ASM}/loadkmenu.asm | 0 .../C_Layer/{libimg => ASM}/loadlibimg.asm | 0 .../C_Layer/{libini => ASM}/loadlibini.asm | 0 .../C_Layer/{proc_lib => ASM}/loadproclib.asm | 0 .../{ => EXAMPLE}/libguic_kolibri/README | 0 .../{ => EXAMPLE}/libguic_kolibri/boardmsg.c | 0 .../libguic_kolibri/make_boardmsg | 0 .../libguic_kolibri/make_boardmsg.sh | 0 .../{ => EXAMPLE}/libguic_kolibri/quirks | 0 .../kolibri_boxlib.h | 0 .../{buf2d => INCLUDE}/kolibri_buf2d.h | 0 .../kolibri_button.h | 0 .../kolibri_checkbox.h | 0 .../kolibri_colordialog.h | 0 .../kolibri_colors.h | 0 .../kolibri_debug.h | 0 .../kolibri_editbox.h | 0 .../kolibri_frame.h | 0 .../kolibri_gui.h | 0 .../kolibri_gui_elements.h | 0 .../{kmenu => INCLUDE}/kolibri_kmenu.h | 0 .../{libimg => INCLUDE}/kolibri_libimg.h | 0 .../{libini => INCLUDE}/kolibri_libini.h | 0 .../kolibri_opendialog.h | 0 .../{proc_lib => INCLUDE}/kolibri_proclib.h | 0 .../kolibri_progressbar.h | 0 contrib/C_Layer/libguic_kolibri/kolwin.c | 57 ------------------- 31 files changed, 7 insertions(+), 57 deletions(-) create mode 100644 contrib/C_Layer/ASM/Makefile rename contrib/C_Layer/{libguic_kolibri => ASM}/loadboxlib.asm (100%) rename contrib/C_Layer/{buf2d => ASM}/loadbuf2d.asm (100%) rename contrib/C_Layer/{http_lib => ASM}/loadhttp.asm (100%) rename contrib/C_Layer/{kmenu => ASM}/loadkmenu.asm (100%) rename contrib/C_Layer/{libimg => ASM}/loadlibimg.asm (100%) rename contrib/C_Layer/{libini => ASM}/loadlibini.asm (100%) rename contrib/C_Layer/{proc_lib => ASM}/loadproclib.asm (100%) rename contrib/C_Layer/{ => EXAMPLE}/libguic_kolibri/README (100%) rename contrib/C_Layer/{ => EXAMPLE}/libguic_kolibri/boardmsg.c (100%) rename contrib/C_Layer/{ => EXAMPLE}/libguic_kolibri/make_boardmsg (100%) rename contrib/C_Layer/{ => EXAMPLE}/libguic_kolibri/make_boardmsg.sh (100%) rename contrib/C_Layer/{ => EXAMPLE}/libguic_kolibri/quirks (100%) rename contrib/C_Layer/{libguic_kolibri => INCLUDE}/kolibri_boxlib.h (100%) rename contrib/C_Layer/{buf2d => INCLUDE}/kolibri_buf2d.h (100%) rename contrib/C_Layer/{libguic_kolibri => INCLUDE}/kolibri_button.h (100%) rename contrib/C_Layer/{libguic_kolibri => INCLUDE}/kolibri_checkbox.h (100%) rename contrib/C_Layer/{proc_lib => INCLUDE}/kolibri_colordialog.h (100%) rename contrib/C_Layer/{libguic_kolibri => INCLUDE}/kolibri_colors.h (100%) rename contrib/C_Layer/{libguic_kolibri => INCLUDE}/kolibri_debug.h (100%) rename contrib/C_Layer/{libguic_kolibri => INCLUDE}/kolibri_editbox.h (100%) rename contrib/C_Layer/{libguic_kolibri => INCLUDE}/kolibri_frame.h (100%) rename contrib/C_Layer/{libguic_kolibri => INCLUDE}/kolibri_gui.h (100%) rename contrib/C_Layer/{libguic_kolibri => INCLUDE}/kolibri_gui_elements.h (100%) rename contrib/C_Layer/{kmenu => INCLUDE}/kolibri_kmenu.h (100%) rename contrib/C_Layer/{libimg => INCLUDE}/kolibri_libimg.h (100%) rename contrib/C_Layer/{libini => INCLUDE}/kolibri_libini.h (100%) rename contrib/C_Layer/{proc_lib => INCLUDE}/kolibri_opendialog.h (100%) rename contrib/C_Layer/{proc_lib => INCLUDE}/kolibri_proclib.h (100%) rename contrib/C_Layer/{libguic_kolibri => INCLUDE}/kolibri_progressbar.h (100%) delete mode 100644 contrib/C_Layer/libguic_kolibri/kolwin.c diff --git a/contrib/C_Layer/ASM/Makefile b/contrib/C_Layer/ASM/Makefile new file mode 100644 index 0000000000..52fb9d3798 --- /dev/null +++ b/contrib/C_Layer/ASM/Makefile @@ -0,0 +1,7 @@ + +FASM = fasm + +all: $(patsubst %.asm,%.obj,$(wildcard *.asm)) + mv $^ ../OBJ/ +%.obj: %.asm + $(FASM) $< $% diff --git a/contrib/C_Layer/libguic_kolibri/loadboxlib.asm b/contrib/C_Layer/ASM/loadboxlib.asm similarity index 100% rename from contrib/C_Layer/libguic_kolibri/loadboxlib.asm rename to contrib/C_Layer/ASM/loadboxlib.asm diff --git a/contrib/C_Layer/buf2d/loadbuf2d.asm b/contrib/C_Layer/ASM/loadbuf2d.asm similarity index 100% rename from contrib/C_Layer/buf2d/loadbuf2d.asm rename to contrib/C_Layer/ASM/loadbuf2d.asm diff --git a/contrib/C_Layer/http_lib/loadhttp.asm b/contrib/C_Layer/ASM/loadhttp.asm similarity index 100% rename from contrib/C_Layer/http_lib/loadhttp.asm rename to contrib/C_Layer/ASM/loadhttp.asm diff --git a/contrib/C_Layer/kmenu/loadkmenu.asm b/contrib/C_Layer/ASM/loadkmenu.asm similarity index 100% rename from contrib/C_Layer/kmenu/loadkmenu.asm rename to contrib/C_Layer/ASM/loadkmenu.asm diff --git a/contrib/C_Layer/libimg/loadlibimg.asm b/contrib/C_Layer/ASM/loadlibimg.asm similarity index 100% rename from contrib/C_Layer/libimg/loadlibimg.asm rename to contrib/C_Layer/ASM/loadlibimg.asm diff --git a/contrib/C_Layer/libini/loadlibini.asm b/contrib/C_Layer/ASM/loadlibini.asm similarity index 100% rename from contrib/C_Layer/libini/loadlibini.asm rename to contrib/C_Layer/ASM/loadlibini.asm diff --git a/contrib/C_Layer/proc_lib/loadproclib.asm b/contrib/C_Layer/ASM/loadproclib.asm similarity index 100% rename from contrib/C_Layer/proc_lib/loadproclib.asm rename to contrib/C_Layer/ASM/loadproclib.asm diff --git a/contrib/C_Layer/libguic_kolibri/README b/contrib/C_Layer/EXAMPLE/libguic_kolibri/README similarity index 100% rename from contrib/C_Layer/libguic_kolibri/README rename to contrib/C_Layer/EXAMPLE/libguic_kolibri/README diff --git a/contrib/C_Layer/libguic_kolibri/boardmsg.c b/contrib/C_Layer/EXAMPLE/libguic_kolibri/boardmsg.c similarity index 100% rename from contrib/C_Layer/libguic_kolibri/boardmsg.c rename to contrib/C_Layer/EXAMPLE/libguic_kolibri/boardmsg.c diff --git a/contrib/C_Layer/libguic_kolibri/make_boardmsg b/contrib/C_Layer/EXAMPLE/libguic_kolibri/make_boardmsg similarity index 100% rename from contrib/C_Layer/libguic_kolibri/make_boardmsg rename to contrib/C_Layer/EXAMPLE/libguic_kolibri/make_boardmsg diff --git a/contrib/C_Layer/libguic_kolibri/make_boardmsg.sh b/contrib/C_Layer/EXAMPLE/libguic_kolibri/make_boardmsg.sh similarity index 100% rename from contrib/C_Layer/libguic_kolibri/make_boardmsg.sh rename to contrib/C_Layer/EXAMPLE/libguic_kolibri/make_boardmsg.sh diff --git a/contrib/C_Layer/libguic_kolibri/quirks b/contrib/C_Layer/EXAMPLE/libguic_kolibri/quirks similarity index 100% rename from contrib/C_Layer/libguic_kolibri/quirks rename to contrib/C_Layer/EXAMPLE/libguic_kolibri/quirks diff --git a/contrib/C_Layer/libguic_kolibri/kolibri_boxlib.h b/contrib/C_Layer/INCLUDE/kolibri_boxlib.h similarity index 100% rename from contrib/C_Layer/libguic_kolibri/kolibri_boxlib.h rename to contrib/C_Layer/INCLUDE/kolibri_boxlib.h diff --git a/contrib/C_Layer/buf2d/kolibri_buf2d.h b/contrib/C_Layer/INCLUDE/kolibri_buf2d.h similarity index 100% rename from contrib/C_Layer/buf2d/kolibri_buf2d.h rename to contrib/C_Layer/INCLUDE/kolibri_buf2d.h diff --git a/contrib/C_Layer/libguic_kolibri/kolibri_button.h b/contrib/C_Layer/INCLUDE/kolibri_button.h similarity index 100% rename from contrib/C_Layer/libguic_kolibri/kolibri_button.h rename to contrib/C_Layer/INCLUDE/kolibri_button.h diff --git a/contrib/C_Layer/libguic_kolibri/kolibri_checkbox.h b/contrib/C_Layer/INCLUDE/kolibri_checkbox.h similarity index 100% rename from contrib/C_Layer/libguic_kolibri/kolibri_checkbox.h rename to contrib/C_Layer/INCLUDE/kolibri_checkbox.h diff --git a/contrib/C_Layer/proc_lib/kolibri_colordialog.h b/contrib/C_Layer/INCLUDE/kolibri_colordialog.h similarity index 100% rename from contrib/C_Layer/proc_lib/kolibri_colordialog.h rename to contrib/C_Layer/INCLUDE/kolibri_colordialog.h diff --git a/contrib/C_Layer/libguic_kolibri/kolibri_colors.h b/contrib/C_Layer/INCLUDE/kolibri_colors.h similarity index 100% rename from contrib/C_Layer/libguic_kolibri/kolibri_colors.h rename to contrib/C_Layer/INCLUDE/kolibri_colors.h diff --git a/contrib/C_Layer/libguic_kolibri/kolibri_debug.h b/contrib/C_Layer/INCLUDE/kolibri_debug.h similarity index 100% rename from contrib/C_Layer/libguic_kolibri/kolibri_debug.h rename to contrib/C_Layer/INCLUDE/kolibri_debug.h diff --git a/contrib/C_Layer/libguic_kolibri/kolibri_editbox.h b/contrib/C_Layer/INCLUDE/kolibri_editbox.h similarity index 100% rename from contrib/C_Layer/libguic_kolibri/kolibri_editbox.h rename to contrib/C_Layer/INCLUDE/kolibri_editbox.h diff --git a/contrib/C_Layer/libguic_kolibri/kolibri_frame.h b/contrib/C_Layer/INCLUDE/kolibri_frame.h similarity index 100% rename from contrib/C_Layer/libguic_kolibri/kolibri_frame.h rename to contrib/C_Layer/INCLUDE/kolibri_frame.h diff --git a/contrib/C_Layer/libguic_kolibri/kolibri_gui.h b/contrib/C_Layer/INCLUDE/kolibri_gui.h similarity index 100% rename from contrib/C_Layer/libguic_kolibri/kolibri_gui.h rename to contrib/C_Layer/INCLUDE/kolibri_gui.h diff --git a/contrib/C_Layer/libguic_kolibri/kolibri_gui_elements.h b/contrib/C_Layer/INCLUDE/kolibri_gui_elements.h similarity index 100% rename from contrib/C_Layer/libguic_kolibri/kolibri_gui_elements.h rename to contrib/C_Layer/INCLUDE/kolibri_gui_elements.h diff --git a/contrib/C_Layer/kmenu/kolibri_kmenu.h b/contrib/C_Layer/INCLUDE/kolibri_kmenu.h similarity index 100% rename from contrib/C_Layer/kmenu/kolibri_kmenu.h rename to contrib/C_Layer/INCLUDE/kolibri_kmenu.h diff --git a/contrib/C_Layer/libimg/kolibri_libimg.h b/contrib/C_Layer/INCLUDE/kolibri_libimg.h similarity index 100% rename from contrib/C_Layer/libimg/kolibri_libimg.h rename to contrib/C_Layer/INCLUDE/kolibri_libimg.h diff --git a/contrib/C_Layer/libini/kolibri_libini.h b/contrib/C_Layer/INCLUDE/kolibri_libini.h similarity index 100% rename from contrib/C_Layer/libini/kolibri_libini.h rename to contrib/C_Layer/INCLUDE/kolibri_libini.h diff --git a/contrib/C_Layer/proc_lib/kolibri_opendialog.h b/contrib/C_Layer/INCLUDE/kolibri_opendialog.h similarity index 100% rename from contrib/C_Layer/proc_lib/kolibri_opendialog.h rename to contrib/C_Layer/INCLUDE/kolibri_opendialog.h diff --git a/contrib/C_Layer/proc_lib/kolibri_proclib.h b/contrib/C_Layer/INCLUDE/kolibri_proclib.h similarity index 100% rename from contrib/C_Layer/proc_lib/kolibri_proclib.h rename to contrib/C_Layer/INCLUDE/kolibri_proclib.h diff --git a/contrib/C_Layer/libguic_kolibri/kolibri_progressbar.h b/contrib/C_Layer/INCLUDE/kolibri_progressbar.h similarity index 100% rename from contrib/C_Layer/libguic_kolibri/kolibri_progressbar.h rename to contrib/C_Layer/INCLUDE/kolibri_progressbar.h diff --git a/contrib/C_Layer/libguic_kolibri/kolwin.c b/contrib/C_Layer/libguic_kolibri/kolwin.c deleted file mode 100644 index 57d74b4795..0000000000 --- a/contrib/C_Layer/libguic_kolibri/kolwin.c +++ /dev/null @@ -1,57 +0,0 @@ -#include "kolibri_gui.h" - -int main() -{ - /* Load all libraries, initialize global tables like system color table and - operations table. kolibri_gui_init() will EXIT with mcall -1 if it fails - to do it's job. This is all you need to call and all libraries and GUI - elements can be used after a successful call to this function - */ - kolibri_gui_init(); - - /* Set gui_event to REDRAW so that window is drawn in first iteration */ - unsigned int gui_event = KOLIBRI_EVENT_REDRAW; - - struct kolibri_window *main_window = kolibri_new_window(50, 50, 400, 100, "BoardMsg: Send msg to debug board"); - struct check_box *checkbox = kolibri_new_check_box(20, 40, 12, 12, "Append BOARDMSG to entered message."); - struct edit_box *textbox = kolibri_new_edit_box(20, 55, 40); - struct kolibri_button *button = kolibri_new_button(310, 55, 14, 14, 0x00123456, kolibri_color_table.color_work_button); - - kolibri_window_add_element(main_window, KOLIBRI_EDIT_BOX, textbox); - kolibri_window_add_element(main_window, KOLIBRI_CHECK_BOX, checkbox); - kolibri_window_add_element(main_window, KOLIBRI_BUTTON, button); - - do /* Start of main activity loop */ - { - if(gui_event == KOLIBRI_EVENT_REDRAW) - { - kolibri_handle_event_redraw(main_window); - } - else if(gui_event == KOLIBRI_EVENT_KEY) - { - kolibri_handle_event_key(main_window); - } - else if(gui_event == KOLIBRI_EVENT_BUTTON) - { - unsigned int pressed_button = kolibri_button_get_identifier(); - - if(pressed_button = 0x00123456) /* Our button was pressed */ - { - if(checkbox -> flags & CHECKBOX_IS_SET) /* Append BoardMsg checkbox is set */ - debug_board_write_str("BOARDMSG: "); - - debug_board_write_str(textbox->text); - debug_board_write_str("\n"); - } - } - else if(gui_event == KOLIBRI_EVENT_MOUSE) - { - kolibri_handle_event_mouse(main_window); - } - - } while(gui_event = get_os_event()); /* End of main activity loop */ - - /* kolibri_quit(); */ - - return 0; -}