Commit 0f26b26f authored by Robert Ancell's avatar Robert Ancell Committed by Ryan Lortie

Gdk: add an experimental backend for mir

This is disabled by default.  Enable with --enable-mir-backend.

This backend is a combined work of Robert Ancell and Ryan Lortie.
parent 4e66cca5
......@@ -33,11 +33,11 @@ MAINTAINERCLEANFILES = \
## Copy .pc files to target-specific names
gtk+-x11-3.0.pc gtk+-win32-3.0.pc gtk+-quartz-3.0.pc gtk+-broadway-3.0.pc gtk+-wayland-3.0.pc: gtk+-3.0.pc
gtk+-x11-3.0.pc gtk+-win32-3.0.pc gtk+-quartz-3.0.pc gtk+-broadway-3.0.pc gtk+-wayland-3.0.pc gtk+-mir-3.0.pc: gtk+-3.0.pc
rm -f $@ && \
cp gtk+-3.0.pc $@
gdk-x11-3.0.pc gdk-win32-3.0.pc gdk-quartz-3.0.pc gdk-broadway-3.0.pc gdk-wayland-3.0.pc: gdk-3.0.pc
gdk-x11-3.0.pc gdk-win32-3.0.pc gdk-quartz-3.0.pc gdk-broadway-3.0.pc gdk-wayland-3.0.pc gdk-mir-3.0.pc: gdk-3.0.pc
rm -f $@ && \
cp gdk-3.0.pc $@
......@@ -59,12 +59,14 @@ DISTCLEANFILES = \
gtk+-quartz-3.0.pc \
gtk+-broadway-3.0.pc \
gtk+-wayland-3.0.pc \
gtk+-mir-3.0.pc \
gdk-3.0.pc \
gdk-x11-3.0.pc \
gdk-win32-3.0.pc \
gdk-quartz-3.0.pc \
gdk-broadway-3.0.pc \
gdk-wayland-3.0.pc \
gdk-mir-3.0.pc \
gail-3.0.pc \
config.lt
......
......@@ -330,6 +330,10 @@ AC_ARG_ENABLE(wayland-backend,
[AS_HELP_STRING([--enable-wayland-backend],
[enable the wayland gdk backend])],
[backend_set=yes])
AC_ARG_ENABLE(mir-backend,
[AS_HELP_STRING([--enable-mir-backend],
[enable the Mir gdk backend])],
[backend_set=yes])
if test -z "$backend_set"; then
if test "$platform_win32" = yes; then
......@@ -337,6 +341,7 @@ if test -z "$backend_set"; then
else
enable_x11_backend=yes
enable_wayland_backend=maybe
enable_mir_backend=no
fi
fi
......@@ -459,6 +464,30 @@ else
AM_CONDITIONAL(USE_WAYLAND, false)
fi
MIR_DEPENDENCIES="mirclient"
if test "$enable_mir_backend" = "maybe" ; then
PKG_CHECK_EXISTS($MIR_DEPENDENCIES, [have_mir_deps=yes], [have_mir_deps=no])
AC_MSG_CHECKING([for MIR_DEPENDENCIES])
if test "$have_mir_deps" = "no" ; then
enable_mir_backend=no
else
enable_mir_backend=yes
fi
AC_MSG_RESULT($enable_mir_backend)
fi
if test "$enable_mir_backend" = "yes"; then
cairo_backends="$cairo_backends cairo"
GDK_BACKENDS="$GDK_BACKENDS mir"
GDK_WINDOWING="$GDK_WINDOWING
#define GDK_WINDOWING_MIR"
MIR_PACKAGES="$MIR_DEPENDENCIES"
AM_CONDITIONAL(USE_MIR, true)
else
AM_CONDITIONAL(USE_MIR, false)
fi
# strip leading space
GDK_BACKENDS=${GDK_BACKENDS#* }
......@@ -1328,7 +1357,7 @@ CFLAGS="$saved_cflags"
LDFLAGS="$saved_ldflags"
GDK_PACKAGES="$PANGO_PACKAGES gdk-pixbuf-2.0 >= gdk_pixbuf_required_version cairo >= cairo_required_version cairo-gobject >= cairo_required_version"
GDK_PRIVATE_PACKAGES="$GDK_GIO_PACKAGE $X_PACKAGES $WAYLAND_PACKAGES $cairo_backends epoxy >= epoxy_required_version"
GDK_PRIVATE_PACKAGES="$GDK_GIO_PACKAGE $X_PACKAGES $WAYLAND_PACKAGES $MIR_PACKAGES $cairo_backends epoxy >= epoxy_required_version"
if test "x$enable_x11_backend" = xyes; then
GDK_PRIVATE_PACKAGES="$GDK_PRIVATE_PACKAGES pangoft2"
fi
......@@ -1365,7 +1394,7 @@ fi
PKG_CHECK_MODULES(ATK, $ATK_PACKAGES)
GTK_PACKAGES="atk >= atk_required_version cairo >= cairo_required_version cairo-gobject >= cairo_required_version gdk-pixbuf-2.0 >= gdk_pixbuf_required_version gio-2.0 >= glib_required_version"
GTK_PRIVATE_PACKAGES="$ATK_PACKAGES"
GTK_PRIVATE_PACKAGES="$ATK_PACKAGES $WAYLAND_PACKAGES $MIR_PACKAGES"
if test "x$enable_x11_backend" = xyes; then
GTK_PRIVATE_PACKAGES="$GTK_PRIVATE_PACKAGES pangoft2"
fi
......@@ -1915,6 +1944,7 @@ gdk/win32/rc/Makefile
gdk/win32/rc/gdk.rc
gdk/quartz/Makefile
gdk/wayland/Makefile
gdk/mir/Makefile
gdk/gdkversionmacros.h
gtk/Makefile
gtk/makefile.msc
......
......@@ -146,6 +146,7 @@ content_files = \
osx.sgml \
broadway.xml \
wayland.xml \
mir.xml \
question_index.sgml \
resources.sgml \
text_widget.sgml \
......
......@@ -407,6 +407,11 @@ How to compile GTK+ itself
<arg choice="plain">--disable-wayland-backend</arg>
</group>
<sbr/>
<group>
<arg choice="plain">--enable-mir-backend</arg>
<arg choice="plain">--disable-mir-backend</arg>
</group>
<sbr/>
<group>
<arg choice="plain">--enable-introspection=[no/auto/yes]</arg>
</group>
......@@ -608,8 +613,10 @@ How to compile GTK+ itself
<systemitem>--disable-quartz-backend</systemitem>,
<systemitem>--enable-broadway-backend</systemitem>,
<systemitem>--disable-broadway-backend</systemitem>,
<systemitem>--enable-wayland-backend</systemitem>, and
<systemitem>--disable-wayland-backend</systemitem></title>
<systemitem>--enable-wayland-backend</systemitem>,
<systemitem>--disable-wayland-backend</systemitem>
<systemitem>--enable-mir-backend</systemitem>, and
<systemitem>--disable-mir-backend</systemitem></title>
<para>
Enables specific backends for GDK. If none of these options
......
......@@ -416,6 +416,7 @@
<xi:include href="osx.sgml" />
<xi:include href="broadway.xml" />
<xi:include href="wayland.xml" />
<xi:include href="mir.xml" />
</part>
<xi:include href="glossary.xml" />
......
<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
]>
<refentry id="gtk-mir">
<refmeta>
<refentrytitle>Using GTK+ with Mir</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GTK Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>Using GTK+ with Mir</refname>
<refpurpose>
Mir-specific aspects of using GTK+
</refpurpose>
</refnamediv>
<refsect1>
<title>Using GTK+ with Mir</title>
<para>
The GDK Mir backend provides support for running GTK+ applications
under Mir based display servers. To run your application in this way,
select the Mir backend by setting <literal>GDK_BACKEND=mir</literal>.
</para>
<para>
Currently, the Mir backend does not use any additional commandline
options or environment variables.
</para>
</refsect1>
</refentry>
......@@ -491,6 +491,11 @@ nevertheless.
<listitem><para>Selects the Wayland backend for connecting to Wayland display servers</para></listitem>
</varlistentry>
<varlistentry>
<term>mir</term>
<listitem><para>Selects the Mir backend for connecting to Mir display servers</para></listitem>
</varlistentry>
</variablelist>
Since 3.10, this environment variable can contain a comma-separated list
of backend names, which are tried in order. The list may also contain
......
......@@ -13,7 +13,7 @@ INTROSPECTION_COMPILER_ARGS = \
SUBDIRS = $(GDK_BACKENDS) .
DIST_SUBDIRS = win32 x11 quartz broadway wayland
DIST_SUBDIRS = win32 x11 quartz broadway wayland mir
CLEANFILES =
......@@ -205,6 +205,10 @@ if USE_WAYLAND
libgdk_3_la_LIBADD += wayland/libgdk-wayland.la
endif
if USE_MIR
libgdk_3_la_LIBADD += mir/libgdk-mir.la
endif
if HAVE_INTROSPECTION
introspection_files = \
......
......@@ -60,6 +60,10 @@
#include "wayland/gdkprivate-wayland.h"
#endif
#ifdef GDK_WINDOWING_MIR
#include "mir/gdkmir-private.h"
#endif
/**
* SECTION:gdkdisplaymanager
* @Short_description: Maintains a list of all open GdkDisplays
......@@ -272,6 +276,9 @@ static GdkBackend gdk_backends[] = {
#ifdef GDK_WINDOWING_WAYLAND
{ "wayland", _gdk_wayland_display_open },
#endif
#ifdef GDK_WINDOWING_MIR
{ "mir", _gdk_mir_display_open },
#endif
#ifdef GDK_WINDOWING_BROADWAY
{ "broadway", _gdk_broadway_display_open },
#endif
......
## Process this file with automake to produce Makefile.in
include $(top_srcdir)/Makefile.decl
libgdkincludedir = $(includedir)/gtk-3.0/gdk
libgdkmirincludedir = $(includedir)/gtk-3.0/gdk/mir
AM_CPPFLAGS = \
-DG_LOG_DOMAIN=\"Gdk\" \
-DGDK_COMPILATION \
-I$(top_srcdir) \
-I$(top_srcdir)/gdk \
-I$(top_builddir)/gdk \
$(GDK_HIDDEN_VISIBILITY_CFLAGS) \
$(GTK_DEBUG_FLAGS) \
$(GDK_DEP_CFLAGS)
LDADDS = $(GDK_DEP_LIBS)
noinst_LTLIBRARIES = \
libgdk-mir.la
libgdk_mir_la_SOURCES = \
gdkmircursor.c \
gdkmirdevicemanager.c \
gdkmirdisplay.c \
gdkmireventsource.c \
gdkmirkeyboard.c \
gdkmirkeymap.c \
gdkmirpointer.c \
gdkmirscreen.c \
gdkmirwindow.c \
gdkmirwindowimpl.c \
gdkmir-debug.c \
gdkmir.h
libgdkinclude_HEADERS = \
gdkmir.h
-include $(top_srcdir)/git.mk
/*
* Copyright © 2014 Canonical Ltd
*
* 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/>.
*/
#include "gdkmir-private.h"
void
_gdk_mir_print_modifiers (unsigned int modifiers)
{
g_printerr (" Modifiers");
if ((modifiers & mir_key_modifier_alt) != 0)
g_printerr (" alt");
if ((modifiers & mir_key_modifier_alt_left) != 0)
g_printerr (" alt-left");
if ((modifiers & mir_key_modifier_alt_right) != 0)
g_printerr (" alt-right");
if ((modifiers & mir_key_modifier_shift) != 0)
g_printerr (" shift");
if ((modifiers & mir_key_modifier_shift_left) != 0)
g_printerr (" shift-left");
if ((modifiers & mir_key_modifier_shift_right) != 0)
g_printerr (" shift-right");
if ((modifiers & mir_key_modifier_sym) != 0)
g_printerr (" sym");
if ((modifiers & mir_key_modifier_function) != 0)
g_printerr (" function");
if ((modifiers & mir_key_modifier_ctrl) != 0)
g_printerr (" ctrl");
if ((modifiers & mir_key_modifier_ctrl_left) != 0)
g_printerr (" ctrl-left");
if ((modifiers & mir_key_modifier_ctrl_right) != 0)
g_printerr (" ctrl-right");
if ((modifiers & mir_key_modifier_meta) != 0)
g_printerr (" meta");
if ((modifiers & mir_key_modifier_meta_left) != 0)
g_printerr (" meta-left");
if ((modifiers & mir_key_modifier_meta_right) != 0)
g_printerr (" meta-right");
if ((modifiers & mir_key_modifier_caps_lock) != 0)
g_printerr (" caps-lock");
if ((modifiers & mir_key_modifier_num_lock) != 0)
g_printerr (" num-lock");
if ((modifiers & mir_key_modifier_scroll_lock) != 0)
g_printerr (" scroll-lock");
g_printerr ("\n");
}
void
_gdk_mir_print_key_event (const MirKeyEvent *event)
{
g_printerr ("KEY\n");
g_printerr (" Device %i\n", event->device_id);
g_printerr (" Source %i\n", event->source_id);
g_printerr (" Action ");
switch (event->action)
{
case mir_key_action_down:
g_printerr ("down");
break;
case mir_key_action_up:
g_printerr ("up");
break;
case mir_key_action_multiple:
g_printerr ("multiple");
break;
default:
g_printerr ("%u", event->action);
break;
}
g_printerr ("\n");
g_printerr (" Flags");
if ((event->flags & mir_key_flag_woke_here) != 0)
g_printerr (" woke-here");
if ((event->flags & mir_key_flag_soft_keyboard) != 0)
g_printerr (" soft-keyboard");
if ((event->flags & mir_key_flag_keep_touch_mode) != 0)
g_printerr (" keep-touch-mode");
if ((event->flags & mir_key_flag_from_system) != 0)
g_printerr (" from-system");
if ((event->flags & mir_key_flag_editor_action) != 0)
g_printerr (" editor-action");
if ((event->flags & mir_key_flag_canceled) != 0)
g_printerr (" canceled");
if ((event->flags & mir_key_flag_virtual_hard_key) != 0)
g_printerr (" virtual-hard-key");
if ((event->flags & mir_key_flag_long_press) != 0)
g_printerr (" long-press");
if ((event->flags & mir_key_flag_canceled_long_press) != 0)
g_printerr (" canceled-long-press");
if ((event->flags & mir_key_flag_tracking) != 0)
g_printerr (" tracking");
if ((event->flags & mir_key_flag_fallback) != 0)
g_printerr (" fallback");
g_printerr ("\n");
_gdk_mir_print_modifiers (event->modifiers);
g_printerr (" Key Code %i\n", event->key_code);
g_printerr (" Scan Code %i\n", event->scan_code);
g_printerr (" Repeat Count %i\n", event->repeat_count);
g_printerr (" Down Time %lli\n", (long long int) event->down_time);
g_printerr (" Event Time %lli\n", (long long int) event->event_time);
g_printerr (" Is System Key %s\n", event->is_system_key ? "true" : "false");
}
void
_gdk_mir_print_motion_event (const MirMotionEvent *event)
{
size_t i;
g_printerr ("MOTION\n");
g_printerr (" Device %i\n", event->device_id);
g_printerr (" Source %i\n", event->source_id);
g_printerr (" Action ");
switch (event->action)
{
case mir_motion_action_down:
g_printerr ("down");
break;
case mir_motion_action_up:
g_printerr ("up");
break;
case mir_motion_action_move:
g_printerr ("move");
break;
case mir_motion_action_cancel:
g_printerr ("cancel");
break;
case mir_motion_action_outside:
g_printerr ("outside");
break;
case mir_motion_action_pointer_down:
g_printerr ("pointer-down");
break;
case mir_motion_action_pointer_up:
g_printerr ("pointer-up");
break;
case mir_motion_action_hover_move:
g_printerr ("hover-move");
break;
case mir_motion_action_scroll:
g_printerr ("scroll");
break;
case mir_motion_action_hover_enter:
g_printerr ("hover-enter");
break;
case mir_motion_action_hover_exit:
g_printerr ("hover-exit");
break;
default:
g_printerr ("%u", event->action);
}
g_printerr ("\n");
g_printerr (" Flags");
switch (event->flags)
{
case mir_motion_flag_window_is_obscured:
g_printerr (" window-is-obscured");
break;
}
g_printerr ("\n");
_gdk_mir_print_modifiers (event->modifiers);
g_printerr (" Edge Flags %i\n", event->edge_flags);
g_printerr (" Button State");
switch (event->button_state)
{
case mir_motion_button_primary:
g_printerr (" primary");
break;
case mir_motion_button_secondary:
g_printerr (" secondary");
break;
case mir_motion_button_tertiary:
g_printerr (" tertiary");
break;
case mir_motion_button_back:
g_printerr (" back");
break;
case mir_motion_button_forward:
g_printerr (" forward");
break;
}
g_printerr ("\n");
g_printerr (" Offset (%f, %f)\n", event->x_offset, event->y_offset);
g_printerr (" Precision (%f, %f)\n", event->x_precision, event->y_precision);
g_printerr (" Down Time %lli\n", (long long int) event->down_time);
g_printerr (" Event Time %lli\n", (long long int) event->event_time);
g_printerr (" Pointer Coordinates\n");
for (i = 0; i < event->pointer_count; i++)
{
g_printerr (" ID=%i location=(%f, %f) raw=(%f, %f) touch=(%f, %f) size=%f pressure=%f orientation=%f scroll=(%f, %f) tool=",
event->pointer_coordinates[i].id,
event->pointer_coordinates[i].x, event->pointer_coordinates[i].y,
event->pointer_coordinates[i].raw_x, event->pointer_coordinates[i].raw_y,
event->pointer_coordinates[i].touch_major, event->pointer_coordinates[i].touch_minor,
event->pointer_coordinates[i].size,
event->pointer_coordinates[i].pressure,
event->pointer_coordinates[i].orientation,
event->pointer_coordinates[i].hscroll, event->pointer_coordinates[i].vscroll);
switch (event->pointer_coordinates[i].tool_type)
{
case mir_motion_tool_type_unknown:
g_printerr ("unknown");
break;
case mir_motion_tool_type_finger:
g_printerr ("finger");
break;
case mir_motion_tool_type_stylus:
g_printerr ("stylus");
break;
case mir_motion_tool_type_mouse:
g_printerr ("mouse");
break;
case mir_motion_tool_type_eraser:
g_printerr ("eraser");
break;
default:
g_printerr ("%u", event->pointer_coordinates[i].tool_type);
break;
}
g_printerr ("\n");
}
}
void
_gdk_mir_print_surface_event (const MirSurfaceEvent *event)
{
g_printerr ("SURFACE\n");
g_printerr (" Surface %i\n", event->id);
g_printerr (" Attribute ");
switch (event->attrib)
{
case mir_surface_attrib_type:
g_printerr ("type");
break;
case mir_surface_attrib_state:
g_printerr ("state");
break;
case mir_surface_attrib_swapinterval:
g_printerr ("swapinterval");
break;
case mir_surface_attrib_focus:
g_printerr ("focus");
break;
default:
g_printerr ("%u", event->attrib);
break;
}
g_printerr ("\n");
g_printerr (" Value %i\n", event->value);
}
void
_gdk_mir_print_resize_event (const MirResizeEvent *event)
{
g_printerr ("RESIZE\n");
g_printerr (" Surface %i\n", event->surface_id);
g_printerr (" Size (%i, %i)\n", event->width, event->height);
}
void
_gdk_mir_print_event (const MirEvent *event)
{
switch (event->type)
{
case mir_event_type_key:
_gdk_mir_print_key_event (&event->key);
break;
case mir_event_type_motion:
_gdk_mir_print_motion_event (&event->motion);
break;
case mir_event_type_surface:
_gdk_mir_print_surface_event (&event->surface);
break;
case mir_event_type_resize:
_gdk_mir_print_resize_event (&event->resize);
break;
default:
g_printerr ("EVENT %u\n", event->type);
break;
}
}
/*
* Copyright © 2014 Canonical Ltd
*
* 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 __GDK_PRIVATE_MIR_H__
#define __GDK_PRIVATE_MIR_H__
#include "gdkmir.h"
#include "gdkdisplay.h"
#include "gdkscreen.h"
#include "gdkdevicemanager.h"
#include "gdkkeys.h"
#include "gdkwindowimpl.h"
typedef struct _GdkMirWindowImpl GdkMirWindowImpl;
typedef struct _GdkMirWindowReference GdkMirWindowReference;
typedef struct _GdkMirEventSource GdkMirEventSource;
#define GDK_TYPE_MIR_WINDOW_IMPL (gdk_mir_window_impl_get_type ())
#define GDK_MIR_WINDOW_IMPL(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_MIR_WINDOW_IMPL, GdkMirWindowImpl))
#define GDK_IS_WINDOW_IMPL_MIR(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_MIR_WINDOW_IMPL))
GType gdk_mir_window_impl_get_type (void);
GdkDisplay *_gdk_mir_display_open (const gchar *display_name);
GdkScreen *_gdk_mir_screen_new (GdkDisplay *display);
GdkDeviceManager *_gdk_mir_device_manager_new (GdkDisplay *display);
GdkDevice *_gdk_mir_device_manager_get_keyboard (GdkDeviceManager *device_manager);
GdkKeymap *_gdk_mir_keymap_new (void);
GdkDevice *_gdk_mir_keyboard_new (GdkDeviceManager *device_manager, const gchar *name);
GdkDevice *_gdk_mir_pointer_new (GdkDeviceManager *device_manager, const gchar *name);
void _gdk_mir_pointer_set_location (GdkDevice *pointer, gdouble x, gdouble y, GdkWindow *window, GdkModifierType mask);
GdkCursor *_gdk_mir_cursor_new (GdkDisplay *display, GdkCursorType type);
GdkWindowImpl *_gdk_mir_window_impl_new (void);
void _gdk_mir_window_impl_set_surface_state (GdkMirWindowImpl *impl, MirSurfaceState state);
void _gdk_mir_window_impl_set_cursor_state (GdkMirWindowImpl *impl, gdouble x, gdouble y, gboolean cursor_inside, MirMotionButton button_state);
void _gdk_mir_window_impl_get_cursor_state (GdkMirWindowImpl *impl, gdouble *x, gdouble *y, gboolean *cursor_inside, MirMotionButton *button_state);
GdkMirEventSource *_gdk_mir_display_get_event_source (GdkDisplay *display);
GdkMirEventSource *_gdk_mir_event_source_new (GdkDisplay *display);
GdkMirWindowReference *_gdk_mir_event_source_get_window_reference (GdkWindow *window);
void _gdk_mir_window_reference_unref (GdkMirWindowReference *ref);
void _gdk_mir_event_source_queue (GdkMirWindowReference *window_ref, const MirEvent *event);
void _gdk_mir_print_modifiers (unsigned int modifiers);
void _gdk_mir_print_key_event (const MirKeyEvent *event);
void _gdk_mir_print_motion_event (const MirMotionEvent *event);
void _gdk_mir_print_surface_event (const MirSurfaceEvent *event);
void _gdk_mir_print_resize_event (const MirResizeEvent *event);
void _gdk_mir_print_event (const MirEvent *event);
#endif /* __GDK_PRIVATE_MIR_H__ */
/*
* Copyright © 2014 Canonical Ltd
*
* 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 __GDK_MIR_H__
#define __GDK_MIR_H__
#include <gdk/gdk.h>
#include <mir_toolkit/mir_client_library.h>
#define GDK_TYPE_MIR_DISPLAY (gdk_mir_display_get_type ())
#define GDK_IS_MIR_DISPLAY(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_MIR_DISPLAY))
#define GDK_TYPE_MIR_WINDOW (gdk_mir_window_get_type ())
#define GDK_IS_WINDOW_MIR(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_WINDOW_MIR))
GDK_AVAILABLE_IN_3_10
GType gdk_mir_display_get_type (void);
GDK_AVAILABLE_IN_3_10
struct MirConnection *gdk_mir_display_get_mir_connection (GdkDisplay *display);
GDK_AVAILABLE_IN_3_10
GType gdk_mir_window_get_type (void);
#endif /* __GDK_MIR_H__ */
/*
* Copyright © 2014 Canonical Ltd
*
* 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/>.
*/
#include "config.h"
#include "gdkcursorprivate.h"
#include "gdkmir.h"
#include "gdkmir-private.h"
typedef struct GdkMirCursor GdkMirCursor;
typedef struct GdkMirCursorClass GdkMirCursorClass;
#define GDK_TYPE_MIR_CURSOR (gdk_mir_cursor_get_type ())
#define GDK_MIR_CURSOR(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_MIR_CURSOR, GdkMirCursor))
#define GDK_MIR_CURSOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_MIR_CURSOR, GdkMirCursorClass))
#define GDK_IS_MIR_CURSOR(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_MIR_CURSOR))
#define GDK_IS_MIR_CURSOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_MIR_CURSOR))
#define GDK_MIR_CURSOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_MIR_CURSOR, GdkMirCursorClass))
struct GdkMirCursor
{
GdkCursor parent_instance;
};
struct GdkMirCursorClass
{
GdkCursorClass parent_class;
};