Many, many API updates
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2176 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -82,21 +82,21 @@ Decorator * instantiate_decorator(Layer *owner, uint32 wflags, uint32 wlook)</P>
|
||||
</P>
|
||||
<P class="Body" style="margin: 0px"><span class="OBOS-Function-Def">AppServer(void)</span><span style="font-size: 16pt"></span></P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
Create the message and input ports</P>
|
||||
<P class="Body" style="margin: 0px">Create any necessary semaphores for regulating the 3 main threads</P>
|
||||
<P class="Body" style="margin: 0px">Initialize all member variables</P>
|
||||
<P class="Body" style="margin: 0px">Allocate the application BList</P>
|
||||
<P class="Body" style="margin: 0px">Read in and process all configuration data</P>
|
||||
<P class="Body" style="margin: 0px">Initialize the desktop</P>
|
||||
<P class="Body" style="margin: 0px">Spawn the Picasso and Poller threads</P>
|
||||
1) Create the message and input ports</P>
|
||||
<P class="Body" style="margin: 0px">2) Create any necessary semaphores for regulating the 3 main threads</P>
|
||||
<P class="Body" style="margin: 0px">3) Initialize all member variables</P>
|
||||
<P class="Body" style="margin: 0px">4) Allocate the application BList</P>
|
||||
<P class="Body" style="margin: 0px">5) Read in and process all configuration data</P>
|
||||
<P class="Body" style="margin: 0px">6) Initialize the desktop</P>
|
||||
<P class="Body" style="margin: 0px">7) Spawn the Picasso and Poller threads</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
<BR>
|
||||
<span class="OBOS-Function-Def">~AppServer(void)</span></P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
Shut down the desktop</P>
|
||||
<P class="Body" style="margin: 0px">Empty and delete the application list</P>
|
||||
<P class="Body" style="margin: 0px">Wait for Picasso and Poller to exit</P>
|
||||
<P class="Body" style="margin: 0px">Free any allocated heap space</P>
|
||||
1) Shut down the desktop</P>
|
||||
<P class="Body" style="margin: 0px">2) Empty and delete the application list</P>
|
||||
<P class="Body" style="margin: 0px">3) Wait for Picasso and Poller to exit</P>
|
||||
<P class="Body" style="margin: 0px">4) Free any allocated heap space</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
<BR>
|
||||
<span class="OBOS-Function-Def">void MainLoop(void)</span></P>
|
||||
@@ -123,7 +123,7 @@ Attached Data:</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
</P>
|
||||
<P class="Body" style="text-align: center; margin: 0px"></P>
|
||||
<TABLE WIDTH=573 HEIGHT=88 BORDER=1 CELLPADDING=1 CELLSPACING=2>
|
||||
<TABLE WIDTH=573 HEIGHT=110 BORDER=1 CELLPADDING=1 CELLSPACING=2>
|
||||
<TR>
|
||||
<TD WIDTH=112 HEIGHT=32>
|
||||
<P class="Body" style="margin: 0px">port_id reply_port</P>
|
||||
@@ -140,6 +140,14 @@ Attached Data:</P>
|
||||
<P class="Body" style="margin: 0px">message port for the requesting BApplication</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD WIDTH=112 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">int16 sig_length</P>
|
||||
</TD>
|
||||
<TD WIDTH=318 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">length of the following application signature</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD WIDTH=112 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">const char *signature</P>
|
||||
@@ -525,8 +533,48 @@ Attached Data:</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
</P>
|
||||
<P class="Body" style="text-align: center; margin: 0px"></P>
|
||||
<TABLE HEIGHT=0 BORDER=0 CELLPADDING=1 CELLSPACING=2>
|
||||
</TABLE>
|
||||
<TABLE WIDTH=573 HEIGHT=113 BORDER=1 CELLPADDING=1 CELLSPACING=2>
|
||||
<TR>
|
||||
<TD WIDTH=112 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">int64 when</P>
|
||||
</TD>
|
||||
<TD WIDTH=318 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">event time in seconds since 1/1/70</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD WIDTH=112 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">int32 rawcode</P>
|
||||
</TD>
|
||||
<TD WIDTH=318 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">code for the physical key pressed</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD WIDTH=112 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">int32 modifiers</P>
|
||||
</TD>
|
||||
<TD WIDTH=318 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">flags signifying the states of the modifier keys</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD WIDTH=112 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">int8 state_count</P>
|
||||
</TD>
|
||||
<TD WIDTH=318 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">number of bytes to follow containing the state of all keys</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD WIDTH=112 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">int8 *states</P>
|
||||
</TD>
|
||||
<TD WIDTH=318 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">array of the state of all keys at the time of the event</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<P class="Body" style="text-align: center; margin: 0px"><BR>
|
||||
</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
@@ -542,7 +590,51 @@ B_UNMAPPED_KEY_UP:</P>
|
||||
Attached Data:</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
</P>
|
||||
<P class="Body" style="text-align: center; margin: 0px">?</P>
|
||||
<P class="Body" style="text-align: center; margin: 0px"></P>
|
||||
<TABLE WIDTH=573 HEIGHT=113 BORDER=1 CELLPADDING=1 CELLSPACING=2>
|
||||
<TR>
|
||||
<TD WIDTH=112 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">int64 when</P>
|
||||
</TD>
|
||||
<TD WIDTH=318 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">event time in seconds since 1/1/70</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD WIDTH=112 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">int32 rawcode</P>
|
||||
</TD>
|
||||
<TD WIDTH=318 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">code for the physical key pressed</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD WIDTH=112 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">int32 modifiers</P>
|
||||
</TD>
|
||||
<TD WIDTH=318 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">flags signifying the states of the modifier keys</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD WIDTH=112 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">int8 state_count</P>
|
||||
</TD>
|
||||
<TD WIDTH=318 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">number of bytes to follow containing the state of all keys</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD WIDTH=112 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">int8 *states</P>
|
||||
</TD>
|
||||
<TD WIDTH=318 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">array of the state of all keys at the time of the event</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<P class="Body" style="text-align: center; margin: 0px"><BR>
|
||||
</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
1) Acquire the active application lock</P>
|
||||
<P class="Body" style="margin: 0px">2) Create a PortLink instance, target the active ServerApp's sender port, set the opcode to B_UNMAPPED_KEY_UP, attach the buffer <span style="font-style: italic">en masse</span>, and send it to the BApplication.</P>
|
||||
@@ -557,11 +649,57 @@ Attached Data:</P>
|
||||
Attached Data:</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
</P>
|
||||
<P class="Body" style="text-align: center; margin: 0px">?</P>
|
||||
<P class="Body" style="text-align: center; margin: 0px"></P>
|
||||
<TABLE WIDTH=573 HEIGHT=113 BORDER=1 CELLPADDING=1 CELLSPACING=2>
|
||||
<TR>
|
||||
<TD WIDTH=112 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">int64 when</P>
|
||||
</TD>
|
||||
<TD WIDTH=318 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">event time in seconds since 1/1/70</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD WIDTH=112 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">int32 modifiers</P>
|
||||
</TD>
|
||||
<TD WIDTH=318 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">flags signifying the states of the modifier keys</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD WIDTH=112 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">int32 old_modifiers</P>
|
||||
</TD>
|
||||
<TD WIDTH=318 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">former states of the modifier keys</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD WIDTH=112 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">int8 state_count</P>
|
||||
</TD>
|
||||
<TD WIDTH=318 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">number of bytes to follow containing the state of all keys</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD WIDTH=112 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">int8 *states</P>
|
||||
</TD>
|
||||
<TD WIDTH=318 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">array of the state of all keys at the time of the event</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<P class="Body" style="text-align: center; margin: 0px"><BR>
|
||||
</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
1) Acquire the active application lock</P>
|
||||
<P class="Body" style="margin: 0px">2) Create a PortLink instance, target the active ServerApp's sender port, set the opcode to B_MODIFIERS_CHANGED, attach the buffer <span style="font-style: italic">en masse</span>, and send it to the BApplication.</P>
|
||||
<P class="Body" style="margin: 0px">3) Release the active application lock</P>
|
||||
<DIV class="layer" id="Layer 1">
|
||||
</DIV>
|
||||
</DIV>
|
||||
</BODY>
|
||||
</HTML>
|
||||
|
||||
@@ -93,7 +93,7 @@ Member Functions</P>
|
||||
Enumerated Types:</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
cursor_which {</P>
|
||||
<P class="Body" style="margin: 0px"> CURSOR_ARROW</P>
|
||||
<P class="Body" style="margin: 0px"> CURSOR_DEFAULT</P>
|
||||
<P class="Body" style="margin: 0px"> CURSOR_TEXT</P>
|
||||
<P class="Body" style="margin: 0px"> CURSOR_MOVE</P>
|
||||
<P class="Body" style="margin: 0px"> CURSOR_DRAG</P>
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
Member Functions</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
</P>
|
||||
<TABLE WIDTH=463 HEIGHT=208 BORDER=1 CELLPADDING=1 CELLSPACING=2>
|
||||
<TABLE WIDTH=617 HEIGHT=270 BORDER=1 CELLPADDING=1 CELLSPACING=2>
|
||||
<TR>
|
||||
<TD WIDTH=203 HEIGHT=32>
|
||||
<P class="Body" style="margin: 0px">Decorator(BRect int32 wlook, int32 wfeel, int32 wflags)</P>
|
||||
@@ -95,16 +95,16 @@ Member Functions</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD WIDTH=203 HEIGHT=22>
|
||||
<TD WIDTH=203 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">void SetTitle(const char *string)</P>
|
||||
</TD>
|
||||
<TD WIDTH=260 HEIGHT=22>
|
||||
<TD WIDTH=260 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">void SetFont(SFont *sf)</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD WIDTH=203 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">void _ClipTitle(void)</P>
|
||||
<P class="Body" style="margin: 0px">int32 _ClipTitle(float width)</P>
|
||||
</TD>
|
||||
<TD WIDTH=260 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">void SetFocus(bool is_active)</P>
|
||||
@@ -115,8 +115,8 @@ Member Functions</P>
|
||||
<P class="Body" style="margin: 0px">bool GetFocus(void)</P>
|
||||
</TD>
|
||||
<TD WIDTH=260 HEIGHT=17>
|
||||
|
||||
</TD>
|
||||
<P class="Body" style="margin: 0px">int32 _TitleWidth(void)</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
@@ -125,7 +125,7 @@ Member Functions</P>
|
||||
Virtual Functions</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
</P>
|
||||
<TABLE WIDTH=617 HEIGHT=289 BORDER=1 CELLPADDING=1 CELLSPACING=2>
|
||||
<TABLE WIDTH=617 HEIGHT=269 BORDER=1 CELLPADDING=1 CELLSPACING=2>
|
||||
<TR>
|
||||
<TD WIDTH=203 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">void MoveBy(float x, float y)</P>
|
||||
@@ -207,12 +207,12 @@ Virtual Functions</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD WIDTH=203 HEIGHT=32>
|
||||
<TD WIDTH=203 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">void _SetFocus(void)</P>
|
||||
</TD>
|
||||
<TD WIDTH=260 HEIGHT=32>
|
||||
|
||||
</TD>
|
||||
<TD WIDTH=260 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">BRect SlideTab(float dx, float dy=0)</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
@@ -279,11 +279,17 @@ Empty.</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
These functions work with the internal members common to all Decorators - assigning them and returning them. Additionally, SetTitle() and SetFont() set the clip_font flag to true.</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
<span class="OBOS-Function-Def">void ClipTitle(void)</span></P>
|
||||
<span class="OBOS-Function-Def">int32 _ClipTitle(float width)</span></P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
ClipTitle calculates how much of the title will actually be displayed when _DrawTitle() is called. </P>
|
||||
ClipTitle calculates how much of the title, in characters, can be displayed in the given width.</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
<span style="color: rgb(255,51,0)"><To be fleshed out once font subsystem is better understood></span></P>
|
||||
1) Call StringWidth() on the title.</P>
|
||||
<P class="Body" style="margin: 0px">2) If the string's width is less than<span style="font-style: italic">width</span>, return the string's character count</P>
|
||||
<P class="Body" style="margin: 0px">3) while the character count to display is > 0</P>
|
||||
<P class="Body" style="margin: 0px"> a) calculate the string's width</P>
|
||||
<P class="Body" style="margin: 0px"> b) if the string's width is less than <span style="font-style: italic">width</span>, return the character count</P>
|
||||
<P class="Body" style="margin: 0px"> c) decrement the character count</P>
|
||||
<P class="Body" style="margin: 0px">4) If the loop completes itself without returning a value, it can't fit, so return 0.</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
<BR>
|
||||
<span class="OBOS-Function-Def">void SetFocus(bool is_active)</span></P>
|
||||
@@ -301,6 +307,11 @@ Returns the focus state held by the decorator</P>
|
||||
1) Return the focus flag</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
<BR>
|
||||
<span class="OBOS-Function-Def">int32 _TitleWidth(void)</span></P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
Returns the character count of the title or 0 if it is NULL.</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
<BR>
|
||||
<span class="OBOS-Function-Def">Virtual Functions</span></P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
Most of these functions have a default behavior which can be overridden, but are implemented to handle the more common implementations.</P>
|
||||
@@ -336,22 +347,23 @@ Main drawing call which checks the intersection of the rectangle passed to it an
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
Each of these is designed to utilize their respective button rectangles. The public (void) versions simply call the internal protected ones with the button rectangle. These protected versions are, by default, empty. The rectangle passed to them is the invalid area to be drawn, which is not necessarily the entire button's rectangle.</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
<BR>
|
||||
<span class="OBOS-Function-Def">void DrawFrame(void)</span></P>
|
||||
<P class="Body" style="margin: 0px"><span class="OBOS-Function-Def">protected: void _DrawFrame(BRect r)</span></P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
Draws the frame, if any. The public version amounts to _DrawFrame(framerect). The protected version is expected to not cover up the client frame when drawing. Any drawing within the clientrect member will end up being drawn over by the window's child views.</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
<BR>
|
||||
<span class="OBOS-Function-Def">void DrawTab(void)</span></P>
|
||||
<P class="Body" style="margin: 0px"><span class="OBOS-Function-Def">protected: void _DrawTab(BRect r)</span></P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
Draws the window's tab, if any. DrawTab() amounts to _DrawTab(tabrect). If window titles are displayed, the _DrawTitle call is expected to be made here. Button-drawing calls, assuming that a window's buttons are in the tab, should be made here, as well.</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
<BR>
|
||||
<span class="OBOS-Function-Def">void DrawTitle(void)</span></P>
|
||||
<P class="Body" style="margin: 0px"><span class="OBOS-Function-Def">protected: void _DrawTitle(BRect r)</span></P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
These cause the window's title to be drawn. DrawTitle() amounts to _DrawTitle(titlerect). _DrawTitle() should check the clip_title flag and call ClipTitle() only if it is true.</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
<span style="color: rgb(255,51,0)"><To be fleshed out once font subsystem is better understood></span></P>
|
||||
These cause the window's title to be drawn. DrawTitle() amounts to _DrawTitle(titlerect). </P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
<BR>
|
||||
<span class="OBOS-Function-Def">void _SetFocus(void)</span></P>
|
||||
@@ -369,6 +381,10 @@ This returns the "footprint" of the decorator, i.e. the area which is occupied b
|
||||
Clicked() performs hit testing for the decorator, given input conditions. This function is required by ALL subclasses expecting to do more than display itself. The return type will cause the server to take the appropriate actions, such as close the window, get ready to move it, etc.</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
<BR>
|
||||
<span class="OBOS-Function-Def">BRect SlideTab(float dx, dy=0)</span></P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
SlideTab is implemented only for those decorators which allow the user to somehow slide the tab (if there is one) along the window. Currently, only the horizontal direction is supported. It returns the rectangle of the invalid region which needs redrawn as a result of the slide.</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
<span class="OBOS-Function-Def">extern "C" Decorator *create_decorator(BRect frame, int32 wlook, int32 wfeel, int32 wflags)</span></P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
Required export function which simply allocates an instance of the decorator and returns it.</P>
|
||||
|
||||
@@ -48,7 +48,20 @@ void AddWindowToDesktop(ServerWindow *win, int32 workspace=B_CURRENT_WORKSPACE,
|
||||
<P class="Body" style="margin: 0px">void RemoveWindowFromDesktop(ServerWindow *win)</P>
|
||||
<P class="Body" style="margin: 0px">ServerWindow *GetActiveWindow(void)</P>
|
||||
<P class="Body" style="margin: 0px">void SetActiveWindow(ServerWindow *win)</P>
|
||||
<P class="Body" style="margin: 0px">Layer *GetRootLayer(int32 workspace=B_CURRENT_WORKSPACE, screen_id screen=B_MAIN_SCREEN_ID)</P>
|
||||
<P class="Body" style="margin: 0px">Layer *GetRootLayer(int32 workspace=B_CURRENT_WORKSPACE, screen_id s</P>
|
||||
<P class="Body" style="margin: 0px">screen=B_MAIN_SCREEN_ID)</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
void set_drag_message(int32 size, int8 *flattened)</P>
|
||||
<P class="Body" style="margin: 0px">int8* get_drag_message(int32 *size)</P>
|
||||
<P class="Body" style="margin: 0px">void empty_drag_ message(void)</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
Namespaces</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
desktop_private {</P>
|
||||
<P class="Body" style="margin: 0px"> int8 *dragmessage</P>
|
||||
<P class="Body" style="margin: 0px"> int32 dragmessagesize</P>
|
||||
<P class="Body" style="margin: 0px"> sem_id draglock</P>
|
||||
<P class="Body" style="margin: 0px">}</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
<HR>
|
||||
</P>
|
||||
@@ -60,14 +73,19 @@ Sets up all the stuff necessary for the system's desktop.</P>
|
||||
<P class="Body" style="margin: 0px">2) Create and populate Screen list, pointing each Screen instance to its Driver instance</P>
|
||||
<P class="Body" style="margin: 0px">3) Create layer and workspace locks</P>
|
||||
<P class="Body" style="margin: 0px">4) Set screen 0 to active</P>
|
||||
<P class="Body" style="margin: 0px">5) Create the desktop_private::draglock semaphore</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
<BR>
|
||||
<span class="OBOS-Function-Def">void ShutdownDesktop(void)</span></P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
Undoes everything done in InitDesktop().</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
1) Delete all locks</P>
|
||||
<P class="Body" style="margin: 0px">2) Delete all screens in the list</P>
|
||||
<P class="Body" style="margin: 0px">3) Delete the desktop_private::draglock semaphore</P>
|
||||
<P class="Body" style="margin: 0px">4) If desktop_private::dragmessage is non-NULL, delete it.</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
<BR>
|
||||
<span class="OBOS-Function-Def">void AddWorkspace(int32 index=-1)</span></P>
|
||||
<P class="Body" style="margin: 0px"><span class="OBOS-Function-Def">void DeleteWorkspace(int32 index)</span></P>
|
||||
<P class="Body" style="margin: 0px"><span class="OBOS-Function-Def">int32 CountWorkspaces(void)</span></P>
|
||||
@@ -77,6 +95,7 @@ Undoes everything done in InitDesktop().</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
Each of these calls the appropriate method in the Screen class. Add and Delete workspace functions operate on all screens.</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
<BR>
|
||||
<span class="OBOS-Function-Def">void SetScreen(screen_id id)</span></P>
|
||||
<P class="Body" style="margin: 0px"><span class="OBOS-Function-Def">int32 CountScreens(void)</span></P>
|
||||
<P class="Body" style="margin: 0px"><span class="OBOS-Function-Def">screen_id ActiveScreen(void)</span></P>
|
||||
@@ -85,6 +104,7 @@ Each of these calls the appropriate method in the Screen class. Add and Delete w
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
Each of these calls operate on the objects in the Screen list, calling methods as appropriate.</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
<BR>
|
||||
<span class="OBOS-Function-Def">void AddWindowToDesktop(ServerWindow *win, int32 workspace=B_CURRENT_WORKSPACE, screen_id screen=B_MAIN_SCREEN_ID)</span></P>
|
||||
<P class="Body" style="margin: 0px"><span class="OBOS-Function-Def">void RemoveWindowFromDesktop(ServerWindow *win)</span></P>
|
||||
<P class="Body" style="margin: 0px"><span class="OBOS-Function-Def">ServerWindow *GetActiveWindow(void)</span></P>
|
||||
@@ -93,7 +113,36 @@ Each of these calls operate on the objects in the Screen list, calling methods a
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
These operate on the layer structure in the active Screen object, calling methods as appropriate.</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
</P>
|
||||
<BR>
|
||||
<span class="OBOS-Function-Def">void set_drag_message(int32 size, int8 *flattened)</span></P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
This assigns a BMessage in its flattened state to the internal storage. Only one message can be stored at a time. Once an assignment is made, another cannot be made until the current one is emptied. If additional calls are made while there is a drag message assigned, the new assignment will not be made. Note that this merely passes a pointer around. No copies are made and the caller is responsible for freeing any allocated objects from the heap.</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
1) Acquire the draglock</P>
|
||||
<P class="Body" style="margin: 0px">2) release the lock and return if winborder_private::dragmessage is non-NULL</P>
|
||||
<P class="Body" style="margin: 0px">3) Assign parameters to the private variables</P>
|
||||
<P class="Body" style="margin: 0px">4) Release the draglock</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
<BR>
|
||||
<span class="OBOS-Function-Def">int8* get_drag_message(int32 *size)</span></P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
Retrieve the current drag message in use. This function will fail if a NULL pointer is passed to it. Note that this does not free the current drag message from use. The size of the flattened message is stored in the size parameter. Note that if there is no message in use, it will return NULL and set size to 0.</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
1) return NULL if size pointer is NULL</P>
|
||||
<P class="Body" style="margin: 0px">2) acquire the draglock</P>
|
||||
<P class="Body" style="margin: 0px">3) set value of size parameter to winborder_private::dragmessagesize</P>
|
||||
<P class="Body" style="margin: 0px">4) assign a temporary pointer the value of desktop_private::dragmessage</P>
|
||||
<P class="Body" style="margin: 0px">5) release the draglock</P>
|
||||
<P class="Body" style="margin: 0px">6) return the temporary pointer</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
<BR>
|
||||
<span class="OBOS-Function-Def">void empty_drag_ message(void)</span></P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
This empties the current drag message from use and allows for other messages to be assigned.</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
1) acquire draglock</P>
|
||||
<P class="Body" style="margin: 0px">2) assign 0 to desktop_private::dragmessagesize and set desktop_private::dragmessage to NULL</P>
|
||||
<P class="Body" style="margin: 0px">3) release draglock</P>
|
||||
<DIV class="layer" id="Layer 1">
|
||||
</DIV>
|
||||
</DIV>
|
||||
|
||||
@@ -43,7 +43,7 @@ Member Functions</P>
|
||||
<P class="Body" style="margin: 0px">void AddWorkspace(int32 index=-1)</P>
|
||||
</TD>
|
||||
<TD WIDTH=235 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">void Delete Workspace(int32 index)</P>
|
||||
<P class="Body" style="margin: 0px">void DeleteWorkspace(int32 index)</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
@@ -113,16 +113,55 @@ Member Functions</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
1) Set driver pointer to gfxmodule</P>
|
||||
<P class="Body" style="margin: 0px">2) If driver pointer is non-NULL and driver->Initialize() is true, set initialized flag to true</P>
|
||||
<P class="Body" style="margin: 0px">3) If initialized, create and populate workspace list</P>
|
||||
<P class="Body" style="margin: 0px">4) Clear all workspaces</P>
|
||||
<P class="Body" style="margin: 0px">3) If initialized, get the appropriate display driver info and save it internally</P>
|
||||
<P class="Body" style="margin: 0px">4) Create and populate workspace list</P>
|
||||
<P class="Body" style="margin: 0px">5) Clear all workspaces</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
~Screen(void)</P>
|
||||
<P class="Body" style="margin: 0px">void AddWorkspace(int32 index=-1)</P>
|
||||
<P class="Body" style="margin: 0px">void Delete Workspace(int32 index)</P>
|
||||
<P class="Body" style="margin: 0px">int32 CountWorkspaces(void)</P>
|
||||
<P class="Body" style="margin: 0px">void SetWorkspaceCount(int32 count)</P>
|
||||
<P class="Body" style="margin: 0px">int32 CurrentWorkspace(void)</P>
|
||||
<P class="Body" style="margin: 0px">void SetWorkspace(int32 workspace)</P>
|
||||
<span class="OBOS-Function-Def">~Screen(void)</span></P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
1) Remove all workspaces from the list and delete them</P>
|
||||
<P class="Body" style="margin: 0px">2) Delete the workspace list</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
<BR>
|
||||
<span class="OBOS-Function-Def">void AddWorkspace(int32 index=-1)</span></P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
Adds a workspace to the screen object, setting its settings to the default, and adding it to the list in the specified index or the end of the list if the index is -1</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
1) Create a workspace object</P>
|
||||
<P class="Body" style="margin: 0px">2) Add it to the workspace list - to the end if the index is -1, and to the particular index if not</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
<BR>
|
||||
<span class="OBOS-Function-Def">void DeleteWorkspace(int32 index)</span></P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
Deletes the workspace at the specified index.</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
1) Remove the item at the specified index and if non-NULL, delete it.</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
<BR>
|
||||
<span class="OBOS-Function-Def">int32 CountWorkspaces(void)</span></P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
Returns the number of workspaces kept by the particular Screen objects</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
1) Return the workspace list's CountItems() value</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
<BR>
|
||||
<span class="OBOS-Function-Def">void SetWorkspaceCount(int32 count)</span></P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
Sets the number of workspaces available to <span style="font-style: italic">count</span>. If <span style="font-style: italic">count</span> is less than the number of current workspaces, the last workspaces are deleted first. Workspaces are added to the end of the list. If a delete workspace should include the active workspace, then the workspace with the index <span style="font-style: italic">count-1</span> is activated. There must be at least one workspace.</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
1) if count equals the workspace list's CountItems value, return</P>
|
||||
<P class="Body" style="margin: 0px">2) If count is less than 1, set count to 1. If greater than 32, set to 32.</P>
|
||||
<P class="Body" style="margin: 0px">3) If active workspace index is greater than count-1, call SetWorkspace(count-1)</P>
|
||||
<P class="Body" style="margin: 0px">4) If count is greater than the workspace list's CountItems value, call AddWorkspace the appropriate number of times.</P>
|
||||
<P class="Body" style="margin: 0px">5) If count is less than the workspace list's CountItems, call RemoveWorkspace the appropriate number of times</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
<BR>
|
||||
<span class="OBOS-Function-Def">int32 CurrentWorkspace(void)</span></P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
Returns the active workspace index</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
<BR>
|
||||
void SetWorkspace(int32 workspace)</P>
|
||||
<P class="Body" style="margin: 0px">void Activate(bool active=true)</P>
|
||||
<P class="Body" style="margin: 0px">DisplayDriver *GetDriver(void)</P>
|
||||
<P class="Body" style="margin: 0px">status_t SetSpace(int32 index, int32 res, bool stick=true)</P>
|
||||
@@ -139,17 +178,17 @@ Member Functions</P>
|
||||
<P class="Body" style="margin: 0px">Workspace class members</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
</P>
|
||||
<TABLE WIDTH=620 HEIGHT=69 BORDER=1 CELLPADDING=1 CELLSPACING=2>
|
||||
<TABLE WIDTH=610 HEIGHT=150 BORDER=1 CELLPADDING=1 CELLSPACING=2>
|
||||
<TR>
|
||||
<TD WIDTH=232 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">Workspace(void)</P>
|
||||
<TD WIDTH=225 HEIGHT=32>
|
||||
<P class="Body" style="margin: 0px">Workspace(graphics_card_info *gcinfo, frame_buffer_info *fbinfo)</P>
|
||||
</TD>
|
||||
<TD WIDTH=232 HEIGHT=17>
|
||||
<TD WIDTH=232 HEIGHT=32>
|
||||
<P class="Body" style="margin: 0px">~Workspace(void)</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD WIDTH=232 HEIGHT=17>
|
||||
<TD WIDTH=225 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">void SetBGColor(const RGBColor &c)</P>
|
||||
</TD>
|
||||
<TD WIDTH=232 HEIGHT=17>
|
||||
@@ -157,21 +196,66 @@ Member Functions</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD WIDTH=232 HEIGHT=17>
|
||||
<TD WIDTH=225 HEIGHT=32>
|
||||
<P class="Body" style="margin: 0px">RootLayer *GetRoot(void)</P>
|
||||
</TD>
|
||||
<TD WIDTH=232 HEIGHT=17>
|
||||
<TD WIDTH=232 HEIGHT=32>
|
||||
<P class="Body" style="margin: 0px">void SetData(graphics_card_info *gcinfo, frame_buffer_info *fbinfo)</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD WIDTH=225 HEIGHT=32>
|
||||
<P class="Body" style="margin: 0px">void GetData(graphics_card_info *gcinfo, frame_buffer_info *fbinfo)</P>
|
||||
</TD>
|
||||
<TD WIDTH=232 HEIGHT=32>
|
||||
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
<BR>
|
||||
Workspace(void)</P>
|
||||
<P class="Body" style="margin: 0px">~Workspace(void)</P>
|
||||
<P class="Body" style="margin: 0px">void SetBGColor(const RGBColor &c)</P>
|
||||
<P class="Body" style="margin: 0px">RGBColor BGColor(void)</P>
|
||||
<P class="Body" style="margin: 0px">RootLayer *GetRoot(void)</P>
|
||||
<BR>
|
||||
<span class="OBOS-Function-Def">Workspace(void)</span></P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
1) Set background color to RGB(51,102,160)</P>
|
||||
<P class="Body" style="margin: 0px">2) Copy frame_buffer_info and graphics_card_info structure values</P>
|
||||
<P class="Body" style="margin: 0px">3) Create a RootLayer object using the values from the two structures</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
<BR>
|
||||
<span class="OBOS-Function-Def">~Workspace(void)</span></P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
1) Call the RootLayer object's PruneTree method and delete it</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
<BR>
|
||||
<span class="OBOS-Function-Def">void SetBGColor(const RGBColor &c)</span></P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
Sets the particular color for the workspace. Note that this does not refresh the display.</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
1) Set the internal background RGBColor object to the color parameter</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
<BR>
|
||||
<span class="OBOS-Function-Def">RGBColor BGColor(void)</span></P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
Returns the internal background color</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
<BR>
|
||||
<span class="OBOS-Function-Def">RootLayer *GetRoot(void)</span></P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
Returns the pointer to the RootLayer object</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
<BR>
|
||||
<span class="OBOS-Function-Def">void SetData(graphics_card_info *gcinfo, frame_buffer_info *fbinfo)</span></P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
Changes the graphics data and resizes the RootLayer accordingly.</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
1) Copy the two structures to the internal one</P>
|
||||
<P class="Body" style="margin: 0px">2) Resize the RootLayer</P>
|
||||
<P class="Body" style="margin: 0px">3) If the RootLayer was resized larger, Invalidate the new areas</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
<BR>
|
||||
<span class="OBOS-Function-Def">void GetData(graphics_card_info *gcinfo, frame_buffer_info *fbinfo)</span></P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
Copies the two data structures into the parameters passed.</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
<HR>
|
||||
</P>
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<P class="Body" style="margin: 0px">Member Functions</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
</P>
|
||||
<TABLE WIDTH=618 HEIGHT=602 BORDER=1 CELLPADDING=1 CELLSPACING=2>
|
||||
<TABLE WIDTH=464 HEIGHT=474 BORDER=1 CELLPADDING=1 CELLSPACING=2>
|
||||
<TR>
|
||||
<TD WIDTH=224 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">DisplayDriver(void)</P>
|
||||
@@ -101,10 +101,10 @@
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD WIDTH=224 HEIGHT=32>
|
||||
<TD WIDTH=224 HEIGHT=22>
|
||||
<P class="Body" style="margin: 0px">void DrawPicture(SPicture *pic, BPoint pt)</P>
|
||||
</TD>
|
||||
<TD WIDTH=240 HEIGHT=32>
|
||||
<TD WIDTH=240 HEIGHT=22>
|
||||
<P class="Body" style="margin: 0px">void CopyBits(BRect src, BRect dest)</P>
|
||||
</TD>
|
||||
</TR>
|
||||
@@ -153,8 +153,16 @@
|
||||
<P class="Body" style="margin: 0px">bool IsCursorHidden(void)</P>
|
||||
</TD>
|
||||
<TD WIDTH=240 HEIGHT=17>
|
||||
|
||||
</TD>
|
||||
<P class="Body" style="margin: 0px">void SetCursor(ServerCursor *csr)</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD WIDTH=224 HEIGHT=32>
|
||||
<P class="Body" style="margin: 0px">virtual float StringWidth(const char *string, int32 length, LayerData *d)</P>
|
||||
</TD>
|
||||
<TD WIDTH=240 HEIGHT=32>
|
||||
<P class="Body" style="margin: 0px">virtual float StringHeight(const char *string, int32 length, LayerData *d)</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
@@ -236,6 +244,9 @@ void StrokeArc(BRect r, float angle, float span, layerdata *d, int8 *pattern)</s
|
||||
<P class="Body" style="margin: 0px"><span class="OBOS-Function-Def">void HideCursor(void)</span></P>
|
||||
<P class="Body" style="margin: 0px"><span class="OBOS-Function-Def">void ObscureCursor(void)</span></P>
|
||||
<P class="Body" style="margin: 0px"><span class="OBOS-Function-Def">bool IsCursorHidden(void)</span></P>
|
||||
<P class="Body" style="margin: 0px"><span class="OBOS-Function-Def">void SetCursor(ServerCursor *csr)</span></P>
|
||||
<P class="Body" style="margin: 0px"><span class="OBOS-Function-Def">float StringWidth(const char *string, int32 length, LayerData *d)</span></P>
|
||||
<P class="Body" style="margin: 0px"><span class="OBOS-Function-Def">float StringHeight(const char *string, int32 length, LayerData *d)</span></P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
These drawing functions are the meat and potatoes of the graphics module. Defining any or all of them is completely optional. However, the default versions of these functions will do nothing. Thus, implementing them is likely a good idea, even if not required.</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
|
||||
@@ -19,81 +19,121 @@
|
||||
<DIV class="sheet" id="Sheet 1">
|
||||
<P class="Body" style="margin: 0px"><span class="OBOS-Title">FontFamily class</span><span style="color: rgb(0,0,0); font-size: 24pt"></span></P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
FontFamily objects are used to house all related font styles allocated as FontStyle objects.</P>
|
||||
FontFamily objects are used to tie together all related font styles.</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
<HR>
|
||||
</P>
|
||||
<P class="Body" style="margin: 0px">Member Functions</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
</P>
|
||||
<TABLE WIDTH=617 HEIGHT=68 BORDER=1 CELLPADDING=1 CELLSPACING=2>
|
||||
<TABLE WIDTH=463 HEIGHT=90 BORDER=1 CELLPADDING=1 CELLSPACING=2>
|
||||
<TR>
|
||||
<TD WIDTH=203 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">FontFamily(font_family name)</P>
|
||||
<P class="Body" style="margin: 0px">FontFamily(const char *name)</P>
|
||||
</TD>
|
||||
<TD WIDTH=260 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">~FontFamily(void)</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD WIDTH=203 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">font_family GetName(void)</P>
|
||||
<TD WIDTH=203 HEIGHT=22>
|
||||
<P class="Body" style="margin: 0px">const char *GetName(void)</P>
|
||||
</TD>
|
||||
<TD WIDTH=260 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">void AddStyle(FontStyle *style)</P>
|
||||
<TD WIDTH=260 HEIGHT=22>
|
||||
<P class="Body" style="margin: 0px">void AddStyle(const char *path, FT_Face face)</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD WIDTH=203 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">void RemoveStyle(FontStyle *style)</P>
|
||||
<P class="Body" style="margin: 0px">void RemoveStyle(const char *style)</P>
|
||||
</TD>
|
||||
<TD WIDTH=260 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">FontStyle *FindStyle(font_style name)</P>
|
||||
<P class="Body" style="margin: 0px">FontStyle *GetStyle(const char *stylename)</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD WIDTH=203 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">const char *GetStyle(int32 index)</P>
|
||||
</TD>
|
||||
<TD WIDTH=260 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">int32 CountStyles(void)</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD WIDTH=203 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">bool HasStyle(const char *style)</P>
|
||||
</TD>
|
||||
<TD WIDTH=260 HEIGHT=17>
|
||||
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
<BR>
|
||||
<BR>
|
||||
<HR>
|
||||
</P>
|
||||
<P class="Body" style="margin: 0px"><span class="OBOS-Function-Def">FontFamily(font_family name)</span></P>
|
||||
<P class="Body" style="margin: 0px"><span class="OBOS-Function-Def">FontFamily(const char *name)</span></P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
1) Set internal name to the one passed to the constructor</P>
|
||||
1) Create and set internal name to the one passed to the constructor</P>
|
||||
<P class="Body" style="margin: 0px">2) Create the styles list</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
<BR>
|
||||
<span class="OBOS-Function-Def">~FontFamily(void)</span></P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
1) Does nothing</P>
|
||||
1) delete the internal name</P>
|
||||
<P class="Body" style="margin: 0px">2) empty and delete the internal style list</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
<BR>
|
||||
<span class="OBOS-Function-Def">font_family GetName(void)</span></P>
|
||||
<span class="OBOS-Function-Def">const char *GetName(void)</span></P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
Returns the internal family name</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
<BR>
|
||||
<span class="OBOS-Function-Def">void AddStyle(FontStyle *style)</span></P>
|
||||
<span class="OBOS-Function-Def">void AddStyle(const char *path, FT_Face face)</span></P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
Adds the style to the family. Note that the FontFamily object is not responsible for freeing FontStyle objects added in this way.</P>
|
||||
Adds the style to the family.</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
1) Add the style object to the internal STL map object for styles</P>
|
||||
1) Create the FontStyle object and add it to the style list.</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
<BR>
|
||||
<span class="OBOS-Function-Def">void RemoveStyle(FontStyle *style)</span></P>
|
||||
<span class="OBOS-Function-Def">void RemoveStyle(const char *style)</span></P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
Removes the style from the FontFamily object.</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
1) Find the style in the style list. Return if not found.</P>
|
||||
<P class="Body" style="margin: 0px">2) Delete the style list's item</P>
|
||||
1) Call GetStyle on the given pointer</P>
|
||||
<P class="Body" style="margin: 0px">2) If non-NULL, delete the object</P>
|
||||
<P class="Body" style="margin: 0px">3) If the style list is now empty, ask the FontServer to remove it from the family list</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
<BR>
|
||||
<span class="OBOS-Function-Def">FontStyle *FindStyle(font_style name)</span></P>
|
||||
<span class="OBOS-Function-Def">FontStyle *GetStyle(const char *style)</span></P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
Looks up a FontStyle object based on its style name. Returns NULL if not found.</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
1) Call the style list's find() method.</P>
|
||||
<P class="Body" style="margin: 0px">2) Return the appropriate FontStyle object or NULL if not found.</P>
|
||||
1) Iterate through the style list</P>
|
||||
<P class="Body" style="margin: 0px"> a) compare <span style="font-style: italic">style</span> to each FontStyle object's GetName method and return the object if they are the same</P>
|
||||
<P class="Body" style="margin: 0px">2) If all items have been checked and nothing has been returned, return NULL</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
<BR>
|
||||
<span class="OBOS-Function-Def">const char *GetStyle(int32 index)</span></P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
Returns the name of the style at <span style="font-style: italic">index</span></P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
1) Get the FontStyle item at <span style="font-style: italic">index</span> obtained via the style list's ItemAt call</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
<BR>
|
||||
<span class="OBOS-Function-Def">int32 CountStyles(void)</span></P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
Returns the number of items in the style list and, thus, the number of styles in the family</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
<BR>
|
||||
<span class="OBOS-Function-Def">bool HasStyle(const char *stylename)</span></P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
Returns true if the family has a style with the name <span style="font-style: italic">stylename</span></P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
1) Call GetStyle on the style name and return false if NULL, true if not.</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
</P>
|
||||
<DIV class="layer" id="Layer 1">
|
||||
</DIV>
|
||||
</DIV>
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<P class="Body" style="margin: 0px">Member Functions</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
</P>
|
||||
<TABLE WIDTH=466 HEIGHT=185 BORDER=1 CELLPADDING=1 CELLSPACING=2>
|
||||
<TABLE WIDTH=621 HEIGHT=306 BORDER=1 CELLPADDING=1 CELLSPACING=2>
|
||||
<TR>
|
||||
<TD WIDTH=225 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">FontServer(void)</P>
|
||||
@@ -46,10 +46,10 @@
|
||||
</TR>
|
||||
<TR>
|
||||
<TD WIDTH=225 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">FT_Library GetLibrary(void)</P>
|
||||
<P class="Body" style="margin: 0px">void SaveList(void)</P>
|
||||
</TD>
|
||||
<TD WIDTH=240 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">void ScanDirectory(const char *path)</P>
|
||||
<P class="Body" style="margin: 0px">status_t ScanDirectory(const char *path)</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
@@ -61,29 +61,53 @@
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD WIDTH=225 HEIGHT=38>
|
||||
<P class="Body" style="margin: 0px">int32 CountFontFamilies(void)</P>
|
||||
<TD WIDTH=225 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">int32 CountFamiles(void)</P>
|
||||
</TD>
|
||||
<TD WIDTH=240 HEIGHT=38>
|
||||
<P class="Body" style="margin: 0px">status_t GetFamily(int32 index, font_family family)</P>
|
||||
<TD WIDTH=240 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">status_t IsInitialized(void)</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD WIDTH=225 HEIGHT=32>
|
||||
<P class="Body" style="margin: 0px">int32 CountFontStyles(font_family family)</P>
|
||||
<P class="Body" style="margin: 0px">int32 CountStyles(font_family family)</P>
|
||||
</TD>
|
||||
<TD WIDTH=240 HEIGHT=32>
|
||||
<P class="Body" style="margin: 0px">status_t GetStyle(font_family family, font_style style, int32 *flags)</P>
|
||||
<P class="Body" style="margin: 0px">FontStyle *GetStyle(font_family family, font_style style)</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD WIDTH=225 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">void RemoveFamily(FontFamily *family)</P>
|
||||
<P class="Body" style="margin: 0px">void RemoveFamily(const char *family)</P>
|
||||
</TD>
|
||||
<TD WIDTH=240 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">FontFamily *_FindFamily(const char *name)</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD WIDTH=225 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">ServerFont *GetSystemPlain(void)</P>
|
||||
</TD>
|
||||
<TD WIDTH=240 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">ServerFont *GetSystemBold(void)</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD WIDTH=225 HEIGHT=32>
|
||||
<P class="Body" style="margin: 0px">ServerFont *GetSystemFixed(void)</P>
|
||||
</TD>
|
||||
<TD WIDTH=240 HEIGHT=32>
|
||||
<P class="Body" style="margin: 0px">bool SetSystemPlain(const char *family, const char *style, float size)</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD WIDTH=225 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">void RemoveUnusedFamilies(void)</P>
|
||||
</TD>
|
||||
<TD WIDTH=240 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">bool FontsNeedUpdated(void)</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
<BR>
|
||||
@@ -94,7 +118,6 @@
|
||||
1) Create access semaphore</P>
|
||||
<P class="Body" style="margin: 0px">2) Call FT_Init_FreeType()</P>
|
||||
<P class="Body" style="margin: 0px">3) If no error initializing the FreeType library, set init flag to true</P>
|
||||
<P class="Body" style="margin: 0px">4) Call ScanDirectory() on /boot/beos/etc/fonts/psfonts, .../ttfonts, ~/config/fonts/psfonts and .../ttfonts</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
<BR>
|
||||
<span class="OBOS-Function-Def">~FontServer(void)</span></P>
|
||||
@@ -108,25 +131,43 @@
|
||||
These functions simply acquire and release the internal access semaphore.</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
<BR>
|
||||
<span class="OBOS-Function-Def">FT_Library GetLibrary(void)</span></P>
|
||||
<span class="OBOS-Function-Def">void SaveList(void)</span></P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
Returns the internal FT_Library object</P>
|
||||
Saves the list of all scanned and valid font families and styles to disk</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
1) create a BMessage for storing font family data (hereafter, the font message)</P>
|
||||
<P class="Body" style="margin: 0px">2) create a BMessage for storing a list of font family messages (hereafter, the list message)</P>
|
||||
<P class="Body" style="margin: 0px">3) create a boolean tuned flag and a boolean fixed flag</P>
|
||||
<P class="Body" style="margin: 0px">4) Iterate through all families</P>
|
||||
<P class="Body" style="margin: 0px"> A) for each family, get its name and add its name to the font message as "name"</P>
|
||||
<P class="Body" style="margin: 0px"> B) iterate through the families styles</P>
|
||||
<P class="Body" style="margin: 0px"> a) get the style's name, and if valid, add it to the font message as "styles"</P>
|
||||
<P class="Body" style="margin: 0px"> b) if IsTuned and IsScalable, set the tuned flag to true</P>
|
||||
<P class="Body" style="margin: 0px"> c) if IsFixedWidth, set the fixed flag to true</P>
|
||||
<P class="Body" style="margin: 0px"> C) if the tuned flag is set, add a boolean true to the font message as "tuned"</P>
|
||||
<P class="Body" style="margin: 0px"> D) if the fixed flag is set, add a boolean true to the font message as "fixed"</P>
|
||||
<P class="Body" style="margin: 0px"> E) add the font message to the list message as "family"</P>
|
||||
<P class="Body" style="margin: 0px"> F) empty the font message</P>
|
||||
<P class="Body" style="margin: 0px">5) Create a BFile from the path definition SERVER_FONT_LIST for Read/Write, creating the file if nonexistent and erasing any existing one</P>
|
||||
<P class="Body" style="margin: 0px">6) Flatten the list message to the created BFile object</P>
|
||||
<P class="Body" style="margin: 0px">7) Set the needs_update flag to false</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
<BR>
|
||||
<span class="OBOS-Function-Def">void ScanDirectory(const char *path)</span></P>
|
||||
<span class="OBOS-Function-Def">status_t ScanDirectory(const char *path)</span></P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
ScanDirectory is where the brunt of the work of the FontServer is done - scans the directory of all fonts which can be loaded.</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
1) Iterate through the font family STL map and set each FontFamily object's Delete flag to true</P>
|
||||
1) Make a BDirectory object pointer at the path parameter. If the init code is not B_OK, return it.</P>
|
||||
<P class="Body" style="margin: 0px">2) Enter a while() loop, iterating through each entry in the given directory, executing as follows:</P>
|
||||
<P class="Body" style="margin: 0px"> a) Ensure that the entry is not '.' or '..'</P>
|
||||
<P class="Body" style="margin: 0px"> b) Call FT_New_Face on the entry's full path</P>
|
||||
<P class="Body" style="margin: 0px"> c) If a valid FT_Face is returned, iterate through to see if there are any supported character mappings in the current entry.</P>
|
||||
<P class="Body" style="margin: 0px"> d) If there are no supported character mappings, dump the supported mappings to debug output, call FT_Done_Face(), and continue to the next entry</P>
|
||||
<P class="Body" style="margin: 0px"> e) See if the entry's family has been added to the family list. If it hasn't, create one and add it.</P>
|
||||
<P class="Body" style="margin: 0px"> f) Check to see if the font's style has been added to its family. If so, call set the family's Delete flag to false, call FT_Done_Face, and continue to the next entry</P>
|
||||
<P class="Body" style="margin: 0px"> f) Check to see if the font's style has been added to its family. If so, call FT_Done_Face, and continue to the next entry</P>
|
||||
<P class="Body" style="margin: 0px"> g) If the style has not been added, create a new SFont for that family and face, increment the font count, and continue to the next entry.</P>
|
||||
<P class="Body" style="margin: 0px">3) Iterate through all styles in each family and delete all SFont objects which have a true Delete flag</P>
|
||||
<P class="Body" style="margin: 0px">3) set the needs_update flag to true</P>
|
||||
<P class="Body" style="margin: 0px">4) Return B_OK</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
Supported character mappings are Windows and Apple Unicode, Windows symbol, and Apple Roman character mappings, in order of preference from first to last.</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
@@ -148,22 +189,19 @@ Returns a usable instance of a specified font object with specified properties.<
|
||||
<P class="Body" style="margin: 0px">2) Assuming that the FontStyle object is non-NULL, it calls its GetInstance method and returns the result.</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
<BR>
|
||||
<span class="OBOS-Function-Def">int32 CountFontFamilies(void)</span></P>
|
||||
<span class="OBOS-Function-Def">int32 CountFamilies(void)</span></P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
Returns the number of valid font families available to the system.</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
1) Return the number of items in the family list</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
<BR>
|
||||
<span class="OBOS-Function-Def">status_t GetFamily(int32 index, font_family family)</span></P>
|
||||
<span class="OBOS-Function-Def">status_t IsInitialized(void)</span></P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
Gets the name of the family with the index passed to the function and sets the font_family object to the appropriate value.</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
1) If index > family list count, return B_ERROR</P>
|
||||
<P class="Body" style="margin: 0px">2) Look up the string at the index, copy it, and return B_OK</P>
|
||||
Returns the initialization status variable</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
<BR>
|
||||
<span class="OBOS-Function-Def">int32 CountFontStyles(font_family family)</span></P>
|
||||
<span class="OBOS-Function-Def">int32 CountStyles(font_family family)</span></P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
Returns the number of styles available for a given font family.</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
@@ -171,21 +209,20 @@ Returns the number of styles available for a given font family.</P>
|
||||
<P class="Body" style="margin: 0px">2) If non-NULL, call its return the result of its CountStyles method</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
<BR>
|
||||
<span class="OBOS-Function-Def">status_t GetStyle(font_family family, font_style style, int32 *flags)</span></P>
|
||||
<span class="OBOS-Function-Def">FontStyle *GetStyle(font_family family, font_style style)</span></P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
Gets the name of the family with the index passed to the function and sets the font_family object to the appropriate value.</P>
|
||||
Gets the FontStyle object of the family, style, and flags.</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
1) Call _FindFamily() to get the appropriate font family</P>
|
||||
<P class="Body" style="margin: 0px">2) If non-NULL, look up the string at the index, and copy it to the passed style object, otherwise, return B_ERROR</P>
|
||||
<P class="Body" style="margin: 0px">3) Get the style's FontStyle object and set flags to the flags contained in the FontStyle object</P>
|
||||
<P class="Body" style="margin: 0px">4) Return B_OK</P>
|
||||
<P class="Body" style="margin: 0px">2) If non-NULL, call the family's GetStyle method on the font_style parameter and return the result</P>
|
||||
<P class="Body" style="margin: 0px">3) If family is NULL, return NULL</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
<BR>
|
||||
<span class="OBOS-Function-Def">void RemoveFamily(FontFamily *family)</span></P>
|
||||
<span class="OBOS-Function-Def">void RemoveFamily(const char *family)</span></P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
Removes a font family from the family list</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
1) Look up font family in the family list</P>
|
||||
1) Look up font family in the family list via _FindFamily()</P>
|
||||
<P class="Body" style="margin: 0px">2) If it exists, delete it</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
<BR>
|
||||
@@ -197,6 +234,39 @@ Looks up a FontFamily object based on its family name. Returns NULL if not found
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
1) Call the family list's find() method.</P>
|
||||
<P class="Body" style="margin: 0px">2) Return the appropriate FontFamily object or NULL if not found.</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
<BR>
|
||||
<span class="OBOS-Function-Def">ServerFont *GetSystemPlain(void)</span></P>
|
||||
<P class="Body" style="margin: 0px"><span class="OBOS-Function-Def">ServerFont *GetSystemBold(void)</span></P>
|
||||
<P class="Body" style="margin: 0px"><span class="OBOS-Function-Def">ServerFont *GetSystemFixed(void)</span></P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
These return a copy of a pointer to the system-wide ServerFont objects which represent the appropriate system font settings. It is the responsibility of the caller to delete the object returned. NULL is returned if no setting has been set for a particular system font.</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
<span class="OBOS-Function-Def">bool SetSystemPlain(const char *family, const char *style, float size)</span></P>
|
||||
<P class="Body" style="margin: 0px"><span class="OBOS-Function-Def">bool SetSystemBold(const char *family, const char *style, float size)</span></P>
|
||||
<P class="Body" style="margin: 0px"><span class="OBOS-Function-Def">bool SetSystemFixed(const char *family, const char *style, float size)</span></P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
The system fonts settings may be set via these calls by specifying the family, style, and size. They return true if everything worked out ok and false if not. Settings are not changed if false is returned.</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
1) Call _FindFamily on the family parameter. if NULL, return false</P>
|
||||
<P class="Body" style="margin: 0px">2) Call the family's GetStyle member. if NULL, return false</P>
|
||||
<P class="Body" style="margin: 0px">3) if the appropriate system font pointer is non-NULL, delete it</P>
|
||||
<P class="Body" style="margin: 0px">4) call the style's Instantiate member with the size parameter</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
<BR>
|
||||
<span class="OBOS-Function-Def">void RemoveUnusedFamilies(void)</span></P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
The purpose of this function is to allow for a complete rescan of the fonts in the appropriate directories.</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
1) Iterate through the family list</P>
|
||||
<P class="Body" style="margin: 0px"> A) Get a family</P>
|
||||
<P class="Body" style="margin: 0px"> B) if it has no dependents, remove it from the list and delete it</P>
|
||||
<P class="Body" style="margin: 0px">2) Set the needs_update flag to true</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
<BR>
|
||||
<span class="OBOS-Function-Def">bool FontsNeedUpdated(void)</span></P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
Returns the value of the needs_update flag</P>
|
||||
<DIV class="layer" id="Layer 1">
|
||||
</DIV>
|
||||
</DIV>
|
||||
|
||||
@@ -27,126 +27,126 @@
|
||||
Member Functions</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
</P>
|
||||
<TABLE WIDTH=620 HEIGHT=479 BORDER=1 CELLPADDING=1 CELLSPACING=2>
|
||||
<TABLE WIDTH=620 HEIGHT=480 BORDER=1 CELLPADDING=1 CELLSPACING=2>
|
||||
<TR>
|
||||
<TD WIDTH=307 HEIGHT=42>
|
||||
<TD WIDTH=231 HEIGHT=32>
|
||||
<P class="Body" style="margin: 0px">Layer(BRect frame, const char *name, int32 resize, int32 flags, ServerWindow *win)</P>
|
||||
</TD>
|
||||
<TD WIDTH=312 HEIGHT=42>
|
||||
<TD WIDTH=234 HEIGHT=32>
|
||||
<P class="Body" style="margin: 0px">~Layer(void)</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD WIDTH=307 HEIGHT=42>
|
||||
<TD WIDTH=231 HEIGHT=32>
|
||||
<P class="Body" style="margin: 0px">void AddChild(Layer *child, Layer *before=NULL, bool rebuild=true)</P>
|
||||
</TD>
|
||||
<TD WIDTH=312 HEIGHT=42>
|
||||
<TD WIDTH=234 HEIGHT=32>
|
||||
<P class="Body" style="margin: 0px">RemoveChild(Layer *child, bool rebuild=true)</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD WIDTH=307 HEIGHT=24>
|
||||
<TD WIDTH=231 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">void RemoveSelf(bool rebuild=true)</P>
|
||||
</TD>
|
||||
<TD WIDTH=312 HEIGHT=24>
|
||||
<TD WIDTH=234 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">void Invalidate(BRect r)</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD WIDTH=307 HEIGHT=24>
|
||||
<TD WIDTH=231 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">void Invalidate(BRegion *region)</P>
|
||||
</TD>
|
||||
<TD WIDTH=312 HEIGHT=24>
|
||||
<TD WIDTH=234 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">BRect Frame(void)</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD WIDTH=307 HEIGHT=24>
|
||||
<TD WIDTH=231 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">BRect Bounds(void)</P>
|
||||
</TD>
|
||||
<TD WIDTH=312 HEIGHT=24>
|
||||
<TD WIDTH=234 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">void MoveBy(BPoint pt)</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD WIDTH=307 HEIGHT=24>
|
||||
<TD WIDTH=231 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">void MoveBy(float x, float y)</P>
|
||||
</TD>
|
||||
<TD WIDTH=312 HEIGHT=24>
|
||||
<TD WIDTH=234 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">void ResizeBy(BPoint pt)</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD WIDTH=307 HEIGHT=24>
|
||||
<TD WIDTH=231 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">void ResizeBy(float x, float y)</P>
|
||||
</TD>
|
||||
<TD WIDTH=312 HEIGHT=24>
|
||||
<TD WIDTH=234 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">int32 CountChildren(void)</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD WIDTH=307 HEIGHT=24>
|
||||
<TD WIDTH=231 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">bool IsDirty(void)</P>
|
||||
</TD>
|
||||
<TD WIDTH=312 HEIGHT=24>
|
||||
<TD WIDTH=234 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">BRect ConvertToTop(const BRect &r)</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD WIDTH=307 HEIGHT=24>
|
||||
<TD WIDTH=231 HEIGHT=32>
|
||||
<P class="Body" style="margin: 0px">BRegion ConvertToTop(const BRegion &r)</P>
|
||||
</TD>
|
||||
<TD WIDTH=312 HEIGHT=24>
|
||||
<TD WIDTH=234 HEIGHT=32>
|
||||
<P class="Body" style="margin: 0px">BRect ConvertFromTop(const BRect &r)</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD WIDTH=307 HEIGHT=42>
|
||||
<TD WIDTH=231 HEIGHT=32>
|
||||
<P class="Body" style="margin: 0px">BRegion ConvertFromTop(const BRegion &r)</P>
|
||||
</TD>
|
||||
<TD WIDTH=312 HEIGHT=42>
|
||||
<TD WIDTH=234 HEIGHT=32>
|
||||
<P class="Body" style="margin: 0px">BRect ConvertToParent(const BRect &r)</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD WIDTH=307 HEIGHT=42>
|
||||
<TD WIDTH=231 HEIGHT=32>
|
||||
<P class="Body" style="margin: 0px">BRegion ConvertToParent(const BRegion &r)</P>
|
||||
</TD>
|
||||
<TD WIDTH=312 HEIGHT=42>
|
||||
<TD WIDTH=234 HEIGHT=32>
|
||||
<P class="Body" style="margin: 0px">BRect ConvertFromParent(const BRect &r)</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD WIDTH=307 HEIGHT=42>
|
||||
<TD WIDTH=231 HEIGHT=32>
|
||||
<P class="Body" style="margin: 0px">BRegion ConvertFromParent(const BRegion &r)</P>
|
||||
</TD>
|
||||
<TD WIDTH=312 HEIGHT=42>
|
||||
<TD WIDTH=234 HEIGHT=32>
|
||||
<P class="Body" style="margin: 0px">void RebuildRegions(bool recursive=false)</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD WIDTH=307 HEIGHT=24>
|
||||
<TD WIDTH=231 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">void MakeTopChild(void)</P>
|
||||
</TD>
|
||||
<TD WIDTH=312 HEIGHT=24>
|
||||
<TD WIDTH=234 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">void MakeBottomChild(void)</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD WIDTH=307 HEIGHT=24>
|
||||
<TD WIDTH=231 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">void RequestDraw(const BRect &r)</P>
|
||||
</TD>
|
||||
<TD WIDTH=312 HEIGHT=24>
|
||||
<TD WIDTH=234 HEIGHT=17>
|
||||
<P class="Body" style="margin: 0px">Layer *FindLayer(int32 token)</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD WIDTH=307 HEIGHT=42>
|
||||
<TD WIDTH=231 HEIGHT=32>
|
||||
<P class="Body" style="margin: 0px">Layer *GetChildAt(BPoint pt, bool recursive=false)</P>
|
||||
</TD>
|
||||
<TD WIDTH=312 HEIGHT=42>
|
||||
|
||||
</TD>
|
||||
<TD WIDTH=234 HEIGHT=32>
|
||||
<P class="Body" style="margin: 0px">PortLink *GetLink(void)</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
@@ -377,6 +377,11 @@ if recursive is false:</P>
|
||||
<P class="Body" style="margin: 0px"> B) if the child is hidden, continue to the next iteration</P>
|
||||
<P class="Body" style="margin: 0px"> C) if the child's frame contains the point, return the child</P>
|
||||
<P class="Body" style="margin: 0px"> D) if none of the children contain the point, return this</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
<BR>
|
||||
<span class="OBOS-Function-Def">PortLink *GetLink(void)</span></P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
Returns the layer's internal PortLink object so a message can be sent to the Layer's window.</P>
|
||||
<DIV class="layer" id="Layer 1">
|
||||
</DIV>
|
||||
</DIV>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<P class="Body" style="margin: 0px"><span class="OBOS-Title">ServerBitmap class</span><span style="color: rgb(0,0,0); font-size: 24pt"></span></P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
</P>
|
||||
<P class="Body" style="margin: 0px">ServerBitmaps are the server side counterpart to BBitmap.</P>
|
||||
<P class="Body" style="margin: 0px">ServerBitmaps are the server side counterpart to BBitmap. Note that they are not allocated like other objects - the BitmapManager handles all allocation and deletion tasks.</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
<BR>
|
||||
<HR>
|
||||
@@ -29,14 +29,22 @@
|
||||
Member Functions</P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
</P>
|
||||
<TABLE WIDTH=621 HEIGHT=150 BORDER=1 CELLPADDING=1 CELLSPACING=2>
|
||||
<TABLE WIDTH=466 HEIGHT=103 BORDER=1 CELLPADDING=1 CELLSPACING=2>
|
||||
<TR>
|
||||
<TD WIDTH=253 HEIGHT=47>
|
||||
<P class="Body" style="margin: 0px">ServerBitmap(BRect r, color_space cspace, int32 flags, int32 bytesperrow=-1, screen_id screen=B_MAIN_SCREEN_ID)</P>
|
||||
</TD>
|
||||
<TD WIDTH=213 HEIGHT=47>
|
||||
<P class="Body" style="margin: 0px">void _HandleSpace(color_space cs, int32 bytesperline=-1)</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD WIDTH=253 HEIGHT=22>
|
||||
<P class="Body" style="margin: 0px">~ServerBitmap(void)</P>
|
||||
</TD>
|
||||
<TD WIDTH=213 HEIGHT=22>
|
||||
<P class="Body" style="margin: 0px">int32 BytesPerRow(void)</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD WIDTH=253 HEIGHT=17>
|
||||
@@ -54,14 +62,6 @@ Member Functions</P>
|
||||
<P class="Body" style="margin: 0px">BRect Bounds(void)</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD WIDTH=253 HEIGHT=32>
|
||||
<P class="Body" style="margin: 0px">int32 BytesPerRow(void)</P>
|
||||
</TD>
|
||||
<TD WIDTH=213 HEIGHT=32>
|
||||
<P class="Body" style="margin: 0px">void _HandleSpace(color_space cs, int32 bytesperline=-1)</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
<BR>
|
||||
@@ -72,13 +72,14 @@ If there are any global functions associated with the class, they are listed her
|
||||
<BR>
|
||||
<HR>
|
||||
</P>
|
||||
<P class="Body" style="margin: 0px">ServerBitmap(BRect r, color_space cspace, int32 flags, int32 bytesperrow=-1, screen_id screen=B_MAIN_SCREEN_ID)</P>
|
||||
<P class="Body" style="margin: 0px"><span class="OBOS-Function-Def">ServerBitmap(BRect r, color_space cspace, int32 flags, int32 bytesperrow=-1, screen_id screen=B_MAIN_SCREEN_ID)</span></P>
|
||||
<P class="Body" style="margin: 0px"><BR>
|
||||
1) Call _HandleSpace()</P>
|
||||
<P class="Body" style="margin: 0px">2) Call _HandleFlags()</P>
|
||||
<P class="Body" style="margin: 0px">3) Initialize remaining data members to parameters or safe values</P>
|
||||
<P class="Body" style="margin: 0px"><span class="Default"><BR>
|
||||
</span><span style="font-size: 16pt">~ServerBitmap(void)</span></P>
|
||||
</span><BR>
|
||||
<span style="font-size: 16pt">~ServerBitmap(void)</span></P>
|
||||
<P class="Body" style="margin: 0px"><span class="Default"><BR>
|
||||
Empty</span></P>
|
||||
<P class="Body" style="margin: 0px"><span class="Default"><BR>
|
||||
|
||||
@@ -13,16 +13,21 @@
|
||||
<li><a href="AppServer.htm">AppServer</a></li>
|
||||
<li><a href="DebugTools.htm">DebugTools</a></li>
|
||||
<li><a href="ServerApp.htm">ServerApp</a></li>
|
||||
<li><a href="SharedObject.htm">SharedObject</a></li>
|
||||
<li><a href="TokenHandler.htm">TokenHandler</a></li>
|
||||
</ul>
|
||||
|
||||
<dd>Graphics Management</dd>
|
||||
<P>
|
||||
<ul>
|
||||
<li><a href="BitmapManager.htm">BitmapManager</a></li>
|
||||
<li><a href="ColorUtils.htm">ColorUtils</a></li>
|
||||
<li><a href="CursorManager.htm">CursorManager</a></li>
|
||||
<li><a href="Decorator.htm">Decorator</a></li>
|
||||
<li><a href="Desktop.htm">Desktop</a></li>
|
||||
<li><a href="DesktopClasses.htm">Desktop Classes</a></li>
|
||||
<li><a href="DisplayDriver.htm">DisplayDriver</a></li>
|
||||
<li><a href="Layer.htm">Layer</a></li>
|
||||
<li><a href="PatternHandler.htm">PatternHandler</a></li>
|
||||
<li><a href="RGBColor.htm">RGBColor</a></li>
|
||||
<li><a href="ServerBitmap.htm">ServerBitmap</a></li>
|
||||
|
||||
Reference in New Issue
Block a user