xref: /haiku/src/apps/processcontroller/Utilities.h (revision 6011ce6c7495e4e707bd33b12a7e22d66c710aad)
1 /*
2  * Copyright 2000, Georges-Edouard Berenger. All rights reserved.
3  * Distributed under the terms of the MIT License.
4  */
5 #ifndef UTILITIES_H
6 #define UTILITIES_H
7 
8 
9 #include <Font.h>
10 #include <GraphicsDefs.h>
11 #include <Rect.h>
12 #include <OS.h>
13 
14 
15 class BDeskbar;
16 class BBitmap;
17 class BWindow;
18 struct entry_ref;
19 
20 typedef struct {
21 	::team_info		team_info;
22 	BBitmap*		team_icon;
23 	char			team_name[B_PATH_NAME_LENGTH];
24 	::thread_info*	thread_info;
25 } info_pack;
26 
27 bool get_team_name_and_icon(info_pack& infoPack, bool icon = false);
28 bool launch(const char* mime, const char* path);
29 void mix_colors(rgb_color& target, rgb_color& first, rgb_color& second, float mix);
30 void find_self(entry_ref& ref);
31 void move_to_deskbar(BDeskbar& deskbar);
32 void make_window_visible(BWindow* window, bool mayResize = false);
33 
34 BRect bar_rect(BRect& frame, BFont* font);
35 
36 extern const uchar k_cpu_mini[];
37 
38 #endif // UTILITIES_H
39