mirror of
https://github.com/brl/mutter.git
synced 2024-12-25 20:32:16 +00:00
95a41e177a
Instead of driving event dispatching through a per winsys poll_dispatch vfunc its now possible to associate a check and dispatch function with each file descriptor that is registered for polling. This means we can remove the winsys get_dispatch_timeout and poll_dispatch vfuncs and it also makes it easier for more orthogonal internal components to add file descriptors for polling to the mainloop. Reviewed-by: Neil Roberts <neil@linux.intel.com> (cherry picked from commit 627947622df36dd529b9dc60a3ae9e6083532b19)
55 lines
1.7 KiB
C
55 lines
1.7 KiB
C
/*
|
|
* Cogl
|
|
*
|
|
* An object oriented GL/GLES Abstraction/Utility Layer
|
|
*
|
|
* Copyright (C) 2013 Intel Corporation.
|
|
*
|
|
* This library is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
* License as published by the Free Software Foundation; either
|
|
* version 2 of the License, or (at your option) any later version.
|
|
*
|
|
* 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, see
|
|
* <http://www.gnu.org/licenses/>.
|
|
*
|
|
*
|
|
*/
|
|
|
|
#ifndef __COGL_POLL_PRIVATE_H__
|
|
#define __COGL_POLL_PRIVATE_H__
|
|
|
|
#include "cogl-poll.h"
|
|
#include "cogl-renderer.h"
|
|
#include "cogl-closure-list-private.h"
|
|
|
|
void
|
|
_cogl_poll_renderer_remove_fd (CoglRenderer *renderer, int fd);
|
|
|
|
typedef CoglBool (*CoglPollCheckCallback) (void *user_data);
|
|
typedef void (*CoglPollDispatchCallback) (void *user_data);
|
|
|
|
void
|
|
_cogl_poll_renderer_add_fd (CoglRenderer *renderer,
|
|
int fd,
|
|
CoglPollFDEvent events,
|
|
CoglPollCheckCallback check,
|
|
CoglPollDispatchCallback dispatch,
|
|
void *user_data);
|
|
|
|
typedef void (*CoglIdleCallback) (void *user_data);
|
|
|
|
CoglClosure *
|
|
_cogl_poll_renderer_add_idle (CoglRenderer *renderer,
|
|
CoglIdleCallback idle_cb,
|
|
void *user_data,
|
|
CoglUserDataDestroyCallback destroy_cb);
|
|
|
|
#endif /* __COGL_POLL_PRIVATE_H__ */
|