galago-object.h File Reference
Galago Object API. More...
#include <libgalago/galago-types.h>
#include <libgalago/galago-context-base.h>
#include <libgalago/galago-signals.h>
Go to the source code of this file.
Class API | |
GalagoObjectClass * | galago_class_register (GalagoObjectClass *parent_class, const char *name, const char *dbus_iface, const GalagoObjectClassInfo *info) |
Registers a new type of class. | |
GalagoObjectClass * | galago_class_get_parent (const GalagoObjectClass *klass) |
Returns a class's parent class. | |
const char * | galago_class_get_name (const GalagoObjectClass *klass) |
Returns a class's name. | |
const char * | galago_class_get_dbus_iface (const GalagoObjectClass *klass) |
Returns the D-BUS interface of a class. | |
GalagoSignalContext * | galago_class_get_signal_context (const GalagoObjectClass *klass) |
Returns the signal context for a class. | |
Object API | |
void * | galago_object_new (GalagoObjectClass *klass) |
Creates an object. | |
void * | galago_object_ref (void *object) |
References an object. | |
void * | galago_object_unref (void *object) |
Unreferences an object. | |
GalagoObjectClass * | galago_object_get_class (const void *object) |
Returns the object's class. | |
void | galago_object_set_flags (void *object, unsigned long flags) |
Sets the flags for an object. | |
unsigned long | galago_object_get_flags (const void *object) |
Returns the flags for an object. | |
void | galago_object_set_dbus_path (void *object, const char *obj_path) |
Sets the D-BUS object path of an object. | |
const char * | galago_object_get_dbus_path (const void *object) |
Returns the D-BUS object path of an object. | |
void | galago_object_set_watch (void *object, galago_bool watch) |
Sets whether or not this object is watched for events. | |
galago_bool | galago_object_is_watched (const void *object) |
Returns whether or not an object is watched for events. | |
void | galago_object_set_data (void *object, const char *name, void *value) |
Sets custom data on an object. | |
void * | galago_object_get_data (const void *object, const char *name) |
Returns custom data from an object. | |
GalagoContext * | galago_object_get_context (const void *object) |
Returns the object's context. | |
GalagoObject * | galago_object_check_cast (const void *ptr, const GalagoObjectClass *klass) |
Casts the specified pointer to a GalagoObject, if the pointer is an object and matches the type specified. | |
Defines | |
#define | GALAGO_OBJECT_MAGIC 0xB00F |
#define | GALAGO_CLASS_MAGIC 0xB0B0 |
#define | GALAGO_IS_OBJECT(ptr) ((ptr) != NULL && ((GalagoObject *)(ptr))->magic == GALAGO_OBJECT_MAGIC) |
#define | GALAGO_IS_CLASS(ptr) ((ptr) != NULL && ((GalagoObjectClass *)(ptr))->magic == GALAGO_CLASS_MAGIC) |
#define | GALAGO_OBJECT(ptr) |
#define | GALAGO_OBJECT_CLASS(obj) (galago_object_get_class(obj)) |
#define | GALAGO_OBJECT_CAST(obj, klass, type) ((obj) == NULL ? NULL : (type *)galago_object_check_cast((obj), (klass))) |
#define | GALAGO_OBJECT_GET_FLAGS(obj) (galago_object_get_flags(obj)) |
#define | GALAGO_OBJECT_SET_FLAGS(obj, flags) galago_object_set_flags((obj), (flags)) |
#define | GALAGO_OBJECT_SET_FLAG(obj, flag) GALAGO_OBJECT_SET_FLAGS((obj), GALAGO_OBJECT_GET_FLAGS(obj) | (flag)) |
#define | GALAGO_OBJECT_UNSET_FLAG(obj, flag) GALAGO_OBJECT_SET_FLAGS((obj), GALAGO_OBJECT_GET_FLAGS(obj) & ~(flag)) |
#define | GALAGO_OBJECT_HAS_FLAG(obj, flag) ((GALAGO_OBJECT_GET_FLAGS(obj) & (flag)) == (flag)) |
Typedefs | |
typedef _GalagoObjectClass | GalagoObjectClass |
typedef _GalagoObjectClassInfo | GalagoObjectClassInfo |
typedef _GalagoObjectClassPrivate | GalagoObjectClassPrivate |
typedef _GalagoObject | GalagoObject |
typedef _GalagoObjectPrivate | GalagoObjectPrivate |
typedef void(* | GalagoObjectClassInitFunc )(GalagoObjectClass *klass) |
typedef void(* | GalagoObjectClassFinalizeFunc )(GalagoObjectClass *klass) |
typedef void(* | GalagoObjectInitFunc )(GalagoObject *object) |
Enumerations | |
enum | GalagoObjectFlags { GALAGO_FLAG_FINALIZING = 1 << 1 } |
enum | GalagoObjectClassFlags { GALAGO_FLAG_ABSTRACT = 1 << 1 } |
Detailed Description
Galago Object API.
- Copyright:
- (C) 2004-2005 Christian Hammond
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Definition in file galago-object.h.
Define Documentation
|
Value: ((ptr) == NULL ? NULL : \ (GALAGO_IS_OBJECT(ptr) ? (GalagoObject *)(ptr) : NULL)) Definition at line 113 of file galago-object.h. |
Enumeration Type Documentation
|
Definition at line 42 of file galago-object.h. |
|
Definition at line 36 of file galago-object.h. |
Function Documentation
|
Returns the D-BUS interface of a class.
|
|
Returns a class's name.
|
|
Returns a class's parent class.
|
|
Returns the signal context for a class.
|
|
Registers a new type of class.
|
|
Casts the specified pointer to a GalagoObject, if the pointer is an object and matches the type specified.
|
|
Returns the object's class.
|
|
Returns the object's context.
|
|
Returns custom data from an object.
|
|
Returns the D-BUS object path of an object.
|
|
Returns the flags for an object.
|
|
Returns whether or not an object is watched for events.
|
|
Creates an object.
|
|
References an object.
|
|
Sets custom data on an object.
|
|
Sets the D-BUS object path of an object.
|
|
Sets the flags for an object.
|
|
Sets whether or not this object is watched for events.
|
|
Unreferences an object.
|