💾 Archived View for lofi.haiku-os.org › docs › develop › servers › app_server › toc.gmi captured on 2023-09-28 at 15:58:39. Gemini links have been rewritten to link to archived content
-=-=-=-=-=-=-
The app_server provides services to the Haiku by managing processes, filtering and dispatching input from the Input Server to the appropriate applications, and managing all graphics-related tasks.
The tasks performed by the app_server are grouped in relation to its purpose.
Getting things drawn on screen
Application Management
void DispatchMessage(int32 code, int8 *buffer)
bool LoadDecorator(const char *path)
static int32 Picasso(void *data)
static int32 Poller(void *data)
Decorator * instantiate_decorator(Layer *owner, uint32 wflags, uint32 wlook)
void HandleKeyMessage(int32 code, int8 *buffer)
ServerApp(port_id sendport, port_id rcvport, const char *sig, thread_id thread_bapp)
static int32 MonitorApp(void *data)
void DispatchMessage(int32 code, int8 *buffer)
void WindowBroadcast(int32 code)
void Lock(void), void Unlock(void), bool IsLocked(void)
void ExcludeValue(int32 value)
Graphics Management
void DeleteBitmap(ServerBitmap *bitmap)
void SetRGBColor32(rgb_color *col, uint8 r, uint8 g, uint8 b, uint8 a=255)
void SetRGBAColor32(rgb_color *col, uint16 color16)
void SetRGBColor16(uint16 *col, uint8 r, uint8 g, uint8 b)
void SetRGBAColor15(uint16 *col, uint8 r, uint8 g, uint8 b, bool opaque=true)
uint8 FindClosestColor(rgb_color *palette,rgb_color col)
uint16 FindClosestColor16(rgb_color col)
uint16 FindClosestColor15(rgb_color col)
rgb_color MakeBlendColor(rgb_color col, rgb_color col2, float position)
int32 AddCursor(ServerCursor *sc)
void DeleteCursor(int32 ctoken)
void RemoveAppCursors(ServerApp *app)
void ShowCursor(void), void HideCursor(void), void ObscureCursor(void)
void SetCursor(int32 token), void SetCursor(cursor_which cursor)
ServerCursor *GetCursor(cursor_which which)
void ChangeCursor(cursor_which which, int32 token)
cursor_which GetCursorWhich(void)
Decorator(BRect int32 wlook, int32 wfeel, int32 wflags)
void SetColors(color_set colors)
void SetDriver(DisplayDriver *driver)
void SetMinimize(bool is_down)
void SetTitle(const char *string)
void ResizeBy(float x, float y)
protected: void _DrawClose(BRect r)
protected: void _DrawMinimize(BRect r)
protected: void _DrawZoom(BRect r)
protected: void _DrawFrame(BRect r)
protected: void _DrawTab(BRect r)
protected: void _DrawTitle(BRect r)
click_type Clicked(BPoint pt, int32 buttons, int32 modifiers)
BRect SlideTab(float dx, dy=0)
extern “C” Decorator *create_decorator(BRect frame, int32 wlook, int32 wfeel, int32 wflags)
extern “C” float get_decorator_version(void)
void AddWorkspace(int32 index=-1)
void DeleteWorkspace(int32 index)
void SetWorkspaceCount(int32 count)
int32 CurrentWorkspace(screen_id screen=B_MAIN_SCREEN_ID)
void SetWorkspace(int32 workspace, screen_id screen=B_MAIN_SCREEN_ID)
DisplayDriver *GetGfxDriver(screen_id screen=B_MAIN_SCREEN_ID)
status_t SetSpace(int32 index, int32 res, bool stick=true, screen_id screen=B_MAIN_SCREEN_ID)
void RemoveWindowFromDesktop(ServerWindow *win)
ServerWindow *GetActiveWindow(void)
void SetActiveWindow(ServerWindow *win)
Layer *GetRootLayer(int32 workspace=B_CURRENT_WORKSPACE, screen_id screen=B_MAIN_SCREEN_ID)
void set_drag_message(int32 size, int8 *flattened)
int8* get_drag_message(int32 *size)
void empty_drag_ message(void)
Screen(DisplayDriver *gfxmodule, uint8 workspaces)
void AddWorkspace(int32 index=-1)
void DeleteWorkspace(int32 index)
void SetWorkspaceCount(int32 count)
void SetWorkspace(int32 workspace)
void Activate(bool active=true)
DisplayDriver *GetDriver(void)
status_t SetSpace(int32 index, int32 res, bool stick=true)
void AddWindow(ServerWindow *win, int32 workspace=B_CURRENT_WORKSPACE)
void RemoveWindow(ServerWindow *win)
ServerWindow *ActiveWindow(void)
void SetActiveWindow(ServerWindow *win)
Layer *GetRootLayer(int32 workspace=B_CURRENT_WORKSPACE)
Workspace *GetActiveWorkspace(void)
void SetBGColor(const RGBColor &c)
void SetData(graphics_card_info *gcinfo, frame_buffer_info *fbinfo)
void GetData(graphics_card_info *gcinfo, frame_buffer_info *fbinfo)
void RequestDraw(const BRect &r)
void MoveBy(BPoint pt), void MoveBy(float x, float y)
void SetDriver(DisplayDriver *d)
void RebuildRegions(bool recursive=false)
void CopyBits(BRect src, BRect dest)
void DrawBitmap(ServerBitmap *bmp, BRect src, BRect dest, render_mode mode)
void DrawPicture(SPicture *pic, BPoint pt)
void DrawChar(char c, BPoint pt)
void DrawString(const char *string, int32 length, BPoint pt, escapement_delta *delta=NULL)
void StrokeArc(BRect r, float angle, float span, layerdata *d, int8 *pattern)
void FillArc(BRect r, float angle, float span, layerdata *d, int8 *pattern)
void StrokeBezier(BPoint *pts, layerdata *d, int8 *pat)
void FillBezier(BPoint *pts, layerdata *d, int8 *pat)
void StrokeEllipse(BRect r, layerdata *d, int8 *pattern)
void FillEllipse(BRect r, layerdata *d, int8 *pattern)
void StrokeLine(BPoint start, BPoint end, layerdata *d, int8 *pattern)
void StrokeLineArray(BPoint *pts, int32 numlines, rgb_color *colors, layerdata *d)
void FillPolygon(BPoint *ptlist, int32 numpts, BRect rect, layerdata *d, int8 *pattern)
void StrokeRect(BRect r, layerdata *d, int8 *pattern)
void FillRect(BRect r, layerdata *d, int8 *pattern)
void StrokeRoundRect(BRect r, float xrad, float yrad, layerdata *d, int8 *pattern)
void FillRoundRect(BRect r, float xrad, float yrad, layerdata *d, int8 *pattern)
void StrokeShape(SShape *sh, layerdata *d, int8 *pattern)
void FillShape(SShape *sh, layerdata *d, int8 *pattern)
void StrokeTriangle(BPoints *pts, BRect r, layerdata *d, int8 *pattern)
void FillTriangle(BPoints *pts, BRect r, layerdata *d, int8 *pattern)
void SetCursor(ServerCursor *csr)
float StringWidth(const char *string, int32 length, LayerData *d)
float StringHeight(const char *string, int32 length, LayerData *d)
void SetMode(screen_mode mode)
bool DumpToFile(const char *path)
void SetDepthInternal(uint8 d)
void SetHeightInternal(uint16 h)
void SetWidthInternal(uint16 w)
void SetCursorHidden(bool state)
void SetCursorObscured(bool state)
Layer(BRect frame, const char *name, int32 resize, int32 flags, ServerWindow *win)
void AddChild(Layer *child, Layer *before=NULL, bool rebuild=true)
RemoveChild(Layer *child, bool rebuild=true)
void RemoveSelf(bool rebuild=true)
void Invalidate(BRegion *region)
BRect Frame(void), BRect Bounds(void)
void MoveBy(BPoint pt), void MoveBy(float x, float y)
void ResizeBy(BPoint pt), void ResizeBy(float x, float y)
BRect ConvertToTop(const BRect &r), BRegion ConvertToTop(const BRegion &r)
BRect ConvertFromTop(const BRect &r), BRegion ConvertFromTop(const BRegion &r)
BRect ConvertFromParent(const BRect &r), BRegion ConvertFromParent(const BRegion &r)
void RebuildRegions(bool recursive=false)
void RequestDraw(const BRect &r)
Layer *GetChildAt(BPoint pt, bool recursive=false)
void SetColors(RGBColor c1, RGBColor c2)
RGBColor GetColor(BPoint pt) RGBColor GetColor (float x, float y)
bool GetValue(BPoint pt) bool GetValue (float x, float y)
RGBColor(uint8 r, uint8 g, uint8 b, uint8 a=255)
RGBColor(const RGBColor &color)
void SetColor(const RGBColor &color)
void SetColor(uint8 r, uint8 g, uint8 b, uint8 a=255)
RGBColor & operator=(const RGBColor &from)
bool operator==(const RGBColor &from)
bool operator!=(const RGBColor &from)
RGBColor MakeBlendColor(RGBColor c, float position)
void _HandleSpace(color_space cs, int32 bytesperline=-1)
void SetPalette(uint8 index, RGBColor col), void SetPalette(uint8 index, rgb_color col)
RGBColor GetPalette(uint8 index)
void SetGUIColor(color_which which, RGBColor col)
RGBColor GetGUIColor(color_which which)
void SetGUIColors(color_set cset)
protected: void _GenerateSystemPalette(rgb_color *palette)
protected: void _SetDefaultGUIColors(void)
WinBorder class : public Layer
WinBorder(BRect r, const char *name, int32 resize, int32 flags, ServerWindow *win)
void MoveBy(BPoint pt), void MoveBy(float x, float y)
void ResizeBy(BPoint pt), void ResizeBy(float x, float y)
void RebuildRegions(bool recursive=true)
bool is_moving_window(void), void set_is_moving_window(bool state)
bool is_resizing_window(void), void set_is_resizing_window(bool state)
void set_active_winborder(WinBorder *win), WinBorder * get_active_winborder(void)
Font Infrastructure
void Lock(void), void Unlock(void)
status_t ScanDirectory(const char *path)
FontStyle *GetFont(font_family family, font_style face)
int32 CountStyles(font_family family)
FontStyle *GetStyle(font_family family, font_style style)
void RemoveFamily(const char *family)
FontFamily *_FindFamily(const char *name)
ServerFont *GetSystemPlain(void), ServerFont *GetSystemBold(void), ServerFont *GetSystemFixed(void)
bool SetSystemPlain(const char *family, const char *style, float size)
bool SetSystemBold(const char *family, const char *style, float size)
bool SetSystemFixed(const char *family, const char *style, float size)
void RemoveUnusedFamilies(void)
void AddStyle(const char *path, FT_Face face)
void RemoveStyle(const char *style)
FontStyle *GetStyle(const char *style)
const char *GetStyle(int32 index)