(svn r3365) Staticise 36 functions

This commit is contained in:
tron 2006-01-05 12:40:50 +00:00
parent 980e8f525b
commit e272b03fee
37 changed files with 68 additions and 68 deletions

View File

@ -46,7 +46,7 @@ static void AI_DequeueCommands(byte player)
* Needed for SP; we need to delay DoCommand with 1 tick, because else events
* will make infinite loops (AIScript).
*/
void AI_PutCommandInQueue(byte player, uint tile, uint32 p1, uint32 p2, uint procc)
static void AI_PutCommandInQueue(byte player, uint tile, uint32 p1, uint32 p2, uint procc)
{
AICommand *com;

View File

@ -58,6 +58,10 @@ static void IConsoleClearCommand(void)
static inline void IConsoleResetHistoryPos(void) {_iconsole_historypos = ICON_HISTORY_SIZE - 1;}
static void IConsoleHistoryAdd(const char* cmd);
static void IConsoleHistoryNavigate(int direction);
// ** console window ** //
static void IConsoleWndProc(Window* w, WindowEvent* e)
{
@ -322,7 +326,7 @@ void IConsoleOpen(void) {if (_iconsole_mode == ICONSOLE_CLOSED) IConsoleSwitch(
* scroll, etc. Put it to the beginning as it is the latest text
* @param cmd Text to be entered into the 'history'
*/
void IConsoleHistoryAdd(const char *cmd)
static void IConsoleHistoryAdd(const char* cmd)
{
free(_iconsole_history[ICON_HISTORY_SIZE - 1]);
@ -335,7 +339,7 @@ void IConsoleHistoryAdd(const char *cmd)
* Navigate Up/Down in the history of typed commands
* @param direction Go further back in history (+1), go to recently typed commands (-1)
*/
void IConsoleHistoryNavigate(signed char direction)
static void IConsoleHistoryNavigate(int direction)
{
int i = _iconsole_historypos + direction;
@ -687,7 +691,7 @@ static inline int IConsoleCopyInParams(char *dst, const char *src, uint bufpos)
* @param tokencount the number of parameters passed
* @param *tokens are the parameters given to the original command (0 is the first param)
*/
void IConsoleAliasExec(const IConsoleAlias *alias, byte tokencount, char *tokens[ICON_TOKEN_COUNT])
static void IConsoleAliasExec(const IConsoleAlias* alias, byte tokencount, char* tokens[ICON_TOKEN_COUNT])
{
const char *cmdptr;
char *aliases[ICON_MAX_ALIAS_LINES], aliasstream[ICON_MAX_STREAMSIZE];

View File

@ -123,10 +123,6 @@ void IConsoleSwitch(void);
void IConsoleClose(void);
void IConsoleOpen(void);
// ** console cmd buffer ** //
void IConsoleHistoryAdd(const char *cmd);
void IConsoleHistoryNavigate(signed char direction);
// ** console output ** //
void IConsolePrint(uint16 color_code, const char *string);
void CDECL IConsolePrintF(uint16 color_code, const char *s, ...);
@ -150,7 +146,6 @@ void IConsoleVarPrintSetValue(const IConsoleVar *var);
// *** Parser *** //
void IConsoleCmdExec(const char *cmdstr);
void IConsoleVarExec(const IConsoleVar *var, byte tokencount, char *token[]);
void IConsoleAliasExec(const IConsoleAlias *alias, byte tokencount, char *tokens[]);
// ** console std lib (register ingame commands/aliases/variables) ** //
void IConsoleStdLibRegister(void);

View File

@ -829,7 +829,7 @@ StringID GetCustomEngineName(EngineID engine)
}
void AcceptEnginePreview(Engine *e, PlayerID player)
static void AcceptEnginePreview(Engine *e, PlayerID player)
{
Player *p = GetPlayer(player);

View File

@ -206,8 +206,6 @@ void DrawRoadVehEngine(int x, int y, EngineID engine, uint32 image_ormod);
void DrawShipEngine(int x, int y, EngineID engine, uint32 image_ormod);
void DrawAircraftEngine(int x, int y, EngineID engine, uint32 image_ormod);
void AcceptEnginePreview(Engine *e, PlayerID player);
void LoadCustomEngineNames(void);
void DeleteCustomEngineNames(void);

View File

@ -216,7 +216,6 @@ Town *ClosestTownFromTile(TileIndex tile, uint threshold);
void ChangeTownRating(Town *t, int add, int max);
uint GetRoadBitsByTile(TileIndex tile);
void DrawRoadBits(TileInfo *ti, byte road, byte ground_type, bool snow, bool flat);
int GetTownRadiusGroup(const Town *t, TileIndex tile);
void ShowNetworkChatQueryWindow(byte desttype, byte dest);
void ShowNetworkGiveMoneyWindow(byte player);

3
gui.h
View File

@ -17,7 +17,6 @@ void ShowGameOptions(void);
void ShowGameDifficulty(void);
void ShowPatchesSelection(void);
void ShowNewgrf(void);
void ShowCustCurrency(void);
/* graph_gui.c */
void ShowOperatingProfitGraph(void);
@ -64,8 +63,6 @@ void ShowPlayerAircraft(PlayerID player, StationID station);
void ShowTerraformToolbar(void);
void PlaceProc_DemolishArea(TileIndex tile);
void PlaceProc_LowerLand(TileIndex tile);
void PlaceProc_RaiseLand(TileIndex tile);
void PlaceProc_LevelLand(TileIndex tile);
bool GUIPlaceProcDragXY(const WindowEvent *we);

View File

@ -27,7 +27,7 @@ enum {
/**
* Called if a new block is added to the industry-pool
*/
void IndustryPoolNewBlock(uint start_item)
static void IndustryPoolNewBlock(uint start_item)
{
Industry *i;

View File

@ -32,7 +32,7 @@ extern const char _openttd_revision[];
static uint32 last_ack_frame;
void NetworkRecvPatchSettings(NetworkClientState *cs, Packet *p);
static void NetworkRecvPatchSettings(NetworkClientState* cs, Packet* p);
// **********
// Sending functions
@ -823,7 +823,7 @@ extern const SettingDesc patch_settings[];
// This is a TEMPORARY solution to get the patch-settings
// to the client. When the patch-settings are saved in the savegame
// this should be removed!!
void NetworkRecvPatchSettings(NetworkClientState *cs, Packet *p)
static void NetworkRecvPatchSettings(NetworkClientState* cs, Packet* p)
{
const SettingDesc *item;

View File

@ -24,9 +24,10 @@
// This file handles all the server-commands
void NetworkHandleCommandQueue(NetworkClientState *cs);
static void NetworkHandleCommandQueue(NetworkClientState* cs);
static void NetworkSendPatchSettings(NetworkClientState* cs);
void NetworkPopulateCompanyInfo(void);
void NetworkSendPatchSettings(NetworkClientState *cs);
// Is the network enabled?
@ -1190,7 +1191,7 @@ extern const SettingDesc patch_settings[];
// This is a TEMPORARY solution to get the patch-settings
// to the client. When the patch-settings are saved in the savegame
// this should be removed!!
void NetworkSendPatchSettings(NetworkClientState *cs)
static void NetworkSendPatchSettings(NetworkClientState* cs)
{
const SettingDesc *item;
Packet *p = NetworkSend_Init(PACKET_SERVER_MAP);
@ -1484,7 +1485,8 @@ bool NetworkServer_ReadPackets(NetworkClientState *cs)
}
// Handle the local command-queue
void NetworkHandleCommandQueue(NetworkClientState *cs) {
static void NetworkHandleCommandQueue(NetworkClientState* cs)
{
CommandPacket *cp;
while ( (cp = cs->command_queue) != NULL) {

View File

@ -41,7 +41,7 @@ enum {
};
#define DEF_UDP_RECEIVE_COMMAND(type) void NetworkPacketReceive_ ## type ## _command(Packet *p, struct sockaddr_in *client_addr)
void NetworkSendUDP_Packet(SOCKET udp, Packet *p, struct sockaddr_in *recv);
static void NetworkSendUDP_Packet(SOCKET udp, Packet* p, struct sockaddr_in* recv);
static NetworkClientState _udp_cs;
@ -303,7 +303,7 @@ static NetworkUDPPacket* const _network_udp_packet[] = {
assert_compile(lengthof(_network_udp_packet) == PACKET_UDP_END);
void NetworkHandleUDPPacket(Packet *p, struct sockaddr_in *client_addr)
static void NetworkHandleUDPPacket(Packet* p, struct sockaddr_in* client_addr)
{
byte type;
@ -322,7 +322,7 @@ void NetworkHandleUDPPacket(Packet *p, struct sockaddr_in *client_addr)
// Send a packet over UDP
void NetworkSendUDP_Packet(SOCKET udp, Packet *p, struct sockaddr_in *recv)
static void NetworkSendUDP_Packet(SOCKET udp, Packet* p, struct sockaddr_in* recv)
{
int res;
@ -451,7 +451,7 @@ void NetworkUDPReceive(SOCKET udp)
}
// Broadcast to all ips
void NetworkUDPBroadCast(SOCKET udp)
static void NetworkUDPBroadCast(SOCKET udp)
{
int i;
struct sockaddr_in out_addr;

View File

@ -544,7 +544,7 @@ void OTTD_SendThreadMessage(ThreadMsg msg)
/** Handle the user-messages sent to us
* @param message message sent
*/
void ProcessSentMessage(ThreadMsg message)
static void ProcessSentMessage(ThreadMsg message)
{
switch (message) {
case MSG_OTTD_SAVETHREAD_START: SaveFileStart(); break;

View File

@ -178,7 +178,6 @@ bool IsOrderListShared(const Vehicle *v);
void AssignOrder(Order *order, Order data);
bool CheckForValidOrders(const Vehicle* v);
Order UnpackVersion4Order(uint16 packed);
Order UnpackOldOrder(uint16 packed);
#endif /* ORDER_H */

View File

@ -63,7 +63,7 @@ Order UnpackOldOrder(uint16 packed)
* Unpacks a order from savegames with version 4 and lower
*
*/
Order UnpackVersion4Order(uint16 packed)
static Order UnpackVersion4Order(uint16 packed)
{
Order order;
order.type = GB(packed, 0, 4);

View File

@ -266,7 +266,5 @@ int8 SaveHighScoreValueNetwork(void);
void InitialiseEngineReplacement(Player *p);
EngineID EngineReplacement(const Player *p, EngineID engine);
bool EngineHasReplacement(const Player *p, EngineID engine);
int32 AddEngineReplacement(Player *p, EngineID old_engine, EngineID new_engine, uint32 flags);
int32 RemoveEngineReplacement(Player *p, EngineID engine, uint32 flags);
#endif /* PLAYER_H */

View File

@ -637,6 +637,10 @@ static void DeletePlayerStuff(PlayerID pi)
p->president_name_1 = 0;
}
static int32 AddEngineReplacement(Player* p, EngineID old_engine, EngineID new_engine, uint32 flags);
static int32 RemoveEngineReplacement(Player* p, EngineID engine, uint32 flags);
/** Change engine renewal parameters
* @param x,y unused
* @param p1 bits 0-3 command
@ -1141,7 +1145,7 @@ bool EngineHasReplacement(const Player *p, EngineID engine)
* @param flags The calling command flags.
* @return 0 on success, CMD_ERROR on failure.
*/
int32 AddEngineReplacement(Player *p, EngineID old_engine, EngineID new_engine, uint32 flags)
static int32 AddEngineReplacement(Player* p, EngineID old_engine, EngineID new_engine, uint32 flags)
{
if (flags & DC_EXEC) p->engine_replacement[old_engine] = new_engine;
return 0;
@ -1154,7 +1158,7 @@ int32 AddEngineReplacement(Player *p, EngineID old_engine, EngineID new_engine,
* @param flags The calling command flags.
* @return 0 on success, CMD_ERROR on failure.
*/
int32 RemoveEngineReplacement(Player *p, EngineID engine, uint32 flags)
static int32 RemoveEngineReplacement(Player* p, EngineID engine, uint32 flags)
{
if (flags & DC_EXEC) p->engine_replacement[engine] = INVALID_ENGINE;
return 0;

1
rail.h
View File

@ -638,7 +638,6 @@ static inline bool TracksOverlap(TrackBits bits)
return true;
}
void DrawTrackBits(TileInfo *ti, TrackBits track, bool earth, bool snow, bool flat);
void DrawTrainDepotSprite(int x, int y, int image, RailType railtype);
void DrawDefaultWaypointSprite(int x, int y, RailType railtype);
#endif /* RAIL_H */

View File

@ -1342,7 +1342,7 @@ static void DrawSpecialBuilding(uint32 image, uint32 offset,
* @param snow Draw as snow
* @param flat Always draw foundation
*/
void DrawTrackBits(TileInfo *ti, TrackBits track, bool earth, bool snow, bool flat)
static void DrawTrackBits(TileInfo* ti, TrackBits track, bool earth, bool snow, bool flat)
{
const RailtypeInfo *rti = GetRailTypeInfo(GetRailType(ti->tile));
PalSpriteID image;

View File

@ -773,7 +773,7 @@ const byte _road_sloped_sprites[14] = {
* @param snow Draw snow
* @param flat Draw foundation
*/
void DrawRoadBits(TileInfo *ti, byte road, byte ground_type, bool snow, bool flat)
static void DrawRoadBits(TileInfo *ti, byte road, byte ground_type, bool snow, bool flat)
{
const DrawRoadTileStruct *drts;
PalSpriteID image = 0;

View File

@ -93,7 +93,7 @@ void DrawRoadVehEngine(int x, int y, EngineID engine, uint32 image_ormod)
DrawSprite((6 + _roadveh_images[spritenum]) | image_ormod, x, y);
}
int32 EstimateRoadVehCost(EngineID engine_type)
static int32 EstimateRoadVehCost(EngineID engine_type)
{
return ((_price.roadveh_base >> 3) * RoadVehInfo(engine_type)->base_cost) >> 5;
}

View File

@ -83,6 +83,9 @@ static inline bool RoadVehiclesAreBuilt(void)
return false;
}
static void ShowCustCurrency(void);
static void GameOptionsWndProc(Window *w, WindowEvent *e)
{
switch (e->event) {
@ -1506,7 +1509,7 @@ static const WindowDesc _cust_currency_desc = {
CustCurrencyWndProc,
};
void ShowCustCurrency(void)
static void ShowCustCurrency(void)
{
_str_separator[0] = _custom_currency.separator;
_str_separator[1] = '\0';

View File

@ -377,7 +377,7 @@ static bool ShipAccelerate(Vehicle *v)
return (t < v->progress);
}
int32 EstimateShipCost(EngineID engine_type)
static int32 EstimateShipCost(EngineID engine_type)
{
return ShipVehInfo(engine_type)->base_cost * (_price.ship_base>>3)>>5;
}

View File

@ -207,7 +207,6 @@ static inline int GetRoadStopType(TileIndex tile)
return (_m[tile].m5 < 0x47) ? RS_TRUCK : RS_BUS;
}
uint GetNumRoadStops(const Station *st, RoadStopType type);
RoadStop * GetPrimaryRoadStop(const Station *st, RoadStopType type);
RoadStop * AllocateRoadStop( void );
void ClearSlot(Vehicle *v, RoadStop *rs);

View File

@ -118,7 +118,7 @@ RoadStop* GetRoadStopByTile(TileIndex tile, RoadStopType type)
return rs;
}
uint GetNumRoadStops(const Station *st, RoadStopType type)
static uint GetNumRoadStops(const Station* st, RoadStopType type)
{
uint num = 0;
const RoadStop *rs;

View File

@ -141,12 +141,12 @@ void PlaceProc_DemolishArea(TileIndex tile)
VpStartPlaceSizing(tile, VPM_X_AND_Y | GUI_PlaceProc_DemolishArea);
}
void PlaceProc_RaiseLand(TileIndex tile)
static void PlaceProc_RaiseLand(TileIndex tile)
{
GenericRaiseLowerLand(tile, 1);
}
void PlaceProc_LowerLand(TileIndex tile)
static void PlaceProc_LowerLand(TileIndex tile)
{
GenericRaiseLowerLand(tile, 0);
}

1
town.h
View File

@ -83,7 +83,6 @@ void InitializeTown(void);
void ShowTownViewWindow(uint town);
void DeleteTown(Town *t);
void ExpandTown(Town *t);
bool GrowTown(Town *t);
Town *CreateRandomTown(uint attempts);
enum {

View File

@ -415,6 +415,9 @@ static const TileIndexDiffC _roadblock_tileadd[] = {
{ 0, 1}
};
static bool GrowTown(Town *t);
static void TownTickHandler(Town *t)
{
if (t->flags12&1) {
@ -762,7 +765,7 @@ static int GenRandomRoadBits(void)
// Grow the town
// Returns true if a house was built, or no if the build failed.
bool GrowTown(Town *t)
static bool GrowTown(Town *t)
{
TileIndex tile;
const TileIndexDiffC *ptr;

View File

@ -354,7 +354,7 @@ static int GetTrainAcceleration(Vehicle *v, bool mode)
}
}
void UpdateTrainAcceleration(Vehicle *v)
static void UpdateTrainAcceleration(Vehicle* v)
{
uint power = 0;
uint weight = 0;
@ -630,7 +630,7 @@ static int32 EstimateTrainCost(const RailVehicleInfo* rvi)
return (rvi->base_cost * (_price.build_railvehicle >> 3)) >> 5;
}
void AddRearEngineToMultiheadedTrain(Vehicle *v, Vehicle *u, bool building)
static void AddRearEngineToMultiheadedTrain(Vehicle* v, Vehicle* u, bool building)
{
u->direction = v->direction;
u->owner = v->owner;

View File

@ -23,7 +23,7 @@
* @param tile tile coordinates where HQ is located to destroy
* @param flags docommand flags of calling function
*/
int32 DestroyCompanyHQ(TileIndex tile, uint32 flags)
static int32 DestroyCompanyHQ(TileIndex tile, uint32 flags)
{
Player *p;

View File

@ -191,6 +191,9 @@ Vehicle *FindVehicleBetween(TileIndex from, TileIndex to, byte z)
return NULL;
}
static void UpdateVehiclePosHash(Vehicle* v, int x, int y);
void VehiclePositionChanged(Vehicle *v)
{
int img = v->cur_image;
@ -395,7 +398,7 @@ void *VehicleFromPos(TileIndex tile, void *data, VehicleFromPosProc *proc)
void UpdateVehiclePosHash(Vehicle *v, int x, int y)
static void UpdateVehiclePosHash(Vehicle* v, int x, int y)
{
VehicleID *old_hash, *new_hash;
int old_x = v->left_coord;

View File

@ -249,7 +249,6 @@ Vehicle *AllocateVehicle(void);
bool AllocateVehicles(Vehicle **vl, int num);
Vehicle *ForceAllocateVehicle(void);
Vehicle *ForceAllocateSpecialVehicle(void);
void UpdateVehiclePosHash(Vehicle *v, int x, int y);
void VehiclePositionChanged(Vehicle *v);
void AfterLoadVehicles(void);
Vehicle *GetLastVehicleInChain(Vehicle *v);
@ -272,8 +271,6 @@ void ViewportAddVehicles(DrawPixelInfo *dpi);
void TrainEnterDepot(Vehicle *v, TileIndex tile);
void AddRearEngineToMultiheadedTrain(Vehicle *v, Vehicle *u, bool building) ;
/* train_cmd.h */
int GetTrainImage(const Vehicle *v, byte direction);
int GetAircraftImage(const Vehicle *v, byte direction);
@ -311,7 +308,6 @@ UnitID GetFreeUnitNumber(byte type);
int LoadUnloadVehicle(Vehicle *v);
void TrainConsistChanged(Vehicle *v);
void UpdateTrainAcceleration(Vehicle *v);
int32 GetTrainRunningCost(const Vehicle *v);
int CheckTrainStoppedInDepot(const Vehicle *v);

View File

@ -216,7 +216,7 @@ static void DoSetViewportPosition(Window *w, int left, int top, int width, int h
}
}
void SetViewportPosition(Window *w, int x, int y)
static void SetViewportPosition(Window* w, int x, int y)
{
ViewPort *vp = w->viewport;
int old_left = vp->virtual_left;
@ -1939,7 +1939,7 @@ void VpSetPresizeRange(uint from, uint to)
_thd.next_drawstyle = HT_RECT;
}
void VpStartPreSizing(void)
static void VpStartPreSizing(void)
{
_thd.selend.x = -1;
_special_mouse_mode = WSM_PRESIZE;

View File

@ -18,7 +18,6 @@ void SetSelectionRed(bool);
/* viewport.c */
void AssignWindowViewport(Window *w, int x, int y,
int width, int height, uint32 follow_flags, byte zoom);
void SetViewportPosition(Window *w, int x, int y);
ViewPort *IsPtInWindowViewport(const Window *w, int x, int y);
Point GetTileBelowCursor(void);
void ZoomInOrOutToCursorWindow(bool in, Window * w);
@ -44,7 +43,6 @@ void SetTileSelectSize(int w, int h);
void SetTileSelectBigSize(int ox, int oy, int sx, int sy);
void VpStartPlaceSizing(TileIndex tile, int user);
void VpStartPreSizing(void);
void VpSetPresizeRange(uint from, uint to);
void VpSetPlaceSizingLimit(int limit);

View File

@ -64,7 +64,7 @@ static Waypoint* AllocateWaypoint(void)
}
/* Update the sign for the waypoint */
void UpdateWaypointSign(Waypoint *wp)
static void UpdateWaypointSign(Waypoint* wp)
{
Point pt = RemapCoords2(TileX(wp->xy) * 16, TileY(wp->xy) * 16);
SetDParam(0, wp->index);

View File

@ -74,7 +74,6 @@ int32 RemoveTrainWaypoint(TileIndex tile, uint32 flags, bool justremove);
Station *ComposeWaypointStation(TileIndex tile);
void ShowRenameWaypointWindow(const Waypoint *cp);
void DrawWaypointSprite(int x, int y, int image, RailType railtype);
void UpdateWaypointSign(Waypoint *cp);
void FixOldWaypoints(void);
void UpdateAllWaypointSigns(void);
void UpdateAllWaypointCustomGraphics(void);

View File

@ -23,6 +23,10 @@ void HandleButtonClick(Window *w, byte widget)
InvalidateWidget(w, widget);
}
static Window* StartWindowDrag(Window* w);
static Window* StartWindowSizing(Window* w);
static void DispatchLeftClickEvent(Window* w, int x, int y)
{
WindowEvent e;
@ -139,6 +143,8 @@ static void DispatchMouseWheelEvent(Window* w, int widget, int wheel)
}
static void DrawOverlappedWindow(Window* w, int left, int top, int right, int bottom);
void DrawOverlappedWindowForAll(int left, int top, int right, int bottom)
{
Window *w;
@ -155,7 +161,7 @@ void DrawOverlappedWindowForAll(int left, int top, int right, int bottom)
}
}
void DrawOverlappedWindow(Window *w, int left, int top, int right, int bottom)
static void DrawOverlappedWindow(Window* w, int left, int top, int right, int bottom)
{
const Window* v = w;
int x;
@ -287,6 +293,9 @@ void DeleteWindowByClass(WindowClass cls)
}
}
static Window* BringWindowToFront(Window* w);
Window *BringWindowToFrontById(WindowClass cls, WindowNumber number)
{
Window *w = FindWindowById(cls, number);
@ -312,7 +321,7 @@ static inline bool IsVitalWindow(const Window *w)
* - New window, Chatbar (only if open)
* @param w window that is put into the foreground
*/
Window *BringWindowToFront(Window *w)
static Window* BringWindowToFront(Window* w)
{
Window *v;
Window temp;
@ -1057,7 +1066,7 @@ static bool HandleWindowDragging(void)
return false;
}
Window *StartWindowDrag(Window *w)
static Window* StartWindowDrag(Window* w)
{
w->flags4 |= WF_DRAGGING;
_dragging_window = true;
@ -1070,7 +1079,7 @@ Window *StartWindowDrag(Window *w)
return w;
}
Window *StartWindowSizing(Window *w)
static Window* StartWindowSizing(Window* w)
{
w->flags4 |= WF_SIZING;
_dragging_window = true;

View File

@ -552,7 +552,6 @@ enum WindowFlags {
};
/* window.c */
void DrawOverlappedWindow(Window *w, int left, int top, int right, int bottom);
void CallWindowEventNP(Window *w, int event);
void CallWindowTickEvent(void);
void SetWindowDirty(const Window* w);
@ -561,9 +560,6 @@ void SendWindowMessage(WindowClass wnd_class, WindowNumber wnd_num, uint msg, ui
Window *FindWindowById(WindowClass cls, WindowNumber number);
void DeleteWindow(Window *w);
Window *BringWindowToFrontById(WindowClass cls, WindowNumber number);
Window *BringWindowToFront(Window *w);
Window *StartWindowDrag(Window *w);
Window *StartWindowSizing(Window *w);
Window *FindWindowFromPt(int x, int y);
bool IsWindowOfPrototype(const Window* w, const Widget* widget);