Пример #1
0
 extern static double _GetTimestamp(PPResource buffer);
Пример #2
0
 extern static int _Connect(PPResource tcp_socket,
                            PPResource addr,
                            PPCompletionCallback callback);
Пример #3
0
 extern static PPResource _GetLocalAddress(PPResource tcp_socket);
Пример #4
0
 extern static PPBool _IsVisible(PPResource resource);
Пример #5
0
 /**
  * Determines if a given resource is a TCP socket.
  *
  * @param[in] resource A <code>PP_Resource</code> to check.
  *
  * @return <code>PP_TRUE</code> if the input is a
  * <code>PPB_TCPSocket</code> resource; <code>PP_FALSE</code> otherwise.
  */
 public static PPBool IsTCPSocket(PPResource resource)
 {
     return(_IsTCPSocket(resource));
 }
Пример #6
0
 extern static PPBool _GetRect(PPResource resource, out PPRect rect);
Пример #7
0
 extern static PPBool _IsFullscreen(PPResource resource);
Пример #8
0
 /**
  * ReleaseResource() removes a reference from a resource.
  *
  * @param[in] config A <code>PP_Resource</code> corresponding to a
  * resource.
  */
 public static void ReleaseResource(PPResource resource)
 {
     _ReleaseResource(resource);
 }
Пример #9
0
 /**
  * IsPageVisible() determines if the page that contains the module instance
  * is visible. The most common cause of invisible pages is that
  * the page is in a background tab in the browser.
  *
  * Most applications should use IsVisible() instead of this function since
  * the module instance could be scrolled off of a visible page, and this
  * function will still return true. However, depending on how your module
  * interacts with the page, there may be certain updates that you may want to
  * perform when the page is visible even if your specific module instance is
  * not visible.
  *
  * @param resource A <code>PP_Resource</code> corresponding to a
  * <code>PPB_View</code> resource.
  *
  * @return <code>PP_TRUE</code> if the instance is plausibly visible to the
  * user, <code>PP_FALSE</code> if it is definitely not visible.
  */
 public static PPBool IsPageVisible(PPResource resource)
 {
     return(_IsPageVisible(resource));
 }
Пример #10
0
 /**
  *
  * AddRefResource() adds a reference to a resource.
  *
  * @param[in] config A <code>PP_Resource</code> corresponding to a
  * resource.
  */
 public static void AddRefResource(PPResource resource)
 {
     _AddRefResource(resource);
 }
Пример #11
0
 extern static void _ReleaseResource(PPResource resource);
Пример #12
0
 extern static void _AddRefResource(PPResource resource);
Пример #13
0
 extern static void _SetTimestamp(PPResource buffer, double timestamp);
Пример #14
0
 /**
  * Gets the timestamp of the audio buffer.
  *
  * @param[in] buffer A <code>PP_Resource</code> corresponding to an audio
  * buffer resource.
  *
  * @return A <code>PP_TimeDelta</code> containing the timestamp of the audio
  * buffer. Given in seconds since the start of the containing audio stream.
  */
 public static double GetTimestamp(PPResource buffer)
 {
     return(_GetTimestamp(buffer));
 }
Пример #15
0
 extern static PPBool _IsView(PPResource resource);
Пример #16
0
 extern static PPBool _GetClipRect(PPResource resource, out PPRect clip);
Пример #17
0
 /**
  * IsView() determines if the given resource is a valid
  * <code>PPB_View</code> resource. Note that <code>PPB_ViewChanged</code>
  * resources derive from <code>PPB_View</code> and will return true here
  * as well.
  *
  * @param resource A <code>PP_Resource</code> corresponding to a
  * <code>PPB_View</code> resource.
  *
  * @return <code>PP_TRUE</code> if the given resource supports
  * <code>PPB_View</code> or <code>PP_FALSE</code> if it is an invalid
  * resource or is a resource of another type.
  */
 public static PPBool IsView(PPResource resource)
 {
     return(_IsView(resource));
 }
