qulogic/talkatu
Clone
Summary
Browse
Changes
Graph
Somehow maiku was missing, so I added him
2019-08-05, Gary Kramlich
2e691dcd9200
Somehow maiku was missing, so I added him
/*
* talkatu
* Copyright (C) 2017-2019 Gary Kramlich <grim@reaperworld.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#if !defined(TALKATU_GLOBAL_HEADER_INSIDE) && !defined(TALKATU_COMPILATION)
#error "only <talkatu.h> may be included directly"
#endif
#ifndef TALKATU_VIEW_H
#define TALKATU_VIEW_H
#include
<glib.h>
#include
<glib-object.h>
#include
<gtk/gtk.h>
typedef
enum
_TalkatuViewSendBinding
/*< prefix=TALKATU_VIEW_SEND_BINDING,underscore_name=TALKATU_VIEW_SEND_BINDING >*/
{
TALKATU_VIEW_SEND_BINDING_RETURN
=
1
<<
0
,
TALKATU_VIEW_SEND_BINDING_KP_ENTER
=
1
<<
1
,
TALKATU_VIEW_SEND_BINDING_SHIFT_RETURN
=
1
<<
2
,
TALKATU_VIEW_SEND_BINDING_CONTROL_RETURN
=
1
<<
3
,
}
TalkatuViewSendBinding
;
G_BEGIN_DECLS
#define TALKATU_TYPE_VIEW (talkatu_view_get_type())
G_DECLARE_DERIVABLE_TYPE
(
TalkatuView
,
talkatu_view
,
TALKATU
,
VIEW
,
GtkTextView
)
struct
_TalkatuViewClass
{
/*< private >*/
GtkTextViewClass
parent
;
/*< public >*/
void
(
*
format_activate
)(
TalkatuView
*
view
,
const
gchar
*
action_name
);
void
(
*
should_send_message
)(
TalkatuView
*
view
,
TalkatuViewSendBinding
binding
);
void
(
*
send_message
)(
TalkatuView
*
view
);
void
(
*
open_url
)(
TalkatuView
*
view
,
const
gchar
*
url
);
/*< private >*/
gpointer
reserved
[
4
];
};
GtkWidget
*
talkatu_view_new
(
void
);
GtkWidget
*
talkatu_view_new_with_buffer
(
GtkTextBuffer
*
buffer
);
void
talkatu_view_set_send_binding
(
TalkatuView
*
view
,
TalkatuViewSendBinding
bindings
);
TalkatuViewSendBinding
talkatu_view_get_send_binding
(
TalkatuView
*
view
);
void
talkatu_view_send_message
(
TalkatuView
*
view
);
G_END_DECLS
#endif
/* TALKATU_VIEW_H */