summaryrefslogtreecommitdiff
path: root/gjs/mainloop.h
blob: 9ab78a70cefce91a09e0cf33f28a20382feb2e4d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */
/*
 * SPDX-License-Identifier: MIT OR LGPL-2.0-or-later
 * SPDX-FileCopyrightText: 2021 Evan Welsh <contact@evanwelsh.com>
 */

#ifndef GJS_MAINLOOP_H_
#define GJS_MAINLOOP_H_

#include <config.h>
#include <js/TypeDecls.h>

#include "gjs/context.h"

namespace Gjs {
class MainLoop {
    uint32_t m_refcount;

 public:
    MainLoop();

    void ref();

    bool unref();

    void spin(GjsContext* context);
};
};  // namespace Gjs

#endif  // GJS_MAINLOOP_H_