1 /*
2  *  Copyright (C) 2005-2018 Team Kodi
3  *  This file is part of Kodi - https://kodi.tv
4  *
5  *  SPDX-License-Identifier: GPL-2.0-or-later
6  *  See LICENSES/README.md for more information.
7  */
8 
9 #pragma once
10 
11 //  GUI messages outside GuiLib
12 //
13 
14 #include "guilib/GUIMessage.h"
15 
16 //  Source related messages
17 #define GUI_MSG_REMOVED_MEDIA           GUI_MSG_USER + 1
18 #define GUI_MSG_UPDATE_SOURCES          GUI_MSG_USER + 2
19 
20 //  General playlist items changed
21 #define GUI_MSG_PLAYLIST_CHANGED        GUI_MSG_USER + 3
22 
23 //  Start Slideshow in my pictures lpVoid = std::string
24 //  Param lpVoid: std::string* that points to the Directory
25 //  to start the slideshow in.
26 #define GUI_MSG_START_SLIDESHOW         GUI_MSG_USER + 4
27 
28 #define GUI_MSG_PLAYBACK_STARTED        GUI_MSG_USER + 5
29 #define GUI_MSG_PLAYBACK_ENDED          GUI_MSG_USER + 6
30 
31 //  Playback stopped by user
32 #define GUI_MSG_PLAYBACK_STOPPED        GUI_MSG_USER + 7
33 
34 //  Message is send by the playlistplayer when it starts a playlist
35 //  Parameter:
36 //  dwParam1 = Current Playlist, can be PLAYLIST_MUSIC, PLAYLIST_TEMP_MUSIC, PLAYLIST_VIDEO or PLAYLIST_TEMP_VIDEO
37 //  dwParam2 = Item started in the playlist
38 //  lpVoid = Playlistitem started playing
39 #define GUI_MSG_PLAYLISTPLAYER_STARTED  GUI_MSG_USER + 8
40 
41 //  Message is send by playlistplayer when next/previous item is started
42 //  Parameter:
43 //  dwParam1 = Current Playlist, can be PLAYLIST_MUSIC, PLAYLIST_TEMP_MUSIC, PLAYLIST_VIDEO or PLAYLIST_TEMP_VIDEO
44 //  dwParam2 = LOWORD Position of the current playlistitem
45 //             HIWORD Position of the previous playlistitem
46 //  lpVoid = Current Playlistitem
47 #define GUI_MSG_PLAYLISTPLAYER_CHANGED  GUI_MSG_USER + 9
48 
49 //  Message is send by the playlistplayer when the last item to play ended
50 //  Parameter:
51 //  dwParam1 = Current Playlist, can be PLAYLIST_MUSIC, PLAYLIST_TEMP_MUSIC, PLAYLIST_VIDEO or PLAYLIST_TEMP_VIDEO
52 //  dwParam2 = Playlistitem played when stopping
53 #define GUI_MSG_PLAYLISTPLAYER_STOPPED  GUI_MSG_USER + 10
54 
55 #define GUI_MSG_LOAD_SKIN               GUI_MSG_USER + 11
56 
57 //  Message is send by the dialog scan music
58 //  Parameter:
59 //  StringParam = Directory last scanned
60 #define GUI_MSG_DIRECTORY_SCANNED       GUI_MSG_USER + 12
61 
62 #define GUI_MSG_SCAN_FINISHED           GUI_MSG_USER + 13
63 
64 //  Player has requested the next item for caching purposes (PAPlayer)
65 #define GUI_MSG_QUEUE_NEXT_ITEM         GUI_MSG_USER + 16
66 
67 // Visualisation messages when loading/unloading
68 #define GUI_MSG_VISUALISATION_UNLOADING GUI_MSG_USER + 117 // sent by vis
69 #define GUI_MSG_VISUALISATION_LOADED    GUI_MSG_USER + 118 // sent by vis
70 #define GUI_MSG_GET_VISUALISATION       GUI_MSG_USER + 119 // request to vis for the visualisation object
71 #define GUI_MSG_VISUALISATION_ACTION    GUI_MSG_USER + 120 // request the vis perform an action
72 #define GUI_MSG_VISUALISATION_RELOAD    GUI_MSG_USER + 121 // request the vis to reload
73 
74 #define GUI_MSG_VIDEO_MENU_STARTED      GUI_MSG_USER + 21 // sent by VideoPlayer on entry to the menu
75 
76 //  Message is sent by built-in function to alert the playlist window
77 //  that the user has initiated Random playback
78 //  dwParam1 = Current Playlist (PLAYLIST_MUSIC, PLAYLIST_TEMP_MUSIC, PLAYLIST_VIDEO or PLAYLIST_TEMP_VIDEO)
79 //  dwParam2 = 0 or 1 (Enabled or Disabled)
80 #define GUI_MSG_PLAYLISTPLAYER_RANDOM   GUI_MSG_USER + 22
81 
82 //  Message is sent by built-in function to alert the playlist window
83 //  that the user has initiated Repeat playback
84 //  dwParam1 = Current Playlist (PLAYLIST_MUSIC, PLAYLIST_TEMP_MUSIC, PLAYLIST_VIDEO or PLAYLIST_TEMP_VIDEO)
85 //  dwParam2 = 0 or 1 or 2 (Off, Repeat All, Repeat One)
86 #define GUI_MSG_PLAYLISTPLAYER_REPEAT   GUI_MSG_USER + 23
87 
88 // Message is sent by the background info loader when it is finished with fetching a weather location.
89 #define GUI_MSG_WEATHER_FETCHED       GUI_MSG_USER + 24
90 
91 // Message is sent to the screensaver window to tell that it should check the lock
92 #define GUI_MSG_CHECK_LOCK            GUI_MSG_USER + 25
93 
94 // Message is sent to media windows to force a refresh
95 #define GUI_MSG_UPDATE                GUI_MSG_USER + 26
96 
97 // Message sent by filtering dialog to request a new filter be applied
98 #define GUI_MSG_FILTER_ITEMS          GUI_MSG_USER + 27
99 
100 // Message sent by search dialog to request a new search be applied
101 #define GUI_MSG_SEARCH_UPDATE         GUI_MSG_USER + 28
102 
103 // Message sent to tell the GUI to update a single item
104 #define GUI_MSG_UPDATE_ITEM           GUI_MSG_USER + 29
105 
106 // Flags for GUI_MSG_UPDATE_ITEM message
107 constexpr int GUI_MSG_FLAG_UPDATE_LIST = 0x00000001;
108 constexpr int GUI_MSG_FLAG_FORCE_UPDATE = 0x00000002;
109 
110 // Message sent to tell the GUI to change view mode
111 #define GUI_MSG_CHANGE_VIEW_MODE      GUI_MSG_USER + 30
112 
113 // Message sent to tell the GUI to change sort method/direction
114 #define GUI_MSG_CHANGE_SORT_METHOD    GUI_MSG_USER + 31
115 #define GUI_MSG_CHANGE_SORT_DIRECTION GUI_MSG_USER + 32
116 
117 // Sent from filesystem if a path is known to have changed
118 #define GUI_MSG_UPDATE_PATH           GUI_MSG_USER + 33
119 
120 // Sent to tell window to initiate a search dialog
121 #define GUI_MSG_SEARCH                GUI_MSG_USER + 34
122 
123 // Sent to the AddonSetting dialogs from addons if they updated a setting
124 #define GUI_MSG_SETTING_UPDATED       GUI_MSG_USER + 35
125 
126 // Message sent to CGUIWindowSlideshow to show picture
127 #define GUI_MSG_SHOW_PICTURE          GUI_MSG_USER + 36
128 
129 // Sent to CGUIWindowEventLog
130 #define GUI_MSG_EVENT_ADDED        GUI_MSG_USER + 39
131 #define GUI_MSG_EVENT_REMOVED      GUI_MSG_USER + 40
132 
133 // Send to RDS Radiotext handlers to inform about changed data
134 #define GUI_MSG_UPDATE_RADIOTEXT      GUI_MSG_USER + 41
135 
136 #define GUI_MSG_PLAYBACK_ERROR        GUI_MSG_USER + 42
137 #define GUI_MSG_PLAYBACK_AVCHANGE     GUI_MSG_USER + 43
138 #define GUI_MSG_PLAYBACK_AVSTARTED    GUI_MSG_USER + 44
139 
140 // Sent to notify system sleep/wake
141 #define GUI_MSG_SYSTEM_SLEEP GUI_MSG_USER + 45
142 #define GUI_MSG_SYSTEM_WAKE GUI_MSG_USER + 46
143