summaryrefslogtreecommitdiff
path: root/gtk/gtktexthandleprivate.h
blob: 0a02eac12e1f4d7c79ad5bd014f076364ec7b2cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/* GTK - The GIMP Toolkit
 * Copyright © 2012 Carlos Garnacho <carlosg@gnome.org>
 *
 * 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/>.
 */

#ifndef __GTK_TEXT_HANDLE_PRIVATE_H__
#define __GTK_TEXT_HANDLE_PRIVATE_H__

#include <gtk/gtkwidget.h>

G_BEGIN_DECLS

#define GTK_TYPE_TEXT_HANDLE (gtk_text_handle_get_type ())
G_DECLARE_FINAL_TYPE (GtkTextHandle, gtk_text_handle,
		      GTK, TEXT_HANDLE, GtkWidget)

typedef enum
{
  GTK_TEXT_HANDLE_ROLE_CURSOR,
  GTK_TEXT_HANDLE_ROLE_SELECTION_START,
  GTK_TEXT_HANDLE_ROLE_SELECTION_END,
} GtkTextHandleRole;

GtkTextHandle *    gtk_text_handle_new          (GtkWidget             *parent);

void               gtk_text_handle_set_role (GtkTextHandle     *handle,
					     GtkTextHandleRole  role);
GtkTextHandleRole  gtk_text_handle_get_role (GtkTextHandle     *handle);

void               gtk_text_handle_set_position (GtkTextHandle      *handle,
						 const GdkRectangle *rect);

gboolean           gtk_text_handle_get_is_dragged (GtkTextHandle *handle);

G_END_DECLS

#endif /* __GTK_TEXT_HANDLE_PRIVATE_H__ */