Create basic GObject structure for GraphView

This commit is contained in:
2020-04-02 00:32:11 +02:00
parent 850ae7db43
commit 7323fd15e8
4 changed files with 139 additions and 8 deletions

View File

@@ -1,6 +1,56 @@
#include <gtk-graph-view.h>
/*
* This file is part of GtkGraphView.
*
* Foobar is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* GtkGraphView 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 GtkGraphView. If not, see <https://www.gnu.org/licenses/>.
*/
int test()
#include <gtk-graph-view.h>
#include <epoxy/gl.h>
struct _GtkGraphView {
GtkGLArea parent;
};
typedef struct {
int i; /**< @note This is just a dummy. Remove! */
} GtkGraphViewPrivate;
G_DEFINE_TYPE_WITH_PRIVATE(GtkGraphView, gtk_graph_view, GTK_TYPE_GL_AREA)
/**
* @brief Init class structure of GtkGraphView
* @param klass Class structure
*/
static void gtk_graph_view_class_init(GtkGraphViewClass *klass)
{
return 1;
(void)klass;
return;
}
/**
* @brief Init a new GtkGraphView GObject
* @param obj Object to initialize
*/
static void gtk_graph_view_init(GtkGraphView *obj)
{
GtkGraphViewPrivate *priv;
priv = gtk_graph_view_get_instance_private(obj);
priv->i = 0;
}
GtkWidget *gtk_graph_view_new()
{
return gtk_widget_new(GTK_TYPE_GRAPH_VIEW, NULL);
}