| 1 |
/* |
| 2 |
* Copyright (C) Pietro Pilolli 2010 <[email protected]> |
| 3 |
* |
| 4 |
* Curtain is free software: you can redistribute it and/or modify it |
| 5 |
* under the terms of the GNU General Public License as published by the |
| 6 |
* Free Software Foundation, either version 3 of the License, or |
| 7 |
* (at your option) any later version. |
| 8 |
* |
| 9 |
* Curtain 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. |
| 12 |
* See the GNU General Public License for more details. |
| 13 |
* |
| 14 |
* You should have received a copy of the GNU General Public License along |
| 15 |
* with this program. If not, see <http://www.gnu.org/licenses/>. |
| 16 |
*/ |
| 17 |
|
| 18 |
#include <stdlib.h> |
| 19 |
#include <math.h> |
| 20 |
|
| 21 |
#include <gtk/gtk.h> |
| 22 |
#include <gdk/gdkkeysyms.h> |
| 23 |
|
| 24 |
#include <cairo.h> |
| 25 |
|
| 26 |
#ifdef _WIN32 |
| 27 |
#define CURTAIN_FILE "..\\share\\curtain\\ui\\icons\\curtain.png" |
| 28 |
#else |
| 29 |
#define CURTAIN_FILE PACKAGE_DATA_DIR"/curtain/ui/icons/curtain.png" |
| 30 |
#endif |
| 31 |
/* This is for local testing*/ |
| 32 |
//#define CURTAIN_FILE "curtain.png" |
| 33 |
|
| 34 |
#ifdef _WIN32 |
| 35 |
/* User for grab the pointer on win32. */ |
| 36 |
#define CURTAIN_MOUSE_EVENTS (GDK_POINTER_MOTION_MASK | \ |
| 37 |
GDK_BUTTON_PRESS_MASK | \ |
| 38 |
GDK_BUTTON_RELEASE_MASK | \ |
| 39 |
GDK_PROXIMITY_IN | \ |
| 40 |
GDK_PROXIMITY_OUT | \ |
| 41 |
GDK_MOTION_NOTIFY | \ |
| 42 |
GDK_BUTTON_PRESS \ |
| 43 |
) |
| 44 |
#endif |
| 45 |
|
| 46 |
|
| 47 |
/* Destroy window. */ |
| 48 |
gboolean |
| 49 |
destroy (GtkWidget *widget, |
| 50 |
gpointer data); |
| 51 |
|
| 52 |
|
| 53 |
/* On screen changed. */ |
| 54 |
void on_window_screen_changed (GtkWidget *widget, |
| 55 |
GdkScreen *previous_screen, |
| 56 |
gpointer user_data); |
| 57 |
|
| 58 |
|