Mostly minor fixes up until version 0.8.10.
[irreco.git] / irreco / src / core / irreco_cmd_chain_editor.h
blobede6f9740db8cd698904346ffe54f9887f52d112
1 /*
2 * irreco - Ir Remote Control
3 * Copyright (C) 2007 Arto Karppinen (arto.karppinen@iki.fi)
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 /**
21 * @addtogroup IrrecoCmdChainEditor
22 * @{
25 /**
26 * @file
27 * Header file of @ref IrrecoCmdChainEditor.
32 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
33 /* Typedef */
34 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
36 * Make sure that typedefs are available before we include anything elese.
38 * This makes sure that whatever other structures that depend on structures
39 * defined in this file will compile OK recardles of header inclusion order.
41 #ifndef __HEADER_NAME_H_TYPEDEF__
42 #define __HEADER_NAME_H_TYPEDEF__
44 typedef struct _IrrecoCmdChainEditor IrrecoCmdChainEditor;
45 typedef struct _IrrecoCmdChainEditorClass IrrecoCmdChainEditorClass;
47 #define IRRECO_TYPE_CMD_CHAIN_EDITOR irreco_cmd_chain_editor_get_type()
49 #define IRRECO_CMD_CHAIN_EDITOR(obj) \
50 (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
51 IRRECO_TYPE_CMD_CHAIN_EDITOR, IrrecoCmdChainEditor))
53 #define IRRECO_CMD_CHAIN_EDITOR_CLASS(klass) \
54 (G_TYPE_CHECK_CLASS_CAST ((klass), \
55 IRRECO_TYPE_CMD_CHAIN_EDITOR, IrrecoCmdChainEditorClass))
57 #define IRRECO_IS_CMD_CHAIN_EDITOR(obj) \
58 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
59 IRRECO_TYPE_CMD_CHAIN_EDITOR))
61 #define IRRECO_IS_CMD_CHAIN_EDITOR_CLASS(klass) \
62 (G_TYPE_CHECK_CLASS_TYPE ((klass), \
63 IRRECO_TYPE_CMD_CHAIN_EDITOR))
65 #define IRRECO_CMD_CHAIN_EDITOR_GET_CLASS(obj) \
66 (G_TYPE_INSTANCE_GET_CLASS ((obj), \
67 IRRECO_TYPE_CMD_CHAIN_EDITOR, IrrecoCmdChainEditorClass))
70 typedef enum {
71 /* Changes will take effect only if
72 irreco_cmd_chain_editor_apply_changes() is called. */
73 IRRECO_INDIRECT_EDITING = 0,
75 /* Changes affect the command chain immediately. */
76 IRRECO_DIRECT_EDITING
78 } IrrecoEditMode;
80 #endif /* __HEADER_NAME_H_TYPEDEF__ */
84 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
85 /* Include */
86 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
87 #ifndef __HEADER_NAME_H__
88 #define __HEADER_NAME_H__
89 #include "irreco.h"
90 #include "irreco_internal_widget.h"
91 #include "irreco_listbox_text.h"
92 #include "irreco_cmd_chain.h"
96 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
97 /* Datatypes */
98 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
99 struct _IrrecoCmdChainEditor{
100 IrrecoInternalWidget parent;
102 GtkWindow *parent_window;
104 GtkWidget *listbox;
105 GtkWidget *hbox;
106 GtkWidget *add;
107 GtkWidget *remove;
108 GtkWidget *up;
109 GtkWidget *down;
110 GtkWidget *properties;
112 IrrecoEditMode edit_mode;
113 IrrecoCmdChain *old_cmd_chain;
114 IrrecoCmdChain *new_cmd_chain;
117 struct _IrrecoCmdChainEditorClass{
118 IrrecoInternalWidgetClass parent_class;
123 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
124 /* Macro */
125 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
129 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
130 /* Prototypes */
131 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
132 GType irreco_cmd_chain_editor_get_type(void);
133 GtkWidget* irreco_cmd_chain_editor_new (IrrecoData *irreco_data,
134 GtkWindow *parent);
135 void irreco_cmd_chain_editor_set_parent_window(IrrecoCmdChainEditor *self,
136 GtkWindow *parent);
137 void irreco_cmd_chain_editor_set_autosize (IrrecoCmdChainEditor *self,
138 gint min_width,
139 gint max_width,
140 gint min_height,
141 gint max_height);
142 void irreco_cmd_chain_editor_set_edit_mode (IrrecoCmdChainEditor *self,
143 IrrecoEditMode edit_mode);
144 void irreco_cmd_chain_editor_set_chain (IrrecoCmdChainEditor *self,
145 IrrecoCmdChain *cmd_chain);
146 IrrecoCmdChain *irreco_cmd_chain_editor_get_chain(IrrecoCmdChainEditor *self);
147 void irreco_cmd_chain_editor_apply_changes (IrrecoCmdChainEditor *self);
148 void irreco_cmd_chain_editor_reset_changes (IrrecoCmdChainEditor *self);
149 void irreco_cmd_chain_editor_clear_chain (IrrecoCmdChainEditor *self);
152 #endif /* __HEADER_NAME_H__ */
154 /** @} */