Gnash  0.8.10
Public Types | Public Member Functions
gnash::HostMessage Class Reference

Built-in forms of communication with the host application. More...

#include <HostInterface.h>

List of all members.

Public Types

enum  KnownEvent {
  SHOW_MOUSE, RESIZE_STAGE, UPDATE_STAGE, SHOW_MENU,
  SET_DISPLAYSTATE, SET_CLIPBOARD, SCREEN_RESOLUTION, SCREEN_DPI,
  PIXEL_ASPECT_RATIO, PLAYER_TYPE, SCREEN_COLOR, NOTIFY_ERROR,
  QUERY, EXTERNALINTERFACE_ISPLAYING, EXTERNALINTERFACE_PAN, EXTERNALINTERFACE_PLAY,
  EXTERNALINTERFACE_REWIND, EXTERNALINTERFACE_SETZOOMRECT, EXTERNALINTERFACE_STOPPLAY, EXTERNALINTERFACE_ZOOM
}
 The messages that a hosting application should handle. More...

Public Member Functions

 HostMessage (KnownEvent e, const boost::any &arg=boost::blank())
KnownEvent event () const
const boost::any & arg () const

Detailed Description

Built-in forms of communication with the host application.

These messages should be supported for ActionScript compatibility.


Member Enumeration Documentation

The messages that a hosting application should handle.

Enumerator:
SHOW_MOUSE 

Whether to display a mouse pointer

  • Argument type: bool
  • Effects: show mouse if true, hide if false
  • Return: boolean, true if the mouse was visible before
RESIZE_STAGE 

Resize the stage

  • Argument type: std::pair<int, int>(x, y)
  • Effects: resize stage to x pixels by y pixels
  • Return: none
UPDATE_STAGE 

Update the stage

  • Argument type: none
  • Effects: update the stage
  • Return: none
SHOW_MENU 

Whether to show the menu or not

  • Argument type: bool
  • Effects: show menu if true, hide if false
  • Return: none
    Todo:
    This is probably insufficient.
SET_DISPLAYSTATE 

Whether to show in fullscreen or not

SET_CLIPBOARD 

Set system clipboard

  • Argument type: std::string
  • Effects: set system clipboard
  • Return: none
SCREEN_RESOLUTION 

Get screen resolution

  • Argument type: none
  • Effects: get screen resolution
  • Return: std::pair<int, int>(x, y)
SCREEN_DPI 

Get screen DPI.

  • Argument type: none
  • Effects: get screen DPI
  • Return: double
PIXEL_ASPECT_RATIO 

Get pixel aspect ratio

  • Argument type: none
  • Effects: return pixel aspect ratio
  • Return: double
PLAYER_TYPE 

Get player type

  • Argument type: none
  • Effects: return "Plugin" or "StandAlone"
  • Return: std::string
SCREEN_COLOR 

Get screen color

  • Argument type: none
  • Effects: return "Color" or something else
  • Return: std::string
NOTIFY_ERROR 

Notify an error

  • Argument type: std::string
  • Effects: notify the user of an error
  • Return: none
QUERY 

Ask a question

  • Argument type: std::string
  • Effects: get the answer to a question
  • Return: bool
EXTERNALINTERFACE_ISPLAYING 
Todo:
check if the following types are appropriate.
EXTERNALINTERFACE_PAN 
EXTERNALINTERFACE_PLAY 
EXTERNALINTERFACE_REWIND 
EXTERNALINTERFACE_SETZOOMRECT 
EXTERNALINTERFACE_STOPPLAY 
EXTERNALINTERFACE_ZOOM 

Constructor & Destructor Documentation

gnash::HostMessage::HostMessage ( KnownEvent  e,
const boost::any &  arg = boost::blank() 
) [inline, explicit]

Member Function Documentation

const boost::any& gnash::HostMessage::arg ( ) const [inline]
KnownEvent gnash::HostMessage::event ( ) const [inline]

Referenced by gnash::operator<<().


The documentation for this class was generated from the following file: