PageRenderTime 158ms CodeModel.GetById 24ms RepoModel.GetById 8ms app.codeStats 0ms

/src/wrappers/gtk/library/gtk_widget.e

http://github.com/tybor/Liberty
Specman e | 1503 lines | 550 code | 176 blank | 777 comment | 2 complexity | 5d5d34741c218d57eb93a3455ac78cf4 MD5 | raw file
Possible License(s): GPL-3.0, LGPL-2.1, GPL-2.0
  1. indexing
  2. description: "GtkWidget -- Base class for all widgets"
  3. copyright: "[
  4. Copyright (C) 2006 eiffel-libraries team, GTK+ team
  5. This library is free software; you can redistribute it and/or
  6. modify it under the terms of the GNU Lesser General Public License
  7. as published by the Free Software Foundation; either version 2.1 of
  8. the License, or (at your option) any later version.
  9. This library is distributed in the hope that it will be useful, but
  10. WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. Lesser General Public License for more details.
  13. You should have received a copy of the GNU Lesser General Public
  14. License along with this library; if not, write to the Free Software
  15. Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  16. 02110-1301 USA
  17. ]"
  18. license: "LGPL v2 or later"
  19. date: "$Date:$"
  20. revision "$REvision:$"
  21. deferred class GTK_WIDGET
  22. inherit GTK_OBJECT
  23. insert
  24. GTK_WIDGET_EXTERNALS
  25. GDK_DRAG_ACTION
  26. GTK_DEST_DEFAULTS
  27. GDK_MODIFIER_TYPE
  28. GDK_EVENT_MASK
  29. feature -- Access
  30. hide is
  31. -- Reverses the effects of `show' causing the widget to be hidden
  32. -- (invisible to the user).
  33. do
  34. gtk_widget_hide (handle)
  35. end
  36. style: GTK_STYLE is
  37. -- Returns the style for this widget
  38. do
  39. create Result.from_external_pointer (gtk_widget_get_style (handle))
  40. end
  41. is_sensitive: BOOLEAN is
  42. -- Returns True if this widget is sensitive.
  43. do
  44. Result := gtk_widget_is_sensitive (handle).to_boolean
  45. end
  46. feature -- Operation
  47. set_style (a_style: GTK_STYLE) is
  48. -- Sets the GTK_STYLE for a widget (widget.style).
  49. -- You probably don't want to use this function;
  50. -- it interacts badly with themes, because themes work by
  51. -- replacing the GtkStyle. Instead, use modify_style(). (NOT IMPLEMENTED)
  52. require
  53. valid_style: a_style /= Void
  54. do
  55. gtk_widget_set_style (handle, a_style.handle)
  56. end
  57. show is
  58. -- Flags widget to be displayed.
  59. do
  60. debug
  61. std_error.put_string(once "Showing a ")
  62. std_error.put_string(create {STRING}.from_external_copy
  63. (g_object_type_name(handle)))
  64. std_error.put_string(once ", handle ")
  65. std_error.put_pointer(handle)
  66. std_error.put_new_line
  67. end
  68. gtk_widget_show (handle)
  69. end
  70. show_all is
  71. -- Recursively shows a widget, and any child widgets (if the
  72. -- widget is a container).
  73. do
  74. gtk_widget_show_all (handle)
  75. end
  76. set_drag_destination, drag_dest_set (a_flags, an_actions: INTEGER) is
  77. -- Sets a widget as a potential drop destination.
  78. -- TODO: GtkTargetEntry isn't wrapped yet, use add_text_targets() and such..
  79. require
  80. is_valid_gtk_dest_defaults (a_flags)
  81. is_valid_gdk_drag_action (an_actions)
  82. do
  83. gtk_drag_dest_set (handle, a_flags, default_pointer, 0, an_actions)
  84. end
  85. set_drag_source, drag_source_set (a_modifier, an_actions: INTEGER) is
  86. -- Sets up a widget so that GTK+ will start a drag operation when
  87. -- the user clicks and drags on the widget. The widget must have a
  88. -- window.
  89. -- TODO: GtkTargetEntry isn't wrapped yet, use add_text_targets() and such...
  90. require
  91. is_valid_gdk_modifier_type (a_modifier)
  92. is_valid_gdk_drag_action (an_actions)
  93. do
  94. gtk_drag_source_set (handle, a_modifier, default_pointer, 0, an_actions)
  95. end
  96. drag_dest_add_text_targets is
  97. -- Add the text targets supported by GtkSelection to the target
  98. -- list of the drag destination. The targets are added with
  99. -- info = 0. If you need another value, use
  100. -- drag_dest_set_target_list
  101. do
  102. gtk_drag_dest_add_text_targets (handle)
  103. end
  104. drag_dest_add_image_targets is
  105. -- Add the image targets supported by GtkSelection to the target
  106. -- list of the drag destination. The targets are added with
  107. -- info = 0. If you need another value, use
  108. -- drag_dest_set_target_list
  109. do
  110. gtk_drag_dest_add_image_targets (handle)
  111. end
  112. drag_dest_add_uri_targets is
  113. -- Add the URI targets supported by GtkSelection to the target
  114. -- list of the drag destination. The targets are added with
  115. -- info = 0. If you need another value, use
  116. -- drag_dest_set_target_list
  117. do
  118. gtk_drag_dest_add_uri_targets (handle)
  119. end
  120. drag_source_add_text_targets is
  121. -- Add the text targets supported by GtkSelection to the target
  122. -- list of the drag source. The targets are added with info = 0.
  123. -- If you need another value, use drag_source_set_target_list
  124. do
  125. gtk_drag_source_add_text_targets (handle)
  126. end
  127. drag_source_add_image_targets is
  128. -- Add the writable image targets supported by GtkSelection to the
  129. -- target list of the drag source. The targets are added with
  130. -- info = 0. If you need another value, use
  131. -- drag_source_set_target_list
  132. do
  133. gtk_drag_source_add_image_targets (handle)
  134. end
  135. drag_source_add_uri_targets is
  136. -- Add the URI targets supported by GtkSelection to the target list
  137. -- of the drag source. The targets are added with info = 0. If you
  138. -- need another value, use drag_source_set_target_list
  139. do
  140. gtk_drag_source_add_uri_targets (handle)
  141. end
  142. drag_source_set_icon_pixbuf (a_pixbuf: GDK_PIXBUF) is
  143. -- Sets the icon that will be used for drags from a particular
  144. -- widget from a GdkPixbuf. GTK+ retains a reference for pixbuf
  145. -- and will release it when it is no longer needed.
  146. do
  147. gtk_drag_source_set_icon_pixbuf (handle, a_pixbuf.handle)
  148. end
  149. drag_source_set_icon_stock (a_stock_id: STRING) is
  150. -- Sets the icon that will be used for drags from a particular
  151. -- source to a stock icon.
  152. do
  153. gtk_drag_source_set_icon_stock (handle, a_stock_id.to_external)
  154. end
  155. drag_source_set_icon_name (an_icon_name: STRING) is
  156. -- Sets the icon that will be used for drags from a particular
  157. -- source to a themed icon. See the docs for GtkIconTheme for
  158. -- more details.
  159. do
  160. gtk_drag_source_set_icon_name (handle, an_icon_name.to_external)
  161. end
  162. set_events (some_events: INTEGER) is
  163. -- Sets the event mask (see GDK_EVENT_MASK) for this widget.
  164. -- The event mask determines which events the widget will receive.
  165. -- Keep in mind that different widgets have different default event
  166. -- masks, and by changing the event mask you may disrupt a widget's
  167. -- functionality, so be careful. This function must be called while
  168. -- a widget is unrealized. Consider add_events() for widgets that
  169. -- are already realized, or if you want to preserve the existing
  170. -- event mask. This function can't be used with GTK_NO_WINDOW
  171. -- widgets; to get events on those widgets, place them inside a
  172. -- GTK_EVENT_BOX and receive events on the event box.
  173. require
  174. is_valid_gdk_event_mask (some_events)
  175. do
  176. gtk_widget_set_events (handle, some_events)
  177. end
  178. add_events (some_events: INTEGER) is
  179. -- Adds the events in the bitfield events to the event mask for
  180. -- this widget. See set_events() for details.
  181. require
  182. is_valid_gdk_event_mask (some_events)
  183. do
  184. gtk_widget_add_events (handle, some_events)
  185. end
  186. -- #define GTK_WIDGET_TYPE (wid)
  187. -- #define GTK_WIDGET_STATE (wid)
  188. -- #define GTK_WIDGET_SAVED_STATE (wid)
  189. -- #define GTK_WIDGET_FLAGS (wid)
  190. -- #define GTK_WIDGET_TOPLEVEL (wid)
  191. -- #define GTK_WIDGET_NO_WINDOW (wid)
  192. is_realized: BOOLEAN is
  193. do
  194. Result := gtk_widget_realized (handle).to_boolean
  195. end
  196. is_mapped: BOOLEAN is
  197. do
  198. Result := gtk_widget_mapped (handle).to_boolean
  199. end
  200. is_visible: BOOLEAN is
  201. do
  202. Result := gtk_widget_visible (handle).to_boolean
  203. end
  204. is_drawable: BOOLEAN is
  205. do
  206. Result := gtk_widget_drawable (handle).to_boolean
  207. end
  208. -- #define GTK_WIDGET_SENSITIVE (wid)
  209. -- #define GTK_WIDGET_PARENT_SENSITIVE (wid)
  210. -- #define GTK_WIDGET_CAN_FOCUS (wid)
  211. -- #define GTK_WIDGET_HAS_FOCUS (wid)
  212. -- #define GTK_WIDGET_CAN_DEFAULT (wid)
  213. -- #define GTK_WIDGET_RECEIVES_DEFAULT (wid)
  214. -- #define GTK_WIDGET_HAS_DEFAULT (wid)
  215. -- #define GTK_WIDGET_HAS_GRAB (wid)
  216. -- #define GTK_WIDGET_RC_STYLE (wid)
  217. -- #define GTK_WIDGET_COMPOSITE_CHILD (wid)
  218. -- #define GTK_WIDGET_APP_PAINTABLE (wid)
  219. -- #define GTK_WIDGET_DOUBLE_BUFFERED (wid)
  220. -- #define GTK_WIDGET_SET_FLAGS (wid,flag)
  221. -- #define GTK_WIDGET_UNSET_FLAGS (wid,flag)
  222. -- void (*GtkCallback) (GtkWidget *widget,
  223. -- gpointer data);
  224. -- GtkRequisition;
  225. -- struct GtkAllocation;
  226. -- GtkSelectionData;
  227. -- GtkWidgetAuxInfo;
  228. -- GtkWidgetShapeInfo;
  229. -- enum GtkWidgetHelpType;
  230. -- GtkWidget* gtk_widget_new (GType type,
  231. -- const gchar *first_property_name,
  232. -- ...);
  233. -- GtkWidget* gtk_widget_ref (GtkWidget *widget);
  234. -- void gtk_widget_unref (GtkWidget *widget);
  235. -- void gtk_widget_destroy (GtkWidget *widget);
  236. -- void gtk_widget_destroyed (GtkWidget *widget,
  237. -- GtkWidget **widget_pointer);
  238. -- void gtk_widget_set (GtkWidget *widget,
  239. -- const gchar *first_property_name,
  240. -- ...);
  241. -- void gtk_widget_unparent (GtkWidget *widget);
  242. -- void gtk_widget_show_now (GtkWidget *widget);
  243. -- void gtk_widget_hide_all (GtkWidget *widget);
  244. -- void gtk_widget_map (GtkWidget *widget);
  245. -- void gtk_widget_unmap (GtkWidget *widget);
  246. realize is
  247. -- Creates the GDK (windowing system) resources associated with a widget. For example,
  248. -- 'window' will be created when a widget is realized. Normally realization happens
  249. -- implicitly; if you show a widget and all its parent containers, then the widget
  250. -- will be realized and mapped automatically.
  251. --
  252. -- Realizing a widget requires all the widget's parent widgets to be realized; calling
  253. -- 'realize' realizes the widget's parents in addition to widget itself. If a widget
  254. -- is not yet inside a toplevel window when you realize it, bad things will happen.
  255. --
  256. -- This function is primarily used in widget implementations, and isn't very useful
  257. -- otherwise. Many times when you think you might need it, a better approach is to
  258. -- connect to a signal that will be called after the widget is realized automatically,
  259. -- such as "expose_event". Or simply g_signal_connect_after() to the "realize" signal.
  260. require
  261. not is_realized
  262. do
  263. gtk_widget_realize (handle)
  264. end
  265. unrealize is
  266. -- This function is only useful in widget implementations. Causes a widget to be
  267. -- unrealized (frees all GDK resources associated with the widget, such as 'window').
  268. require
  269. is_realized
  270. do
  271. gtk_widget_unrealize (handle)
  272. end
  273. -- void gtk_widget_queue_resize (GtkWidget *widget);
  274. -- void gtk_widget_queue_resize_no_redraw
  275. -- (GtkWidget *widget);
  276. -- void gtk_widget_draw (GtkWidget *widget,
  277. -- GdkRectangle *area);
  278. actual_size_request: GTK_REQUISITION is
  279. do
  280. create Result.make
  281. gtk_widget_size_request (handle, Result.handle)
  282. ensure
  283. Result /= Void
  284. end
  285. -- void gtk_widget_get_child_requisition
  286. -- (GtkWidget *widget,
  287. -- GtkRequisition *requisition);
  288. -- void gtk_widget_size_allocate (GtkWidget *widget,
  289. -- GtkAllocation *allocation);
  290. -- void gtk_widget_add_accelerator (GtkWidget *widget,
  291. -- const gchar *accel_signal,
  292. -- GtkAccelGroup *accel_group,
  293. -- guint accel_key,
  294. -- GdkModifierType accel_mods,
  295. -- GtkAccelFlags accel_flags);
  296. -- gboolean gtk_widget_remove_accelerator (GtkWidget *widget,
  297. -- GtkAccelGroup *accel_group,
  298. -- guint accel_key,
  299. -- GdkModifierType accel_mods);
  300. -- void gtk_widget_set_accel_path (GtkWidget *widget,
  301. -- const gchar *accel_path,
  302. -- GtkAccelGroup *accel_group);
  303. -- GList* gtk_widget_list_accel_closures (GtkWidget *widget);
  304. -- gboolean gtk_widget_can_activate_accel (GtkWidget *widget,
  305. -- guint signal_id);
  306. -- gboolean gtk_widget_event (GtkWidget *widget,
  307. -- GdkEvent *event);
  308. -- gboolean gtk_widget_activate (GtkWidget *widget);
  309. -- void gtk_widget_reparent (GtkWidget *widget,
  310. -- GtkWidget *new_parent);
  311. -- gboolean gtk_widget_intersect (GtkWidget *widget,
  312. -- GdkRectangle *area,
  313. -- GdkRectangle *intersection);
  314. -- gboolean gtk_widget_is_focus (GtkWidget *widget);
  315. grab_focus is
  316. -- Causes widget to have the keyboard focus for the GtkWindow
  317. -- it's inside. Current widget must be a focusable widget,
  318. -- such as a GTK_ENTRY; something like GtkFrame won't
  319. -- work. (More precisely, it must have the GTK_CAN_FOCUS flag
  320. -- set.)
  321. require focusable: can_focus
  322. do
  323. gtk_widget_grab_focus (handle)
  324. end
  325. grab_default is
  326. -- Causes widget to become the default widget. widget must have
  327. -- the GTK_CAN_DEFAULT flag set; typically you have to set this
  328. -- flag yourself by calling
  329. -- GTK_WIDGET_SET_FLAGS (widget, GTK_CAN_DEFAULT). The default
  330. -- widget is activated when the user presses Enter in a window.
  331. -- Default widgets must be activatable, that is, gtk_widget_activate()
  332. -- should affect them.
  333. require defaultable: can_default
  334. do
  335. gtk_widget_grab_default (handle)
  336. end
  337. set_name (a_name: STRING) is
  338. -- Widgets can be named, which allows you to refer to them from
  339. -- a gtkrc file. You can apply a style to widgets with a particular
  340. -- name in the gtkrc file. See the documentation for gtkrc files
  341. -- (on the same page as the docs for GtkRcStyle).
  342. --
  343. -- Note that widget names are separated by periods in paths (see
  344. -- `path'), so names with embedded periods may cause confusion.
  345. --
  346. -- a_name : name for the widget
  347. do
  348. gtk_widget_set_name (handle, a_name.to_external)
  349. end
  350. name: STRING is
  351. -- Retrieves the name of a widget. See `set_name' for the
  352. -- significance of widget names.
  353. --
  354. -- Returns : name of the widget.
  355. do
  356. create Result.from_external_copy (gtk_widget_get_name (handle))
  357. end
  358. -- void gtk_widget_set_state (GtkWidget *widget,
  359. -- GtkStateType state);
  360. -- void gtk_widget_set_parent (GtkWidget *widget,
  361. -- GtkWidget *parent);
  362. -- void gtk_widget_set_parent_window (GtkWidget *widget,
  363. -- GdkWindow *parent_window);
  364. window: GDK_WINDOW is
  365. -- Result can be void if window isn't realized yet
  366. local factory: G_OBJECT_EXPANDED_FACTORY [GDK_WINDOW]
  367. do
  368. Result := factory.wrapper_or_void (gtk_widget_get_window (handle))
  369. end
  370. parent_window: GDK_WINDOW is
  371. local factory: G_OBJECT_EXPANDED_FACTORY [GDK_WINDOW]
  372. do
  373. Result := factory.wrapper_or_void (gtk_widget_get_parent_window (handle))
  374. end
  375. -- void gtk_widget_set_uposition (GtkWidget *widget,
  376. -- gint x,
  377. -- gint y);
  378. -- void gtk_widget_set_usize (GtkWidget *widget,
  379. -- gint width,
  380. -- gint height);
  381. -- void gtk_widget_set_events (GtkWidget *widget,
  382. -- gint events);
  383. -- void gtk_widget_add_events (GtkWidget *widget,
  384. -- gint events);
  385. -- void gtk_widget_set_extension_events (GtkWidget *widget,
  386. -- GdkExtensionMode mode);
  387. -- GdkExtensionMode gtk_widget_get_extension_events
  388. -- (GtkWidget *widget);
  389. -- GtkWidget* gtk_widget_get_ancestor (GtkWidget *widget,
  390. -- GType widget_type);
  391. -- GdkColormap* gtk_widget_get_colormap (GtkWidget *widget);
  392. -- void gtk_widget_set_colormap (GtkWidget *widget,
  393. -- GdkColormap *colormap);
  394. -- GdkVisual* gtk_widget_get_visual (GtkWidget *widget);
  395. -- gint gtk_widget_get_events (GtkWidget *widget);
  396. -- void gtk_widget_get_pointer (GtkWidget *widget,
  397. -- gint *x,
  398. -- gint *y);
  399. -- gboolean gtk_widget_is_ancestor (GtkWidget *widget,
  400. -- GtkWidget *ancestor);
  401. -- gboolean gtk_widget_translate_coordinates
  402. -- (GtkWidget *src_widget,
  403. -- GtkWidget *dest_widget,
  404. -- gint src_x,
  405. -- gint src_y,
  406. -- gint *dest_x,
  407. -- gint *dest_y);
  408. -- gboolean gtk_widget_hide_on_delete (GtkWidget *widget);
  409. -- #define gtk_widget_set_rc_style (widget)
  410. -- void gtk_widget_ensure_style (GtkWidget *widget);
  411. -- #define gtk_widget_restore_default_style(widget)
  412. -- void gtk_widget_reset_rc_styles (GtkWidget *widget);
  413. -- void gtk_widget_push_colormap (GdkColormap *cmap);
  414. -- void gtk_widget_pop_colormap (void);
  415. -- void gtk_widget_set_default_colormap (GdkColormap *colormap);
  416. -- GtkStyle* gtk_widget_get_default_style (void);
  417. -- GdkColormap* gtk_widget_get_default_colormap
  418. -- (void);
  419. -- GdkVisual* gtk_widget_get_default_visual (void);
  420. -- void gtk_widget_set_direction (GtkWidget *widget,
  421. -- GtkTextDirection dir);
  422. -- enum GtkTextDirection;
  423. -- GtkTextDirection gtk_widget_get_direction (GtkWidget *widget);
  424. -- void gtk_widget_set_default_direction
  425. -- (GtkTextDirection dir);
  426. -- GtkTextDirection gtk_widget_get_default_direction
  427. -- (void);
  428. -- void gtk_widget_shape_combine_mask (GtkWidget *widget,
  429. -- GdkBitmap *shape_mask,
  430. -- gint offset_x,
  431. -- gint offset_y);
  432. -- void gtk_widget_path (GtkWidget *widget,
  433. -- guint *path_length,
  434. -- gchar **path,
  435. -- gchar **path_reversed);
  436. -- void gtk_widget_class_path (GtkWidget *widget,
  437. -- guint *path_length,
  438. -- gchar **path,
  439. -- gchar **path_reversed);
  440. -- gchar* gtk_widget_get_composite_name (GtkWidget *widget);
  441. -- void gtk_widget_modify_style (GtkWidget *widget,
  442. -- GtkRcStyle *style);
  443. -- GtkRcStyle* gtk_widget_get_modifier_style (GtkWidget *widget);
  444. -- void gtk_widget_modify_fg (GtkWidget *widget,
  445. -- GtkStateType state,
  446. -- const GdkColor *color);
  447. -- void gtk_widget_modify_bg (GtkWidget *widget,
  448. -- GtkStateType state,
  449. -- const GdkColor *color);
  450. -- void gtk_widget_modify_text (GtkWidget *widget,
  451. -- GtkStateType state,
  452. -- const GdkColor *color);
  453. -- void gtk_widget_modify_base (GtkWidget *widget,
  454. -- GtkStateType state,
  455. -- const GdkColor *color);
  456. -- void gtk_widget_modify_font (GtkWidget *widget,
  457. -- PangoFontDescription *font_desc);
  458. -- PangoContext* gtk_widget_get_pango_context (GtkWidget *widget);
  459. -- PangoLayout* gtk_widget_create_pango_layout (GtkWidget *widget,
  460. -- const gchar *text);
  461. -- GdkPixbuf* gtk_widget_render_icon (GtkWidget *widget,
  462. -- const gchar *stock_id,
  463. -- GtkIconSize size,
  464. -- const gchar *detail);
  465. -- void gtk_widget_pop_composite_child (void);
  466. -- void gtk_widget_push_composite_child (void);
  467. -- void gtk_widget_queue_clear (GtkWidget *widget);
  468. -- void gtk_widget_queue_clear_area (GtkWidget *widget,
  469. -- gint x,
  470. -- gint y,
  471. -- gint width,
  472. -- gint height);
  473. -- void gtk_widget_queue_draw_area (GtkWidget *widget,
  474. -- gint x,
  475. -- gint y,
  476. -- gint width,
  477. -- gint height);
  478. -- void gtk_widget_reset_shapes (GtkWidget *widget);
  479. -- void gtk_widget_set_app_paintable (GtkWidget *widget,
  480. -- gboolean app_paintable);
  481. -- void gtk_widget_set_double_buffered (GtkWidget *widget,
  482. -- gboolean double_buffered);
  483. -- void gtk_widget_set_redraw_on_allocate
  484. -- (GtkWidget *widget,
  485. -- gboolean redraw_on_allocate);
  486. -- void gtk_widget_set_composite_name (GtkWidget *widget,
  487. -- const gchar *name);
  488. -- gboolean gtk_widget_set_scroll_adjustments
  489. -- (GtkWidget *widget,
  490. -- GtkAdjustment *hadjustment,
  491. -- GtkAdjustment *vadjustment);
  492. -- gboolean gtk_widget_mnemonic_activate (GtkWidget *widget,
  493. -- gboolean group_cycling);
  494. -- void gtk_widget_class_install_style_property
  495. -- (GtkWidgetClass *klass,
  496. -- GParamSpec *pspec);
  497. -- void gtk_widget_class_install_style_property_parser
  498. -- (GtkWidgetClass *klass,
  499. -- GParamSpec *pspec,
  500. -- GtkRcPropertyParser parser);
  501. -- GParamSpec* gtk_widget_class_find_style_property
  502. -- (GtkWidgetClass *klass,
  503. -- const gchar *property_name);
  504. -- GParamSpec** gtk_widget_class_list_style_properties
  505. -- (GtkWidgetClass *klass,
  506. -- guint *n_properties);
  507. -- GdkRegion* gtk_widget_region_intersect (GtkWidget *widget,
  508. -- GdkRegion *region);
  509. -- gint gtk_widget_send_expose (GtkWidget *widget,
  510. -- GdkEvent *event);
  511. -- void gtk_widget_style_get (GtkWidget *widget,
  512. -- const gchar *first_property_name,
  513. -- ...);
  514. -- void gtk_widget_style_get_property (GtkWidget *widget,
  515. -- const gchar *property_name,
  516. -- GValue *value);
  517. -- void gtk_widget_style_get_valist (GtkWidget *widget,
  518. -- const gchar *first_property_name,
  519. -- va_list var_args);
  520. -- AtkObject* gtk_widget_get_accessible (GtkWidget *widget);
  521. -- gboolean gtk_widget_child_focus (GtkWidget *widget,
  522. -- GtkDirectionType direction);
  523. -- void gtk_widget_child_notify (GtkWidget *widget,
  524. -- const gchar *child_property);
  525. -- void gtk_widget_freeze_child_notify (GtkWidget *widget);
  526. -- gboolean gtk_widget_get_child_visible (GtkWidget *widget);
  527. -- GtkWidget* gtk_widget_get_parent (GtkWidget *widget);
  528. -- GtkSettings* gtk_widget_get_settings (GtkWidget *widget);
  529. -- GtkClipboard* gtk_widget_get_clipboard (GtkWidget *widget,
  530. -- GdkAtom selection);
  531. -- GdkDisplay* gtk_widget_get_display (GtkWidget *widget);
  532. -- GdkWindow* gtk_widget_get_root_window (GtkWidget *widget);
  533. -- GdkScreen* gtk_widget_get_screen (GtkWidget *widget);
  534. -- gboolean gtk_widget_has_screen (GtkWidget *widget);
  535. -- #define gtk_widget_pop_visual ()
  536. -- #define gtk_widget_push_visual (visual)
  537. -- void gtk_widget_set_child_visible (GtkWidget *widget,
  538. -- gboolean is_visible);
  539. -- #define gtk_widget_set_default_visual (visual)
  540. -- #define gtk_widget_set_visual (widget,visual)
  541. -- void gtk_widget_thaw_child_notify (GtkWidget *widget);
  542. -- void gtk_widget_set_no_show_all (GtkWidget *widget,
  543. -- gboolean no_show_all);
  544. -- gboolean gtk_widget_get_no_show_all (GtkWidget *widget);
  545. -- GList* gtk_widget_list_mnemonic_labels (GtkWidget *widget);
  546. -- void gtk_widget_add_mnemonic_label (GtkWidget *widget,
  547. -- GtkWidget *label);
  548. -- void gtk_widget_remove_mnemonic_label
  549. -- (GtkWidget *widget,
  550. -- GtkWidget *label);
  551. -- GtkRequisition* gtk_requisition_copy (const GtkRequisition *requisition);
  552. -- void gtk_requisition_free (GtkRequisition *requisition);
  553. -- Object Hierarchy
  554. -- GObject
  555. -- +----GtkObject
  556. -- +----GtkWidget
  557. -- +----GtkContainer
  558. -- +----GtkMisc
  559. -- +----GtkCalendar
  560. -- +----GtkCellView
  561. -- +----GtkDrawingArea
  562. -- +----GtkEntry
  563. -- +----GtkRuler
  564. -- +----GtkRange
  565. -- +----GtkSeparator
  566. -- +----GtkInvisible
  567. -- +----GtkOldEditable
  568. -- +----GtkPreview
  569. -- +----GtkProgress
  570. -- Known Derived Interfaces
  571. -- GtkWidget is required by GtkFileChooser and GtkCellEditable.
  572. -- Implemented Interfaces
  573. -- GtkWidget implements AtkImplementorIface.
  574. -- Properties
  575. -- "app-paintable" gboolean : Read / Write
  576. -- "can-default" gboolean : Read / Write
  577. -- "can-focus" gboolean : Read / Write
  578. -- "composite-child" gboolean : Read
  579. -- "events" GdkEventMask : Read / Write
  580. -- "extension-events" GdkExtensionMode : Read / Write
  581. -- "has-default" gboolean : Read / Write
  582. -- "has-focus" gboolean : Read / Write
  583. -- "height-request" gint : Read / Write
  584. -- "is-focus" gboolean : Read / Write
  585. -- "name" gchararray : Read / Write
  586. -- "no-show-all" gboolean : Read / Write
  587. -- "parent" GtkContainer : Read / Write
  588. -- "receives-default" gboolean : Read / Write
  589. -- "sensitive" gboolean : Read / Write
  590. -- "style" GtkStyle : Read / Write
  591. -- "visible" gboolean : Read / Write
  592. -- "width-request" gint : Read / Write
  593. -- Style Properties
  594. -- "cursor-aspect-ratio" gfloat : Read
  595. -- "cursor-color" GdkColor : Read
  596. -- "draw-border" GtkBorder : Read
  597. -- "focus-line-pattern" gchararray : Read
  598. -- "focus-line-width" gint : Read
  599. -- "focus-padding" gint : Read
  600. -- "interior-focus" gboolean : Read
  601. -- "secondary-cursor-color" GdkColor : Read
  602. feature -- Signals
  603. -- "accel-closures-changed"
  604. -- void user_function (GtkWidget *widget,
  605. -- gpointer user_data) :
  606. -- "can-activate-accel"
  607. -- gboolean user_function (GtkWidget *widget,
  608. -- guint signal_id,
  609. -- gpointer user_data) : Run last
  610. -- "child-notify"
  611. -- void user_function (GtkWidget *widget,
  612. -- GParamSpec *pspec,
  613. -- gpointer user_data) : Run first / No recursion / Has details / No hooks
  614. -- "client-event"
  615. -- gboolean user_function (GtkWidget *widget,
  616. -- GdkEventClient *event,
  617. -- gpointer user_data) : Run last
  618. -- "configure-event"
  619. -- gboolean user_function (GtkWidget *widget,
  620. -- GdkEventConfigure *event,
  621. -- gpointer user_data) : Run last
  622. feature -- delete-event signal
  623. delete_event_signal_name: STRING is "delete-event"
  624. enable_on_delete_event is
  625. -- Connects "delete-event" signal to `on_delete_event' feature.
  626. do
  627. connect (Current, delete_event_signal_name, $on_delete_event)
  628. end
  629. on_delete_event: INTEGER is
  630. -- Built-in delete-event signal handler; empty by design; redefine it.
  631. -- The `delete-event' signal is emitted if a user requests that a
  632. -- toplevel window is closed. The default handler for this signal
  633. -- destroys the window.
  634. -- finish with "Result := 1" to stop other handlers.
  635. do
  636. end
  637. connect_agent_to_delete_event_signal (a_function: FUNCTION[ANY, TUPLE [GTK_WIDGET, GDK_EVENT], BOOLEAN]) is
  638. require
  639. valid_function: a_function /= Void
  640. wrapper_is_stored: is_eiffel_wrapper_stored
  641. local
  642. delete_event_callback: DELETE_EVENT_CALLBACK
  643. do
  644. create delete_event_callback.make
  645. delete_event_callback.connect (Current, a_function)
  646. end
  647. -- "direction-changed"
  648. -- void user_function (GtkWidget *widget,
  649. -- GtkTextDirection arg1,
  650. -- gpointer user_data) : Run first
  651. feature -- drag-begin signal
  652. drag_begin_signal_name: STRING is "drag-begin"
  653. -- "drag-begin"
  654. -- void user_function (GtkWidget *widget,
  655. -- GdkDragContext *drag_context,
  656. -- gpointer user_data) : Run last
  657. enable_on_drag_begin is
  658. -- Connects "drag-begin" signal to `on_drag_begin' feature.
  659. do
  660. connect (Current, drag_begin_signal_name, $on_drag_begin)
  661. end
  662. on_drag_begin: INTEGER is
  663. -- Built-in drag-begin signal handler; empty by design; redefine it.
  664. -- The `drag-begin' signal is emitted on the drag source
  665. -- when a drag is started. A typical reason to connect to this
  666. -- signal is to set up a custom drag icon with
  667. -- gtk_drag_source_set_icon().
  668. do
  669. end
  670. connect_agent_to_drag_begin_signal (a_procedure: PROCEDURE[ANY, TUPLE [GDK_DRAG_CONTEXT, GTK_WIDGET]]) is
  671. -- widget : the object which received the signal.
  672. -- drag_context : the drag context
  673. require
  674. valid_procedure: a_procedure /= Void
  675. wrapper_is_stored: is_eiffel_wrapper_stored
  676. local
  677. drag_begin_callback: DRAG_BEGIN_CALLBACK
  678. do
  679. create drag_begin_callback.make
  680. drag_begin_callback.connect (Current, a_procedure)
  681. end
  682. feature -- drag-data-delete signal
  683. drag_data_delete_signal_name: STRING is "drag-data-delete"
  684. -- "drag-data-delete"
  685. -- void user_function (GtkWidget *widget,
  686. -- GdkDragContext *drag_context,
  687. -- gpointer user_data) : Run last
  688. enable_on_drag_data_delete is
  689. -- Connects "drag-data-delete" signal to `on_drag_data_delete' feature.
  690. do
  691. connect (Current, drag_data_delete_signal_name, $on_drag_data_delete)
  692. end
  693. on_drag_data_delete: INTEGER is
  694. -- Built-in drag-data-delete signal handler; empty by design; redefine it.
  695. -- The `drag-data-delete' signal is emitted on the drag
  696. -- source when a drag with the action GDK_ACTION_MOVE is
  697. -- successfully completed. The signal handler is responsible
  698. -- for deleting the data that has been dropped. What "delete"
  699. -- means, depends on the context of the drag operation
  700. do
  701. end
  702. connect_agent_to_drag_data_delete_signal (a_procedure: PROCEDURE[ANY, TUPLE [GDK_DRAG_CONTEXT, GTK_WIDGET]]) is
  703. -- widget : the object which received the signal.
  704. -- drag_context : the drag context
  705. require
  706. valid_procedure: a_procedure /= Void
  707. wrapper_is_stored: is_eiffel_wrapper_stored
  708. local
  709. drag_data_delete_callback: DRAG_DATA_DELETE_CALLBACK
  710. do
  711. create drag_data_delete_callback.make
  712. drag_data_delete_callback.connect (Current, a_procedure)
  713. end
  714. feature -- drag-data-get signal
  715. drag_data_get_signal_name: STRING is "drag-data-get"
  716. -- "drag-data-get"
  717. -- void user_function (GtkWidget *widget,
  718. -- GdkDragContext *drag_context,
  719. -- GtkSelectionData *data,
  720. -- guint info,
  721. -- guint time,
  722. -- gpointer user_data) : Run last
  723. enable_on_drag_data_get is
  724. -- Connects "drag-data-get" signal to `on_drag_data_get' feature.
  725. do
  726. connect (Current, drag_data_get_signal_name, $on_drag_data_get)
  727. end
  728. on_drag_data_get: INTEGER is
  729. -- Built-in drag-data-get signal handler; empty by design; redefine it.
  730. -- The `drag-data-get' signal is emitted on the drag source
  731. -- when the drop site requests the data which is dragged. It is
  732. -- the responsibility of the signal handler to fill data with
  733. -- the data in the format which is indicated by info. See
  734. -- gtk_selection_data_set() and gtk_selection_data_set_text().
  735. do
  736. end
  737. connect_agent_to_drag_data_get_signal (a_procedure: PROCEDURE[ANY,
  738. TUPLE [GDK_DRAG_CONTEXT, GTK_SELECTION_DATA,
  739. INTEGER, INTEGER, GTK_WIDGET]]) is
  740. -- widget : the object which received the signal.
  741. -- drag_context : the drag context
  742. -- data : the GtkSelectionData to be filled with the dragged data
  743. -- info : the info that has been registered with the target in the GtkTargetList.
  744. -- time : the timestamp at which the data was requested
  745. require
  746. valid_procedure: a_procedure /= Void
  747. wrapper_is_stored: is_eiffel_wrapper_stored
  748. local
  749. drag_data_get_callback: DRAG_DATA_GET_CALLBACK
  750. do
  751. create drag_data_get_callback.make
  752. drag_data_get_callback.connect (Current, a_procedure)
  753. end
  754. feature -- drag-data-received signal
  755. drag_data_received_signal_name: STRING is "drag-data-received"
  756. -- "drag-data-received"
  757. -- void user_function (GtkWidget *widget,
  758. -- GdkDragContext *drag_context,
  759. -- gint x,
  760. -- gint y,
  761. -- GtkSelectionData *data,
  762. -- guint info,
  763. -- guint time,
  764. -- gpointer user_data) : Run last
  765. enable_on_drag_data_received is
  766. -- Connects "drag-data-received" signal to `on_drag_data_received' feature.
  767. do
  768. connect (Current, drag_data_received_signal_name, $on_drag_data_received)
  769. end
  770. on_drag_data_received: INTEGER is
  771. -- Built-in drag-data-received signal handler; empty by design; redefine it.
  772. -- The `drag-data-received' signal is emitted on the drop
  773. -- site when the dragged data has been received. If the data
  774. -- was received in order to determine whether the drop will be
  775. -- accepted, the handler is expected to call gdk_drag_status()
  776. -- and not finish the drag. If the data was received in
  777. -- response to a `drag-drop' signal (and this is the last
  778. -- target to be received), the handler for this signal is
  779. -- expected to process the received data and then call
  780. -- gtk_drag_finish(), setting the success parameter depending
  781. -- on whether the data was processed successfully.
  782. -- The handler may inspect and modify drag_context->action
  783. -- before calling gtk_drag_finish(), e.g. to implement
  784. -- GDK_ACTION_ASK as shown in the following example:
  785. -- (see http://developer.gnome.org/doc/API/2.0/gtk/GtkWidget.html#GtkWidget-drag-data-received)
  786. do
  787. end
  788. connect_agent_to_drag_data_received_signal (a_procedure: PROCEDURE[ANY,
  789. TUPLE [GDK_DRAG_CONTEXT, INTEGER, INTEGER,
  790. GTK_SELECTION_DATA, INTEGER, INTEGER,
  791. GTK_WIDGET]]) is
  792. -- widget : the object which received the signal.
  793. -- drag_context : the drag context
  794. -- x : where the drop happened
  795. -- y : where the drop happened
  796. -- data : the received data
  797. -- info : the info that has been registered with the target in the GtkTargetList.
  798. -- time : the timestamp at which the data was received
  799. require
  800. valid_procedure: a_procedure /= Void
  801. wrapper_is_stored: is_eiffel_wrapper_stored
  802. local
  803. drag_data_received_callback: DRAG_DATA_RECEIVED_CALLBACK
  804. do
  805. create drag_data_received_callback.make
  806. drag_data_received_callback.connect (Current, a_procedure)
  807. end
  808. feature -- drag-drop signal
  809. drag_drop_signal_name: STRING is "drag-drop"
  810. -- "drag-drop" gboolean user_function (GtkWidget *widget,
  811. -- GdkDragContext *drag_context,
  812. -- gint x,
  813. -- gint y,
  814. -- guint time,
  815. -- gpointer user_data) : Run last
  816. enable_on_drag_drop is
  817. -- Connects "drag-drop" signal to `on_drag_drop' feature.
  818. do
  819. connect (Current, drag_drop_signal_name, $on_drag_drop)
  820. end
  821. on_drag_drop: INTEGER is
  822. -- Built-in drag-drop signal handler; empty by design; redefine it.
  823. -- The `drag-drop signal' is emitted on the drop site when
  824. -- the user drops the data onto the widget. The signal handler
  825. -- must determine whether the cursor position is in a drop zone
  826. -- or not. If it is not in a drop zone, it returns FALSE and no
  827. -- further processing is necessary. Otherwise, the handler
  828. -- returns TRUE. In this case, the handler must ensure that
  829. -- gtk_drag_finish() is called to let the source know that the
  830. -- drop is done. The call to gtk_drag_finish() can be done
  831. -- either directly or in a ::drag-data-received handler which
  832. -- gets triggered by calling gtk_drop_get_data() to receive the
  833. -- data for one or more of the supported targets.
  834. do
  835. end
  836. connect_agent_to_drag_drop_signal (a_function: FUNCTION[ANY, TUPLE [GDK_DRAG_CONTEXT, INTEGER, INTEGER,
  837. INTEGER, GTK_WIDGET], BOOLEAN]) is
  838. -- widget : the object which received the signal.
  839. -- drag_context : the drag context
  840. -- x : the x coordinate of the current cursor position
  841. -- y : the y coordinate of the current cursor position
  842. -- time : the timestamp of the motion event
  843. -- returns : whether the cursor position is in a drop zone
  844. require
  845. valid_function: a_function /= Void
  846. wrapper_is_stored: is_eiffel_wrapper_stored
  847. local
  848. drag_drop_callback: DRAG_DROP_CALLBACK
  849. do
  850. create drag_drop_callback.make
  851. drag_drop_callback.connect (Current, a_function)
  852. end
  853. feature -- drag-end signal
  854. drag_end_signal_name: STRING is "drag-end"
  855. -- "drag-end" void user_function (GtkWidget *widget,
  856. -- GdkDragContext *drag_context,
  857. -- gpointer user_data) : Run last
  858. enable_on_drag_end is
  859. -- Connects "drag-end" signal to `on_drag_end' feature.
  860. do
  861. connect (Current, drag_end_signal_name, $on_drag_end)
  862. end
  863. on_drag_end: INTEGER is
  864. -- Built-in drag-end signal handler; empty by design; redefine it.
  865. -- The `drag-end' signal is emitted on the drag source when
  866. -- a drag is finished. A typical reason to connect to this
  867. -- signal is to undo things done in `drag-begin'.
  868. do
  869. end
  870. connect_agent_to_drag_end_signal (a_procedure: PROCEDURE[ANY, TUPLE [GDK_DRAG_CONTEXT, GTK_WIDGET]]) is
  871. -- widget : the object which received the signal.
  872. -- drag_context : the drag context
  873. require
  874. valid_procedure: a_procedure /= Void
  875. wrapper_is_stored: is_eiffel_wrapper_stored
  876. local
  877. drag_end_callback: DRAG_END_CALLBACK
  878. do
  879. create drag_end_callback.make
  880. drag_end_callback.connect (Current, a_procedure)
  881. end
  882. feature -- drag-leave signal
  883. drag_leave_signal_name: STRING is "drag-leave"
  884. -- "drag-leave"
  885. -- void user_function (GtkWidget *widget,
  886. -- GdkDragContext *drag_context,
  887. -- guint time,
  888. -- gpointer user_data) : Run last
  889. enable_on_drag_leave is
  890. -- Connects "drag-leave" signal to `on_drag_leave' feature.
  891. do
  892. connect (Current, drag_leave_signal_name, $on_drag_leave)
  893. end
  894. on_drag_leave: INTEGER is
  895. -- Built-in drag-leave signal handler; empty by design; redefine it.
  896. -- The `drag-leave' signal is emitted on the drop site when
  897. -- the cursor leaves the widget. A typical reason to connect to
  898. -- this signal is to undo things done in `drag-motion', e.g.
  899. -- undo highlighting with gtk_drag_unhighlight()
  900. do
  901. end
  902. connect_agent_to_drag_leave_signal (a_procedure: PROCEDURE[ANY, TUPLE [GDK_DRAG_CONTEXT, INTEGER, GTK_WIDGET]]) is
  903. -- widget : the object which received the signal.
  904. -- drag_context : the drag context
  905. -- time : the timestamp of the motion event
  906. require
  907. valid_procedure: a_procedure /= Void
  908. wrapper_is_stored: is_eiffel_wrapper_stored
  909. local
  910. drag_leave_callback: DRAG_LEAVE_CALLBACK
  911. do
  912. create drag_leave_callback.make
  913. drag_leave_callback.connect (Current, a_procedure)
  914. end
  915. feature -- drag-motion signal
  916. drag_motion_signal_name: STRING is "drag-motion"
  917. -- "drag-motion"
  918. -- gboolean user_function (GtkWidget *widget,
  919. -- GdkDragContext *drag_context,
  920. -- gint x,
  921. -- gint y,
  922. -- guint time,
  923. -- gpointer user_data) : Run last
  924. enable_on_drag_motion is
  925. -- Connects "drag-motion" signal to `on_drag_motion' feature.
  926. do
  927. connect (Current, drag_motion_signal_name, $on_drag_motion)
  928. end
  929. on_drag_motion: INTEGER is
  930. -- Built-in drag-motion signal handler; empty by design; redefine it.
  931. -- The `drag-motion' signal is emitted on the drop site when
  932. -- the user moves the cursor over the widget during a drag. The
  933. -- signal handler must determine whether the cursor position is
  934. -- in a drop zone or not. If it is not in a drop zone, it
  935. -- returns FALSE and no further processing is necessary.
  936. -- Otherwise, the handler returns TRUE. In this case, the
  937. -- handler is responsible for providing the necessary
  938. -- information for displaying feedback to the user, by calling
  939. -- gdk_drag_status(). If the decision whether the drop will be
  940. -- accepted or rejected can't be made based solely on the
  941. -- cursor position and the type of the data, the handler may
  942. -- inspect the dragged data by calling gtk_drag_get_data() and
  943. -- defer the gdk_drag_status() call to the `drag-data-received'
  944. -- handler.
  945. -- Note that there is no `drag-enter' signal. The drag
  946. -- receiver has to keep track of whether he has received any
  947. -- `drag-motion' signals since the last `drag-leave' and if
  948. -- not, treat the `drag-motion' signal as an "enter" signal.
  949. -- Upon an "enter", the handler will typically highlight the
  950. -- drop site with gtk_drag_highlight().
  951. -- See an example here: http://developer.gnome.org/doc/API/2.0/gtk/GtkWidget.html#GtkWidget-drag-motion.
  952. do
  953. end
  954. connect_agent_to_drag_motion_signal (a_function: FUNCTION[ANY, TUPLE [GDK_DRAG_CONTEXT, INTEGER, INTEGER,
  955. INTEGER, GTK_WIDGET], BOOLEAN]) is
  956. -- widget : the object which received the signal.
  957. -- drag_context : the drag context
  958. -- x : the x coordinate of the current cursor position
  959. -- y : the y coordinate of the current cursor position
  960. -- time : the timestamp of the motion event
  961. -- returns : whether the cursor position is in a drop zone
  962. require
  963. valid_function: a_function /= Void
  964. wrapper_is_stored: is_eiffel_wrapper_stored
  965. local
  966. drag_motion_callback: DRAG_MOTION_CALLBACK
  967. do
  968. create drag_motion_callback.make
  969. drag_motion_callback.connect (Current, a_function)
  970. end
  971. feature -- enter-notify-event signal
  972. enter_notify_event_signal_name: STRING is "enter-notify-event"
  973. -- "enter-notify-event"
  974. -- gboolean user_function (GtkWidget *widget,
  975. -- GdkEventCrossing *event,
  976. -- gpointer user_data) : Run last
  977. enable_on_enter_notify_event is
  978. -- Connects "enter-notify-event" signal to `on_enter_notify_event' feature.
  979. do
  980. connect (Current, enter_notify_event_signal_name, $on_enter_notify_event)
  981. end
  982. on_enter_notify_event (an_event_crossing: GDK_EVENT_CROSSING; a_widget: GTK_WIDGET): BOOLEAN is
  983. -- Built-in enter-notify-event signal handler; empty by design; redefine it.
  984. do
  985. end
  986. connect_agent_to_enter_notify_event_signal (a_function: FUNCTION[ANY, TUPLE [GDK_EVENT_CROSSING, GTK_WIDGET], BOOLEAN]) is
  987. -- widget : the object which received the signal.
  988. -- event :
  989. -- user_data : user data set when the signal handler was connected.
  990. -- Returns : TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further.
  991. require
  992. valid_function: a_function /= Void
  993. wrapper_is_stored: is_eiffel_wrapper_stored
  994. local
  995. enter_notify_event_callback: ENTER_NOTIFY_EVENT_CALLBACK
  996. do
  997. create enter_notify_event_callback.make
  998. enter_notify_event_callback.connect (Current, a_function)
  999. end
  1000. -- "event" gboolean user_function (GtkWidget *widget,
  1001. -- GdkEvent *event,
  1002. -- gpointer user_data) : Run last
  1003. -- "event-after"
  1004. -- void user_function (GtkWidget *widget,
  1005. -- GdkEvent *event,
  1006. -- gpointer user_data) :
  1007. -- gboolean user_function (GtkWidget *widget,
  1008. -- GdkEventExpose *event,
  1009. -- gpointer user_data) : Run last
  1010. feature -- "expose-event"
  1011. connect_agent_to_expose_event_signal (a_function: FUNCTION[ANY, TUPLE [GDK_EVENT_EXPOSE, GTK_WIDGET], BOOLEAN]) is
  1012. -- The ::expose-event signal is emitted when an area of a previously
  1013. -- obscured GdkWindow is made visible and needs to be redrawn.
  1014. -- GTK_NO_WINDOW widgets will get a synthesized event from their
  1015. -- parent widget.
  1016. --
  1017. -- To receive this signal, the GdkWindow associated to the widget
  1018. -- needs to enable the GDK_EXPOSURE_MASK mask.
  1019. require
  1020. valid_function: a_function /= Void
  1021. wrapper_is_stored: is_eiffel_wrapper_stored
  1022. local
  1023. expose_event_callback: EXPOSE_EVENT_CALLBACK
  1024. do
  1025. create expose_event_callback.make
  1026. expose_event_callback.connect (Current, a_function)
  1027. end
  1028. -- "focus" gboolean user_function (GtkWidget *widget,
  1029. -- GtkDirectionType arg1,
  1030. -- gpointer user_data) : Run last
  1031. -- "focus-in-event"
  1032. -- gboolean user_function (GtkWidget *widget,
  1033. -- GdkEventFocus *event,
  1034. -- gpointer user_data) : Run last
  1035. feature -- focus-out-event signal
  1036. focus_out_event_signal_name: STRING is "focus-out-event"
  1037. -- "focus-out-event"
  1038. -- gboolean user_function (GtkWidget *widget,
  1039. -- GdkEventFocus *event,
  1040. -- gpointer user_data) : Run last
  1041. enable_on_focus_out_event is
  1042. -- Connects "kry-press-event" signal to `on_focus_out_event' feature.
  1043. do
  1044. connect (Current, focus_out_event_signal_name, $on_focus_out_event)
  1045. end
  1046. on_focus_out_event: INTEGER is
  1047. -- Built-in focus-out-event signal handler; empty by design; redefine it.
  1048. do
  1049. end
  1050. connect_agent_to_focus_out_event_signal (a_function: FUNCTION[ANY, TUPLE [GDK_EVENT_FOCUS, GTK_WIDGET], BOOLEAN]) is
  1051. -- The `focus-out-event' signal will be emitted when the keyboard focus
  1052. -- leaves the widget's window.
  1053. -- To receive this signal, the GdkWindow associated to the widget needs to
  1054. -- enable the GDK_FOCUS_CHANGE_MASK mask.
  1055. -- widget: the object which received the signal
  1056. -- event: the GdkEventFocus which triggered this signal
  1057. -- Returns: True to stop other handlers from being invoked for the
  1058. -- event. False to propagate the event further.
  1059. require
  1060. valid_function: a_function /= Void
  1061. wrapper_is_stored: is_eiffel_wrapper_stored
  1062. local
  1063. focus_out_event_callback: FOCUS_OUT_EVENT_CALLBACK
  1064. do
  1065. create focus_out_event_callback.make
  1066. focus_out_event_callback.connect (Current, a_function)
  1067. end
  1068. -- "grab-broken-event"
  1069. -- gboolean user_function (GtkWidget *widget,
  1070. -- GdkEvent *event,
  1071. -- gpointer user_data) : Run last
  1072. -- "grab-focus"
  1073. -- void user_function (GtkWidget *widget,
  1074. -- gpointer user_data) : Run last / Action
  1075. -- "grab-notify"
  1076. -- void user_function (GtkWidget *widget,
  1077. -- gboolean arg1,
  1078. -- gpointer user_data) : Run first
  1079. -- "hide" void user_function (GtkWidget *widget,
  1080. -- gpointer user_data) : Run first
  1081. -- "hierarchy-changed"
  1082. -- void user_function (GtkWidget *widget,
  1083. -- GtkWidget *widget2,
  1084. -- gpointer user_data) : Run last
  1085. feature -- key-press-event signal
  1086. key_press_event_signal_name: STRING is "key-press-event"
  1087. -- "key-press-event" signal
  1088. -- gboolean user_function (GtkWidget *widget,
  1089. -- GdkEventKey *event,
  1090. -- gpointer user_data) : Run last
  1091. enable_on_key_press_event is
  1092. -- Connects "kry-press-event" signal to `on_key_press_event' feature.
  1093. do
  1094. connect (Current, key_press_event_signal_name, $on_key_press_event)
  1095. end
  1096. on_key_press_event: INTEGER is
  1097. -- Built-in key-press-event signal handler; empty by design; redefine it.
  1098. do
  1099. end
  1100. connect_agent_to_key_press_event_signal (a_function: FUNCTION[ANY, TUPLE [GDK_EVENT_KEY, GTK_WIDGET], BOOLEAN]) is
  1101. -- widget : the object which received the signal.
  1102. -- event :
  1103. -- user_data : user data set when the signal handler was connected.
  1104. -- Returns : TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further.
  1105. require
  1106. valid_function: a_function /= Void
  1107. wrapper_is_stored: is_eiffel_wrapper_stored
  1108. local
  1109. key_press_event_callback: KEY_PRESS_EVENT_CALLBACK
  1110. do
  1111. create key_press_event_callback.make
  1112. key_press_event_callback.connect (Current, a_function)
  1113. end
  1114. -- "key-release-event"
  1115. -- gboolean user_function (GtkWidget *widget,
  1116. -- GdkEventKey *event,
  1117. -- gpointer user_data) : Run last
  1118. feature -- leave-notify-event signal
  1119. leave_notify_event_signal_name: STRING is "leave-notify-event"
  1120. -- "leave-notify-event"
  1121. -- gboolean user_function (GtkWidget *widget,
  1122. -- GdkEventCrossing *event,
  1123. -- gpointer user_data) : Run last
  1124. enable_on_leave_notify_event is
  1125. -- Connects "leave-notify-event" signal to `on_leave_notify_event' feature.
  1126. do
  1127. connect (Current, leave_notify_event_signal_name, $on_leave_notify_event)
  1128. end
  1129. on_leave_notify_event (an_event_crossing: GDK_EVENT_CROSSING; a_widget: GTK_WIDGET): BOOLEAN is
  1130. -- Built-in leave-notify-event signal handler; empty by design; redefine it.
  1131. do
  1132. end
  1133. connect_agent_to_leave_notify_event_signal (a_function: FUNCTION[ANY, TUPLE [GDK_EVENT_CROSSING, GTK_WIDGET], BOOLEAN]) is
  1134. -- widget : the object which received the signal.
  1135. -- event :
  1136. -- user_data : user data set when the signal handler was connected.
  1137. -- Returns : TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further.
  1138. require
  1139. valid_function: a_function /= Void
  1140. wrapper_is_stored: is_eiffel_wrapper_stored
  1141. local
  1142. leave_notify_event_callback: LEAVE_NOTIFY_EVENT_CALLBACK
  1143. do
  1144. create leave_notify_event_callback.make
  1145. leave_notify_event_callback.connect (Current, a_function)
  1146. end
  1147. -- "map" void user_function (GtkWidget *widget,
  1148. -- gpointer user_data) : Run first
  1149. -- "map-event" gboolean user_function (GtkWidget *widget,
  1150. -- GdkEvent *event,
  1151. -- gpointer user_data) : Run last
  1152. -- "mnemonic-activate"
  1153. -- gboolean user_function (GtkWidget *widget,
  1154. -- gboolean arg1,
  1155. -- gpointer user_data) : Run last
  1156. feature -- motion-notify-event signal
  1157. motion_notify_event_signal_name: STRING is "motion-notify-event"
  1158. -- "motion-notify-event"
  1159. -- gboolean user_function (GtkWidget *widget,
  1160. -- GdkEventMotion *event,
  1161. -- gpointer user_data) : Run last
  1162. enable_on_motion_notify_event is
  1163. -- Connects "motion-notify-event" signal to `on_motion_notify_event' feature.
  1164. do
  1165. connect (Current, motion_notify_event_signal_name, $on_motion_notify_event)
  1166. end
  1167. on_motion_notify_event (a_event_motion: GDK_EVENT_MOTION; a_widet: GTK_WIDGET): BOOLEAN is
  1168. -- Built-in motion-notify-event signal handler; empty by design; redefine it.
  1169. do
  1170. end
  1171. connect_agent_to_motion_notify_event_signal (a_function: FUNCTION[ANY, TUPLE [GDK_EVENT_MOTION, GTK_WIDGET], BOOLEAN]) is
  1172. -- widget : the object which received the signal.
  1173. -- event :
  1174. -- user_data : user data set when the signal handler was connected.
  1175. -- Returns : TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further.
  1176. require
  1177. valid_function: a_function /= Void
  1178. wrapper_is_stored: is_eiffel_wrapper_stored
  1179. local
  1180. motion_notify_event_callback: MOTION_NOTIFY_EVENT_CALLBACK
  1181. do
  1182. create motion_notify_event_callback.make
  1183. motion_notify_event_callback.connect (Current, a_function)
  1184. end
  1185. feature -- button-release-event signal
  1186. button_release_event_signal_name: STRING is "button-release-event"
  1187. -- "button-release-event" signal
  1188. -- gboolean user_function (GtkWidget *widget,
  1189. -- GdkEventButton *event,
  1190. -- gpointer user_data) : Run last
  1191. enable_on_button_release_event is
  1192. -- Connects "button-release-event" signal to `on_button_release_event' feature.
  1193. do
  1194. connect (Current, button_release_event_signal_name, $on_button_release_event)
  1195. end
  1196. on_button_release_event (event: GDK_EVENT_BUTTON; a_widget: GTK_WIDGET): BOOLEAN is
  1197. -- Built-in button-release-event signal handler; empty by design; redefine it.
  1198. do
  1199. end
  1200. connect_agent_to_button_release_event_signal (a_function: FUNCTION[ANY, TUPLE [GDK_EVENT_BUTTON, GTK_WIDGET], BOOLEAN]) is
  1201. -- widget : the object which received the signal.
  1202. -- event :
  1203. -- user_data : user data set when the signal handler was connected.
  1204. -- Returns : TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further.
  1205. require
  1206. valid_function: a_function /= Void
  1207. wrapper_is_stored: is_eiffel_wrapper_stored
  1208. local
  1209. button_release_event_callback: BUTTON_RELEASE_EVENT_CALLBACK
  1210. do
  1211. create button_release_event_callback.make
  1212. button_release_event_callback.connect (Current, a_function)
  1213. end
  1214. feature -- button-press-event signal
  1215. button_press_event_signal_name: STRING is "button-press-event"
  1216. -- "button-press-event" signal
  1217. -- gboolean user_function (GtkWidget *widget,
  1218. -- GdkEventButton *event,
  1219. -- gpointer user_data) : Run last
  1220. enable_on_button_press_event is
  1221. -- Connects "button-press-event" signal to `on_button_press_event' feature.
  1222. do
  1223. connect (Current, button_press_event_signal_name, $on_button_press_event)
  1224. end
  1225. on_button_press_event (event: GDK_EVENT_BUTTON; a_widget: GTK_WIDGET): BOOLEAN is
  1226. -- Built-in button-press-event signal handler; empty by design; redefine it.
  1227. do
  1228. end
  1229. connect_agent_to_button_press_event_signal (a_function: FUNCTION[ANY, TUPLE [GDK_EVENT_BUTTON, GTK_WIDGET], BOOLEAN]) is
  1230. -- widget : the object which received the signal.
  1231. -- event :
  1232. -- user_data : user data set when the signal handler was connected.
  1233. -- Returns : TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further.
  1234. require
  1235. valid_function: a_function /= Void
  1236. wrapper_is_stored: is_eiffel_wrapper_stored
  1237. local
  1238. button_press_event_callback: BUTTON_PRESS_EVENT_CALLBACK
  1239. do
  1240. create button_press_event_callback.make
  1241. button_press_event_callback.connect (Current, a_function)
  1242. end
  1243. -- "no-expose-event"
  1244. -- gboolean user_function (GtkWidget *widget,
  1245. -- GdkEventNoExpose *event,
  1246. -- gpointer user_data) : Run last
  1247. -- "parent-set"
  1248. -- void user_function (GtkWidget *widget,
  1249. -- GtkObject *old_parent,
  1250. -- gpointer user_data) : Run first
  1251. -- "popup-menu"
  1252. -- gboolean user_function (GtkWidget *widget,
  1253. -- gpointer user_data) : Run last / Action
  1254. -- "property-notify-event"
  1255. -- gboolean user_function (GtkWidget *widget,
  1256. -- GdkEventProperty *event,
  1257. -- gpointer user_data) : Run last
  1258. -- "proximity-in-event"
  1259. -- gboolean user_function (GtkWidget *widget,
  1260. -- GdkEventProximity *event,
  1261. -- gpointer user_data) : Run last
  1262. -- "proximity-out-event"
  1263. -- gboolean user_function (GtkWidget *widget,
  1264. -- GdkEventProximity *event,
  1265. -- gpointer user_data) : Run last
  1266. feature -- realize signal
  1267. realize_signal_name: STRING is "realize"
  1268. -- "realize" void user_function (GtkWidget *widget,
  1269. -- gpointer user_data) : Run first
  1270. enable_on_realize is
  1271. -- Connects "realize" signal to `on_realize' feature.
  1272. do
  1273. connect (Current, realize_signal_name, $on_realize)
  1274. end
  1275. on_realize is
  1276. -- Built-in realize signal handler; empty by design; redefine it.
  1277. do
  1278. end
  1279. connect_agent_to_realize_signal (a_procedure: PROCEDURE[ANY, TUPLE [GTK_WIDGET]]) is
  1280. -- widget : the object which received the signal.
  1281. require
  1282. valid_procedure: a_procedure /= Void
  1283. wrapper_is_stored: is_eiffel_wrapper_stored
  1284. local
  1285. realize_callback: REALIZE_CALLBACK
  1286. do
  1287. create realize_callback.make
  1288. realize_callback.connect (Current, a_procedure)
  1289. end
  1290. -- "screen-changed"
  1291. -- void user_function (GtkWidget *widget,
  1292. -- GdkScreen *arg1,
  1293. -- gpointer user_data) : Run last
  1294. feature -- scroll-event signal
  1295. scroll_event_signal_name: STRING is "scroll-event"
  1296. -- gboolean user_function (GtkWidget *widget,
  1297. -- GdkEventScroll *event,
  1298. -- gpointer user_data) : Run last
  1299. enable_on_scroll_event is
  1300. -- Connects "scroll-event" signal to `on_scroll_event' feature.
  1301. do
  1302. connect (Current, scroll_event_signal_name, $on_scroll_event)
  1303. end
  1304. on_scroll_event (event: POINTER; a_widget: POINTER): BOOLEAN is
  1305. -- Built-in button-release-event signal handler; empty by design; redefine it.
  1306. do
  1307. end
  1308. connect_agent_to_scroll_event_signal (a_function: FUNCTION[ANY, TUPLE [GDK_EVENT_SCROLL, GTK_WIDGET], BOOLEAN]) is
  1309. -- widget : the object which received the signal.
  1310. -- event :
  1311. -- user_data : user data set when the signal handler was connected.
  1312. -- Returns : TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further.
  1313. require
  1314. valid_function: a_function /= Void
  1315. wrapper_is_stored: is_eiffel_wrapper_stored
  1316. local
  1317. scroll_event_callback: SCROLL_EVENT_CALLBACK
  1318. do
  1319. create scroll_event_callback.make
  1320. scroll_event_callback.connect (Current, a_function)
  1321. end
  1322. -- "selection-clear-event"
  1323. -- gboolean user_function (GtkWidget *widget,
  1324. -- GdkEventSelection *event,
  1325. -- gpointer user_data) : Run last
  1326. -- "selection-get"
  1327. -- void user_fun