Add non-animated SSSE3 blitter
[openttd/fttd.git] / src / window_type.h
blob9727cf9f12d6b879fcfb16a0b3e8f399da331469
1 /* $Id$ */
3 /*
4 * This file is part of OpenTTD.
5 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
6 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
7 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
8 */
10 /** @file window_type.h Types related to windows */
12 #ifndef WINDOW_TYPE_H
13 #define WINDOW_TYPE_H
15 /** %Window numbers. */
16 enum WindowNumberEnum {
17 WN_GAME_OPTIONS_AI = 0, ///< AI settings.
18 WN_GAME_OPTIONS_ABOUT, ///< About window.
19 WN_GAME_OPTIONS_NEWGRF_STATE, ///< NewGRF settings.
20 WN_GAME_OPTIONS_GAME_OPTIONS, ///< Game options.
21 WN_GAME_OPTIONS_GAME_SETTINGS, ///< Game settings.
23 WN_QUERY_STRING = 0, ///< Query string.
24 WN_QUERY_STRING_SIGN, ///< Query string for signs.
26 WN_CONFIRM_POPUP_QUERY = 0, ///< Query popup confirm.
27 WN_CONFIRM_POPUP_QUERY_BOOTSTRAP, ///< Query popup confirm for bootstrap.
29 WN_NETWORK_WINDOW_GAME = 0, ///< Network game window.
30 WN_NETWORK_WINDOW_LOBBY, ///< Network lobby window.
31 WN_NETWORK_WINDOW_CONTENT_LIST, ///< Network content list.
32 WN_NETWORK_WINDOW_START, ///< Network start server.
34 WN_NETWORK_STATUS_WINDOW_JOIN = 0, ///< Network join status.
35 WN_NETWORK_STATUS_WINDOW_CONTENT_DOWNLOAD, ///< Network content download status.
38 /** %Window classes. */
39 enum WindowClass {
40 WC_NONE, ///< No window, redirects to WC_MAIN_WINDOW.
42 /**
43 * Main window; %Window numbers:
44 * - 0 = #MainWidgets
46 WC_MAIN_WINDOW = WC_NONE,
48 /**
49 * Main toolbar (the long bar at the top); %Window numbers:
50 * - 0 = #ToolbarNormalWidgets
51 * - 0 = #ToolbarEditorWidgets
53 WC_MAIN_TOOLBAR,
55 /**
56 * Statusbar (at the bottom of your screen); %Window numbers:
57 * - 0 = #StatusbarWidgets
59 WC_STATUS_BAR,
61 /**
62 * Build toolbar; %Window numbers:
63 * - #TRANSPORT_RAIL = #RailToolbarWidgets
64 * - #TRANSPORT_AIR = #AirportToolbarWidgets
65 * - #TRANSPORT_WATER = #DockToolbarWidgets
66 * - #TRANSPORT_ROAD = #RoadToolbarWidgets
68 WC_BUILD_TOOLBAR,
70 /**
71 * Scenario build toolbar; %Window numbers:
72 * - #TRANSPORT_WATER = #DockToolbarWidgets
73 * - #TRANSPORT_ROAD = #RoadToolbarWidgets
75 WC_SCEN_BUILD_TOOLBAR,
77 /**
78 * Build trees toolbar; %Window numbers:
79 * - 0 = #BuildTreesWidgets
81 WC_BUILD_TREES,
83 /**
84 * Transparency toolbar; %Window numbers:
85 * - 0 = #TransparencyToolbarWidgets
87 WC_TRANSPARENCY_TOOLBAR,
89 /**
90 * Build signal toolbar; %Window numbers:
91 * - #TRANSPORT_RAIL = #BuildSignalWidgets
93 WC_BUILD_SIGNAL,
95 /**
96 * Small map; %Window numbers:
97 * - 0 = #SmallMapWidgets
99 WC_SMALLMAP,
102 * Error message; %Window numbers:
103 * - 0 = #ErrorMessageWidgets
105 WC_ERRMSG,
108 * Tooltip window; %Window numbers:
109 * - 0 = #ToolTipsWidgets
111 WC_TOOLTIPS,
114 * Query string window; %Window numbers:
115 * - #WN_QUERY_STRING = #QueryStringWidgets
116 * - #WN_QUERY_STRING_SIGN = #QueryEditSignWidgets
118 WC_QUERY_STRING,
121 * Popup with confirm question; %Window numbers:
122 * - #WN_CONFIRM_POPUP_QUERY = #QueryWidgets
123 * - #WN_CONFIRM_POPUP_QUERY_BOOTSTRAP = #BootstrapAskForDownloadWidgets
125 WC_CONFIRM_POPUP_QUERY,
128 * Popup with a set of buttons, designed to ask the user a question
129 * from a GameScript. %Window numbers:
130 * - uniqueid = #GoalQuestionWidgets
132 WC_GOAL_QUESTION,
136 * Saveload window; %Window numbers:
137 * - 0 = #SaveLoadWidgets
139 WC_SAVELOAD,
142 * Land info window; %Window numbers:
143 * - 0 = #LandInfoWidgets
145 WC_LAND_INFO,
148 * Drop down menu; %Window numbers:
149 * - 0 = #DropdownMenuWidgets
151 WC_DROPDOWN_MENU,
154 * On Screen Keyboard; %Window numbers:
155 * - 0 = #OnScreenKeyboardWidgets
157 WC_OSK,
160 * Set date; %Window numbers:
161 * - #VehicleID = #SetDateWidgets
163 WC_SET_DATE,
167 * AI settings; %Window numbers:
168 * - 0 = #AISettingsWidgets
170 WC_AI_SETTINGS,
173 * NewGRF parameters; %Window numbers:
174 * - 0 = #NewGRFParametersWidgets
176 WC_GRF_PARAMETERS,
179 * textfile; %Window numbers:
180 * - 0 = #TextfileWidgets
182 WC_TEXTFILE,
186 * Town authority; %Window numbers:
187 * - #TownID = #TownAuthorityWidgets
189 WC_TOWN_AUTHORITY,
192 * Vehicle details; %Window numbers:
193 * - #VehicleID = #VehicleDetailsWidgets
195 WC_VEHICLE_DETAILS,
198 * Vehicle refit; %Window numbers:
199 * - #VehicleID = #VehicleRefitWidgets
201 WC_VEHICLE_REFIT,
204 * Vehicle orders; %Window numbers:
205 * - #VehicleID = #OrderWidgets
207 WC_VEHICLE_ORDERS,
210 * Replace vehicle window; %Window numbers:
211 * - #VehicleType = #ReplaceVehicleWidgets
213 WC_REPLACE_VEHICLE,
216 * Vehicle timetable; %Window numbers:
217 * - #VehicleID = #VehicleTimetableWidgets
219 WC_VEHICLE_TIMETABLE,
222 * Company colour selection; %Window numbers:
223 * - #CompanyID = #SelectCompanyLiveryWidgets
225 WC_COMPANY_COLOUR,
228 * Alter company face window; %Window numbers:
229 * - #CompanyID = #SelectCompanyManagerFaceWidgets
231 WC_COMPANY_MANAGER_FACE,
234 * Select station (when joining stations); %Window numbers:
235 * - 0 = #JoinStationWidgets
237 WC_SELECT_STATION,
240 * News window; %Window numbers:
241 * - 0 = #NewsWidgets
243 WC_NEWS_WINDOW,
246 * Town directory; %Window numbers:
247 * - 0 = #TownDirectoryWidgets
249 WC_TOWN_DIRECTORY,
252 * Subsidies list; %Window numbers:
253 * - 0 = #SubsidyListWidgets
255 WC_SUBSIDIES_LIST,
258 * Industry directory; %Window numbers:
259 * - 0 = #IndustryDirectoryWidgets
261 WC_INDUSTRY_DIRECTORY,
264 * News history list; %Window numbers:
265 * - 0 = #MessageHistoryWidgets
267 WC_MESSAGE_HISTORY,
270 * Sign list; %Window numbers:
271 * - 0 = #SignListWidgets
273 WC_SIGN_LIST,
276 * AI list; %Window numbers:
277 * - 0 = #AIListWidgets
279 WC_AI_LIST,
282 * Goals list; %Window numbers:
283 * - 0 ; #GoalListWidgets
285 WC_GOALS_LIST,
288 * Story book; %Window numbers:
289 * - CompanyID = #StoryBookWidgets
291 WC_STORY_BOOK,
294 * Station list; %Window numbers:
295 * - #CompanyID = #StationListWidgets
297 WC_STATION_LIST,
300 * Trains list; %Window numbers:
301 * - Packed value = #GroupListWidgets / #VehicleListWidgets
303 WC_TRAINS_LIST,
306 * Road vehicle list; %Window numbers:
307 * - Packed value = #GroupListWidgets / #VehicleListWidgets
309 WC_ROADVEH_LIST,
312 * Ships list; %Window numbers:
313 * - Packed value = #GroupListWidgets / #VehicleListWidgets
315 WC_SHIPS_LIST,
318 * Aircraft list; %Window numbers:
319 * - Packed value = #GroupListWidgets / #VehicleListWidgets
321 WC_AIRCRAFT_LIST,
325 * Town view; %Window numbers:
326 * - #TownID = #TownViewWidgets
328 WC_TOWN_VIEW,
331 * Vehicle view; %Window numbers:
332 * - #VehicleID = #VehicleViewWidgets
334 WC_VEHICLE_VIEW,
337 * Station view; %Window numbers:
338 * - #StationID = #StationViewWidgets
340 WC_STATION_VIEW,
343 * Depot view; %Window numbers:
344 * - #TileIndex = #DepotWidgets
346 WC_VEHICLE_DEPOT,
349 * Waypoint view; %Window numbers:
350 * - #WaypointID = #WaypointWidgets
352 WC_WAYPOINT_VIEW,
355 * Industry view; %Window numbers:
356 * - #IndustryID = #IndustryViewWidgets
358 WC_INDUSTRY_VIEW,
361 * Company view; %Window numbers:
362 * - #CompanyID = #CompanyWidgets
364 WC_COMPANY,
368 * Build object; %Window numbers:
369 * - 0 = #BuildObjectWidgets
371 WC_BUILD_OBJECT,
374 * Build vehicle; %Window numbers:
375 * - #VehicleType = #BuildVehicleWidgets
376 * - #TileIndex = #BuildVehicleWidgets
378 WC_BUILD_VEHICLE,
381 * Build bridge; %Window numbers:
382 * - #TransportType = #BuildBridgeSelectionWidgets
384 WC_BUILD_BRIDGE,
387 * Build station; %Window numbers:
388 * - #TRANSPORT_AIR = #AirportPickerWidgets
389 * - #TRANSPORT_WATER = #DockToolbarWidgets
390 * - #TRANSPORT_RAIL = #BuildRailStationWidgets
392 WC_BUILD_STATION,
395 * Build bus station; %Window numbers:
396 * - #TRANSPORT_ROAD = #BuildRoadStationWidgets
398 WC_BUS_STATION,
401 * Build truck station; %Window numbers:
402 * - #TRANSPORT_ROAD = #BuildRoadStationWidgets
404 WC_TRUCK_STATION,
407 * Build depot; %Window numbers:
408 * - #TRANSPORT_WATER = #BuildDockDepotWidgets
409 * - #TRANSPORT_RAIL = #BuildRailDepotWidgets
410 * - #TRANSPORT_ROAD = #BuildRoadDepotWidgets
412 WC_BUILD_DEPOT,
415 * Build waypoint; %Window numbers:
416 * - #TRANSPORT_RAIL = #BuildRailWaypointWidgets
418 WC_BUILD_WAYPOINT,
421 * Found a town; %Window numbers:
422 * - 0 = #TownFoundingWidgets
424 WC_FOUND_TOWN,
427 * Build industry; %Window numbers:
428 * - 0 = #DynamicPlaceIndustriesWidgets
430 WC_BUILD_INDUSTRY,
434 * Select game window; %Window numbers:
435 * - 0 = #SelectGameIntroWidgets
437 WC_SELECT_GAME,
440 * Landscape generation (in Scenario Editor); %Window numbers:
441 * - 0 = #TerraformToolbarWidgets
442 * - 0 = #EditorTerraformToolbarWidgets
444 WC_SCEN_LAND_GEN,
447 * Generate landscape (newgame); %Window numbers:
448 * - GLWM_SCENARIO = #CreateScenarioWidgets
449 * - #GenenerateLandscapeWindowMode = #GenerateLandscapeWidgets
451 WC_GENERATE_LANDSCAPE,
454 * Progress report of landscape generation; %Window numbers:
455 * - 0 = #GenerationProgressWidgets
456 * - 1 = #ScanProgressWidgets
458 WC_MODAL_PROGRESS,
462 * Network window; %Window numbers:
463 * - #WN_NETWORK_WINDOW_GAME = #NetworkGameWidgets
464 * - #WN_NETWORK_WINDOW_LOBBY = #NetworkLobbyWidgets
465 * - #WN_NETWORK_WINDOW_CONTENT_LIST = #NetworkContentListWidgets
466 * - #WN_NETWORK_WINDOW_START = #NetworkStartServerWidgets
468 WC_NETWORK_WINDOW,
471 * Client list; %Window numbers:
472 * - 0 = #ClientListWidgets
474 WC_CLIENT_LIST,
477 * Popup for the client list; %Window numbers:
478 * - #ClientID = #ClientListPopupWidgets
480 WC_CLIENT_LIST_POPUP,
483 * Network status window; %Window numbers:
484 * - #WN_NETWORK_STATUS_WINDOW_JOIN = #NetworkJoinStatusWidgets
485 * - #WN_NETWORK_STATUS_WINDOW_CONTENT_DOWNLOAD = #NetworkContentDownloadStatusWidgets
487 WC_NETWORK_STATUS_WINDOW,
490 * Chatbox; %Window numbers:
491 * - #DestType = #NetWorkChatWidgets
493 WC_SEND_NETWORK_MSG,
496 * Company password query; %Window numbers:
497 * - 0 = #NetworkCompanyPasswordWidgets
499 WC_COMPANY_PASSWORD_WINDOW,
503 * Industry cargoes chain; %Window numbers:
504 * - 0 = #IndustryCargoesWidgets
506 WC_INDUSTRY_CARGOES,
509 * Legend for graphs; %Window numbers:
510 * - 0 = #GraphLegendWidgets
512 WC_GRAPH_LEGEND,
515 * Finances of a company; %Window numbers:
516 * - #CompanyID = #CompanyWidgets
518 WC_FINANCES,
521 * Income graph; %Window numbers:
522 * - 0 = #CompanyValueWidgets
524 WC_INCOME_GRAPH,
527 * Operating profit graph; %Window numbers:
528 * - 0 = #CompanyValueWidgets
530 WC_OPERATING_PROFIT,
533 * Delivered cargo graph; %Window numbers:
534 * - 0 = #CompanyValueWidgets
536 WC_DELIVERED_CARGO,
539 * Performance history graph; %Window numbers:
540 * - 0 = #PerformanceHistoryGraphWidgets
542 WC_PERFORMANCE_HISTORY,
545 * Company value graph; %Window numbers:
546 * - 0 = #CompanyValueWidgets
548 WC_COMPANY_VALUE,
551 * Company league window; %Window numbers:
552 * - 0 = #CompanyLeagueWidgets
554 WC_COMPANY_LEAGUE,
557 * Payment rates graph; %Window numbers:
558 * - 0 = #CargoPaymentRatesWidgets
560 WC_PAYMENT_RATES,
563 * Performance detail window; %Window numbers:
564 * - 0 = #PerformanceRatingDetailsWidgets
566 WC_PERFORMANCE_DETAIL,
569 * Company infrastructure overview; %Window numbers:
570 * - #CompanyID = #CompanyInfrastructureWidgets
572 WC_COMPANY_INFRASTRUCTURE,
576 * Buyout company (merger); %Window numbers:
577 * - #CompanyID = #BuyCompanyWidgets
579 WC_BUY_COMPANY,
582 * Engine preview window; %Window numbers:
583 * - #EngineID = #EnginePreviewWidgets
585 WC_ENGINE_PREVIEW,
589 * Music window; %Window numbers:
590 * - 0 = #MusicWidgets
592 WC_MUSIC_WINDOW,
595 * Music track selection; %Window numbers:
596 * - 0 = MusicTrackSelectionWidgets
598 WC_MUSIC_TRACK_SELECTION,
601 * Game options window; %Window numbers:
602 * - #WN_GAME_OPTIONS_AI = #AIConfigWidgets
603 * - #WN_GAME_OPTIONS_ABOUT = #AboutWidgets
604 * - #WN_GAME_OPTIONS_NEWGRF_STATE = #NewGRFStateWidgets
605 * - #WN_GAME_OPTIONS_GAME_OPTIONS = #GameOptionsWidgets
606 * - #WN_GAME_OPTIONS_GAME_SETTINGS = #GameSettingsWidgets
608 WC_GAME_OPTIONS,
611 * Custom currency; %Window numbers:
612 * - 0 = #CustomCurrencyWidgets
614 WC_CUSTOM_CURRENCY,
617 * Cheat window; %Window numbers:
618 * - 0 = #CheatWidgets
620 WC_CHEATS,
623 * Extra viewport; %Window numbers:
624 * - Ascending value = #ExtraViewportWidgets
626 WC_EXTRA_VIEW_PORT,
630 * Console; %Window numbers:
631 * - 0 = #ConsoleWidgets
633 WC_CONSOLE,
636 * Bootstrap; %Window numbers:
637 * - 0 = #BootstrapBackgroundWidgets
639 WC_BOOTSTRAP,
642 * Highscore; %Window numbers:
643 * - 0 = #HighscoreWidgets
645 WC_HIGHSCORE,
648 * Endscreen; %Window numbers:
649 * - 0 = #HighscoreWidgets
651 WC_ENDSCREEN,
655 * AI debug window; %Window numbers:
656 * - 0 = #AIDebugWidgets
658 WC_AI_DEBUG,
661 * NewGRF inspect (debug); %Window numbers:
662 * - Packed value = #NewGRFInspectWidgets
664 WC_NEWGRF_INSPECT,
667 * Sprite aligner (debug); %Window numbers:
668 * - 0 = #SpriteAlignerWidgets
670 WC_SPRITE_ALIGNER,
673 * Linkgraph legend; Window numbers:
674 * - 0 = #LinkGraphWidgets
676 WC_LINKGRAPH_LEGEND,
678 WC_INVALID = 0xFFFF, ///< Invalid window.
681 /** Data value for #Window::OnInvalidateData() of windows with class #WC_GAME_OPTIONS. */
682 enum GameOptionsInvalidationData {
683 GOID_DEFAULT = 0,
684 GOID_NEWGRF_RESCANNED, ///< NewGRFs were just rescanned.
685 GOID_NEWGRF_LIST_EDITED, ///< List of active NewGRFs is being edited.
686 GOID_NEWGRF_PRESET_LOADED, ///< A NewGRF preset was picked.
689 struct Window;
691 /** Number to differentiate different windows of the same class */
692 typedef int32 WindowNumber;
694 /** State of handling an event. */
695 enum EventState {
696 ES_HANDLED, ///< The passed event is handled.
697 ES_NOT_HANDLED, ///< The passed event is not handled.
700 #endif /* WINDOW_TYPE_H */