[gedit-code-assistance] Added missing gca-utils files
- From: Jesse van den Kieboom <jessevdk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit-code-assistance] Added missing gca-utils files
- Date: Fri, 8 Nov 2013 13:54:08 +0000 (UTC)
commit f3903615b7fa4544a27923e4a0814a3500ab037e
Author: Jesse van den Kieboom <jessevdk gmail com>
Date: Fri Nov 8 14:54:00 2013 +0100
Added missing gca-utils files
src/gca-utils-c.c | 76 +++++++++++++++++++++++++++++++++++++++++++++++++++++
src/gca-utils-c.h | 61 ++++++++++++++++++++++++++++++++++++++++++
2 files changed, 137 insertions(+), 0 deletions(-)
---
diff --git a/src/gca-utils-c.c b/src/gca-utils-c.c
new file mode 100644
index 0000000..c5a586b
--- /dev/null
+++ b/src/gca-utils-c.c
@@ -0,0 +1,76 @@
+/*
+ * This file is part of gedit-code-assistant.
+ *
+ * Copyright (C) 2011 - Jesse van den Kieboom
+ *
+ * gedit-code-assistant 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.
+ *
+ * gedit-code-assistant 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 gedit-code-assistant. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "gca-utils-c.h"
+
+
+#define GCA_UTILS_C_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE((object), GCA_TYPE_UTILS_C,
GcaUtilsCPrivate))
+
+struct _GcaUtilsCPrivate
+{
+};
+
+G_DEFINE_TYPE (GcaUtilsC, gca_utils_c, G_TYPE_OBJECT)
+
+static void
+gca_utils_c_finalize (GObject *object)
+{
+ G_OBJECT_CLASS (gca_utils_c_parent_class)->finalize (object);
+}
+
+static void
+gca_utils_c_class_init (GcaUtilsCClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+ object_class->finalize = gca_utils_c_finalize;
+
+ g_type_class_add_private (object_class, sizeof (GcaUtilsCPrivate));
+}
+
+static void
+gca_utils_c_init (GcaUtilsC *self)
+{
+ self->priv = GCA_UTILS_C_GET_PRIVATE (self);
+}
+
+gint
+gca_utils_c_get_style_property_int (GtkStyleContext *context,
+ gchar const *name)
+{
+ GValue ret = {0,};
+ gint val = 0;
+
+ g_return_val_if_fail (context != NULL, 0);
+ g_return_val_if_fail (name != NULL, 0);
+
+ g_value_init (&ret, G_TYPE_INT);
+ gtk_style_context_get_style_property (context, name, &ret);
+
+ val = g_value_get_int (&ret);
+
+ g_value_unset (&ret);
+ return val;
+}
+
+void
+gca_utils_c_get_range_rect (GtkRange *range, GdkRectangle *rect)
+{
+ gtk_range_get_range_rect (range, rect);
+}
diff --git a/src/gca-utils-c.h b/src/gca-utils-c.h
new file mode 100644
index 0000000..cbf6c29
--- /dev/null
+++ b/src/gca-utils-c.h
@@ -0,0 +1,61 @@
+/*
+ * This file is part of gedit-code-assistant.
+ *
+ * Copyright (C) 2011 - Jesse van den Kieboom
+ *
+ * gedit-code-assistant 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.
+ *
+ * gedit-code-assistant 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 gedit-code-assistant. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __GCA_UTILS_C_H__
+#define __GCA_UTILS_C_H__
+
+#include <glib-object.h>
+#include <gtk/gtk.h>
+
+G_BEGIN_DECLS
+
+#define GCA_TYPE_UTILS_C (gca_utils_c_get_type ())
+#define GCA_UTILS_C(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GCA_TYPE_UTILS_C, GcaUtilsC))
+#define GCA_UTILS_C_CONST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GCA_TYPE_UTILS_C, GcaUtilsC
const))
+#define GCA_UTILS_C_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GCA_TYPE_UTILS_C, GcaUtilsCClass))
+#define GCA_IS_UTILS_C(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GCA_TYPE_UTILS_C))
+#define GCA_IS_UTILS_C_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GCA_TYPE_UTILS_C))
+#define GCA_UTILS_C_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GCA_TYPE_UTILS_C, GcaUtilsCClass))
+
+typedef struct _GcaUtilsC GcaUtilsC;
+typedef struct _GcaUtilsCClass GcaUtilsCClass;
+typedef struct _GcaUtilsCPrivate GcaUtilsCPrivate;
+
+struct _GcaUtilsC
+{
+ GObject parent;
+
+ GcaUtilsCPrivate *priv;
+};
+
+struct _GcaUtilsCClass
+{
+ GObjectClass parent_class;
+};
+
+GType gca_utils_c_get_type (void) G_GNUC_CONST;
+
+gint gca_utils_c_get_style_property_int (GtkStyleContext *context,
+ gchar const *name);
+
+void gca_utils_c_get_range_rect (GtkRange *range, GdkRectangle *rect);
+
+G_END_DECLS
+
+#endif /* __GCA_UTILS_C_H__ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]