/src/wrappers/gtk/library/gtk_target_entry.e
Specman e | 107 lines | 69 code | 22 blank | 16 comment | 3 complexity | 95f023e3a6c88bce836d7f9209d6a86c MD5 | raw file
1indexing 2 description: "GtkTargetEntry -- String representing the drag type." 3 copyright: "[ 4 Copyright (C) 2006 eiffel-libraries team, GTK+ team 5 6 This library is free software; you can redistribute it and/or 7 modify it under the terms of the GNU Lesser General Public License 8 as published by the Free Software Foundation; either version 2.1 of 9 the License, or (at your option) any later version. 10 11 This library is distributed in the hope that it will be useful, but 12 WITHOUT ANY WARRANTY; without even the implied warranty of 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 Lesser General Public License for more details. 15 16 You should have received a copy of the GNU Lesser General Public 17 License along with this library; if not, write to the Free Software 18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 19 02110-1301 USA 20 ]" 21 gtk_documentation: "[ 22 23 ]" 24 25class GTK_TARGET_ENTRY 26 -- A GtkTargetEntry structure represents a single type of data than 27 -- can be supplied for by a widget for a selection or for supplied 28 -- or received during drag-and-drop. It contains a string 29 -- representing the drag type, a flags field (used only for drag 30 -- and drop - see GtkTargetFlags), and an application assigned 31 -- integer ID. The integer ID will later be passed as a signal 32 -- parameter for signals like %"selection_get%". It allows the 33 -- application to identify the target type without extensive string 34 -- compares. 35 36 -- GtkTargetEntry 37 -- 38 -- typedef struct { 39 -- gchar *target; 40 -- guint flags; 41 -- guint info; 42 -- } GtkTargetEntry; 43 44inherit 45 G_STRUCT 46 47insert 48 GTK_TARGET_ENTRY_EXTERNALS 49 50creation from_external_pointer, make 51 52feature -- Creation 53 54 make is 55 do 56 allocate 57 end 58 59feature -- Access 60 61 target: STRING is 62 local 63 c_ptr: POINTER 64 do 65 c_ptr := gtk_target_entry_get_target (handle) 66 if c_ptr.is_not_null then 67 create Result.from_external (c_ptr) 68 end 69 end 70 71 flags: INTEGER is 72 do 73 Result := gtk_target_entry_get_flags (handle) 74 end 75 76 info: INTEGER is 77 do 78 Result := gtk_target_entry_get_info (handle) 79 end 80 81feature -- Operations 82 83 set_target (a_target: STRING) is 84 require 85 a_target /= Void 86 do 87 gtk_target_entry_set_target (handle, a_target.to_external) 88 end 89 90 set_flags (some_flags: INTEGER) is 91 do 92 gtk_target_entry_set_flags (handle, some_flags) 93 end 94 95 set_info (some_info: INTEGER) is 96 do 97 gtk_target_entry_set_info (handle, some_info) 98 end 99 100feature -- size 101 102 struct_size: INTEGER is 103 external "C inline use <gtk/gtk.h>" 104 alias "sizeof (GtkTargetEntry)" 105 end 106 107end