From f15b90f66bdc562b62837d1389e92608439f6b30 Mon Sep 17 00:00:00 2001 From: raveit65 Date: Sat, 11 Jun 2016 18:03:09 +0200 Subject: Borrow pluma-close-button class and use it. This is a subclass of GtkButton special theming for the close button. taken from: https://git.gnome.org/browse/gnome-terminal/commit/src?h=gnome-3-8&id=c3a3e06 https://git.gnome.org/browse/gnome-terminal/diff/src/terminal-close-button.c?h=gnome-3-8&id=2bff4b6 --- src/terminal-close-button.h | 59 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 src/terminal-close-button.h (limited to 'src/terminal-close-button.h') diff --git a/src/terminal-close-button.h b/src/terminal-close-button.h new file mode 100644 index 0000000..9578010 --- /dev/null +++ b/src/terminal-close-button.h @@ -0,0 +1,59 @@ +/* + * terminal-close-button.h + * + * Copyright © 2010 - Paolo Borelli + * Copyright © 2016 - Wolfgang Ulbrich + * + * Mate-terminal 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. + * + * Mate-terminal 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 . + */ + +#ifndef __TERMINAL_CLOSE_BUTTON_H__ +#define __TERMINAL_CLOSE_BUTTON_H__ + +#include + +G_BEGIN_DECLS + +#define TERMINAL_TYPE_CLOSE_BUTTON (terminal_close_button_get_type ()) +#define TERMINAL_CLOSE_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TERMINAL_TYPE_CLOSE_BUTTON, TerminalCloseButton)) +#define TERMINAL_CLOSE_BUTTON_CONST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TERMINAL_TYPE_CLOSE_BUTTON, TerminalCloseButton const)) +#define TERMINAL_CLOSE_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TERMINAL_TYPE_CLOSE_BUTTON, TerminalCloseButtonClass)) +#define TERMINAL_IS_CLOSE_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TERMINAL_TYPE_CLOSE_BUTTON)) +#define TERMINAL_IS_CLOSE_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TERMINAL_TYPE_CLOSE_BUTTON)) +#define TERMINAL_CLOSE_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TERMINAL_TYPE_CLOSE_BUTTON, TerminalCloseButtonClass)) + +typedef struct _TerminalCloseButton TerminalCloseButton; +typedef struct _TerminalCloseButtonPrivate TerminalCloseButtonPrivate; +typedef struct _TerminalCloseButtonClass TerminalCloseButtonClass; +typedef struct _TerminalCloseButtonClassPrivate TerminalCloseButtonClassPrivate; + +struct _TerminalCloseButton +{ + GtkButton parent; +}; + +struct _TerminalCloseButtonClass +{ + GtkButtonClass parent_class; + + TerminalCloseButtonClassPrivate *priv; +}; + +GType terminal_close_button_get_type (void) G_GNUC_CONST; + +GtkWidget *terminal_close_button_new (void); + +G_END_DECLS + +#endif /* __TERMINAL_CLOSE_BUTTON_H__ */ -- cgit v1.2.1