mirror of
git://projects.qi-hardware.com/fped.git
synced 2024-11-18 07:28:26 +02:00
0b241a14fe
tool, with all the old code still around, so the code paths are a bit obscure. - gui_frame_drag.c: use GTK_DEST_DEFAULT_MOTION instead of GTK_DEST_DEFAULT_HIGHLIGHT - gui_frame_drag.c: put meat on the frame and canvas drag and drop skeleton - gui_frame_drag.c (setup_frame_drag, setup_canvas_drag): use GDK_ACTION_COPY instead of GDK_ACTION_PRIVATE - gui_frame_drag.h, gui_frame_drag.c (is_dragging_anything): new helper function to check if we're dragging anything, without specifying what - gui_canvas.h, gui_canvas.c: added thin interface layer between gui_frame.c and gui_tool.c - gui_canvas.c (enter_notify_event, leave_notify_event): return FALSE so that other widgets can get the events, too - gui_tool.h, gui_tool.c (tool_hover): return whether we found anything to hover on - gui_tool.h, gui_tool.c: added interface for dropping a frame on the canvas git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5932 99fdad57-331a-0410-800a-d7fa5415bdb3
46 lines
1020 B
C
46 lines
1020 B
C
/*
|
|
* gui_canvas.h - GUI, canvas
|
|
*
|
|
* Written 2009, 2010 by Werner Almesberger
|
|
* Copyright 2009, 2010 by Werner Almesberger
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*/
|
|
|
|
|
|
#ifndef GUI_CANVAS_H
|
|
#define GUI_CANVAS_H
|
|
|
|
#include <gtk/gtk.h>
|
|
|
|
|
|
/*
|
|
* "highlight" is invoked at the end of each redraw, for optional highlighting
|
|
* of objects.
|
|
*/
|
|
|
|
extern void (*highlight)(void);
|
|
|
|
|
|
void refresh_pos(void);
|
|
|
|
void redraw(void);
|
|
|
|
void zoom_in_center(void);
|
|
void zoom_out_center(void);
|
|
void zoom_to_frame(void);
|
|
void zoom_to_extents(void);
|
|
|
|
void canvas_frame_begin(struct frame *frame);
|
|
int canvas_frame_motion(struct frame *frame, int x, int y);
|
|
void canvas_frame_end(void);
|
|
int canvas_frame_drop(struct frame *frame, int x, int y);
|
|
|
|
GtkWidget *make_canvas(void);
|
|
void init_canvas(void);
|
|
|
|
#endif /* !GUI_CANVAS_H */
|