Protect against NULL pointer dereference
[platform/upstream/atk.git] / atk / atkutil.c
old mode 100755 (executable)
new mode 100644 (file)
index f57e2fa..af95944
@@ -20,7 +20,7 @@
 #include "config.h"
 
 #include "atkutil.h"
-#include "atkmarshal.c"
+#include "atkmarshal.h"
 
 /**
  * SECTION:atkutil
@@ -92,7 +92,7 @@ struct _FocusTracker {
 };
 
 /**
- * atk_focus_tracker_init:
+ * atk_focus_tracker_init: (skip)
  * @init: Function to be called for focus tracker initialization
  *
  * Specifies the function to be called for focus tracker initialization.
@@ -100,9 +100,8 @@ struct _FocusTracker {
  * ATK interface if any specific work needs to be done to enable
  * focus tracking.
  *
- * Deprecated: This method is deprecated since ATK version
- * 2.9.4. Focus tracking has been dropped as a feature to be
- * implemented by ATK itself.
+ * Deprecated: 2.9.4: Focus tracking has been dropped as a feature
+ * to be implemented by ATK itself.
  *
  **/
 void
@@ -113,17 +112,16 @@ atk_focus_tracker_init (AtkEventListenerInit    init)
 }
 
 /**
- * atk_add_focus_tracker:
+ * atk_add_focus_tracker: (skip)
  * @focus_tracker: Function to be added to the list of functions to be called
  * when an object receives focus.
  *
  * Adds the specified function to the list of functions to be called
  * when an object receives focus.
  *
- * Deprecated: This method is deprecated since ATK version
- * 2.9.4. Focus tracking has been dropped as a feature to be
- * implemented by ATK itself. If you need focus tracking on your
- * implementation, subscribe to the state-changed:focused signal.
+ * Deprecated: 2.9.4: Focus tracking has been dropped as a feature
+ * to be implemented by ATK itself. If you need focus tracking on your
+ * implementation, subscribe to the #AtkObject::state-change "focused" signal.
  *
  * Returns: added focus tracker id, or 0 on failure.
  **/
@@ -160,14 +158,14 @@ atk_add_focus_tracker (AtkEventListener   focus_tracker)
  * atk_remove_focus_tracker:
  * @tracker_id: the id of the focus tracker to remove
  *
- * Deprecated: This method is deprecated since ATK version
- * 2.9.4. Focus tracking has been dropped as a feature to be
- * implemented by ATK itself. If you need focus tracking on your
- * implementation, subscribe to the state-changed:focused signal.
- *
  * Removes the specified focus tracker from the list of functions
  * to be called when any object receives focus.
- **/
+ *
+ * Deprecated: 2.9.4: Focus tracking has been dropped as a feature
+ *   to be implemented by ATK itself. If you need focus tracking on your
+ *   implementation, subscribe to the #AtkObject::state-change "focused"
+ *   signal.
+ */
 void
 atk_remove_focus_tracker (guint            tracker_id)
 {
@@ -198,13 +196,11 @@ atk_remove_focus_tracker (guint            tracker_id)
  * Cause the focus tracker functions which have been specified to be
  * executed for the object.
  *
- * Deprecated: This method is deprecated since ATK version
- * 2.9.4. Focus tracking has been dropped as a feature to be
- * implemented by ATK itself. As #AtkObject::focus-event was
+ * Deprecated: 2.9.4: Focus tracking has been dropped as a feature
+ * to be implemented by ATK itself. As #AtkObject::focus-event was
  * deprecated in favor of a #AtkObject::state-change signal, in order
  * to notify a focus change on your implementation, you can use
  * atk_object_notify_state_change() instead.
- *
  **/
 void
 atk_focus_tracker_notify (AtkObject       *object)
@@ -349,7 +345,7 @@ atk_util_real_remove_global_event_listener (guint remove_listener)
 
 
 /**
- * atk_add_global_event_listener:
+ * atk_add_global_event_listener: (skip)
  * @listener: the listener to notify
  * @event_type: the type of event for which notification is requested
  *
@@ -435,7 +431,7 @@ atk_remove_global_event_listener (guint listener_id)
 }
 
 /**
- * atk_add_key_event_listener:
+ * atk_add_key_event_listener: (skip)
  * @listener: the listener to notify
  * @data: a #gpointer that points to a block of data that should be sent to the registered listeners,
  *        along with the event notification, when it occurs.  
@@ -477,7 +473,7 @@ atk_remove_key_event_listener (guint listener_id)
 {
   AtkUtilClass *klass = g_type_class_peek (ATK_TYPE_UTIL);
 
-  if (klass->remove_key_event_listener)
+  if (klass && klass->remove_key_event_listener)
     klass->remove_key_event_listener (listener_id);
 }