* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
/*
#ifndef __GDK_EVENTS_H__
#define __GDK_EVENTS_H__
+#include <gdk/gdkversionmacros.h>
#include <gdk/gdkcolor.h>
#include <gdk/gdktypes.h>
#include <gdk/gdkdnd.h>
*/
#define GDK_PRIORITY_REDRAW (G_PRIORITY_HIGH_IDLE + 20)
+/**
+ * GDK_EVENT_PROPAGATE:
+ *
+ * Use this macro as the return value for continuing the propagation of
+ * an event handler.
+ *
+ * Since: 3.4
+ */
+#define GDK_EVENT_PROPAGATE (FALSE)
+
+/**
+ * GDK_EVENT_STOP:
+ *
+ * Use this macro as the return value for stopping the propagation of
+ * an event handler.
+ *
+ * Since: 3.4
+ */
+#define GDK_EVENT_STOP (TRUE)
+
+/**
+ * GDK_BUTTON_PRIMARY:
+ *
+ * The primary button. This is typically the left mouse button, or the
+ * right button in a left-handed setup.
+ *
+ * Since: 3.4
+ */
+#define GDK_BUTTON_PRIMARY (1)
+
+/**
+ * GDK_BUTTON_MIDDLE:
+ *
+ * The middle button.
+ *
+ * Since: 3.4
+ */
+#define GDK_BUTTON_MIDDLE (2)
+
+/**
+ * GDK_BUTTON_SECONDARY:
+ *
+ * The secondary button. This is typically the right mouse button, or the
+ * left button in a left-handed setup.
+ *
+ * Since: 3.4
+ */
+#define GDK_BUTTON_SECONDARY (3)
+
+
typedef struct _GdkEventAny GdkEventAny;
typedef struct _GdkEventExpose GdkEventExpose;
* decorations.
* @GDK_WINDOW_STATE_ABOVE: the window is kept above other windows.
* @GDK_WINDOW_STATE_BELOW: the window is kept below other windows.
+ * @GDK_WINDOW_STATE_FOCUSED: the window is presented as focused (with active decorations).
*
* Specifies the state of a toplevel window.
*/
GDK_WINDOW_STATE_STICKY = 1 << 3,
GDK_WINDOW_STATE_FULLSCREEN = 1 << 4,
GDK_WINDOW_STATE_ABOVE = 1 << 5,
- GDK_WINDOW_STATE_BELOW = 1 << 6
+ GDK_WINDOW_STATE_BELOW = 1 << 6,
+ GDK_WINDOW_STATE_FOCUSED = 1 << 7
} GdkWindowState;
/**
* @target: the target to which the selection should be converted.
* @property: the property in which to place the result of the conversion.
* @time: the time of the event in milliseconds.
- * @requestor: the native window on which to place @property.
+ * @requestor: the window on which to place @property or %NULL if none.
*
* Generated when a selection is requested or ownership of a selection
* is taken over by another client application.
GdkAtom target;
GdkAtom property;
guint32 time;
- GdkNativeWindow requestor;
+ GdkWindow *requestor;
};
/**
gboolean gdk_event_get_coords (const GdkEvent *event,
gdouble *x_win,
gdouble *y_win);
-gboolean gdk_event_get_root_coords (const GdkEvent *event,
- gdouble *x_root,
- gdouble *y_root);
+gboolean gdk_event_get_root_coords (const GdkEvent *event,
+ gdouble *x_root,
+ gdouble *y_root);
+GDK_AVAILABLE_IN_3_2
+gboolean gdk_event_get_button (const GdkEvent *event,
+ guint *button);
+GDK_AVAILABLE_IN_3_2
+gboolean gdk_event_get_click_count (const GdkEvent *event,
+ guint *click_count);
+GDK_AVAILABLE_IN_3_2
+gboolean gdk_event_get_keyval (const GdkEvent *event,
+ guint *keyval);
+GDK_AVAILABLE_IN_3_2
+gboolean gdk_event_get_keycode (const GdkEvent *event,
+ guint16 *keycode);
+GDK_AVAILABLE_IN_3_2
+gboolean gdk_event_get_scroll_direction (const GdkEvent *event,
+ GdkScrollDirection *direction);
gboolean gdk_event_get_axis (const GdkEvent *event,
GdkAxisUse axis_use,
gdouble *value);
void gdk_event_set_source_device (GdkEvent *event,
GdkDevice *device);
GdkDevice* gdk_event_get_source_device (const GdkEvent *event);
-void gdk_event_request_motions (const GdkEventMotion *event);
+void gdk_event_request_motions (const GdkEventMotion *event);
+GDK_AVAILABLE_IN_3_4
+gboolean gdk_event_triggers_context_menu (const GdkEvent *event);
gboolean gdk_events_get_distance (GdkEvent *event1,
GdkEvent *event2,