The Photon Library Reference accompanies the Photon Development
System and is intended for application developers.
It describes the data types, structures, and functions that are defined in
the Photon API.
In general, the Photon libraries aren't thread-safe.
In a multithreaded program, only the thread that called
PtInit() is
allowed to call Photon functions. The only exception is
PtPulseDeliver() - you can use it in other threads to send
notifications to the Photon thread.
To use the datatypes and functions in an application:
If you're using the Photon Application Builder (PhAB), the
appropriate header files are automatically included in your
application.
If you aren't using PhAB but your application uses widgets,
include <Pt.h>.
If you aren't using PhAB or widgets, include <Ph.h>.
The widget is created as a child of the default parent, which is usually
the most recently created container.
To change the default parent, call
PtSetParentWidget().
The root of the widget family is created as a child of the default parent,
which is usually the most recently created container.
To change the default parent, call
PtSetParentWidget().
Don't call PgSetClipping() in a widget's draw function;
use PtClipAdd()
and PtClipRemove()
instead. For more information, see the Building Custom Widgets
guide.
A shared memory object will persist until no other applications
refer to it. Don't use the same name for another shared memory
object, especially right after detaching the first one.
The description of the image_tag member has been expanded.
Ph_RELEASE_IMAGE_ALL is a new flag that indicates that
the image data, palette data, transparency mask bitmap, and the
ghosting bitmap are all to be freed.
The mask_bpl member doesn't need to be a multiple of 4.
The leftmost pixel of the image corresponds to the top bit of the first
byte in the transparency and ghost masks.
You can add more than one function for a set of signals or set of
intersecting signals.
All handlers for a signal are called, but the order they're called in
is unspecified.
It's safe to call PtBkgdHandlerProcess() in callbacks, work
procedures, and input procedures, but
not in a widget's Draw method or a PtRaw widget's
drawing function.
This function returns 0 if at least one of the given resources
was applied to the widget. It returns -1 if
the widget wasn't modified because it doesn't contain the given
resources or the values of the resources were the same as those
already stored in the widget.
A return code of 0 doesn't necessarily mean that all the resources
were successfully set. The only way to be sure that a resource was set
is to set it, then get it and compare the values.