Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
|
#include "guilib/WindowIDs.h"
#include "messaging/ThreadMessage.h"
#include "threads/Thread.h"
#include <map>
#include <memory>
#include <queue>
#include <string>
#include <vector>
Classes | |
struct | KODI::MESSAGING::ThreadMessageCallback |
class | KODI::MESSAGING::CApplicationMessenger |
This implements a simple message dispatcher/router for Kodi. More... | |
Namespaces | |
namespace | KODI |
namespace | KODI::MESSAGING |
#define TMSG_ACTIVATESCREENSAVER TMSG_MASK_APPLICATION + 8 |
#define TMSG_CALLBACK 800 |
#define TMSG_CECACTIVATESOURCE TMSG_MASK_PERIPHERALS + 2 |
#define TMSG_CECSTANDBY TMSG_MASK_PERIPHERALS + 3 |
#define TMSG_CECTOGGLESTATE TMSG_MASK_PERIPHERALS + 1 |
#define TMSG_DISPLAY_DESTROY TMSG_MASK_APPLICATION + 13 |
#define TMSG_DISPLAY_SETUP TMSG_MASK_APPLICATION + 12 |
#define TMSG_EVENT TMSG_MASK_APPLICATION + 33 |
#define TMSG_EXECUTE_BUILT_IN TMSG_MASK_APPLICATION + 23 |
#define TMSG_EXECUTE_OS TMSG_MASK_APPLICATION + 24 |
#define TMSG_EXECUTE_SCRIPT TMSG_MASK_APPLICATION + 22 |
#define TMSG_GUI_ACTION TMSG_MASK_WINDOWMANAGER + 5 |
#define TMSG_GUI_ACTIVATE_WINDOW TMSG_MASK_WINDOWMANAGER + 2 |
#define TMSG_GUI_ADDON_DIALOG TMSG_MASK_WINDOWMANAGER + 6 |
#define TMSG_GUI_DIALOG_OK TMSG_MASK_WINDOWMANAGER + 9 |
#define TMSG_GUI_DIALOG_OPEN TMSG_MASK_WINDOWMANAGER + 1 |
#define TMSG_GUI_DIALOG_YESNO TMSG_MASK_WINDOWMANAGER + 8 |
Message sent through CApplicationMessenger to open a yes/no dialog box.
There's two ways to send this message, a short and concise way and a more flexible way allowing more customization.
Option 1: CApplicationMessenger::Get().SendMsg(TMSG_GUI_DIALOG_YESNO, 123, 456); 123: This is the string id for the heading 456: This is the string id for the text
Option 2: HELPERS::DialogYesNoMessage options. Fill in options CApplicationMessenger::Get().SendMsg(TMSG_GUI_DIALOG_YESNO, -1, -1, static_cast<void*>(&options));
#define TMSG_GUI_INFOBOOL TMSG_MASK_GUIINFOMANAGER + 1 |
#define TMSG_GUI_INFOLABEL TMSG_MASK_GUIINFOMANAGER + 0 |
#define TMSG_GUI_MESSAGE TMSG_MASK_WINDOWMANAGER + 7 |
#define TMSG_GUI_PREVIOUS_WINDOW TMSG_MASK_WINDOWMANAGER + 10 |
Message sent through CApplicationMessenger to go back to the previous window.
This is an alternative to TMSG_GUI_ACTIVATE_WINDOW, but it keeps all configured parameters, like startup directory.
#define TMSG_GUI_PYTHON_DIALOG TMSG_MASK_WINDOWMANAGER + 3 |
#define TMSG_GUI_WINDOW_CLOSE TMSG_MASK_WINDOWMANAGER + 4 |
#define TMSG_HIBERNATE TMSG_MASK_APPLICATION + 3 |
#define TMSG_INHIBITIDLESHUTDOWN TMSG_MASK_APPLICATION + 20 |
#define TMSG_INHIBITSCREENSAVER TMSG_MASK_APPLICATION + 29 |
#define TMSG_LOADPROFILE TMSG_MASK_APPLICATION + 27 |
#define TMSG_MASK_APPLICATION (1<<30) |
#define TMSG_MASK_GUIINFOMANAGER (1<<28) |
#define TMSG_MASK_MESSAGE 0xFFFF0000 |
#define TMSG_MASK_PERIPHERALS (1<<26) |
#define TMSG_MASK_PLAYLISTPLAYER (1<<29) |
#define TMSG_MASK_WINDOWMANAGER (1<<27) |
#define TMSG_MEDIA_PAUSE TMSG_MASK_PLAYLISTPLAYER + 14 |
#define TMSG_MEDIA_PAUSE_IF_PLAYING TMSG_MASK_PLAYLISTPLAYER + 17 |
#define TMSG_MEDIA_PLAY TMSG_MASK_PLAYLISTPLAYER + 12 |
#define TMSG_MEDIA_RESTART TMSG_MASK_PLAYLISTPLAYER + 15 |
#define TMSG_MEDIA_SEEK_TIME TMSG_MASK_PLAYLISTPLAYER + 18 |
#define TMSG_MEDIA_STOP TMSG_MASK_PLAYLISTPLAYER + 13 |
#define TMSG_MEDIA_UNPAUSE TMSG_MASK_PLAYLISTPLAYER + 16 |
#define TMSG_MINIMIZE TMSG_MASK_APPLICATION + 16 |
#define TMSG_MOVETOSCREEN TMSG_MASK_APPLICATION + 34 |
#define TMSG_NETWORKMESSAGE TMSG_MASK_APPLICATION + 9 |
#define TMSG_PICTURE_SHOW TMSG_MASK_APPLICATION + 25 |
#define TMSG_PICTURE_SLIDESHOW TMSG_MASK_APPLICATION + 26 |
#define TMSG_PLAYLISTPLAYER_ADD TMSG_MASK_PLAYLISTPLAYER + 3 |
#define TMSG_PLAYLISTPLAYER_CLEAR TMSG_MASK_PLAYLISTPLAYER + 4 |
#define TMSG_PLAYLISTPLAYER_GET_ITEMS TMSG_MASK_PLAYLISTPLAYER + 6 |
#define TMSG_PLAYLISTPLAYER_INSERT TMSG_MASK_PLAYLISTPLAYER + 8 |
#define TMSG_PLAYLISTPLAYER_NEXT TMSG_MASK_PLAYLISTPLAYER + 1 |
#define TMSG_PLAYLISTPLAYER_PLAY TMSG_MASK_PLAYLISTPLAYER + 0 |
#define TMSG_PLAYLISTPLAYER_PLAY_ITEM_ID TMSG_MASK_PLAYLISTPLAYER + 7 |
#define TMSG_PLAYLISTPLAYER_PREV TMSG_MASK_PLAYLISTPLAYER + 2 |
#define TMSG_PLAYLISTPLAYER_REMOVE TMSG_MASK_PLAYLISTPLAYER + 9 |
#define TMSG_PLAYLISTPLAYER_REPEAT TMSG_MASK_PLAYLISTPLAYER + 11 |
#define TMSG_PLAYLISTPLAYER_SHUFFLE TMSG_MASK_PLAYLISTPLAYER + 5 |
#define TMSG_PLAYLISTPLAYER_SWAP TMSG_MASK_PLAYLISTPLAYER + 10 |
#define TMSG_POWERDOWN TMSG_MASK_APPLICATION + 1 |
#define TMSG_QUIT TMSG_MASK_APPLICATION + 2 |
#define TMSG_RENDERER_FLUSH TMSG_MASK_APPLICATION + 19 |
#define TMSG_RENDERER_PREINIT TMSG_MASK_APPLICATION + 31 |
#define TMSG_RENDERER_UNINIT TMSG_MASK_APPLICATION + 32 |
#define TMSG_RESET TMSG_MASK_APPLICATION + 6 |
#define TMSG_RESETSCREENSAVER TMSG_MASK_APPLICATION + 10 |
#define TMSG_RESTART TMSG_MASK_APPLICATION + 5 |
#define TMSG_RESTARTAPP TMSG_MASK_APPLICATION + 7 |
#define TMSG_SET_MUTE TMSG_MASK_APPLICATION + 37 |
#define TMSG_SET_VOLUME TMSG_MASK_APPLICATION + 36 |
#define TMSG_SETLANGUAGE TMSG_MASK_APPLICATION + 18 |
#define TMSG_SETVIDEORESOLUTION TMSG_MASK_APPLICATION + 14 |
#define TMSG_SHUTDOWN TMSG_MASK_APPLICATION + 0 |
#define TMSG_START_ANDROID_ACTIVITY TMSG_MASK_APPLICATION + 21 |
#define TMSG_SUSPEND TMSG_MASK_APPLICATION + 4 |
#define TMSG_SWITCHTOFULLSCREEN TMSG_MASK_APPLICATION + 15 |
#define TMSG_SYSTEM_POWERDOWN TMSG_MASK_APPLICATION + 30 |
#define TMSG_TOGGLEFULLSCREEN TMSG_MASK_APPLICATION + 17 |
#define TMSG_UPDATE_CURRENT_ITEM TMSG_MASK_GUIINFOMANAGER + 2 |
#define TMSG_UPDATE_PLAYER_ITEM TMSG_MASK_APPLICATION + 35 |
Called from the player when its current item is updated.
#define TMSG_VIDEORESIZE TMSG_MASK_APPLICATION + 28 |
#define TMSG_VOLUME_SHOW TMSG_MASK_APPLICATION + 11 |