From f5fdcd56a9fd265d0b1a68573656d47ffb682abc Mon Sep 17 00:00:00 2001 From: Marrub Date: Mon, 21 Nov 2016 01:11:13 -0500 Subject: [PATCH] Remove Lth_button and test file --- lithos_c/Makefile | 3 +- lithos_c/inc/Lth.h | 1 + lithos_c/inc/Lth_button.h | 47 ------------------------- lithos_c/src/button.c | 74 --------------------------------------- lithos_fs/Base.lthm | 3 -- 5 files changed, 2 insertions(+), 126 deletions(-) delete mode 100644 lithos_c/inc/Lth_button.h delete mode 100644 lithos_c/src/button.c delete mode 100644 lithos_fs/Base.lthm diff --git a/lithos_c/Makefile b/lithos_c/Makefile index 44bb39c..13929b5 100644 --- a/lithos_c/Makefile +++ b/lithos_c/Makefile @@ -37,7 +37,6 @@ ALLOCMIN=--alloc-min Sta "" ## Sources SOURCES= \ - $(SRC)/button.c \ $(SRC)/context.c \ $(SRC)/control.c \ $(SRC)/draw.c \ @@ -52,7 +51,6 @@ SOURCES= \ HEADERS= \ $(INC)/Lth.h \ $(INC)/Lth_assert.h \ - $(INC)/Lth_button.h \ $(INC)/Lth_callback.h \ $(INC)/Lth_context.h \ $(INC)/Lth_control.h \ @@ -62,6 +60,7 @@ HEADERS= \ $(INC)/Lth_hudmessage.h \ $(INC)/Lth_linklist.h \ $(INC)/Lth_manifest.h \ + $(INC)/Lth_stdfix.h \ $(INC)/Lth_stdlib.h \ $(INC)/Lth_token.h \ $(INC)/Lth_tokenstream.h \ diff --git a/lithos_c/inc/Lth.h b/lithos_c/inc/Lth.h index bb81fe1..a667dfe 100644 --- a/lithos_c/inc/Lth.h +++ b/lithos_c/inc/Lth.h @@ -13,6 +13,7 @@ #ifndef lithos3__Lth_h #define lithos3__Lth_h +#include "Lth_stdfix.h" #include #include #include diff --git a/lithos_c/inc/Lth_button.h b/lithos_c/inc/Lth_button.h deleted file mode 100644 index 81e843a..0000000 --- a/lithos_c/inc/Lth_button.h +++ /dev/null @@ -1,47 +0,0 @@ -//----------------------------------------------------------------------------- -// -// Copyright © 2016 Project Golan -// -// See "LICENSE" for more information. -// -//----------------------------------------------------------------------------- -// -// Button control. -// -//----------------------------------------------------------------------------- - -#ifndef lithos3__Lth_button_h -#define lithos3__Lth_button_h - - -// Type Definitions ----------------------------------------------------------| - -// -// Lth_ButtonState -// -enum Lth_ButtonState -{ - Lth_BS_Normal, - Lth_BS_Hover, - Lth_BS_Depressed, - Lth_BS_Clicked, - Lth_BS_Max -}; - -// -// Lth_Button -// -typedef struct Lth_Button -{ - Lth_Inherits(Lth_Control); - char *label; - int state; -} Lth_Button; - - -// Extern Functions ----------------------------------------------------------| - -Lth_Button *Lth_ButtonNew(char const *label); -void Lth_ButtonSetLabel(Lth_Button *ctrl, char const *label); - -#endif//lithos3__Lth_button_h diff --git a/lithos_c/src/button.c b/lithos_c/src/button.c deleted file mode 100644 index 2a79973..0000000 --- a/lithos_c/src/button.c +++ /dev/null @@ -1,74 +0,0 @@ -//----------------------------------------------------------------------------- -// -// Copyright © 2016 Project Golan -// -// See "LICENSE" for more information. -// -//----------------------------------------------------------------------------- -// -// Window functions. -// -//----------------------------------------------------------------------------- - -#include "Lth.h" - -#include - - -// Static Functions ----------------------------------------------------------| - -// -// Lth_ButtonDraw -// -static void Lth_ButtonDraw(Lth_Button *ctrl) -{ - ACS_SetFont(s"CONFONT"); - ACS_BeginPrint(); - Lth_PrintString(ctrl->label); - Lth_HudMessagePlain(ctrl->ctx->hid.cur--, - ctrl->x - 8 + Lth_A_Cen, - ctrl->y - 8 + Lth_A_Cen); - Lth_DrawRect(ctrl->ctx, ctrl->x, ctrl->y, ctrl->w, ctrl->h, 0.5k); -} - -// -// Lth_ButtonDestroy -// -static void Lth_ButtonDestroy(Lth_Button *ctrl) -{ - if(ctrl->label) - free(ctrl->label); -} - - -// Extern Functions ----------------------------------------------------------| - -// -// Lth_ButtonNew -// -Lth_Button *Lth_ButtonNew(char const *label) -{ - Lth_Button *ctrl = calloc(1, sizeof(Lth_Button)); - Lth_assert(ctrl != NULL); - - Lth_ButtonSetLabel(ctrl, label); - Lth_ControlConnect(ctrl, Lth_SIGDRAW, Lth_Callback(Lth_ButtonDraw)); - Lth_ControlConnect(ctrl, Lth_SIGDESTROY, Lth_Callback(Lth_ButtonDestroy)); - - return ctrl; -} - -// -// Lth_ButtonSetLabel -// -void Lth_ButtonSetLabel(Lth_Button *ctrl, char const *label) -{ - Lth_assert(ctrl != NULL); - - if(label != NULL) - ctrl->label = Lth_strdup(label); - else - ctrl->label = Lth_strdup("Button"); -} - -// EOF diff --git a/lithos_fs/Base.lthm b/lithos_fs/Base.lthm deleted file mode 100644 index 3606a01..0000000 --- a/lithos_fs/Base.lthm +++ /dev/null @@ -1,3 +0,0 @@ -Resource1 = 0x30 - -// EOF