1
0
mirror of git://projects.qi-hardware.com/fped.git synced 2024-11-25 16:12:28 +02:00
fped/gui_frame_drag.h

31 lines
751 B
C
Raw Normal View History

/*
* gui_frame_drag.h - GUI, dragging of frame items
*
* Written 2010 by Werner Almesberger
* Copyright 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_FRAME_DRAG_H
#define GUI_FRAME_DRAG_H
#include <gtk/gtk.h>
#include "obj.h"
Working towards the dragging of frames. Changed the press/drag/release logic of tables such that items are selected on release and we can thus drag without selecting. (From a user point of view, selecting would be fine. But selecting may sometimes cause a change_world or similar, destroying the widget, which upsets drag and drop.) - gui_frame_drag.c (setup_var_drag, setup_value_drag): moved targets to file scope - gui_frame_drag.c (has_target, drag_var_motion, drag_value_motion): Gtk doesn't check target compatibility for us, so we have to do this explicitly - gui_frame_drag.c (drag_begin): don't leak the pixbuf - gui_frame_drag.c (is_dragging, drag_end), gui_frame_drag.h: for drag vs. activations on button release, we now can test what is being dragged. For this, we have to explicitly clear the variable "dragging" when done. - gui_frame_drag.c (setup_var_drag, setup_value_drag): moved common setup to setup_drag_common - gui_frame_drag.c (setup_frame_drag, drag_frame_motion), gui_frame_drag.h, gui_frame.c (frame_select_event, build_frame_label): added infrastructure for dragging frames - gui_frame_drag.c (setup_canvas_drag, drag_canvas_motion), gui_frame_drag.h, gui_canvas.c (motion_notify_event, make_canvas): added infrastructure for dragging to the canvas - gui_frame.c (table_var_select_event, table_value_select_event, build_table): split logic into press and release action, so that we can drag without implicitly selecting git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5930 99fdad57-331a-0410-800a-d7fa5415bdb3
2010-04-24 01:01:56 +03:00
int is_dragging(void *this);
int is_dragging_anything(void);
Working towards the dragging of frames. Changed the press/drag/release logic of tables such that items are selected on release and we can thus drag without selecting. (From a user point of view, selecting would be fine. But selecting may sometimes cause a change_world or similar, destroying the widget, which upsets drag and drop.) - gui_frame_drag.c (setup_var_drag, setup_value_drag): moved targets to file scope - gui_frame_drag.c (has_target, drag_var_motion, drag_value_motion): Gtk doesn't check target compatibility for us, so we have to do this explicitly - gui_frame_drag.c (drag_begin): don't leak the pixbuf - gui_frame_drag.c (is_dragging, drag_end), gui_frame_drag.h: for drag vs. activations on button release, we now can test what is being dragged. For this, we have to explicitly clear the variable "dragging" when done. - gui_frame_drag.c (setup_var_drag, setup_value_drag): moved common setup to setup_drag_common - gui_frame_drag.c (setup_frame_drag, drag_frame_motion), gui_frame_drag.h, gui_frame.c (frame_select_event, build_frame_label): added infrastructure for dragging frames - gui_frame_drag.c (setup_canvas_drag, drag_canvas_motion), gui_frame_drag.h, gui_canvas.c (motion_notify_event, make_canvas): added infrastructure for dragging to the canvas - gui_frame.c (table_var_select_event, table_value_select_event, build_table): split logic into press and release action, so that we can drag without implicitly selecting git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5930 99fdad57-331a-0410-800a-d7fa5415bdb3
2010-04-24 01:01:56 +03:00
void setup_var_drag(struct var *var);
void setup_value_drag(struct value *value);
Working towards the dragging of frames. Changed the press/drag/release logic of tables such that items are selected on release and we can thus drag without selecting. (From a user point of view, selecting would be fine. But selecting may sometimes cause a change_world or similar, destroying the widget, which upsets drag and drop.) - gui_frame_drag.c (setup_var_drag, setup_value_drag): moved targets to file scope - gui_frame_drag.c (has_target, drag_var_motion, drag_value_motion): Gtk doesn't check target compatibility for us, so we have to do this explicitly - gui_frame_drag.c (drag_begin): don't leak the pixbuf - gui_frame_drag.c (is_dragging, drag_end), gui_frame_drag.h: for drag vs. activations on button release, we now can test what is being dragged. For this, we have to explicitly clear the variable "dragging" when done. - gui_frame_drag.c (setup_var_drag, setup_value_drag): moved common setup to setup_drag_common - gui_frame_drag.c (setup_frame_drag, drag_frame_motion), gui_frame_drag.h, gui_frame.c (frame_select_event, build_frame_label): added infrastructure for dragging frames - gui_frame_drag.c (setup_canvas_drag, drag_canvas_motion), gui_frame_drag.h, gui_canvas.c (motion_notify_event, make_canvas): added infrastructure for dragging to the canvas - gui_frame.c (table_var_select_event, table_value_select_event, build_table): split logic into press and release action, so that we can drag without implicitly selecting git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5930 99fdad57-331a-0410-800a-d7fa5415bdb3
2010-04-24 01:01:56 +03:00
void setup_frame_drag(struct frame *frame);
void setup_canvas_drag(GtkWidget *canvas);
#endif /* !GUI_FRAME_DRAG_H */