• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

gtktexthandleprivate.h

Go to the documentation of this file.
00001 /* GTK - The GIMP Toolkit
00002  * Copyright © 2012 Carlos Garnacho <carlosg@gnome.org>
00003  *
00004  * This library is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU Lesser General Public
00006  * License as published by the Free Software Foundation; either
00007  * version 2 of the License, or (at your option) any later version.
00008  *
00009  * This library is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012  * Lesser General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU Lesser General Public
00015  * License along with this library. If not, see <http://www.gnu.org/licenses/>.
00016  */
00017 
00018 #ifndef __FV_TEXT_HANDLE_PRIVATE_H__
00019 #define __FV_TEXT_HANDLE_PRIVATE_H__
00020 
00021 #include "ut_compiler.h"
00022 ABI_W_NO_CONST_QUAL
00023 #include <gtk/gtk.h>
00024 ABI_W_POP
00025 
00026 G_BEGIN_DECLS
00027 
00028 #define FV_TYPE_TEXT_HANDLE           (_fv_text_handle_get_type ())
00029 #define FV_TEXT_HANDLE(o)             (G_TYPE_CHECK_INSTANCE_CAST ((o), FV_TYPE_TEXT_HANDLE, FvTextHandle))
00030 #define FV_TEXT_HANDLE_CLASS(c)       (G_TYPE_CHECK_CLASS_CAST ((c), FV_TYPE_TEXT_HANDLE, FvTextHandleClass))
00031 #define FV_IS_TEXT_HANDLE(o)          (G_TYPE_CHECK_INSTANCE_TYPE ((o), FV_TYPE_TEXT_HANDLE))
00032 #define FV_IS_TEXT_HANDLE_CLASS(o)    (G_TYPE_CHECK_CLASS_TYPE ((o), FV_TYPE_TEXT_HANDLE))
00033 #define FV_TEXT_HANDLE_GET_CLASS(o)   (G_TYPE_INSTANCE_GET_CLASS ((o), FV_TYPE_TEXT_HANDLE, FvTextHandleClass))
00034 
00035 typedef struct _FvTextHandle FvTextHandle;
00036 typedef struct _FvTextHandleClass FvTextHandleClass;
00037 
00038 typedef enum
00039 {
00040   FV_TEXT_HANDLE_POSITION_CURSOR,
00041   FV_TEXT_HANDLE_POSITION_SELECTION_START,
00042   FV_TEXT_HANDLE_POSITION_SELECTION_END = FV_TEXT_HANDLE_POSITION_CURSOR
00043 } FvTextHandlePosition;
00044 
00045 typedef enum
00046 {
00047   FV_TEXT_HANDLE_MODE_NONE,
00048   FV_TEXT_HANDLE_MODE_CURSOR,
00049   FV_TEXT_HANDLE_MODE_SELECTION
00050 } FvTextHandleMode;
00051 
00052 struct FvTextHandlePrivate;
00053 
00054 struct _FvTextHandle
00055 {
00056   GObject parent_instance;
00057   FvTextHandlePrivate* priv;
00058 };
00059 
00060 struct _FvTextHandleClass
00061 {
00062   GObjectClass parent_class;
00063 
00064   void (* handle_dragged) (FvTextHandle         *handle,
00065                            FvTextHandlePosition  pos,
00066                            gint                  x,
00067                            gint                  y);
00068   void (* drag_finished)  (FvTextHandle         *handle,
00069                            FvTextHandlePosition  pos);
00070 };
00071 
00072 GType           _fv_text_handle_get_type     (void) G_GNUC_CONST;
00073 
00074 FvTextHandle *  _fv_text_handle_new          (GtkWidget             *parent);
00075 
00076 void            _fv_text_handle_set_mode     (FvTextHandle          *handle,
00077                                               FvTextHandleMode       mode);
00078 FvTextHandleMode
00079                 _fv_text_handle_get_mode     (FvTextHandle          *handle);
00080 void            _fv_text_handle_set_position (FvTextHandle          *handle,
00081                                               FvTextHandlePosition   pos,
00082                                               GdkRectangle          *rect);
00083 void            _fv_text_handle_set_visible  (FvTextHandle          *handle,
00084                                               FvTextHandlePosition   pos,
00085                                               gboolean               visible);
00086 
00087 void            _fv_text_handle_set_relative_to (FvTextHandle  *handle,
00088                                                  GdkWindow     *window);
00089 
00090 gboolean        _fv_text_handle_get_is_dragged (FvTextHandle         *handle,
00091                                                 FvTextHandlePosition  pos);
00092 
00093 G_END_DECLS
00094 
00095 #endif /* __FV_TEXT_HANDLE_PRIVATE_H__ */

Generated on Sun Feb 14 2021 for AbiWord by  doxygen 1.7.1