#include <stdio.h>
#include <gtk/gtk.h>
#include "Gcolor.h"
#include "Gimage.h"
#include "Gdata.h"
Go to the source code of this file.
Typedefs |
typedef struct _prevSettings | prevSettings |
typedef struct _prevBuffer | prevBuffer |
typedef struct prevEventAny | prevEventAny |
typedef struct prevEventButton | prevEventButton |
typedef struct prevEventMotion | prevEventMotion |
typedef struct prevEventKey | prevEventKey |
typedef union prevEventData | prevEventData |
typedef void(* | prevButtonFunc )(prevBuffer *b, prevEvent signal, int x, int y, void *data) |
typedef void(* | prevSignalFunc )(prevBuffer *b, prevEventData *event, void *data) |
typedef void(* | renderDbOptsFunc )(prevBuffer *b) |
typedef void(* | renderDbFreeFunc )(void *data) |
typedef void *(* | renderDbCopyFunc )(const void *data) |
typedef void(* | renderDbRenderFunc )(prevBuffer *b, const void *data, int disp_mode) |
typedef char *(* | renderDbInfoFunc )(prevBuffer *b, const void *data, int disp_mode, int x, int y, int radius) |
typedef iwImgStatus(* | renderDbVectorFunc )(prevBuffer *b, prevVectorSave *save, const void *data, int disp_mode) |
Enumerations |
enum | prevType {
PREV_IMAGE,
PREV_TEXT,
PREV_LINE,
PREV_RECT,
PREV_FRECT,
PREV_REGION,
PREV_POLYGON,
PREV_FPOLYGON,
PREV_CIRCLE,
PREV_FCIRCLE,
PREV_ELLIPSE,
PREV_COMINFO,
PREV_LINE_F,
PREV_RECT_F,
PREV_FRECT_F,
PREV_POLYGON_F,
PREV_FPOLYGON_F,
PREV_CIRCLE_F,
PREV_FCIRCLE_F,
PREV_ELLIPSE_F,
PREV_NEW = 100
} |
enum | prevEvent {
PREV_BUTTON_PRESS = 1 << 0,
PREV_BUTTON_RELEASE = 1 << 1,
PREV_BUTTON_MOTION = 1 << 2,
PREV_KEY_PRESS = 1 << 3,
PREV_KEY_RELEASE = 1 << 4
} |
enum | prevSave {
SAVE_NONE,
SAVE_RENDER,
SAVE_ORIG,
SAVE_SEQ,
SAVE_ORIGSEQ
} |
Functions |
void | prev_buffer_lock (void) |
void | prev_buffer_unlock (void) |
prevType | prev_renderdb_register (prevType type, renderDbOptsFunc o_fkt, renderDbFreeFunc f_fkt, renderDbCopyFunc c_fkt, renderDbRenderFunc r_fkt) |
void | prev_renderdb_register_info (prevType type, renderDbInfoFunc i_fkt) |
void | prev_renderdb_register_vector (prevType type, renderDbVectorFunc v_fkt) |
void ** | prev_opts_store (prevBuffer *b, prevType type, void *data, gboolean free_data) |
void ** | prev_opts_get (prevBuffer *b, prevType type) |
void | prev_opts_append (prevBuffer *b, prevType type,...) |
float | prev_get_zoom (prevBuffer *b) |
void | prev_chk_save (prevBuffer *b, const iwImage *img) |
void | prev_draw_buffer (prevBuffer *b) |
void | prev_pan_zoom (prevBuffer *b, int x, int y, float zoom) |
void | prev_signal_connect (prevBuffer *b, prevEvent sigset, prevButtonFunc cback, void *data) |
void | prev_signal_connect2 (prevBuffer *b, prevEvent sigset, prevSignalFunc cback, void *data) |
int | prev_get_page (prevBuffer *b) |
void | prev_free_window (prevBuffer *b) |
prevBuffer * | prev_new_window (const char *title, int width, int height, gboolean gray, gboolean show) |
iwImage * | prev_copy_to_image (prevBuffer *b, gboolean save_full) |
Macro Definition Documentation
#define prev_set_render_size |
( |
|
b, |
|
|
|
width, |
|
|
|
height |
|
) |
| |
Typedef Documentation
typedef void(* renderDbFreeFunc)(void *data) |
typedef void*(* renderDbCopyFunc)(const void *data) |
typedef void(* renderDbRenderFunc)(prevBuffer *b, const void *data, int disp_mode) |
typedef char*(* renderDbInfoFunc)(prevBuffer *b, const void *data, int disp_mode, int x, int y, int radius) |
Enumeration Type Documentation
- Enumerator:
SAVE_NONE |
|
SAVE_RENDER |
|
SAVE_ORIG |
|
SAVE_SEQ |
|
SAVE_ORIGSEQ |
|
Function Documentation
void prev_buffer_lock |
( |
void |
| ) |
|
Must be called on access of a prevBuffer->buffer.
Attention: gdk-/X11-mutex must not be locked before locking this
mutex.
void prev_buffer_unlock |
( |
void |
| ) |
|
Register a new render type 'type'.
If 'type' == PREV_NEW use the first unused value and return it.
Register a function which is called for the "Info Window".
Register a function for saving in a vector format.
Store a value associated to type and return its address.
free_data==TRUE: If the window b is freed, data is freed by calling
free().
Used in renderDbOptsFunc() to store the value of the menu entry.
Append option widgets to the window specific menu according to
the given types. Last argument must be '-1'.
Return zoom factor to get something of size
b->gc.width x b->gc.height into buffer b.
If b->save!=SAVE_NONE:
img!=NULL: Save image img.
img==NULL: Save image b->buffer (size: b->width x b->height).
Attention: prev_buffer_(un)lock is called.
If b->window is open, display b->buffer.
void prev_pan_zoom |
( |
prevBuffer * |
b, |
|
|
int |
x, |
|
|
int |
y, |
|
|
float |
zoom |
|
) |
| |
If zoom >= 0, change zoom level of the preview.
If x >= 0 or y >= 0 pan the preview to that position.
Call cback with data as last argument if one of the signals
specified with sigset occured.
Return the page number for the preview settings window. Allows to
create any widgets with the help of the opts_() functions.
Close preview window b (if necessary), remove it from the CList and
free its memory.
prevBuffer* prev_new_window |
( |
const char * |
title, |
|
|
int |
width, |
|
|
int |
height, |
|
|
gboolean |
gray, |
|
|
gboolean |
show |
|
) |
| |
Initialise a new preview window (Title: title, size: width x height,
depth: 24bit (gray==FALSE) or 8 Bit (gray==TRUE)).
show == TRUE: The window is shown immediately.
width, heigth < 0 : Default width, height is used.
title contains '.' (a'.'b): Window is shown in the list of windows
under node a with entry b.
Copy the content of a preview window into an iceWing image. The
preview window needs to be open (buffer->window != NULL), otherwise
NULL is returned. If save_full the full visible preview window size
is used, otherwise the size of the displayed data is used.