/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Eek Preview Stuffs.
*
* The Initial Developer of the Original Code is
* Jon A. Cruz.
* Portions created by the Initial Developer are Copyright (C) 2005
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include <algorithm>
#include "eek-preview.h"
#include "preferences.h"
/* Keep in sync with last value in eek-preview.h */
enum {
};
typedef struct
{
int scaledW;
int scaledH;
int r;
int g;
int b;
{
priv->r = r;
priv->g = g;
priv->b = b;
}
void
{
{
}
}
{
guint i = 0;
for ( i = 0; i < count; ++i ) {
if ( worked ) {
}
}
}
}
for ( i = 0; i < G_N_ELEMENTS(sizeThings); ++i ) {
}
}
{
if ( !setupDone ) {
};
}
width *= 3;
}
if ( width < 0 ) {
width = 1;
}
}
}
#if GTK_CHECK_VERSION(3,0,0)
static void eek_preview_get_preferred_width(GtkWidget *widget, gint *minimal_width, gint *natural_width)
{
}
static void eek_preview_get_preferred_height(GtkWidget *widget, gint *minimal_height, gint *natural_height)
{
}
#endif
enum {
};
#if !GTK_CHECK_VERSION(3,0,0)
{
if (gtk_widget_is_drawable(widget)) {
}
return result;
}
#endif
static
{
#if !GTK_CHECK_VERSION(3,0,0)
};
#endif
insetTop = 1;
insetLeft = 1;
}
insetLeft = 1;
}
}
#if GTK_CHECK_VERSION(3,0,0)
cr,
0, 0,
cr,
0, 0,
#else
NULL,
NULL,
0, 0,
#endif
// Border
cairo_fill(cr);
}
cairo_rectangle(cr, insetLeft, insetTop, allocation.width - (insetLeft + insetRight), allocation.height - (insetTop + insetBottom));
cairo_fill(cr);
if (priv->previewPixbuf )
{
{
}
w - (insetLeft + insetRight),
h - (insetTop + insetBottom),
}
// Border
cairo_fill(cr);
}
}
{
/* Draw arrow */
};
possible.y,
/* Make it square */
/* Center it horizontally */
}
{
#if GTK_CHECK_VERSION(3,0,0)
cr,
G_PI, // Down-pointing arrow
);
#else
NULL, /* clip area. &area, */
widget, /* may be NULL */
NULL, /* detail */
);
#endif
}
{
}
#if GTK_CHECK_VERSION(3,0,0)
cr,
G_PI, // Down-pointing arrow
);
#else
NULL, /* clip area. &area, */
widget, /* may be NULL */
NULL, /* detail */
);
#endif
}
{
}
#if GTK_CHECK_VERSION(3,0,0)
cr,
);
#else
NULL, /* clip area. &area, */
widget, /* may be NULL */
NULL, /* detail */
);
#endif
}
{
area.y,
}
#if GTK_CHECK_VERSION(3,0,0)
cr,
#else
NULL,
NULL,
#endif
}
{
area.y,
}
#if GTK_CHECK_VERSION(3,0,0)
// This should be a diamond too?
cr,
#else
NULL,
NULL,
#endif
}
}
if ( gtk_widget_has_focus(widget) ) {
#if GTK_CHECK_VERSION(3,0,0)
cr,
0 + 1, 0 + 1,
#else
NULL, /* GdkRectangle *area, */
NULL,
0 + 1, 0 + 1,
#endif
}
return FALSE;
}
{
#if GTK_CHECK_VERSION(3,0,0)
gtk_widget_set_state_flags( widget, priv->hot ? GTK_STATE_FLAG_ACTIVE : GTK_STATE_FLAG_PRELIGHT, false );
#else
#endif
}
return FALSE;
}
{
#if GTK_CHECK_VERSION(3,0,0)
#else
#endif
}
return FALSE;
}
{
{
{
}
{
{
#if GTK_CHECK_VERSION(3,0,0)
#else
#endif
}
}
}
return FALSE;
}
{
#if GTK_CHECK_VERSION(3,0,0)
#else
#endif
{
if ( isAlt )
{
}
else
{
}
}
}
return FALSE;
}
{
switch (prop_id)
{
case PROP_FOCUS:
break;
default:
break;
}
}
static void
{
switch (prop_id)
{
case PROP_FOCUS:
break;
default:
break;
}
}
{
return blip;
}
{
#if GTK_CHECK_VERSION(3,0,0)
#else
#endif
/* For keybindings: */
g_signal_new( "clicked",
g_signal_new( "alt-clicked",
1, G_TYPE_INT );
"focus-on-click",
NULL,
"flag to grab focus when clicked",
TRUE,
)
);
}
void
{
{
}
}
{
}
{
}
void
{
{
}
}
void
{
if ( size > PREVIEW_SIZE_LAST )
{
}
if ( ratio > PREVIEW_MAX_RATIO )
{
}
}
static void
{
priv->r = 0x80;
priv->g = 0x80;
priv->b = 0xcc;
priv->previewPixbuf = 0;
}
{
}
/*
Local Variables:
mode:c++
c-file-style:"stroustrup"
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
indent-tabs-mode:nil
fill-column:99
End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :