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 <OS.h> 24 #include <GraphicsDefs.h> 25 26 27 class BDeskbar; 28 class BBitmap; 29 class BWindow; 30 struct entry_ref; 31 32 typedef struct { 33 ::team_info team_info; 34 BBitmap* team_icon; 35 char team_name[B_PATH_NAME_LENGTH]; 36 ::thread_info* thread_info; 37 } info_pack; 38 39 bool get_team_name_and_icon(info_pack& infoPack, bool icon = false); 40 bool launch(const char* mime, const char* path); 41 void mix_colors(rgb_color& target, rgb_color& first, rgb_color& second, float mix); 42 void find_self(entry_ref& ref); 43 void move_to_deskbar(BDeskbar& deskbar); 44 void make_window_visible(BWindow* window, bool mayResize = false); 45 46 extern const uchar k_cpu_mini[]; 47 extern const uchar k_app_mini[]; 48 49 #endif // UTILITIES_H 50