Commit cb5039a3 authored by Felipe Borges's avatar Felipe Borges 👣

frdp-display: Introduce FrdpDisplay

FrdpDisplay is inspired on VncDisplay.

It is going to be the primary public API.
parent ccbcc18a
/* frdp-display.c
*
* Copyright (C) 2018 Felipe Borges <felipeborges@gnome.org>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "frdp-display.h"
G_DEFINE_TYPE (FrdpDisplay, frdp_display, GTK_TYPE_DRAWING_AREA)
GtkWidget *frdp_display_new (void)
{
return GTK_WIDGET (g_object_new (FRDP_TYPE_DISPLAY, NULL));
}
static void
frdp_display_class_init (FrdpDisplayClass *klass)
{
}
static void
frdp_display_init (FrdpDisplay *self)
{
}
/* frdp-display.h
*
* Copyright (C) 2018 Felipe Borges <felipeborges@gnome.org>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include <gtk/gtk.h>
G_BEGIN_DECLS
#define FRDP_TYPE_DISPLAY (frdp_display_get_type())
G_DECLARE_FINAL_TYPE (FrdpDisplay, frdp_display, FRDP_DISPLAY, DISPLAY, GtkDrawingArea)
struct _FrdpDisplay
{
GtkDrawingArea parent;
};
GtkWidget *frdp_display_new (void);
G_END_DECLS
......@@ -19,6 +19,7 @@
#ifndef GTK_FRDP_H
#define GTK_FRDP_H
#include <frdp-display.h>
#include <gtk/gtk.h>
#include <glib.h>
......
api_version = '0.1'
gtk_frdp_sources = [
'frdp-display.c',
]
gtk_frdp_headers = [
'frdp-display.h',
'gtk-frdp.h',
]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment