File: testlib.h

package info (click to toggle)
phosh 0.51.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 9,620 kB
  • sloc: ansic: 81,727; xml: 3,903; python: 502; sh: 456; makefile: 34; lisp: 22; javascript: 6
file content (42 lines) | stat: -rw-r--r-- 1,834 bytes parent folder | download | duplicates (2)
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
31
32
33
34
35
36
37
38
39
40
41
42
/*
 * Copyright (C) 2020 Purism SPC
 *
 * SPDX-License-Identifier: GPL-3.0-or-later
 *
 * Author: Guido Günther <agx@sigxcpu.org>
 */

#include "phosh-wayland.h"
#include "monitor/monitor.h"

#include <gtk/gtk.h>

#include <linux/input-event-codes.h>

#pragma once

G_BEGIN_DECLS

typedef struct _PhoshTestCompositorState {
  GPid                        pid;
  PhoshWayland               *wl;
  GdkDisplay                 *gdk_display;
  PhoshMonitor               *monitor;
} PhoshTestCompositorState;

PhoshTestCompositorState *phosh_test_compositor_new (gboolean heads_stub);
void                      phosh_test_compositor_free (PhoshTestCompositorState *state);
PhoshMonitor*             phosh_test_get_monitor (PhoshTestCompositorState *state);
struct zwp_virtual_keyboard_v1 * phosh_test_keyboard_new (PhoshWayland *wl);
void                      phosh_test_keyboard_press_keys (struct zwp_virtual_keyboard_v1 *keyboard,
                                                          GTimer *timer, ...) G_GNUC_NULL_TERMINATED;
void                      phosh_test_keyboard_press_modifiers   (struct zwp_virtual_keyboard_v1 *keyboard,
                                                                 guint                           modifiers);
void                      phosh_test_keyboard_release_modifiers (struct zwp_virtual_keyboard_v1 *keyboard);
void                      phosh_test_keyboard_press_timeout (struct zwp_virtual_keyboard_v1 *keyboard,
                                                             GTimer                         *timer,
                                                             guint                           key,
                                                             guint                           sleep);
void                      phosh_test_remove_tree (GFile *file);

G_END_DECLS