~ubuntu-branches/ubuntu/precise/clutter-1.0/precise

« back to all changes in this revision

Viewing changes to clutter/clutter-event.c

  • Committer: Bazaar Package Importer
  • Author(s): Emilio Pozuelo Monfort
  • Date: 2010-03-21 13:27:56 UTC
  • mto: (2.1.3 experimental) (1.3.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 8.
  • Revision ID: james.westby@ubuntu.com-20100321132756-nf8yd30yxo3zzwcm
Tags: upstream-1.2.2
ImportĀ upstreamĀ versionĀ 1.2.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 * Lesser General Public License for more details.
19
19
 *
20
20
 * You should have received a copy of the GNU Lesser General Public
21
 
 * License along with this library; if not, write to the
22
 
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23
 
 * Boston, MA 02111-1307, USA.
 
21
 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
 
22
 *
 
23
 *
24
24
 */
25
25
 
26
26
#ifdef HAVE_CONFIG_H
766
766
}
767
767
 
768
768
/**
769
 
 * clutter_input_device_get_device_type:
770
 
 * @device: a #ClutterInputDevice
771
 
 *
772
 
 * Retrieves the type of @device
773
 
 *
774
 
 * Return value: the type of the device
775
 
 *
776
 
 * Since: 1.0
777
 
 */
778
 
ClutterInputDeviceType
779
 
clutter_input_device_get_device_type (ClutterInputDevice *device)
780
 
{
781
 
  g_return_val_if_fail (device != NULL, CLUTTER_POINTER_DEVICE);
782
 
 
783
 
  return device->device_type;
784
 
}
785
 
 
786
 
/**
787
 
 * clutter_input_device_get_device_id:
788
 
 * @device: a #ClutterInputDevice
789
 
 *
790
 
 * Retrieves the unique identifier of @device
791
 
 *
792
 
 * Return value: the identifier of the device
793
 
 *
794
 
 * Since: 1.0
795
 
 */
796
 
gint
797
 
clutter_input_device_get_device_id (ClutterInputDevice *device)
798
 
{
799
 
  g_return_val_if_fail (device != NULL, -1);
800
 
 
801
 
  return device->id;
 
769
 * clutter_get_current_event:
 
770
 *
 
771
 * If an event is currently being processed, return that event.
 
772
 * This function is intended to be used to access event state
 
773
 * that might not be exposed by higher-level widgets.  For
 
774
 * example, to get the key modifier state from a Button 'clicked'
 
775
 * event.
 
776
 *
 
777
 * Return value: (transfer none): The current ClutterEvent, or %NULL if none
 
778
 *
 
779
 * Since: 1.2
 
780
 */
 
781
G_CONST_RETURN ClutterEvent *
 
782
clutter_get_current_event (void)
 
783
{
 
784
  ClutterMainContext *context = _clutter_context_get_default ();
 
785
 
 
786
  g_return_val_if_fail (context != NULL, NULL);
 
787
 
 
788
  return context->current_event;
802
789
}