Some cleanup, some removed typos, some unification, some fixes and some added todos. Most of it related to client-server communication. Apps that rely on BFont stuff should work now (StyledEdit, Fonts, Keymap, Menu, ...). Or should not hang/quit at startup at least.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13625 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -8,7 +8,6 @@
|
||||
#ifndef BITMAP_MANAGER_H_
|
||||
#define BITMAP_MANAGER_H_
|
||||
|
||||
|
||||
#include <GraphicsDefs.h>
|
||||
#include <List.h>
|
||||
#include <OS.h>
|
||||
@@ -32,22 +31,23 @@ class ServerBitmap;
|
||||
by the BitmapManager lock.
|
||||
*/
|
||||
class BitmapManager {
|
||||
public:
|
||||
BitmapManager();
|
||||
virtual ~BitmapManager();
|
||||
public:
|
||||
BitmapManager();
|
||||
virtual ~BitmapManager();
|
||||
|
||||
ServerBitmap* CreateBitmap(BRect bounds,
|
||||
color_space space,
|
||||
int32 flags,
|
||||
int32 bytesPerRow = -1,
|
||||
screen_id screen = B_MAIN_SCREEN_ID);
|
||||
void DeleteBitmap(ServerBitmap* bitmap);
|
||||
protected:
|
||||
BList fBitmapList;
|
||||
int8* fBuffer;
|
||||
TokenHandler fTokenizer;
|
||||
BLocker fLock;
|
||||
AreaPool fMemPool;
|
||||
ServerBitmap *CreateBitmap( BRect bounds,
|
||||
color_space space,
|
||||
int32 flags,
|
||||
int32 bytesPerRow = -1,
|
||||
screen_id screen = B_MAIN_SCREEN_ID);
|
||||
void DeleteBitmap(ServerBitmap* bitmap);
|
||||
|
||||
protected:
|
||||
BList fBitmapList;
|
||||
int8 *fBuffer;
|
||||
TokenHandler fTokenizer;
|
||||
BLocker fLock;
|
||||
AreaPool fMemPool;
|
||||
};
|
||||
|
||||
extern BitmapManager *gBitmapManager;
|
||||
|
||||
@@ -37,69 +37,65 @@
|
||||
\class ColorSet ColorSet.h
|
||||
\brief Encapsulates GUI system colors
|
||||
*/
|
||||
class ColorSet : public BLocker
|
||||
{
|
||||
class ColorSet : public BLocker {
|
||||
public:
|
||||
ColorSet(void);
|
||||
ColorSet(const ColorSet &cs);
|
||||
ColorSet & operator=(const ColorSet &cs);
|
||||
|
||||
void SetColors(const ColorSet &cs);
|
||||
void PrintToStream(void) const;
|
||||
|
||||
bool ConvertToMessage(BMessage *msg) const;
|
||||
bool ConvertFromMessage(const BMessage *msg);
|
||||
|
||||
void SetToDefaults(void);
|
||||
|
||||
rgb_color StringToColor(const char *string);
|
||||
rgb_color AttributeToColor(int32 which);
|
||||
|
||||
status_t SetColor(const char *string, rgb_color value);
|
||||
|
||||
|
||||
rgb_color panel_background,
|
||||
panel_text,
|
||||
|
||||
document_background,
|
||||
document_text,
|
||||
|
||||
control_background,
|
||||
control_text,
|
||||
control_highlight,
|
||||
control_border,
|
||||
|
||||
tooltip_background,
|
||||
tooltip_text,
|
||||
|
||||
menu_background,
|
||||
menu_selected_background,
|
||||
menu_text,
|
||||
menu_selected_text,
|
||||
menu_selected_border,
|
||||
|
||||
keyboard_navigation_base,
|
||||
keyboard_navigation_pulse,
|
||||
|
||||
success,
|
||||
failure,
|
||||
shine,
|
||||
shadow,
|
||||
window_tab,
|
||||
|
||||
// Not all of these guys don't exist in InterfaceDefs.h,
|
||||
// but we keep them as part of the color set anyway -
|
||||
// they're important nonetheless
|
||||
window_tab_text,
|
||||
inactive_window_tab,
|
||||
inactive_window_tab_text;
|
||||
|
||||
private:
|
||||
|
||||
rgb_color * StringToMember(const char *string);
|
||||
void PrintMember(const rgb_color &color) const;
|
||||
};
|
||||
ColorSet();
|
||||
ColorSet(const ColorSet &cs);
|
||||
ColorSet & operator=(const ColorSet &cs);
|
||||
|
||||
void SetColors(const ColorSet &cs);
|
||||
void PrintToStream(void) const;
|
||||
|
||||
bool ConvertToMessage(BMessage *msg) const;
|
||||
bool ConvertFromMessage(const BMessage *msg);
|
||||
|
||||
void SetToDefaults(void);
|
||||
|
||||
rgb_color StringToColor(const char *string);
|
||||
rgb_color AttributeToColor(int32 which);
|
||||
|
||||
status_t SetColor(const char *string, rgb_color value);
|
||||
|
||||
rgb_color panel_background,
|
||||
panel_text,
|
||||
|
||||
document_background,
|
||||
document_text,
|
||||
|
||||
control_background,
|
||||
control_text,
|
||||
control_highlight,
|
||||
control_border,
|
||||
|
||||
tooltip_background,
|
||||
tooltip_text,
|
||||
|
||||
menu_background,
|
||||
menu_selected_background,
|
||||
menu_text,
|
||||
menu_selected_text,
|
||||
menu_selected_border,
|
||||
|
||||
keyboard_navigation_base,
|
||||
keyboard_navigation_pulse,
|
||||
|
||||
success,
|
||||
failure,
|
||||
shine,
|
||||
shadow,
|
||||
window_tab,
|
||||
|
||||
// Not all of these guys do exist in InterfaceDefs.h,
|
||||
// but we keep them as part of the color set anyway -
|
||||
// they're important nonetheless
|
||||
window_tab_text,
|
||||
inactive_window_tab,
|
||||
inactive_window_tab_text;
|
||||
|
||||
private:
|
||||
rgb_color *StringToMember(const char *string);
|
||||
void PrintMember(const rgb_color &color) const;
|
||||
};
|
||||
|
||||
status_t LoadColorSet(const char *path, ColorSet *set);
|
||||
status_t SaveColorSet(const char *path, const ColorSet &set);
|
||||
|
||||
Reference in New Issue
Block a user