From 8f62ceb96ff0a8c9c968e65751b4f39953b1d38d Mon Sep 17 00:00:00 2001 From: Stefano Ceccherini Date: Fri, 19 Dec 2003 07:17:19 +0000 Subject: [PATCH] Started implementing _init_interface_kit_(). WidthBuffer initialization is commented until I move its header to an accessible place git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5711 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/interface/Globals.cpp | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/src/kits/interface/Globals.cpp b/src/kits/interface/Globals.cpp index 95c9039db0..45d1bd10db 100644 --- a/src/kits/interface/Globals.cpp +++ b/src/kits/interface/Globals.cpp @@ -28,11 +28,14 @@ #include #include #include +#include #include #include #include #include +#include +//#include // Private definitions not placed in public headers extern "C" void _init_global_fonts(); @@ -40,8 +43,8 @@ extern "C" status_t _fini_interface_kit_(); using namespace BPrivate; -// InterfaceDefs.h +// InterfaceDefs.h _IMPEXP_BE const color_map * system_colors() { @@ -410,14 +413,29 @@ tint_color(rgb_color color, float tint) extern "C" status_t _init_interface_kit_() { - // TODO: Find out what this does and when it's called + sem_id widthSem = create_sem(1, "TextView WidthBuffer Sem"); + if (widthSem < 0) + return widthSem; + BTextView::sWidthSem = widthSem; + BTextView::sWidthAtom = 0; + //sWidthBuffer = BTextView::sWidths = new _BWidthBuffer_; + + status_t result = get_menu_info(&BMenu::sMenuInfo); + if (result != B_OK) + return result; + + //TODO: fill the other static members + + return B_OK; } extern "C" status_t _fini_interface_kit_() { - // TODO: Find out what this does and when it's called + //TODO: Implement ? + + return B_OK; }