00001 /* 00002 * This file is part of hildon-home 00003 * 00004 * Copyright (C) 2006 Nokia Corporation. 00005 * 00006 * Contact: Karoliina Salminen <karoliina.t.salminen@nokia.com> 00007 * 00008 * This library is free software; you can redistribute it and/or 00009 * modify it under the terms of the GNU Lesser General Public License 00010 * as published by the Free Software Foundation; either version 2.1 of 00011 * the License, or (at your option) any later version. 00012 * 00013 * This library is distributed in the hope that it will be useful, but 00014 * WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 * Lesser General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU Lesser General Public 00019 * License along with this library; if not, write to the Free Software 00020 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 00021 * 02110-1301 USA 00022 * 00023 */ 00024 00025 00026 /* A tool to grab screenshots from the screen. 00027 * We simply read the screen shots from the root window. 00028 * 00029 * In this solution it is required that the are to be 00030 * grabbed is visible on the screen. That's why we call 00031 * it a screenshot.. 00032 * 00033 * Another aproach would be to force a widget to render 00034 * it self to a pixbuf. It would be facinating but 00035 * it is bit tricky as we can not quarantee that the widget 00036 * window won't have visible child windows. We would 00037 * have to replace the windows of each child widget with 00038 * a pixbuf. This is left as an exercise for the reader. 00039 * 00040 * TODO: We should provide a general function to grab 00041 * the area of any GtKWidget too. Not only a GdkWindow. 00042 * 00043 */ 00044 00045 #ifndef SCREENSHOT_H 00046 #define SCREENSHOT_H 00047 00048 #include "gdk/gdk.h" 00049 #include "glib.h" 00050 00051 00052 G_BEGIN_DECLS 00053 00054 00055 00070 GdkPixbuf *screenshot_grab_from_gdk_window(GdkWindow *window); 00071 00072 00091 GdkPixbuf *screenshot_grab_area(const gint x,const gint y, 00092 const gint width,const gint height); 00093 00094 00095 G_END_DECLS 00096 00097 #endif /* SCREENSHOT_H */ 00098 /* 00099 * This file is part of hildon-home 00100 * 00101 * Copyright (C) 2006 Nokia Corporation. 00102 * 00103 * Contact: Karoliina Salminen <karoliina.t.salminen@nokia.com> 00104 * 00105 * This library is free software; you can redistribute it and/or 00106 * modify it under the terms of the GNU Lesser General Public License 00107 * as published by the Free Software Foundation; either version 2.1 of 00108 * the License, or (at your option) any later version. 00109 * 00110 * This library is distributed in the hope that it will be useful, but 00111 * WITHOUT ANY WARRANTY; without even the implied warranty of 00112 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00113 * Lesser General Public License for more details. 00114 * 00115 * You should have received a copy of the GNU Lesser General Public 00116 * License along with this library; if not, write to the Free Software 00117 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 00118 * 02110-1301 USA 00119 * 00120 */ 00121 00122 00123 /* A tool to grab screenshots from the screen. 00124 * We simply read the screen shots from the root window. 00125 * 00126 * In this solution it is required that the are to be 00127 * grabbed is visible on the screen. That's why we call 00128 * it a screenshot.. 00129 * 00130 * Another aproach would be to force a widget to render 00131 * it self to a pixbuf. It would be facinating but 00132 * it is bit tricky as we can not quarantee that the widget 00133 * window won't have visible child windows. We would 00134 * have to replace the windows of each child widget with 00135 * a pixbuf. This is left as an exercise for the reader. 00136 * 00137 * TODO: We should provide a general function to grab 00138 * the area of any GtKWidget too. Not only a GdkWindow. 00139 * 00140 */ 00141 00142 #ifndef SCREENSHOT_H 00143 #define SCREENSHOT_H 00144 00145 #include "gdk/gdk.h" 00146 #include "glib.h" 00147 00148 00149 G_BEGIN_DECLS 00150 00151 00152 00167 GdkPixbuf *screenshot_grab_from_gdk_window(GdkWindow *window); 00168 00169 00188 GdkPixbuf *screenshot_grab_area(const gint x,const gint y, 00189 const gint width,const gint height); 00190 00191 00192 G_END_DECLS 00193 00194 #endif /* SCREENSHOT_H */ 00195 /* 00196 * This file is part of hildon-home 00197 * 00198 * Copyright (C) 2006 Nokia Corporation. 00199 * 00200 * Contact: Karoliina Salminen <karoliina.t.salminen@nokia.com> 00201 * 00202 * This library is free software; you can redistribute it and/or 00203 * modify it under the terms of the GNU Lesser General Public License 00204 * as published by the Free Software Foundation; either version 2.1 of 00205 * the License, or (at your option) any later version. 00206 * 00207 * This library is distributed in the hope that it will be useful, but 00208 * WITHOUT ANY WARRANTY; without even the implied warranty of 00209 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00210 * Lesser General Public License for more details. 00211 * 00212 * You should have received a copy of the GNU Lesser General Public 00213 * License along with this library; if not, write to the Free Software 00214 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 00215 * 02110-1301 USA 00216 * 00217 */ 00218 00219 00220 /* A tool to grab screenshots from the screen. 00221 * We simply read the screen shots from the root window. 00222 * 00223 * In this solution it is required that the are to be 00224 * grabbed is visible on the screen. That's why we call 00225 * it a screenshot.. 00226 * 00227 * Another aproach would be to force a widget to render 00228 * it self to a pixbuf. It would be facinating but 00229 * it is bit tricky as we can not quarantee that the widget 00230 * window won't have visible child windows. We would 00231 * have to replace the windows of each child widget with 00232 * a pixbuf. This is left as an exercise for the reader. 00233 * 00234 * TODO: We should provide a general function to grab 00235 * the area of any GtKWidget too. Not only a GdkWindow. 00236 * 00237 */ 00238 00239 #ifndef SCREENSHOT_H 00240 #define SCREENSHOT_H 00241 00242 #include "gdk/gdk.h" 00243 #include "glib.h" 00244 00245 00246 G_BEGIN_DECLS 00247 00248 00249 00264 GdkPixbuf *screenshot_grab_from_gdk_window(GdkWindow *window); 00265 00266 00285 GdkPixbuf *screenshot_grab_area(const gint x,const gint y, 00286 const gint width,const gint height); 00287 00288 00289 G_END_DECLS 00290 00291 #endif /* SCREENSHOT_H */ 00292 /* 00293 * This file is part of hildon-home 00294 * 00295 * Copyright (C) 2006 Nokia Corporation. 00296 * 00297 * Contact: Karoliina Salminen <karoliina.t.salminen@nokia.com> 00298 * 00299 * This library is free software; you can redistribute it and/or 00300 * modify it under the terms of the GNU Lesser General Public License 00301 * as published by the Free Software Foundation; either version 2.1 of 00302 * the License, or (at your option) any later version. 00303 * 00304 * This library is distributed in the hope that it will be useful, but 00305 * WITHOUT ANY WARRANTY; without even the implied warranty of 00306 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00307 * Lesser General Public License for more details. 00308 * 00309 * You should have received a copy of the GNU Lesser General Public 00310 * License along with this library; if not, write to the Free Software 00311 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 00312 * 02110-1301 USA 00313 * 00314 */ 00315 00316 00317 /* A tool to grab screenshots from the screen. 00318 * We simply read the screen shots from the root window. 00319 * 00320 * In this solution it is required that the are to be 00321 * grabbed is visible on the screen. That's why we call 00322 * it a screenshot.. 00323 * 00324 * Another aproach would be to force a widget to render 00325 * it self to a pixbuf. It would be facinating but 00326 * it is bit tricky as we can not quarantee that the widget 00327 * window won't have visible child windows. We would 00328 * have to replace the windows of each child widget with 00329 * a pixbuf. This is left as an exercise for the reader. 00330 * 00331 * TODO: We should provide a general function to grab 00332 * the area of any GtKWidget too. Not only a GdkWindow. 00333 * 00334 */ 00335 00336 #ifndef SCREENSHOT_H 00337 #define SCREENSHOT_H 00338 00339 #include "gdk/gdk.h" 00340 #include "glib.h" 00341 00342 00343 G_BEGIN_DECLS 00344 00345 00346 00361 GdkPixbuf *screenshot_grab_from_gdk_window(GdkWindow *window); 00362 00363 00382 GdkPixbuf *screenshot_grab_area(const gint x,const gint y, 00383 const gint width,const gint height); 00384 00385 00386 G_END_DECLS 00387 00388 #endif /* SCREENSHOT_H */ 00389 /* 00390 * This file is part of hildon-home 00391 * 00392 * Copyright (C) 2006 Nokia Corporation. 00393 * 00394 * Contact: Karoliina Salminen <karoliina.t.salminen@nokia.com> 00395 * 00396 * This library is free software; you can redistribute it and/or 00397 * modify it under the terms of the GNU Lesser General Public License 00398 * as published by the Free Software Foundation; either version 2.1 of 00399 * the License, or (at your option) any later version. 00400 * 00401 * This library is distributed in the hope that it will be useful, but 00402 * WITHOUT ANY WARRANTY; without even the implied warranty of 00403 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00404 * Lesser General Public License for more details. 00405 * 00406 * You should have received a copy of the GNU Lesser General Public 00407 * License along with this library; if not, write to the Free Software 00408 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 00409 * 02110-1301 USA 00410 * 00411 */ 00412 00413 00414 /* A tool to grab screenshots from the screen. 00415 * We simply read the screen shots from the root window. 00416 * 00417 * In this solution it is required that the are to be 00418 * grabbed is visible on the screen. That's why we call 00419 * it a screenshot.. 00420 * 00421 * Another aproach would be to force a widget to render 00422 * it self to a pixbuf. It would be facinating but 00423 * it is bit tricky as we can not quarantee that the widget 00424 * window won't have visible child windows. We would 00425 * have to replace the windows of each child widget with 00426 * a pixbuf. This is left as an exercise for the reader. 00427 * 00428 * TODO: We should provide a general function to grab 00429 * the area of any GtKWidget too. Not only a GdkWindow. 00430 * 00431 */ 00432 00433 #ifndef SCREENSHOT_H 00434 #define SCREENSHOT_H 00435 00436 #include "gdk/gdk.h" 00437 #include "glib.h" 00438 00439 00440 G_BEGIN_DECLS 00441 00442 00443 00458 GdkPixbuf *screenshot_grab_from_gdk_window(GdkWindow *window); 00459 00460 00479 GdkPixbuf *screenshot_grab_area(const gint x,const gint y, 00480 const gint width,const gint height); 00481 00482 00483 G_END_DECLS 00484 00485 #endif /* SCREENSHOT_H */ 00486 /* 00487 * This file is part of hildon-home 00488 * 00489 * Copyright (C) 2006 Nokia Corporation. 00490 * 00491 * Contact: Karoliina Salminen <karoliina.t.salminen@nokia.com> 00492 * 00493 * This library is free software; you can redistribute it and/or 00494 * modify it under the terms of the GNU Lesser General Public License 00495 * as published by the Free Software Foundation; either version 2.1 of 00496 * the License, or (at your option) any later version. 00497 * 00498 * This library is distributed in the hope that it will be useful, but 00499 * WITHOUT ANY WARRANTY; without even the implied warranty of 00500 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00501 * Lesser General Public License for more details. 00502 * 00503 * You should have received a copy of the GNU Lesser General Public 00504 * License along with this library; if not, write to the Free Software 00505 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 00506 * 02110-1301 USA 00507 * 00508 */ 00509 00510 00511 /* A tool to grab screenshots from the screen. 00512 * We simply read the screen shots from the root window. 00513 * 00514 * In this solution it is required that the are to be 00515 * grabbed is visible on the screen. That's why we call 00516 * it a screenshot.. 00517 * 00518 * Another aproach would be to force a widget to render 00519 * it self to a pixbuf. It would be facinating but 00520 * it is bit tricky as we can not quarantee that the widget 00521 * window won't have visible child windows. We would 00522 * have to replace the windows of each child widget with 00523 * a pixbuf. This is left as an exercise for the reader. 00524 * 00525 * TODO: We should provide a general function to grab 00526 * the area of any GtKWidget too. Not only a GdkWindow. 00527 * 00528 */ 00529 00530 #ifndef SCREENSHOT_H 00531 #define SCREENSHOT_H 00532 00533 #include "gdk/gdk.h" 00534 #include "glib.h" 00535 00536 00537 G_BEGIN_DECLS 00538 00539 00540 00555 GdkPixbuf *screenshot_grab_from_gdk_window(GdkWindow *window); 00556 00557 00576 GdkPixbuf *screenshot_grab_area(const gint x,const gint y, 00577 const gint width,const gint height); 00578 00579 00580 G_END_DECLS 00581 00582 #endif /* SCREENSHOT_H */