Bump gEDA version
[geda-gaf.git] / gschem / src / gschem_main_window.c
blobe5f0e3a34b3f221d4fdd3a6a04c5eea5d55bf531
1 /* gEDA - GPL Electronic Design Automation
2 * gschem - gEDA Schematic Capture
3 * Copyright (C) 1998-2010 Ales Hvezda
4 * Copyright (C) 1998-2020 gEDA Contributors (see ChangeLog for details)
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 /*!
21 * \file gschem_main_window.c
23 * \brief
26 #include <config.h>
28 #include <stdio.h>
29 #ifdef HAVE_STDLIB_H
30 #include <stdlib.h>
31 #endif
32 #ifdef HAVE_STRING_H
33 #include <string.h>
34 #endif
36 #include "gschem.h"
37 #include <gdk/gdkkeysyms.h>
39 static void
40 get_property (GObject *object, guint param_id, GValue *value, GParamSpec *pspec);
42 static void
43 gschem_main_window_class_init (GschemMainWindowClass *klass);
45 static void
46 gschem_main_window_init (GschemMainWindow *window);
48 static void
49 set_property (GObject *object, guint param_id, const GValue *value, GParamSpec *pspec);
53 /*! \brief Get a property
55 * \param [in] object
56 * \param [in] param_id
57 * \param [in,out] value
58 * \param [in] pspec
60 static void
61 get_property (GObject *object, guint param_id, GValue *value, GParamSpec *pspec)
63 //GschemMainWindow *window = GSCHEM_MAIN_WINDOW (object);
65 switch (param_id) {
66 default:
67 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
73 /*! \brief Initialize GschemMainWindow class
75 * \param [in] klass The class for the GschemMainWindow
77 static void
78 gschem_main_window_class_init (GschemMainWindowClass *klass)
80 G_OBJECT_CLASS (klass)->get_property = get_property;
81 G_OBJECT_CLASS (klass)->set_property = set_property;
86 /*! \brief Get/register GschemSelection type.
88 GType
89 gschem_main_window_get_type ()
91 static GType type = 0;
93 if (type == 0) {
94 static const GTypeInfo info = {
95 sizeof(GschemMainWindowClass),
96 NULL, /* base_init */
97 NULL, /* base_finalize */
98 (GClassInitFunc) gschem_main_window_class_init,
99 NULL, /* class_finalize */
100 NULL, /* class_data */
101 sizeof(GschemMainWindow),
102 0, /* n_preallocs */
103 (GInstanceInitFunc) gschem_main_window_init,
106 type = g_type_register_static (GTK_TYPE_WINDOW, "GschemMainWindow", &info, 0);
109 return type;
114 /*! \brief Initialize GschemSelection instance
116 * \param [in,out] selection
118 static void
119 gschem_main_window_init (GschemMainWindow *window)
125 /*! \brief Create a new instanceof the GschemMainWindow
127 * \return A new instanceof the GschemMainWindow
129 GschemMainWindow*
130 gschem_main_window_new ()
132 return GSCHEM_MAIN_WINDOW (g_object_new (GSCHEM_TYPE_MAIN_WINDOW,
133 "type", GTK_WINDOW_TOPLEVEL,
134 NULL));
139 /*! \brief Set a property
141 * \param [in,out] object
142 * \param [in] param_id
143 * \param [in] value
144 * \param [in] pspec
146 static void
147 set_property (GObject *object, guint param_id, const GValue *value, GParamSpec *pspec)
149 //GschemMainWindow *window = GSCHEM_MAIN_WINDOW (object);
151 switch (param_id) {
152 default:
153 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);