Пример #18
0
 /**
  * GetClipRect() returns the clip rectangle relative to the upper-left corner
  * of the module instance. This rectangle indicates the portions of the module
  * instance that are scrolled into view.
  *
  * If the module instance is scrolled off the view, the return value will be
  * (0, 0, 0, 0). This clip rectangle does <i>not</i> take into account page
  * visibility. Therefore, if the module instance is scrolled into view, but
  * the page itself is on a tab that is not visible, the return rectangle will
  * contain the visible rectangle as though the page were visible. Refer to
  * IsPageVisible() and IsVisible() if you want to account for page
  * visibility.
  *
  * Most applications will not need to worry about the clip rectangle. The
  * recommended behavior is to do full updates if the module instance is
  * visible, as determined by IsVisible(), and do no updates if it is not
  * visible.
  *
  * However, if the cost for computing pixels is very high for your
  * application, or the pages you're targeting frequently have very large
  * module instances with small visible portions, you may wish to optimize
  * further. In this case, the clip rectangle will tell you which parts of
  * the module to update.
  *
  * Note that painting of the page and sending of view changed updates
  * happens asynchronously. This means when the user scrolls, for example,
  * it is likely that the previous backing store of the module instance will
  * be used for the first paint, and will be updated later when your
  * application generates new content with the new clip. This may cause
  * flickering at the boundaries when scrolling. If you do choose to do
  * partial updates, you may want to think about what color the invisible
  * portions of your backing store contain (be it transparent or some
  * background color) or to paint a certain region outside the clip to reduce
  * the visual distraction when this happens.
  *
  * @param resource A <code>PP_Resource</code> corresponding to a
  * <code>PPB_View</code> resource.
  *
  * @param clip Output argument receiving the clip rect on success.
  *
  * @return Returns <code>PP_TRUE</code> if the resource was valid and the
  * clip rect was filled in, <code>PP_FALSE</code> if not.
  */
 public static PPBool GetClipRect(PPResource resource, out PPRect clip)
 {
     return(_GetClipRect(resource, out clip));
 }
Пример #19
0
 /**
  * GetRect() retrieves the rectangle of the module instance associated
  * with a view changed notification relative to the upper-left of the browser
  * viewport. This position changes when the page is scrolled.
  *
  * The returned rectangle may not be inside the visible portion of the
  * viewport if the module instance is scrolled off the page. Therefore, the
  * position may be negative or larger than the size of the page. The size will
  * always reflect the size of the module were it to be scrolled entirely into
  * view.
  *
  * In general, most modules will not need to worry about the position of the
  * module instance in the viewport, and only need to use the size.
  *
  * @param resource A <code>PP_Resource</code> corresponding to a
  * <code>PPB_View</code> resource.
  *
  * @param rect A <code>PP_Rect</code> receiving the rectangle on success.
  *
  * @return Returns <code>PP_TRUE</code> if the resource was valid and the
  * viewport rectangle was filled in, <code>PP_FALSE</code> if not.
  */
 public static PPBool GetRect(PPResource resource, out PPRect rect)
 {
     return(_GetRect(resource, out rect));
 }
Пример #20
0
 extern static float _GetDeviceScale(PPResource resource);
Пример #21
0
 /**
  * IsFullscreen() returns whether the instance is currently
  * displaying in fullscreen mode.
  *
  * @param resource A <code>PP_Resource</code> corresponding to a
  * <code>PPB_View</code> resource.
  *
  * @return <code>PP_TRUE</code> if the instance is in full screen mode,
  * or <code>PP_FALSE</code> if it's not or the resource is invalid.
  */
 public static PPBool IsFullscreen(PPResource resource)
 {
     return(_IsFullscreen(resource));
 }
Пример #22
0
 extern static float _GetCSSScale(PPResource resource);
Пример #23
0
 public View(PPResource viewResource) : base(viewResource)
 {
 }
Пример #24
0
 /**
  * GetCSSScale returns the scale factor between DIPs and CSS pixels. This
  * allows proper scaling between DIPs - as sent via the Pepper API - and CSS
  * pixel coordinates used for Web content.
  *
  * @param[in] resource A <code>PP_Resource</code> corresponding to a
  * <code>PPB_View</code> resource.
  *
  * @return css_scale A <code>float</code> value representing the number of
  * DIPs per CSS pixel. If the resource is invalid, the value will be 0.0.
  */
 public static float GetCSSScale(PPResource resource)
 {
     return(_GetCSSScale(resource));
 }
