From b25c948c1dfc213036f1138d7e417b78947b6454 Mon Sep 17 00:00:00 2001 From: memson Date: Tue, 23 Apr 2002 19:01:03 +0000 Subject: [PATCH] added MFont.h/cpp to flatten font api. --- begui/begui/libbegui/MFont.cpp | 81 +++++++++++++++++++++++++++++ begui/begui/libbegui/MFont.h | 40 ++++++++++++++ begui/begui/libbegui/libbegui.proj | Bin 14397 -> 13353 bytes 3 files changed, 121 insertions(+) create mode 100644 begui/begui/libbegui/MFont.cpp create mode 100644 begui/begui/libbegui/MFont.h diff --git a/begui/begui/libbegui/MFont.cpp b/begui/begui/libbegui/MFont.cpp new file mode 100644 index 0000000..17832d9 --- /dev/null +++ b/begui/begui/libbegui/MFont.cpp @@ -0,0 +1,81 @@ +#include "MFont.h" + +BFont* BFont_Create(){ + return new BFont(); +} + +BFont* BFont_Create_ref(const BFont &font){ + return new BFont(font); +} + +BFont* BFont_Create_pointer(const BFont *font){ + return new BFont(font); +} + +status_t BFont_SetFamilyAndStyle(BFont* fnt, const font_family family, const font_style style){ + return fnt->SetFamilyAndStyle(family, style); +} + +status_t BFont_SetFamilyAndFace(BFont* fnt, const font_family family, uint16 face){ + return fnt->SetFamilyAndFace(family, face); +} + +void BFont_SetSize(BFont* fnt, float size){ + fnt->SetSize(size); +} + +void BFont_SetShear(BFont* fnt, float shear){ + fnt-> SetShear(shear); +} + +void BFont_SetRotation(BFont* fnt, float rotation){ + fnt->SetRotation(rotation); +} + +void BFont_SetSpacing(BFont* fnt, uint8 spacing){ + fnt->SetSpacing(spacing); +} + +void BFont_SetEncoding(BFont* fnt, uint8 encoding){ + fnt->SetEncoding(encoding); +} + +void BFont_SetFace(BFont* fnt, uint16 face){ + fnt->SetFace(face); +} + +void BFont_SetFlags(BFont* fnt, uint32 flags){ + fnt->SetFlags(flags); +} + +void BFont_GetFamilyAndStyle(BFont* fnt, font_family *family, font_style *style){ + fnt->GetFamilyAndStyle(family, style); +} + +float BFont_Size(BFont* fnt){ + return fnt->Size(); +} + +float BFont_Shear(BFont* fnt){ + return fnt->Shear(); +} + +float BFont_Rotation(BFont* fnt){ + return fnt->Rotation(); +} + +uint8 BFont_Spacing(BFont* fnt){ + return fnt->Spacing(); +} + +uint8 BFont_Encoding(BFont* fnt){ + return fnt->Encoding(); +} + +uint16 BFont_Face(BFont* fnt){ + return fnt->Face(); +} + +uint32 BFont_Flags(BFont* fnt){ + return fnt->Flags(); +} diff --git a/begui/begui/libbegui/MFont.h b/begui/begui/libbegui/MFont.h new file mode 100644 index 0000000..5b01d5c --- /dev/null +++ b/begui/begui/libbegui/MFont.h @@ -0,0 +1,40 @@ +#ifndef MFONT_H +#define MFONT_H + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +//flattened api + +BFont* BFont_Create(); +BFont* BFont_Create_ref(const BFont &font); +BFont* BFont_Create_pointer(const BFont *font); +status_t BFont_SetFamilyAndStyle(BFont* fnt, const font_family family, const font_style style); +status_t BFont_SetFamilyAndFace(BFont* fnt, const font_family family, uint16 face); + +void BFont_SetSize(BFont* fnt, float size); +void BFont_SetShear(BFont* fnt, float shear); +void BFont_SetRotation(BFont* fnt, float rotation); +void BFont_SetSpacing(BFont* fnt, uint8 spacing); +void BFont_SetEncoding(BFont* fnt, uint8 encoding); +void BFont_SetFace(BFont* fnt, uint16 face); +void BFont_SetFlags(BFont* fnt, uint32 flags); + +void BFont_GetFamilyAndStyle(BFont* fnt, font_family *family, font_style *style); +float BFont_Size(BFont* fnt); +float BFont_Shear(BFont* fnt); +float BFont_Rotation(BFont* fnt); +uint8 BFont_Spacing(BFont* fnt); +uint8 BFont_Encoding(BFont* fnt); +uint16 BFont_Face(BFont* fnt); +uint32 BFont_Flags(BFont* fnt); + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/begui/begui/libbegui/libbegui.proj b/begui/begui/libbegui/libbegui.proj index c81ac8d02e647036e84be0ad3f61d0ab2a5b14c5..7c0158c1b08158e5f1f8535d6f07626160038cea 100644 GIT binary patch delta 380 zcmdm6urfoy*VDz7fx$%4C7>vcfkAuSL;;P>J}ezCc@vcfkFS!L;($spuB)01_l>^D^`WHQ7WPVChD3(|H;p8*VFc4+=(=HhM00g6BQVbTCnvjivxlKcRq z_cAavOkSfKv$;rTFJlC`Cb(th7y=Fa#lRr907&xyF$)kgGyt*9{-n>7KN_e_UaNOZ z%4^$Or&Y#CwGR