Panda3D
Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions

WindowHandle Class Reference

This object represents a window on the desktop, not necessarily a Panda window. More...

#include "windowHandle.h"

Inheritance diagram for WindowHandle:
TypedReferenceCount TypedObject ReferenceCount MemoryBase MemoryBase NativeWindowHandle

List of all members.

Classes

class  OSHandle

Public Member Functions

 WindowHandle (OSHandle *os_handle)
 WindowHandle (const WindowHandle &copy)
virtual void attach_child (WindowHandle *child)
 Called on a parent handle to indicate a child window's intention to attach itself.
virtual void detach_child (WindowHandle *child)
 Called on a parent handle to indicate a child window's intention to detach itself.
virtual TypeHandle force_init_type ()
size_t get_int_handle () const
 Returns the OS-specific handle converted to an integer, if this is possible for the particular representation.
OSHandleget_os_handle () const
 Returns the OS-specific handle stored internally to the WindowHandle wrapper.
virtual TypeHandle get_type () const
void output (ostream &out) const
virtual void receive_windows_message (unsigned int msg, int wparam, int lparam)
 Called on a child handle to deliver a keyboard button event generated in the parent window.
virtual void request_keyboard_focus (WindowHandle *child)
 Called on a parent handle to indicate a child window's wish to receive keyboard button events.
void send_windows_message (unsigned int msg, int wparam, int lparam)
 Call this method on a parent WindowHandle to deliver a Windows message to the current child window, if any.
void set_os_handle (OSHandle *os_handle)
 Changes the OS-specific handle stored internally to the WindowHandle wrapper.

Static Public Member Functions

static TypeHandle get_class_type ()
static void init_type ()
 This function is declared non-inline to work around a compiler bug in g++ 2.96.

Protected Member Functions

 PT (OSHandle) _os_handle
 PT (WindowHandle) _keyboard_window

Detailed Description

This object represents a window on the desktop, not necessarily a Panda window.

This structure can be assigned to a WindowProperties to indicate a parent window.

It also has callbacks so the Panda window can communicate with its parent window, which is particularly important when running embedded in a browser.

To create a WindowHandle, you would usually call one of the NativeWindowHandle::make_*() methods, depending on the kind of native window handle object you already have.

Definition at line 40 of file windowHandle.h.


Member Function Documentation

void WindowHandle::attach_child ( WindowHandle child) [virtual]

Called on a parent handle to indicate a child window's intention to attach itself.

Definition at line 81 of file windowHandle.cxx.

void WindowHandle::detach_child ( WindowHandle child) [virtual]

Called on a parent handle to indicate a child window's intention to detach itself.

Definition at line 91 of file windowHandle.cxx.

size_t WindowHandle::get_int_handle ( ) const

Returns the OS-specific handle converted to an integer, if this is possible for the particular representation.

Returns 0 if it is not.

Definition at line 53 of file windowHandle.cxx.

WindowHandle::OSHandle * WindowHandle::get_os_handle ( ) const [inline]

Returns the OS-specific handle stored internally to the WindowHandle wrapper.

Definition at line 41 of file windowHandle.I.

Referenced by x11GraphicsWindow::open_window(), and eglGraphicsWindow::open_window().

static void WindowHandle::init_type ( ) [inline, static]

This function is declared non-inline to work around a compiler bug in g++ 2.96.

Making it inline seems to cause problems in the optimizer.

Reimplemented from TypedReferenceCount.

Reimplemented in NativeWindowHandle.

Definition at line 105 of file windowHandle.h.

References TypedReferenceCount::init_type().

Referenced by NativeWindowHandle::init_type().

void WindowHandle::receive_windows_message ( unsigned int  msg,
int  wparam,
int  lparam 
) [virtual]

Called on a child handle to deliver a keyboard button event generated in the parent window.

Definition at line 115 of file windowHandle.cxx.

void WindowHandle::request_keyboard_focus ( WindowHandle child) [virtual]

Called on a parent handle to indicate a child window's wish to receive keyboard button events.

Definition at line 104 of file windowHandle.cxx.

void WindowHandle::send_windows_message ( unsigned int  msg,
int  wparam,
int  lparam 
)

Call this method on a parent WindowHandle to deliver a Windows message to the current child window, if any.

This is used in the web plugin system to deliver button events detected directly by the browser system into Panda, which is particularly necessary on Vista.

Definition at line 39 of file windowHandle.cxx.

void WindowHandle::set_os_handle ( OSHandle os_handle) [inline]

Changes the OS-specific handle stored internally to the WindowHandle wrapper.

Definition at line 52 of file windowHandle.I.


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations