[prev in list] [next in list] [prev in thread] [next in thread] 

List:       php-gtk-cvs
Subject:    [php-gtk-cvs] cvs: php-gtk /ext/html Makefile.frag README config.m4 config.w32 html-types.defs html.
From:       "Anant Narayanan" <anant () php ! net>
Date:       2007-03-04 16:14:08
Message-ID: cvsanant1173024848 () cvsserver
[Download RAW message or body]

anant		Sun Mar  4 16:14:08 2007 UTC

  Added files:                 
    /php-gtk/ext/html	Makefile.frag README config.m4 config.w32 
                     	html-types.defs html.defs html.overrides 
                     	php_html.c php_html.h 
    /php-gtk/ext/html/demos	gtkhtml.php 
  Log:
  Checkin GtkHTML3 extension
  
  
["anant-20070304161408.txt" (text/plain)]

http://cvs.php.net/viewvc.cgi/php-gtk/ext/html/Makefile.frag?view=markup&rev=1.1
Index: php-gtk/ext/html/Makefile.frag
+++ php-gtk/ext/html/Makefile.frag

$(builddir)/gen_html.c: $(srcdir)/html.defs $(srcdir)/html.overrides
	( \
     $(PHP) $(top_srcdir)/generator/generator.php \
	 	-l $(@D)/$(*F).log \
        -r ext/gtk+/atk-types.defs   \
        -r ext/gtk+/pango-types.defs \
        -r ext/gtk+/gdk-types.defs   \
        -r ext/gtk+/gtk-types.defs   \
		-r ext/html/html-types.defs \
		-o ext/html/html.overrides \
        -p GtkHTML \
		-f $@ ext/html/html.defs \
     && grep -h "^PHP_GTK_EXPORT_CE" $@ | sed -e "s!^!extern !" > $(@D)/$(*F).h \
	)

http://cvs.php.net/viewvc.cgi/php-gtk/ext/html/config.m4?view=markup&rev=1.1
Index: php-gtk/ext/html/config.m4
+++ php-gtk/ext/html/config.m4
dnl $Id: config.m4,v 1.1 2007/03/04 16:14:08 anant Exp $
dnl config.m4 for html module

define(html_required_version,   3.10.0)

PHP_GTK_ARG_ENABLE(html,for html support,
[  --enable-html     Enable GtkHtml support],no)

if test "$PHP_GTK_HTML" != "no"; then
  PKG_CHECK_MODULES(HTML, [libgtkhtml-3.8 >= html_required_version],
  have_html=yes, have_html=no)
  if test "$have_html" != "yes"; then
    AC_MSG_RESULT([Unable to locate libgtkhtml version html_required_version or \
higher: not building])  else
    AC_DEFINE(HAVE_HTML, 1, [html support])
    PHP_EVAL_INCLINE($HTML_CFLAGS)
    if test "$php_gtk_ext_shared" = "yes"; then
      PHP_EVAL_LIBLINE($HTML_LIBS, HTML_SHARED_LIBADD)
      PHP_SUBST(HTML_SHARED_LIBADD)
    else
      PHP_EVAL_LIBLINE($HTML_LIBS, PHP_GTK2_SHARED_LIBADD)
    fi
    PHP_GTK_EXTENSION(html, $php_gtk_ext_shared, php_html.c, gen_html.c)
  fi
fi

http://cvs.php.net/viewvc.cgi/php-gtk/ext/html/config.w32?view=markup&rev=1.1
Index: php-gtk/ext/html/config.w32
+++ php-gtk/ext/html/config.w32

ARG_WITH("html", "gtkhtml3 support", "no");

if (PHP_GTK_HTML != "no" || PHP_GTK_ALL != "no") {
	if (CHECK_HEADER("gtkhtml\\gtkhtml.h") && CHECK_LIB("gtkhtml-3.0.lib", "html"))
	{
		if (FSO.FileExists("win32\\temp.bat")) {

			var temp = FSO.OpenTextFile("win32\\temp.bat", 8);
			temp.WriteLine("php -q generator\\generator.php -l win32\\logs\\config_html.log -o \
ext\\html\\html.overrides -p gtkhtml -r ext\\gtk+\\gtk.defs ext\\html\\html.defs > \
                ext\\html\\gen_html.c");
                  temp.WriteLine('grep -h "^PHP_GTK_EXPORT_CE" ext\\html\\gen_html.c \
| sed -e "s/^/PHP_GTK_API extern /" > ext\\html\\gen_html.h');		  temp.Close();
		}

		ADD_FLAG("CFLAGS_HTML", "/I ext\\html /I ..\\ext\\html /D HAVE_HTML=1");
		EXTENSION("html", "php_html.c gen_html.c", true); // always shared
		AC_DEFINE("HAVE_HTML", 1, "gtkhtml3 enabled");

	} else {

		WARNING("gtkhtml3 not enabled; libraries and headers not found");
	}
}

http://cvs.php.net/viewvc.cgi/php-gtk/ext/html/html-types.defs?view=markup&rev=1.1
Index: php-gtk/ext/html/html-types.defs
+++ php-gtk/ext/html/html-types.defs
; define enums and flags ...

(define-enum HTMLButtonType
  (c-name "HTMLButtonType")
  (values
    '("normal" "BUTTON_NORMAL")
    '("submit" "BUTTON_SUBMIT")
    '("reset" "BUTTON_RESET")
  )
)

(define-flags HTMLChangeFlags
  (c-name "HTMLChangeFlags")
  (values
    '("none" "HTML_CHANGE_NONE")
    '("min-width" "HTML_CHANGE_MIN_WIDTH")
    '("pref-width" "HTML_CHANGE_PREF_WIDTH")
    '("size" "HTML_CHANGE_SIZE")
    '("recalc-pi" "HTML_CHANGE_RECALC_PI")
    '("all-calc" "HTML_CHANGE_ALL_CALC")
    '("all" "HTML_CHANGE_ALL")
  )
)

(define-enum HTMLClearType
  (c-name "HTMLClearType")
  (values
    '("none" "HTML_CLEAR_NONE")
    '("left" "HTML_CLEAR_LEFT")
    '("right" "HTML_CLEAR_RIGHT")
    '("all" "HTML_CLEAR_ALL")
    '("inherit" "HTML_CLEAR_INHERIT")
  )
)

(define-enum HTMLClueFlowStyle
  (c-name "HTMLClueFlowStyle")
  (values
    '("style-normal" "HTML_CLUEFLOW_STYLE_NORMAL")
    '("style-h1" "HTML_CLUEFLOW_STYLE_H1")
    '("style-h2" "HTML_CLUEFLOW_STYLE_H2")
    '("style-h3" "HTML_CLUEFLOW_STYLE_H3")
    '("style-h4" "HTML_CLUEFLOW_STYLE_H4")
    '("style-h5" "HTML_CLUEFLOW_STYLE_H5")
    '("style-h6" "HTML_CLUEFLOW_STYLE_H6")
    '("style-address" "HTML_CLUEFLOW_STYLE_ADDRESS")
    '("style-pre" "HTML_CLUEFLOW_STYLE_PRE")
    '("style-list-item" "HTML_CLUEFLOW_STYLE_LIST_ITEM")
    '("numstyles" "HTML_CLUEFLOW_NUMSTYLES")
  )
)

(define-enum HTMLColorId
  (c-name "HTMLColorId")
  (values
    '("bgcolor" "HTMLBgColor")
    '("textcolor" "HTMLTextColor")
    '("linkcolor" "HTMLLinkColor")
    '("vlinkcolor" "HTMLVLinkColor")
    '("alinkcolor" "HTMLALinkColor")
    '("highlightcolor" "HTMLHighlightColor")
    '("highlighttextcolor" "HTMLHighlightTextColor")
    '("highlightnfcolor" "HTMLHighlightNFColor")
    '("highlighttextnfcolor" "HTMLHighlightTextNFColor")
    '("spellerrorcolor" "HTMLSpellErrorColor")
    '("citecolor" "HTMLCiteColor")
    '("colors" "HTMLColors")
  )
)

(define-enum HTMLDirection
  (c-name "HTMLDirection")
  (values
    '("derived" "HTML_DIRECTION_DERIVED")
    '("ltr" "HTML_DIRECTION_LTR")
    '("rtl" "HTML_DIRECTION_RTL")
  )
)

(define-enum HTMLEngineCursorMovement
  (c-name "HTMLEngineCursorMovement")
  (values
    '("up" "HTML_ENGINE_CURSOR_UP")
    '("down" "HTML_ENGINE_CURSOR_DOWN")
    '("right" "HTML_ENGINE_CURSOR_RIGHT")
    '("left" "HTML_ENGINE_CURSOR_LEFT")
    '("home" "HTML_ENGINE_CURSOR_HOME")
    '("end" "HTML_ENGINE_CURSOR_END")
    '("pgup" "HTML_ENGINE_CURSOR_PGUP")
    '("pgdown" "HTML_ENGINE_CURSOR_PGDOWN")
  )
)

(define-flags HTMLEngineSetClueFlowStyleMask
  (c-name "HTMLEngineSetClueFlowStyleMask")
  (values
    '("none" "HTML_ENGINE_SET_CLUEFLOW_NONE")
    '("style" "HTML_ENGINE_SET_CLUEFLOW_STYLE")
    '("alignment" "HTML_ENGINE_SET_CLUEFLOW_ALIGNMENT")
    '("indentation" "HTML_ENGINE_SET_CLUEFLOW_INDENTATION")
    '("indentation-delta" "HTML_ENGINE_SET_CLUEFLOW_INDENTATION_DELTA")
    '("indentation-all" "HTML_ENGINE_SET_CLUEFLOW_INDENTATION_ALL")
  )
)

(define-enum HTMLFitType
  (c-name "HTMLFitType")
  (values
    '("none" "HTML_FIT_NONE")
    '("partial" "HTML_FIT_PARTIAL")
    '("complete" "HTML_FIT_COMPLETE")
  )
)

(define-enum HTMLGlossaryEntry
  (c-name "HTMLGlossaryEntry")
  (values
    '("l" "HTML_GLOSSARY_DL")
    '("d" "HTML_GLOSSARY_DD")
  )
)

(define-enum HTMLHAlignType
  (c-name "HTMLHAlignType")
  (values
    '("left" "HTML_HALIGN_LEFT")
    '("center" "HTML_HALIGN_CENTER")
    '("right" "HTML_HALIGN_RIGHT")
    '("none" "HTML_HALIGN_NONE")
  )
)

(define-enum HTMLListType
  (c-name "HTMLListType")
  (values
    '("unordered" "HTML_LIST_TYPE_UNORDERED")
    '("ordered-arabic" "HTML_LIST_TYPE_ORDERED_ARABIC")
    '("ordered-lower-alpha" "HTML_LIST_TYPE_ORDERED_LOWER_ALPHA")
    '("ordered-upper-alpha" "HTML_LIST_TYPE_ORDERED_UPPER_ALPHA")
    '("ordered-lower-roman" "HTML_LIST_TYPE_ORDERED_LOWER_ROMAN")
    '("ordered-upper-roman" "HTML_LIST_TYPE_ORDERED_UPPER_ROMAN")
    '("menu" "HTML_LIST_TYPE_MENU")
    '("dir" "HTML_LIST_TYPE_DIR")
    '("blockquote" "HTML_LIST_TYPE_BLOCKQUOTE")
    '("blockquote-cite" "HTML_LIST_TYPE_BLOCKQUOTE_CITE")
    '("glossary-dl" "HTML_LIST_TYPE_GLOSSARY_DL")
    '("glossary-dd" "HTML_LIST_TYPE_GLOSSARY_DD")
  )
)

(define-flags HTMLObjectFlags
  (c-name "HTMLObjectFlags")
  (values
    '("none" "HTML_OBJECT_FLAG_NONE")
    '("separator" "HTML_OBJECT_FLAG_SEPARATOR")
    '("selected" "HTML_OBJECT_FLAG_SELECTED")
    '("allselected" "HTML_OBJECT_FLAG_ALLSELECTED")
    '("fixedwidth" "HTML_OBJECT_FLAG_FIXEDWIDTH")
    '("aligned" "HTML_OBJECT_FLAG_ALIGNED")
    '("printed" "HTML_OBJECT_FLAG_PRINTED")
    '("hidden" "HTML_OBJECT_FLAG_HIDDEN")
  )
)

(define-enum HTMLReplaceQueryAnswer
  (c-name "HTMLReplaceQueryAnswer")
  (values
    '("replace" "RQA_Replace")
    '("replaceall" "RQA_ReplaceAll")
    '("next" "RQA_Next")
    '("cancel" "RQA_Cancel")
  ) 
)

(define-enum HTMLType
  (c-name "HTMLType")
  (values
    '("type-none" "HTML_TYPE_NONE")
    '("type-anchor" "HTML_TYPE_ANCHOR")
    '("type-bullet" "HTML_TYPE_BULLET")
    '("type-button" "HTML_TYPE_BUTTON")
    '("type-checkbox" "HTML_TYPE_CHECKBOX")
    '("type-clue" "HTML_TYPE_CLUE")
    '("type-cluealigned" "HTML_TYPE_CLUEALIGNED")
    '("type-clueflow" "HTML_TYPE_CLUEFLOW")
    '("type-clueh" "HTML_TYPE_CLUEH")
    '("type-cluev" "HTML_TYPE_CLUEV")
    '("type-embedded" "HTML_TYPE_EMBEDDED")
    '("type-hidden" "HTML_TYPE_HIDDEN")
    '("type-hspace" "HTML_TYPE_HSPACE")
    '("type-image" "HTML_TYPE_IMAGE")
    '("type-imageinput" "HTML_TYPE_IMAGEINPUT")
    '("type-linktext" "HTML_TYPE_LINKTEXT")
    '("type-object" "HTML_TYPE_OBJECT")
    '("type-radio" "HTML_TYPE_RADIO")
    '("type-rule" "HTML_TYPE_RULE")
    '("type-select" "HTML_TYPE_SELECT")
    '("type-table" "HTML_TYPE_TABLE")
    '("type-tablecell" "HTML_TYPE_TABLECELL")
    '("type-text" "HTML_TYPE_TEXT")
    '("type-textarea" "HTML_TYPE_TEXTAREA")
    '("type-textinput" "HTML_TYPE_TEXTINPUT")
    '("type-textslave" "HTML_TYPE_TEXTSLAVE")
    '("type-iframe" "HTML_TYPE_IFRAME")
    '("type-frame" "HTML_TYPE_FRAME")
    '("type-frameset" "HTML_TYPE_FRAMESET")
    '("num-types" "HTML_NUM_TYPES")
  )
)

(define-enum HTMLUndoDirection
  (c-name "HTMLUndoDirection")
  (values
    '("undo" "HTML_UNDO_UNDO")
    '("redo" "HTML_UNDO_REDO")
    '("end" "HTML_UNDO_END")
  )
)

(define-flags HTMLURLDupFlags
  (c-name "HTMLURLDupFlags")
  (values
    '("all" "HTML_URL_DUP_ALL")
    '("noprotocol" "HTML_URL_DUP_NOPROTOCOL")
    '("nousername" "HTML_URL_DUP_NOUSERNAME")
    '("nopassword" "HTML_URL_DUP_NOPASSWORD")
    '("nohostname" "HTML_URL_DUP_NOHOSTNAME")
    '("noport" "HTML_URL_DUP_NOPORT")
    '("nopath" "HTML_URL_DUP_NOPATH")
    '("noreference" "HTML_URL_DUP_NOREFERENCE")
    '("nocgiargs" "HTML_URL_DUP_NOCGIARGS")
  )
)

(define-enum HTMLVAlignType
  (c-name "HTMLVAlignType")
  (values
    '("top" "HTML_VALIGN_TOP")
    '("middle" "HTML_VALIGN_MIDDLE")
    '("bottom" "HTML_VALIGN_BOTTOM")
    '("none" "HTML_VALIGN_NONE")
  )
)

(define-enum HTMLDisplayType
  (c-name "HTMLDisplayType")
  (values
    '("none" "DISPLAY_NONE")
    '("inline" "DISPLAY_INLINE")
    '("list-item" "DISPLAY_LIST_ITEM")
    '("inline-block" "DISPLAY_INLINE_BLOCK")
    '("block" "DISPLAY_BLOCK")
    '("marker" "DISPLAY_MARKER")
    '("run-in" "DISPLAY_RUN_IN")
    '("compact" "DISPLAY_COMPACT")
    '("table-row-group" "DISPLAY_TABLE_ROW_GROUP")
    '("table-column" "DISPLAY_TABLE_COLUMN")
    '("table-column-group" "DISPLAY_TABLE_COLUMN_GROUP")
    '("table-header-group" "DISPLAY_TABLE_HEADER_GROUP")
    '("table-footer-group" "DISPLAY_TABLE_FOOTER_GROUP")
    '("table-row" "DISPLAY_TABLE_ROW")
    '("table-cell" "DISPLAY_TABLE_CELL")
    '("table-caption" "DISPLAY_TABLE_CAPTION")
    '("inline-table" "DISPLAY_INLINE_TABLE")
    '("table" "DISPLAY_TABLE")
    '("document" "DISPLAY_DOCUMENT")
  )
)

(define-enum HTMLWhiteSpaceType
  (c-name "HTMLWhiteSpaceType")
  (values
    '("normal" "HTML_WHITE_SPACE_NORMAL")
    '("pre" "HTML_WHITE_SPACE_PRE")
    '("nowrap" "HTML_WHITE_SPACE_NOWRAP")
    '("pre-wrap" "HTML_WHITE_SPACE_PRE_WRAP")
    '("pre-line" "HTML_WHITE_SPACE_PRE_LINE")
    '("inherit" "HTML_WHITE_SPACE_INHERIT")
  )
)

(define-enum HTMLLengthType
  (c-name "HTMLLengthType")
  (values
    '("pixels" "HTML_LENGTH_TYPE_PIXELS")
    '("percent" "HTML_LENGTH_TYPE_PERCENT")
    '("fraction" "HTML_LENGTH_TYPE_FRACTION")
  )
)

(define-enum HTMLBorderStyle
  (c-name "HTMLBorderStyle")
  (values
    '("none" "HTML_BORDER_NONE")
    '("solid" "HTML_BORDER_SOLID")
    '("inset" "HTML_BORDER_INSET")
    '("outset" "HTML_BORDER_OUTSET")
  )
)

(define-enum HTMLTextSlaveGlyphItemType
  (c-name "HTMLTextSlaveGlyphItemType")
  (values
    '("created" "HTML_TEXT_SLAVE_GLYPH_ITEM_CREATED")
    '("parental" "HTML_TEXT_SLAVE_GLYPH_ITEM_PARENTAL")
  )
)

http://cvs.php.net/viewvc.cgi/php-gtk/ext/html/html.defs?view=markup&rev=1.1
Index: php-gtk/ext/html/html.defs
+++ php-gtk/ext/html/html.defs
;; -*- scheme -*-

; object definitions ...

(define-object HTML
  (in-module "Gtk")
  (parent "GtkLayout")
  (c-name "GtkHTML")
  (gtype-id "GTK_TYPE_HTML")
)

(define-object HTMLEmbedded
  (in-module "Gtk")
  (parent "GtkBin")
  (c-name "GtkHTMLEmbedded")
  (gtype-id "GTK_TYPE_HTML_EMBEDDED")
)

;; From /opt/local/include/libgtkhtml-3.8/gtkhtml/gtkhtml.h

(define-function gtk_html_get_type
  (c-name "gtk_html_get_type")
  (return-type "GtkType")
)

(define-function gtk_html_new
  (c-name "gtk_html_new")
  (is-constructor-of GtkHTML)
  (return-type "GtkWidget*")
)

(define-method set_editor_api
  (of-object "GtkHTML")
  (c-name "gtk_html_set_editor_api")
  (return-type "none")
  (parameters
    '("GtkHTMLEditorAPI*" "api")
    '("gpointer" "data")
  )
)

(define-method set_iframe_parent
  (of-object "GtkHTML")
  (c-name "gtk_html_set_iframe_parent")
  (return-type "gint")
  (parameters
    '("GtkWidget*" "parent")
    '("HTMLObject*" "frame")
  )
)

(define-method get_top_html
  (of-object "GtkHTML")
  (c-name "gtk_html_get_top_html")
  (return-type "GtkHTML*")
)

(define-method enable_debug
  (of-object "GtkHTML")
  (c-name "gtk_html_enable_debug")
  (return-type "none")
  (parameters
    '("gboolean" "debug")
  )
)

(define-method allow_selection
  (of-object "GtkHTML")
  (c-name "gtk_html_allow_selection")
  (return-type "none")
  (parameters
    '("gboolean" "allow")
  )
)

(define-method select_word
  (of-object "GtkHTML")
  (c-name "gtk_html_select_word")
  (return-type "none")
)

(define-method select_line
  (of-object "GtkHTML")
  (c-name "gtk_html_select_line")
  (return-type "none")
)

(define-method select_paragraph
  (of-object "GtkHTML")
  (c-name "gtk_html_select_paragraph")
  (return-type "none")
)

(define-method select_paragraph_extended
  (of-object "GtkHTML")
  (c-name "gtk_html_select_paragraph_extended")
  (return-type "none")
)

(define-method select_all
  (of-object "GtkHTML")
  (c-name "gtk_html_select_all")
  (return-type "none")
)

(define-method request_paste
  (of-object "GtkHTML")
  (c-name "gtk_html_request_paste")
  (return-type "int")
  (parameters
    '("GdkAtom" "selection")
    '("gint" "type")
    '("gint32" "time")
    '("gboolean" "as_cite")
  )
)

(define-method begin
  (of-object "GtkHTML")
  (c-name "gtk_html_begin")
  (return-type "GtkHTMLStream*")
)

(define-method begin_full
  (of-object "GtkHTML")
  (c-name "gtk_html_begin_full")
  (return-type "GtkHTMLStream*")
  (parameters
    '("char*" "target_frame")
    '("char*" "content_type")
    '("GtkHTMLBeginFlags" "flags")
  )
)

(define-method write
  (of-object "GtkHTML")
  (c-name "gtk_html_write")
  (return-type "none")
  (parameters
    '("GtkHTMLStream*" "handle")
    '("const-gchar*" "buffer")
    '("size_t" "size")
  )
)

(define-method end
  (of-object "GtkHTML")
  (c-name "gtk_html_end")
  (return-type "none")
  (parameters
    '("GtkHTMLStream*" "handle")
    '("GtkHTMLStreamStatus" "status")
  )
)

(define-method flush
  (of-object "GtkHTML")
  (c-name "gtk_html_flush")
  (return-type "none")
)

(define-method stop
  (of-object "GtkHTML")
  (c-name "gtk_html_stop")
  (return-type "none")
)

(define-method load_from_string
  (of-object "GtkHTML")
  (c-name "gtk_html_load_from_string")
  (return-type "none")
  (parameters
    '("const-gchar*" "str")
    '("gint" "len")
  )
)

(define-method export
  (of-object "GtkHTML")
  (c-name "gtk_html_export")
  (return-type "gboolean")
  (parameters
    '("const-char*" "type")
    '("GtkHTMLSaveReceiverFn" "receiver")
    '("gpointer" "data")
  )
)

(define-method get_selection_html
  (of-object "GtkHTML")
  (c-name "gtk_html_get_selection_html")
  (return-type "char*")
  (parameters
    '("int*" "len")
  )
)

(define-method set_editable
  (of-object "GtkHTML")
  (c-name "gtk_html_set_editable")
  (return-type "none")
  (parameters
    '("gboolean" "editable")
  )
)

(define-method get_editable
  (of-object "GtkHTML")
  (c-name "gtk_html_get_editable")
  (return-type "gboolean")
)

(define-method set_inline_spelling
  (of-object "GtkHTML")
  (c-name "gtk_html_set_inline_spelling")
  (return-type "none")
  (parameters
    '("gboolean" "inline_spell")
  )
)

(define-method get_inline_spelling
  (of-object "GtkHTML")
  (c-name "gtk_html_get_inline_spelling")
  (return-type "gboolean")
)

(define-method set_magic_links
  (of-object "GtkHTML")
  (c-name "gtk_html_set_magic_links")
  (return-type "none")
  (parameters
    '("gboolean" "magic_links")
  )
)

(define-method get_magic_links
  (of-object "GtkHTML")
  (c-name "gtk_html_get_magic_links")
  (return-type "gboolean")
)

(define-method set_magic_smileys
  (of-object "GtkHTML")
  (c-name "gtk_html_set_magic_smileys")
  (return-type "none")
  (parameters
    '("gboolean" "magic_smileys")
  )
)

(define-method get_magic_smileys
  (of-object "GtkHTML")
  (c-name "gtk_html_get_magic_smileys")
  (return-type "gboolean")
)

(define-method set_caret_mode
  (of-object "GtkHTML")
  (c-name "gtk_html_set_caret_mode")
  (return-type "none")
  (parameters
    '("gboolean" "caret_mode")
  )
)

(define-method get_caret_mode
  (of-object "GtkHTML")
  (c-name "gtk_html_get_caret_mode")
  (return-type "gboolean")
)

(define-method set_animate
  (of-object "GtkHTML")
  (c-name "gtk_html_set_animate")
  (return-type "none")
  (parameters
    '("gboolean" "animate")
  )
)

(define-method get_animate
  (of-object "GtkHTML")
  (c-name "gtk_html_get_animate")
  (return-type "gboolean")
)

; No GnomePrint available yet

;(define-method print_with_header_footer
;  (of-object "GtkHTML")
;  (c-name "gtk_html_print_with_header_footer")
;  (return-type "none")
;  (parameter (type-and-name GnomePrintContext* print_context))
;  (parameter (type-and-name gdouble header_height))
;  (parameter (type-and-name gdouble footer_height))
;  (parameter (type-and-name GtkHTMLPrintCallback header_print))
;  (parameter (type-and-name GtkHTMLPrintCallback footer_print))
;  (parameter (type-and-name gpointer user_data))
;)

;(define-method print
;  (of-object "GtkHTML")
;  (c-name "gtk_html_print")
;  (return-type "none")
;  (parameter (type-and-name GnomePrintContext* print_context))
;)

;(define-method print_get_pages_num
;  (of-object "GtkHTML")
;  (c-name "gtk_html_print_get_pages_num")
;  (return-type "gint")
;  (parameter (type-and-name GnomePrintContext* print_context))
;  (parameter (type-and-name gdouble header_height))
;  (parameter (type-and-name gdouble footer_height))
;)

;(define-method print_set_master
;  (of-object "GtkHTML")
;  (c-name "gtk_html_print_set_master")
;  (return-type "none")
;  (parameter (type-and-name GnomePrintJob* print_master))
;)

(define-method set_title
  (of-object "GtkHTML")
  (c-name "gtk_html_set_title")
  (return-type "none")
  (parameters
    '("const-char*" "title")
  )
)

(define-method jump_to_anchor
  (of-object "GtkHTML")
  (c-name "gtk_html_jump_to_anchor")
  (return-type "gboolean")
  (parameters
    '("const-gchar*" "anchor")
  )
)

(define-method get_paragraph_style
  (of-object "GtkHTML")
  (c-name "gtk_html_get_paragraph_style")
  (return-type "GtkHTMLParagraphStyle")
)

(define-method set_paragraph_style
  (of-object "GtkHTML")
  (c-name "gtk_html_set_paragraph_style")
  (return-type "none")
  (parameters
    '("GtkHTMLParagraphStyle" "style")
  )
)

(define-method set_indent
  (of-object "GtkHTML")
  (c-name "gtk_html_set_indent")
  (return-type "none")
  (parameters
    '("GByteArray*" "levels")
  )
)

(define-method indent_push_level
  (of-object "GtkHTML")
  (c-name "gtk_html_indent_push_level")
  (return-type "none")
  (parameters
    '("HTMLListType" "level_type")
  )
)

(define-method indent_pop_level
  (of-object "GtkHTML")
  (c-name "gtk_html_indent_pop_level")
  (return-type "none")
)

(define-method get_paragraph_indentation
  (of-object "GtkHTML")
  (c-name "gtk_html_get_paragraph_indentation")
  (return-type "guint")
)

(define-method set_font_style
  (of-object "GtkHTML")
  (c-name "gtk_html_set_font_style")
  (return-type "none")
  (parameters
    '("GtkHTMLFontStyle" "and_mask")
    '("GtkHTMLFontStyle" "or_mask")
  )
)

(define-method set_color
  (of-object "GtkHTML")
  (c-name "gtk_html_set_color")
  (return-type "none")
  (parameters
    '("HTMLColor*" "color")
  )
)

(define-method toggle_font_style
  (of-object "GtkHTML")
  (c-name "gtk_html_toggle_font_style")
  (return-type "none")
  (parameters
    '("GtkHTMLFontStyle" "style")
  )
)

(define-method get_paragraph_alignment
  (of-object "GtkHTML")
  (c-name "gtk_html_get_paragraph_alignment")
  (return-type "GtkHTMLParagraphAlignment")
)

(define-method set_paragraph_alignment
  (of-object "GtkHTML")
  (c-name "gtk_html_set_paragraph_alignment")
  (return-type "none")
  (parameters
    '("GtkHTMLParagraphAlignment" "alignment")
  )
)

(define-method cut
  (of-object "GtkHTML")
  (c-name "gtk_html_cut")
  (return-type "none")
)

(define-method copy
  (of-object "GtkHTML")
  (c-name "gtk_html_copy")
  (return-type "none")
)

(define-method paste
  (of-object "GtkHTML")
  (c-name "gtk_html_paste")
  (return-type "none")
  (parameters 
    '("gboolean" "as_cite")
  )
)

(define-method undo
  (of-object "GtkHTML")
  (c-name "gtk_html_undo")
  (return-type "none")
)

(define-method redo
  (of-object "GtkHTML")
  (c-name "gtk_html_redo")
  (return-type "none")
)

(define-method insert_html
  (of-object "GtkHTML")
  (c-name "gtk_html_insert_html")
  (return-type "none")
  (parameters
    '("const-gchar*" "html_src")
  )
)

(define-method insert_gtk_html
  (of-object "GtkHTML")
  (c-name "gtk_html_insert_gtk_html")
  (return-type "none")
  (parameters
    '("GtkHTML*" "to_be_destroyed")
  )
)

(define-method append_html
  (of-object "GtkHTML")
  (c-name "gtk_html_append_html")
  (return-type "none")
  (parameters
    '("const-gchar*" "html_src")
  )
)

(define-method get_object_by_id
  (of-object "GtkHTML")
  (c-name "gtk_html_get_object_by_id")
  (return-type "gpointer")
  (parameters
    '("const-gchar*" "id")
  )
)

(define-method command
  (of-object "GtkHTML")
  (c-name "gtk_html_command")
  (return-type "gboolean")
  (parameters
    '("const-gchar*" "command_name")
  )
)

(define-method edit_make_cursor_visible
  (of-object "GtkHTML")
  (c-name "gtk_html_edit_make_cursor_visible")
  (return-type "gboolean")
)

(define-method set_magnification
  (of-object "GtkHTML")
  (c-name "gtk_html_set_magnification")
  (return-type "none")
  (parameters
    '("gdouble" "magnification")
  )
)

(define-method zoom_in
  (of-object "GtkHTML")
  (c-name "gtk_html_zoom_in")
  (return-type "none")
)

(define-method zoom_out
  (of-object "GtkHTML")
  (c-name "gtk_html_zoom_out")
  (return-type "none")
)

(define-method zoom_reset
  (of-object "GtkHTML")
  (c-name "gtk_html_zoom_reset")
  (return-type "none")
)

(define-method update_styles
  (of-object "GtkHTML")
  (c-name "gtk_html_update_styles")
  (return-type "none")
)

(define-method set_allow_frameset
  (of-object "GtkHTML")
  (c-name "gtk_html_set_allow_frameset")
  (return-type "none")
  (parameters
    '("gboolean" "allow")
  )
)

(define-method get_allow_frameset
  (of-object "GtkHTML")
  (c-name "gtk_html_get_allow_frameset")
  (return-type "gboolean")
)

(define-method set_base
  (of-object "GtkHTML")
  (c-name "gtk_html_set_base")
  (return-type "none")
  (parameters
    '("const-char*" "url")
  )
)

(define-method get_url_base_relative
  (of-object "GtkHTML")
  (c-name "gtk_html_get_url_base_relative")
  (return-type "char*")
  (parameters
    '("const-char*" "url")
  )
)

(define-method get_url_object_relative
  (of-object "GtkHTML")
  (c-name "gtk_html_get_url_object_relative")
  (return-type "char*")
  (parameters
    '("HTMLObject*" "o")
    '("const-char*" "url")
  )
)

(define-method images_ref
  (of-object "GtkHTML")
  (c-name "gtk_html_images_ref")
  (return-type "none")
)

(define-method images_unref
  (of-object "GtkHTML")
  (c-name "gtk_html_images_unref")
  (return-type "none")
)

(define-method image_ref
  (of-object "GtkHTML")
  (c-name "gtk_html_image_ref")
  (return-type "none")
  (parameters
    '("const-gchar*" "url")
  )
)

(define-method image_unref
  (of-object "GtkHTML")
  (c-name "gtk_html_image_unref")
  (return-type "none")
  (parameters
    '("const-gchar*" "url")
  )
)

(define-method image_preload
  (of-object "GtkHTML")
  (c-name "gtk_html_image_preload")
  (return-type "none")
  (parameters
    '("const-gchar*" "url")
  )
)

(define-method set_blocking
  (of-object "GtkHTML")
  (c-name "gtk_html_set_blocking")
  (return-type "none")
  (parameters
    '("gboolean" "block")
  )
)

(define-method set_images_blocking
  (of-object "GtkHTML")
  (c-name "gtk_html_set_images_blocking")
  (return-type "none")
  (parameters
    '("gboolean" "block")
  )
)

(define-method has_undo
  (of-object "GtkHTML")
  (c-name "gtk_html_has_undo")
  (return-type "gboolean")
)

(define-method drop_undo
  (of-object "GtkHTML")
  (c-name "gtk_html_drop_undo")
  (return-type "none")
)

(define-method get_url_at
  (of-object "GtkHTML")
  (c-name "gtk_html_get_url_at")
  (return-type "char*")
  (parameters
    '("int" "x")
    '("int" "y")
  )
)

(define-method get_cursor_url
  (of-object "GtkHTML")
  (c-name "gtk_html_get_cursor_url")
  (return-type "char*")
)

(define-method set_tokenizer
  (of-object "GtkHTML")
  (c-name "gtk_html_set_tokenizer")
  (return-type "none")
  (parameters
    '("HTMLTokenizer*" "tokenizer")
  )
)

; No GConf yet

;(define-function gtk_html_build_with_gconf
;  (c-name "gtk_html_build_with_gconf")
;  (return-type "gboolean")
;)

(define-method set_default_content_type
  (of-object "GtkHTML")
  (c-name "gtk_html_set_default_content_type")
  (return-type "none")
  (parameters
    '("gchar*" "content_type")
  )
)

;(define-function gtk_html_new_from_string
;  (c-name "gtk_html_new_from_string")
;  (return-type "GtkWidget*")
;  (parameters
;    '("const-gchar*" "Astr")
;    '("gint" "len")
;  )
;)

(define-method load_empty
  (of-object "GtkHTML")
  (c-name "gtk_html_load_empty")
  (return-type "none")
)

(define-method save
  (of-object "GtkHTML")
  (c-name "gtk_html_save")
  (return-type "gboolean")
  (parameters
    '("GtkHTMLSaveReceiverFn" "receiver")
    '("gpointer" "data")
  )
)

(define-method begin_content
  (of-object "GtkHTML")
  (c-name "gtk_html_begin_content")
  (return-type "GtkHTMLStream*")
  (parameters
    '("gchar*" "content_type")
  )
)

(define-method drag_dest_set
  (of-object "GtkHTML")
  (c-name "gtk_html_drag_dest_set")
  (return-type "none")
)


;; From /opt/local/include/libgtkhtml-3.8/gtkhtml/gtkhtml-properties.h

(define-function gtk_html_class_properties_new
  (c-name "gtk_html_class_properties_new")
  (return-type "GtkHTMLClassProperties*")
  (parameters
    '("GtkWidget*" "widget")
  )
)

(define-method destroy
  (of-object "GtkHTMLClassProperties")
  (c-name "gtk_html_class_properties_destroy")
  (return-type "none")
)

(define-method copy
  (of-object "GtkHTMLClassProperties")
  (c-name "gtk_html_class_properties_copy")
  (return-type "none")
  (parameters
    '("GtkHTMLClassProperties*" "p2")
  )
)

; No GConf available yet

;(define-method load
;  (of-object "GtkHTMLClassProperties")
;  (c-name "gtk_html_class_properties_load")
;  (return-type "none")
;  (parameter (type-and-name GConfClient* client))
;)

;(define-method update
;  (of-object "GtkHTMLClassProperties")
;  (c-name "gtk_html_class_properties_update")
;  (return-type "none")
;  (parameter (type-and-name GConfClient* client))
;  (parameter (type-and-name GtkHTMLClassProperties* old))
;)

(define-function gtk_html_cursor_skip_get_type
  (c-name "gtk_html_cursor_skip_get_type")
  (return-type "GtkType")
)

(define-function gtk_html_command_get_type
  (c-name "gtk_html_command_get_type")
  (return-type "GtkType")
)


;; From /opt/local/include/libgtkhtml-3.8/gtkhtml/gtkhtml-embedded.h

(define-function gtk_html_embedded_get_type
  (c-name "gtk_html_embedded_get_type")
  (return-type "GType")
)

(define-function gtk_html_embedded_new
  (c-name "gtk_html_embedded_new")
  (is-constructor-of GtkHTMLEmbedded)
  (return-type "GtkWidget*")
  (parameters
    '("char*" "classid")
    '("char*" "name")
    '("char*" "type")
    '("char*" "data")
    '("int" "width")
    '("int" "height")
  )
)

(define-method set_parameter
  (of-object "GtkHTMLEmbedded")
  (c-name "gtk_html_embedded_set_parameter")
  (return-type "none")
  (parameters
    '("char*" "param")
    '("char*" "value")
  )
)

(define-method get_parameter
  (of-object "GtkHTMLEmbedded")
  (c-name "gtk_html_embedded_get_parameter")
  (return-type "char*")
  (parameters
    '("char*" "param")
  )
)

(define-method set_descent
  (of-object "GtkHTMLEmbedded")
  (c-name "gtk_html_embedded_set_descent")
  (return-type "none")
  (parameters
    '("int" "descent")
  )
)


;; From /opt/local/include/libgtkhtml-3.8/gtkhtml/gtkhtml-search.h

(define-method engine_search
  (of-object "GtkHTML")
  (c-name "gtk_html_engine_search")
  (return-type "gboolean")
  (parameters
    '("const-gchar*" "text")
    '("gboolean" "case_sensitive")
    '("gboolean" "forward")
    '("gboolean" "regular")
  )
)

(define-method engine_search_set_forward
  (of-object "GtkHTML")
  (c-name "gtk_html_engine_search_set_forward")
  (return-type "none")
  (parameters
    '("gboolean" "forward")
  )
)

(define-method engine_search_next
  (of-object "GtkHTML")
  (c-name "gtk_html_engine_search_next")
  (return-type "gboolean")
)

(define-method engine_search_incremental
  (of-object "GtkHTML")
  (c-name "gtk_html_engine_search_incremental")
  (return-type "gboolean")
  (parameters
    '("const-gchar*" "text")
    '("gboolean" "forward")
  )
)


;; From /opt/local/include/libgtkhtml-3.8/gtkhtml/gtkhtml-stream.h

(define-method stream_new
  (of-object "GtkHTML")
  (c-name "gtk_html_stream_new")
  (return-type "GtkHTMLStream*")
  (parameters
    '("GtkHTMLStreamTypesFunc" "type_func")
    '("GtkHTMLStreamWriteFunc" "write_func")
    '("GtkHTMLStreamCloseFunc" "close_func")
    '("gpointer" "user_data")
  )
)

(define-method write
  (of-object "GtkHTMLStream")
  (c-name "gtk_html_stream_write")
  (return-type "none")
  (parameters
    '("const-gchar*" "buffer")
    '("size_t" "size")
  )
)

(define-method destroy
  (of-object "GtkHTMLStream")
  (c-name "gtk_html_stream_destroy")
  (return-type "none")
)

(define-method close
  (of-object "GtkHTMLStream")
  (c-name "gtk_html_stream_close")
  (return-type "none")
  (parameters
    '("GtkHTMLStreamStatus" "status")
  )
)

(define-method get_types
  (of-object "GtkHTMLStream")
  (c-name "gtk_html_stream_get_types")
  (return-type "char**")
)

(define-method stream_log_new
  (of-object "GtkHTML")
  (c-name "gtk_html_stream_log_new")
  (return-type "GtkHTMLStream*")
  (parameters
    '("GtkHTMLStream*" "stream")
  )
)

(define-method vprintf
  (of-object "GtkHTMLStream")
  (c-name "gtk_html_stream_vprintf")
  (return-type "int")
  (parameters
    '("const-char*" "format")
  )
  (varargs #t)
)

(define-method printf
  (of-object "GtkHTMLStream")
  (c-name "gtk_html_stream_printf")
  (return-type "int")
  (parameters
    '("const-char*" "format")
  )
  (varargs #t)
)




;; From /opt/local/include/libgtkhtml-3.8/gtkhtml/htmldefine-enums.h


;; -*- scheme -*-
; object definitions ...
;; Enumerations and flags ...


;; From /opt/local/include/libgtkhtml-3.8/gtkhtml/htmltokenizer.h

(define-function html_tokenizer_get_type
  (c-name "html_tokenizer_get_type")
  (return-type "GType")
)

(define-function html_tokenizer_new
  (c-name "html_tokenizer_new")
  (return-type "HTMLTokenizer*")
)

(define-method destroy
  (c-name "html_tokenizer_destroy")
  (return-type "none")
)

(define-method begin
  (c-name "html_tokenizer_begin")
  (return-type "none")
  (parameters
    '("gchar*" "content_type")
  )
)

(define-method write
  (c-name "html_tokenizer_write")
  (return-type "none")
  (parameters
    '("const-gchar*" "string")
    '("size_t" "size")
  )
)

(define-method end
  (c-name "html_tokenizer_end")
  (return-type "none")
)

(define-method peek_token
  (c-name "html_tokenizer_peek_token")
  (return-type "gchar*")
)

(define-method next_token
  (c-name "html_tokenizer_next_token")
  (return-type "gchar*")
)

(define-method has_more_tokens
  (c-name "html_tokenizer_has_more_tokens")
  (return-type "gboolean")
)

(define-method clone
  (c-name "html_tokenizer_clone")
  (return-type "HTMLTokenizer*")
)


http://cvs.php.net/viewvc.cgi/php-gtk/ext/html/html.overrides?view=markup&rev=1.1
Index: php-gtk/ext/html/html.overrides
+++ php-gtk/ext/html/html.overrides
/* vim: set ft=cpp: */
%%
headers
#include <gtkhtml/gtkhtml.h>
#include <gtkhtml/gtkhtml-embedded.h>
#include <gtkhtml/gtkhtml-search.h>
#include "ext/gtk+/php_gtk+.h"
#include "php_gtk_api.h"
%%
ignore-glob
  *_get_type

%%
override gtk_html_load_from_string
PHP_METHOD
{
    char *text;

    NOT_STATIC_METHOD();

    if(!php_gtk_parse_args(ZEND_NUM_ARGS(), "s", &text)) {
        return;
    }

    gtk_html_load_from_string(GTK_HTML(PHPG_GOBJECT(this_ptr)), text, strlen(text));
}

http://cvs.php.net/viewvc.cgi/php-gtk/ext/html/php_html.c?view=markup&rev=1.1
Index: php-gtk/ext/html/php_html.c
+++ php-gtk/ext/html/php_html.c
/*
 * PHP-GTK - The PHP language bindings for GTK+
 *
 * Copyright (C) 2001,2002 Andrei Zmievski <andrei@php.net>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 * 
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
 
/* $Id: php_html.c,v 1.1 2007/03/04 16:14:08 anant Exp $ */

#include "php_html.h"

#if HAVE_HTML

#ifdef COMPILE_DL_HTML2
PHP_GTK_GET_EXTENSION(html)
#endif

PHP_GTK_XINIT_FUNCTION(html)
{
	phpg_gtkhtml_register_classes();
    phpg_gtkhtml_register_constants("HTML_");
	
	return SUCCESS;
}

php_gtk_ext_entry html_ext_entry = {
	"html",
	PHP_GTK_XINIT(html),
	NULL,
};

#endif	/* HAVE_HTML */

http://cvs.php.net/viewvc.cgi/php-gtk/ext/html/php_html.h?view=markup&rev=1.1
Index: php-gtk/ext/html/php_html.h
+++ php-gtk/ext/html/php_html.h
/*
 * PHP-GTK - The PHP language bindings for GTK+
 *
 * Copyright (C) 2001,2002 Andrei Zmievski <andrei@php.net>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 * 
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
 
/* $Id: php_html.h,v 1.1 2007/03/04 16:14:08 anant Exp $ */

#ifndef PHP_HTML_H
#define PHP_HTML_H

#include "php_gtk.h"

#if HAVE_HTML

#include <gtkhtml/gtkhtml.h>

extern php_gtk_ext_entry html_ext_entry;
#define php_gtk_ext_html_ptr &html_ext_entry

void phpg_gtkhtml_register_classes(void);
void phpg_gtkhtml_register_constants(const char *strip_prefix);

#else

#define php_gtk_ext_html_ptr NULL

#endif	/* HAVE_HTML */

#endif	/* PHP_HTML_H */

http://cvs.php.net/viewvc.cgi/php-gtk/ext/html/demos/gtkhtml.php?view=markup&rev=1.1
Index: php-gtk/ext/html/demos/gtkhtml.php
+++ php-gtk/ext/html/demos/gtkhtml.php
<?php

$someHtml = '
    <h1>Hello World!</h1>
    <p><font color="red" size="20">This is GtkHTML</font></p>
    <h2>Bye Bye World!</h2>';

$x = new GtkWindow();

$y = new GtkHTML();
$y->set_title("HTML Test!");
$y->load_from_string($someHtml);

$x->add($y);
$x->show_all();
$x->connect_simple('destroy', array('Gtk', 'main_quit'));

Gtk::main();

?>



-- 
PHP-GTK CVS Mailing List (http://gtk.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic