~vanvugt/mir/pageflip-timings

« back to all changes in this revision

Viewing changes to src/include/server/mir/glib_main_loop.h

  • Committer: Tarmac
  • Author(s): Alexandros Frantzis
  • Date: 2014-11-10 21:41:12 UTC
  • mfrom: (2026.1.8 glib-main-loop-fd)
  • Revision ID: tarmac-20141110214112-8mryou6qc4gy3lld
server: Add fd support to GLibMainLoop.

Approved by Alan Griffiths, PS Jenkins bot, Alberto Aguirre.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
#define MIR_GLIB_MAIN_LOOP_H_
21
21
 
22
22
#include "mir/main_loop.h"
 
23
#include "mir/glib_main_loop_sources.h"
23
24
 
24
25
#include <atomic>
25
26
 
55
56
        std::initializer_list<int> signals,
56
57
        std::function<void(int)> const& handler);
57
58
 
 
59
    void register_fd_handler(
 
60
        std::initializer_list<int> fds,
 
61
        void const* owner,
 
62
        std::function<void(int)> const& handler);
 
63
 
 
64
    void unregister_fd_handler(void const* owner);
 
65
 
58
66
    void enqueue(void const* owner, ServerAction const& action);
59
67
 
60
68
private:
61
69
    detail::GMainContextHandle const main_context;
62
70
    std::atomic<bool> running;
 
71
    detail::FdSources fd_sources;
63
72
};
64
73
 
65
74
}