예제 #1
0
파일: spi_main.c 프로젝트: GNOME/at-spi
void
cspi_object_return (Accessible *accessible)
{
  int old_ref_count;
  g_return_if_fail (accessible != NULL);

  if (!accessible->on_loan ||
      accessible->ref_count == 1)
    {
      cspi_object_unref (accessible);
    }
  else /* Convert to a permanant ref */
    {
      accessible->on_loan = FALSE;
      old_ref_count = accessible->ref_count;
      accessible->objref = cspi_dup_ref (accessible->objref);
      if (old_ref_count != accessible->ref_count &&
          accessible->ref_count == 1)
        {
            cspi_object_unref (accessible);
        }
      else    
        {
          accessible->ref_count--;
        }
    }
}
예제 #2
0
/**
 * SPI_freeDesktopList:
 * @desktop_list: a pointer to an array of #Accessible objects
 * as returned from @SPI_getDesktopList
 * 
 * This routine frees the memory associated with the list.
 **/
void
SPI_freeDesktopList (Accessible **desktop_list)
{
  Accessible **p;
  
  for (p = desktop_list; p && *p; p++)
    {
      cspi_object_unref (*p);
    }
  g_free (desktop_list);
}
예제 #3
0
파일: spi_main.c 프로젝트: GNOME/at-spi
Accessible *
cspi_object_take (CORBA_Object corba_object)
{
  Accessible *accessible;
  accessible = cspi_object_borrow (corba_object);

  cspi_object_ref (accessible);
  /* 
   * if the remote object is dead, 
   * cspi_object_return will throw an exception. 
   * FIXME: what clears that exception context ever ?
   */
  cspi_object_return (accessible);
  if (cspi_exception ()) 
    {
      cspi_object_unref (accessible);
      accessible = NULL;
    }
  return accessible;
}
예제 #4
0
void
AccessibleMatchRule_unref (AccessibleMatchRule *obj)
{
  cspi_object_unref (obj);
}
/**
 * AccessibleStreamableContent_unref:
 * @obj: a pointer to the #AccessibleStreamableContent implementor
 *       on which to operate. 
 *
 * Decrement the reference count for an #AccessibleStreamableContent object.
 *
 * @Since: AT-SPI 1.4
 **/
void
AccessibleStreamableContent_unref (AccessibleStreamableContent *obj)
{
  cspi_object_unref (obj);
}
/**
 * AccessibleHypertext_unref:
 * @obj: a pointer to the #AccessibleHypertext object on which to operate.
 *
 * Decrement the reference count for an #AccessibleHypertext object.
 *       Since AccessibleHypertext is derived from AccessibleText,
 *       this is the same as AccessibleText_unref().
 **/
void
AccessibleHypertext_unref (AccessibleHypertext *obj)
{
  cspi_object_unref (obj);
}
예제 #7
0
/**
 * AccessibleHyperlink_unref:
 * @obj: a pointer to the #AccessibleHyperlink object on which to operate.
 *
 * Decrement the reference count for an #AccessibleHyperlink object.
 **/
void
AccessibleHyperlink_unref (AccessibleHyperlink *obj)
{
  cspi_object_unref (obj);
}
/**
 * AccessibleAction_unref:
 * @obj: a pointer to the #AccessibleAction on which to operate.
 *
 * Decrement the reference count for an #AccessibleAction.
 **/
void
AccessibleAction_unref (AccessibleAction *obj)
{
  cspi_object_unref (obj);
}
/**
 * AccessibleImage_unref:
 * @obj: a pointer to the #AccessibleImage implementor on which to operate.
 *
 * Decrement the reference count for an #AccessibleImage object.
 **/
void
AccessibleImage_unref (AccessibleImage *obj)
{
  cspi_object_unref (obj);
}
예제 #10
0
파일: spi_table.c 프로젝트: GNOME/at-spi
/**
 * AccessibleTable_unref:
 * @obj: a pointer to the #AccessibleTable implementor on which to operate.
 *
 * Decrement the reference count for an #AccessibleTable object.
 **/
void
AccessibleTable_unref (AccessibleTable *obj)
{
  cspi_object_unref (obj);
}