1object Prima::Component( Prima::Object) 2{ 3 void *sysData; # system-dependent data, defined by apc 4 char *name; 5 ApiHandle handle; # apc handle 6 7 property Bool eventFlag; 8 property SV * delegations; 9 property SV * name; 10 property Handle owner; 11 12 method UV add_notification( char * name, SV * subroutine, Handle referer = NULL_HANDLE, int index = -1); 13 method void attach( Handle objectHandle); 14 method Handle bring( char * componentName); 15 method Bool can_event(); 16 method void cleanup(); 17 method void clear_event(); 18 method void done(); 19 method void detach( Handle objectHandle, Bool kill); 20 method void event_error(); 21 c_only Handle first_that_component( void * actionProc, void * params); 22 public void get_components(); 23 method SV * get_handle(); 24 public void get_notification( char * name, int index); 25 c_only void handle_event ( PEvent event); 26 method void init( HV * profile); 27 method int is_owner( Handle objectHandle); 28 c_only Bool message( PEvent event); 29 c_only Bool migrate( Handle attachTo); 30 import SV * notification_types(); 31 public Bool notify( char * format, ...); 32 method Bool pop_event(); 33 method void post_message( SV * info1, SV * info2); 34 import SV * profile_default(); 35 method void push_event(); 36 c_only void recreate(); 37 method void remove_notification( UV id); 38 method void set( HV * profile); 39 method void setup(); 40 public void set_notification( char * name, SV * subroutine); 41 method void unlink_notifier( Handle referer); 42 c_only void update_sys_handle( HV * profile); 43 c_only Bool validate_owner( Handle * newOwner, HV * profile); 44# internal variables 45 char * evStack; 46 int evPtr; 47 int evLimit; 48 PList postList; 49 PList components; 50 PList evQueue; 51 PList refs; 52 PList events; 53 PHash eventIDs; 54 int eventIDCount; 55} 56