diff --git a/src/kits/app/AppDefs.cpp b/src/kits/app/AppDefs.cpp new file mode 100644 index 0000000000..0f0e9853cd --- /dev/null +++ b/src/kits/app/AppDefs.cpp @@ -0,0 +1,37 @@ +/* +** Copyright 2004, Axel Dörfler, axeld@pinc-software.de. All rights reserved. +** Distributed under the terms of the Haiku License. +*/ + + +#include +#include + + +const uint8 B_HAND_CURSOR[] = { + 16, // size (width/height) + 1, // depth + 2, 2, // hot-spot coordinates + + // image mask + 0x0, 0x0, 0x0, 0x0, 0x38, 0x0, 0x24, 0x0, 0x24, 0x0, 0x13, 0xe0, 0x12, 0x5c, 0x9, 0x2a, + 0x8, 0x1, 0x3c, 0x1, 0x4c, 0x1, 0x42, 0x1, 0x30, 0x1, 0xc, 0x1, 0x2, 0x0, 0x1, 0x0, + + // transparency mask + 0x0, 0x0, 0x0, 0x0, 0x38, 0x0, 0x3c, 0x0, 0x3c, 0x0, 0x1f, 0xe0, 0x1f, 0xfc, 0xf, 0xfe, + 0xf, 0xff, 0x3f, 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x3f, 0xff, 0xf, 0xff, 0x3, 0xfe, 0x1, 0xf8, +}; + +const uint8 B_I_BEAM_CURSOR[] = { + 16, // size (width/height) + 1, // depth + 5, 8, // hot-spot coordinates + + // image mask + 0x6, 0xc0, 0x3, 0x80, 0x1, 0x0, 0x1, 0x0, 0x1, 0x0, 0x1, 0x0, 0x1, 0x0, 0x1, 0x0, + 0x1, 0x0, 0x1, 0x0, 0x1, 0x0, 0x1, 0x0, 0x1, 0x0, 0x1, 0x0, 0x3, 0x80, 0x6, 0xc0, + + // transparency mask + 0xf, 0xc0, 0x7, 0x80, 0x3, 0x0, 0x3, 0x0, 0x3, 0x0, 0x3, 0x0, 0x3, 0x0, 0x3, 0x0, + 0x3, 0x0, 0x3, 0x0, 0x3, 0x0, 0x3, 0x0, 0x3, 0x0, 0x3, 0x0, 0x7, 0x80, 0xf, 0xc0, +}; diff --git a/src/kits/app/Application.cpp b/src/kits/app/Application.cpp index 5df64ee4bc..6d5a410b0c 100644 --- a/src/kits/app/Application.cpp +++ b/src/kits/app/Application.cpp @@ -805,6 +805,12 @@ void BApplication::InitData(const char* signature, status_t* error) if (path.SetTo(&ref) == B_OK) create_app_meta_mime(path.Path(), false, true, false); } + + // create global system cursors + // ToDo: these could have a predefined server token to safe the communication! + B_CURSOR_SYSTEM_DEFAULT = new BCursor(B_HAND_CURSOR); + B_CURSOR_I_BEAM = new BCursor(B_I_BEAM_CURSOR); + // Return the error or exit, if there was an error and no error variable // has been supplied. if (error) diff --git a/src/kits/app/app.src b/src/kits/app/app.src index 8195dd91a6..685af9e3a3 100644 --- a/src/kits/app/app.src +++ b/src/kits/app/app.src @@ -1,4 +1,5 @@ APP_KIT_SOURCE = + AppDefs.cpp Application.cpp AppMisc.cpp AppServerLink.cpp