window.c: Just use float instead of GLfloat, remove GLES2.h include

Kristian Høgsberg 13 years ago
parent b71302e1db
commit 80680c7b75
  1. 4
      clients/desktop-shell.c
  2. 6
      clients/dnd.c
  3. 2
      clients/eventdemo.c
  4. 2
      clients/flower.c
  5. 2
      clients/gears.c
  6. 8
      clients/simple-touch.c
  7. 2
      clients/smoke.c
  8. 2
      clients/terminal.c
  9. 28
      clients/window.c
  10. 7
      clients/window.h

@ -233,7 +233,7 @@ panel_redraw_handler(struct widget *widget, void *data)
static int
panel_launcher_enter_handler(struct widget *widget, struct input *input,
GLfloat x, GLfloat y, void *data)
float x, float y, void *data)
{
struct panel_launcher *launcher = data;
@ -504,7 +504,7 @@ unlock_dialog_keyboard_focus_handler(struct window *window,
static int
unlock_dialog_widget_enter_handler(struct widget *widget,
struct input *input,
GLfloat x, GLfloat y, void *data)
float x, float y, void *data)
{
struct unlock_dialog *dialog = data;

@ -450,7 +450,7 @@ lookup_cursor(struct dnd *dnd, int x, int y)
static int
dnd_enter_handler(struct widget *widget,
struct input *input, GLfloat x, GLfloat y, void *data)
struct input *input, float x, float y, void *data)
{
return lookup_cursor(data, x, y);
}
@ -458,7 +458,7 @@ dnd_enter_handler(struct widget *widget,
static int
dnd_motion_handler(struct widget *widget,
struct input *input, uint32_t time,
GLfloat x, GLfloat y, void *data)
float x, float y, void *data)
{
return lookup_cursor(data, x, y);
}
@ -466,7 +466,7 @@ dnd_motion_handler(struct widget *widget,
static void
dnd_data_handler(struct window *window,
struct input *input,
GLfloat x, GLfloat y, const char **types, void *data)
float x, float y, const char **types, void *data)
{
struct dnd *dnd = data;

@ -238,7 +238,7 @@ button_handler(struct widget *widget, struct input *input, uint32_t time,
*/
static int
motion_handler(struct widget *widget, struct input *input, uint32_t time,
GLfloat x, GLfloat y, void *data)
float x, float y, void *data)
{
struct eventdemo *e = data;

@ -134,7 +134,7 @@ redraw_handler(struct widget *widget, void *data)
static int
motion_handler(struct widget *widget, struct input *input,
uint32_t time, GLfloat x, GLfloat y, void *data)
uint32_t time, float x, float y, void *data)
{
return POINTER_HAND1;
}

@ -223,7 +223,7 @@ static const struct wl_callback_listener listener = {
static int
motion_handler(struct widget *widget, struct input *input,
uint32_t time, GLfloat x, GLfloat y, void *data)
uint32_t time, float x, float y, void *data)
{
struct gears *gears = data;
int offset_x, offset_y;

@ -205,8 +205,8 @@ input_device_handle_touch_down(void *data,
wl_fixed_t y_w)
{
struct touch *touch = data;
GLfloat x = wl_fixed_to_double(x_w);
GLfloat y = wl_fixed_to_double(y_w);
float x = wl_fixed_to_double(x_w);
float y = wl_fixed_to_double(y_w);
touch_paint(touch, x, y, id);
}
@ -227,8 +227,8 @@ input_device_handle_touch_motion(void *data,
wl_fixed_t y_w)
{
struct touch *touch = data;
GLfloat x = wl_fixed_to_double(x_w);
GLfloat y = wl_fixed_to_double(y_w);
float x = wl_fixed_to_double(x_w);
float y = wl_fixed_to_double(y_w);
touch_paint(touch, x, y, id);
}

@ -230,7 +230,7 @@ redraw_handler(struct widget *widget, void *data)
static int
smoke_motion_handler(struct widget *widget, struct input *input,
uint32_t time, GLfloat x, GLfloat y, void *data)
uint32_t time, float x, float y, void *data)
{
struct smoke *smoke = data;
int i, i0, i1, j, j0, j1, k, d = 5;

@ -2237,7 +2237,7 @@ button_handler(struct widget *widget,
static int
motion_handler(struct widget *widget,
struct input *input, uint32_t time,
GLfloat x, GLfloat y, void *data)
float x, float y, void *data)
{
struct terminal *terminal = data;

@ -189,7 +189,7 @@ struct input {
int current_cursor;
uint32_t modifiers;
uint32_t pointer_enter_serial;
GLfloat sx, sy;
float sx, sy;
struct wl_list link;
struct widget *focus_widget;
@ -1351,7 +1351,7 @@ window_show_frame_menu(struct window *window,
static int
frame_enter_handler(struct widget *widget,
struct input *input, GLfloat x, GLfloat y, void *data)
struct input *input, float x, float y, void *data)
{
return frame_get_pointer_image_for_location(data, input);
}
@ -1359,7 +1359,7 @@ frame_enter_handler(struct widget *widget,
static int
frame_motion_handler(struct widget *widget,
struct input *input, uint32_t time,
GLfloat x, GLfloat y, void *data)
float x, float y, void *data)
{
return frame_get_pointer_image_for_location(data, input);
}
@ -1454,7 +1454,7 @@ frame_destroy(struct frame *frame)
static void
input_set_focus_widget(struct input *input, struct widget *focus,
GLfloat x, GLfloat y)
float x, float y)
{
struct widget *old, *widget;
int pointer = POINTER_LEFT_PTR;
@ -1494,8 +1494,8 @@ input_handle_motion(void *data, struct wl_input_device *input_device,
struct window *window = input->pointer_focus;
struct widget *widget;
int pointer = POINTER_LEFT_PTR;
GLfloat sx = wl_fixed_to_double(sx_w);
GLfloat sy = wl_fixed_to_double(sy_w);
float sx = wl_fixed_to_double(sx_w);
float sy = wl_fixed_to_double(sy_w);
input->sx = sx;
input->sy = sy;
@ -1638,8 +1638,8 @@ input_handle_pointer_enter(void *data,
struct input *input = data;
struct window *window;
struct widget *widget;
GLfloat sx = wl_fixed_to_double(sx_w);
GLfloat sy = wl_fixed_to_double(sy_w);
float sx = wl_fixed_to_double(sx_w);
float sy = wl_fixed_to_double(sy_w);
input->display->serial = serial;
input->pointer_enter_serial = serial;
@ -1868,8 +1868,8 @@ data_device_enter(void *data, struct wl_data_device *data_device,
{
struct input *input = data;
struct window *window;
GLfloat x = wl_fixed_to_double(x_w);
GLfloat y = wl_fixed_to_double(y_w);
float x = wl_fixed_to_double(x_w);
float y = wl_fixed_to_double(y_w);
char **p;
input->pointer_enter_serial = serial;
@ -1902,8 +1902,8 @@ data_device_motion(void *data, struct wl_data_device *data_device,
{
struct input *input = data;
struct window *window = input->pointer_focus;
GLfloat x = wl_fixed_to_double(x_w);
GLfloat y = wl_fixed_to_double(y_w);
float x = wl_fixed_to_double(x_w);
float y = wl_fixed_to_double(y_w);
input->sx = x;
input->sy = y;
@ -2491,7 +2491,7 @@ menu_set_item(struct menu *menu, int sy)
static int
menu_motion_handler(struct widget *widget,
struct input *input, uint32_t time,
GLfloat x, GLfloat y, void *data)
float x, float y, void *data)
{
struct menu *menu = data;
@ -2503,7 +2503,7 @@ menu_motion_handler(struct widget *widget,
static int
menu_enter_handler(struct widget *widget,
struct input *input, GLfloat x, GLfloat y, void *data)
struct input *input, float x, float y, void *data)
{
struct menu *menu = data;

@ -23,7 +23,6 @@
#ifndef _WINDOW_H_
#define _WINDOW_H_
#include <GLES2/gl2.h>
#include <xkbcommon/xkbcommon.h>
#include <wayland-client.h>
#include <cairo.h>
@ -166,7 +165,7 @@ typedef void (*window_keyboard_focus_handler_t)(struct window *window,
typedef void (*window_data_handler_t)(struct window *window,
struct input *input,
GLfloat x, GLfloat y,
float x, float y,
const char **types,
void *data);
@ -183,12 +182,12 @@ typedef void (*widget_redraw_handler_t)(struct widget *widget, void *data);
typedef int (*widget_enter_handler_t)(struct widget *widget,
struct input *input,
GLfloat x, GLfloat y, void *data);
float x, float y, void *data);
typedef void (*widget_leave_handler_t)(struct widget *widget,
struct input *input, void *data);
typedef int (*widget_motion_handler_t)(struct widget *widget,
struct input *input, uint32_t time,
GLfloat x, GLfloat y, void *data);
float x, float y, void *data);
typedef void (*widget_button_handler_t)(struct widget *widget,
struct input *input, uint32_t time,
uint32_t button, uint32_t state,

Loading…
Cancel
Save