Пример #25
0
 /**
  * Binds the socket to the given address. The socket must not be bound.
  *
  * @param[in] tcp_socket A <code>PP_Resource</code> corresponding to a TCP
  * socket.
  * @param[in] addr A <code>PPB_NetAddress</code> resource.
  * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon
  * completion.
  *
  * @return An int32_t containing an error code from <code>pp_errors.h</code>,
  * including (but not limited to):
  * - <code>PP_ERROR_ADDRESS_IN_USE</code>: the address is already in use.
  * - <code>PP_ERROR_ADDRESS_INVALID</code>: the address is invalid.
  */
 public static int Bind(PPResource tcp_socket,
                        PPResource addr,
                        PPCompletionCallback callback)
 {
     return(_Bind(tcp_socket, addr, callback));
 }
Пример #26
0
 extern static PPBool _GetScrollOffset(PPResource resource,
                                       out PPPoint offset);
Пример #27
0
 /**
  * Connects the socket to the given address. The socket must not be listening.
  * Binding the socket beforehand is optional.
  *
  * @param[in] tcp_socket A <code>PP_Resource</code> corresponding to a TCP
  * socket.
  * @param[in] addr A <code>PPB_NetAddress</code> resource.
  * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon
  * completion.
  *
  * @return An int32_t containing an error code from <code>pp_errors.h</code>,
  * including (but not limited to):
  * - <code>PP_ERROR_NOACCESS</code>: the caller doesn't have required
  *   permissions.
  * - <code>PP_ERROR_ADDRESS_UNREACHABLE</code>: <code>addr</code> is
  *   unreachable.
  * - <code>PP_ERROR_CONNECTION_REFUSED</code>: the connection attempt was
  *   refused.
  * - <code>PP_ERROR_CONNECTION_FAILED</code>: the connection attempt failed.
  * - <code>PP_ERROR_CONNECTION_TIMEDOUT</code>: the connection attempt timed
  *   out.
  *
  * Since version 1.1, if the socket is listening/connected or has a pending
  * listen/connect request, <code>Connect()</code> will fail without starting a
  * connection attempt; otherwise, any failure during the connection attempt
  * will cause the socket to be closed.
  */
 public static int Connect(PPResource tcp_socket,
                           PPResource addr,
                           PPCompletionCallback callback)
 {
     return(_Connect(tcp_socket, addr, callback));
 }
Пример #28
0
 /**
  * GetScrollOffset returns the scroll offset of the window containing the
  * plugin.
  *
  * @param[in] resource A <code>PP_Resource</code> corresponding to a
  * <code>PPB_View</code> resource.
  *
  * @param[out] offset A <code>PP_Point</code> which will be set to the value
  * of the scroll offset in CSS pixels.
  *
  * @return Returns <code>PP_TRUE</code> if the resource was valid and the
  * offset was filled in, <code>PP_FALSE</code> if not.
  */
 public static PPBool GetScrollOffset(PPResource resource,
                                      out PPPoint offset)
 {
     return(_GetScrollOffset(resource, out offset));
 }
Пример #29
0
 /**
  * Gets the local address of the socket, if it is bound.
  *
  * @param[in] tcp_socket A <code>PP_Resource</code> corresponding to a TCP
  * socket.
  *
  * @return A <code>PPB_NetAddress</code> resource on success or 0 on failure.
  */
 public static PPResource GetLocalAddress(PPResource tcp_socket)
 {
     return(_GetLocalAddress(tcp_socket));
 }
Пример #30
0
 /**
  * Determines if a resource is an AudioBuffer resource.
  *
  * @param[in] resource The <code>PP_Resource</code> to test.
  *
  * @return A <code>PP_Bool</code> with <code>PP_TRUE</code> if the given
  * resource is an AudioBuffer resource or <code>PP_FALSE</code> otherwise.
  */
 public static PPBool IsAudioBuffer(PPResource resource)
 {
     return(_IsAudioBuffer(resource));
 }