1 /* 2 ProcessController © 2000, Georges-Edouard Berenger, All Rights Reserved. 3 Copyright (C) 2004 beunited.org 4 5 This library is free software; you can redistribute it and/or 6 modify it under the terms of the GNU Lesser General Public 7 License as published by the Free Software Foundation; either 8 version 2.1 of the License, or (at your option) any later version. 9 10 This library is distributed in the hope that it will be useful, 11 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 Lesser General Public License for more details. 14 15 You should have received a copy of the GNU Lesser General Public 16 License along with this library; if not, write to the Free Software 17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 */ 19 #ifndef UTILITIES_H 20 #define UTILITIES_H 21 22 23 #include <Font.h> 24 #include <GraphicsDefs.h> 25 #include <Rect.h> 26 #include <OS.h> 27 28 29 class BDeskbar; 30 class BBitmap; 31 class BWindow; 32 struct entry_ref; 33 34 typedef struct { 35 ::team_info team_info; 36 BBitmap* team_icon; 37 char team_name[B_PATH_NAME_LENGTH]; 38 ::thread_info* thread_info; 39 } info_pack; 40 41 bool get_team_name_and_icon(info_pack& infoPack, bool icon = false); 42 bool launch(const char* mime, const char* path); 43 void mix_colors(rgb_color& target, rgb_color& first, rgb_color& second, float mix); 44 void find_self(entry_ref& ref); 45 void move_to_deskbar(BDeskbar& deskbar); 46 void make_window_visible(BWindow* window, bool mayResize = false); 47 48 BRect bar_rect(BRect& frame, BFont* font); 49 50 extern const uchar k_cpu_mini[]; 51 52 #endif // UTILITIES_H 53